Move evaluation of attributes into the input routine.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5592 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-03-10 20:26:47 +00:00
parent 44c70d01cb
commit 1a7b115b3c
5 changed files with 51 additions and 79 deletions

View File

@@ -38,42 +38,24 @@
/* common */
#include "coll.h"
/* sp65 */
#include "bitmap.h"
/*****************************************************************************/
/* Data */
/*****************************************************************************/
enum InputFormat {
ifAuto = -1, /* Auto detect */
ifPCX, /* PCX */
ifCount /* Number of actual input formats w/o ifAuto*/
};
typedef enum InputFormat InputFormat;
/*****************************************************************************/
/* Code */
/*****************************************************************************/
int FindInputFormat (const char* Name);
/* Find an input format by name. The function returns a value less than zero
* if Name is not a known input format.
*/
Bitmap* ReadInputFile (const char* Name, InputFormat Format);
/* Read a bitmap from a file and return it. If Format is ifAuto, the routine
* tries to determine the format from the file name extension.
Bitmap* ReadInputFile (const Collection* A);
/* Read a bitmap from a file and return it. Format, file name etc. must be
* given as attributes in A. If no format is given, the function tries to
* autodetect it by using the extension of the file name.
*/