Pass the source image of the conversion down to the output function, so they

are able to output the image properties as comments.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5616 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-03-15 17:02:12 +00:00
parent fbbf7e50d2
commit 7260b3687a
9 changed files with 53 additions and 18 deletions

View File

@@ -67,7 +67,7 @@ typedef struct OutputFormatDesc OutputFormatDesc;
struct OutputFormatDesc {
/* Write routine */
void (*Write) (const StrBuf*, const Collection*);
void (*Write) (const StrBuf*, const Collection*, const Bitmap*);
};
@@ -104,10 +104,12 @@ static const FileId FormatTable[] = {
void WriteOutputFile (const StrBuf* Data, const Collection* A)
void WriteOutputFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
/* Write the contents of Data to a file. 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.
* it by using the extension of the file name. The bitmap passed to the
* function is the bitmap used as source of the conversion. It may be used to
* determine the bitmap properties for documentation purposes.
*/
{
const FileId* F;
@@ -136,7 +138,7 @@ void WriteOutputFile (const StrBuf* Data, const Collection* A)
}
/* Call the format specific write */
OutputFormatTable[F->Id].Write (Data, A);
OutputFormatTable[F->Id].Write (Data, A, B);
}