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:
@@ -139,7 +139,7 @@ static const char* GetSegment (const Collection* A)
|
||||
|
||||
|
||||
|
||||
void WriteAsmFile (const StrBuf* Data, const Collection* A)
|
||||
void WriteAsmFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
|
||||
/* Write the contents of Data to the given file in assembler (ca65) format */
|
||||
{
|
||||
FILE* F;
|
||||
@@ -147,6 +147,9 @@ void WriteAsmFile (const StrBuf* Data, const Collection* A)
|
||||
unsigned Size;
|
||||
|
||||
|
||||
/* Get the name of the image */
|
||||
const StrBuf* S = GetBitmapName (B);
|
||||
|
||||
/* Get the file name */
|
||||
const char* Name = NeedAttrVal (A, "name", "write");
|
||||
|
||||
@@ -171,12 +174,16 @@ void WriteAsmFile (const StrBuf* Data, const Collection* A)
|
||||
/* Write a readable header */
|
||||
fprintf (F,
|
||||
";\n"
|
||||
"; This file was generated by %s %s\n"
|
||||
"; This file was generated by %s %s from\n"
|
||||
"; %.*s (%ux%u, %u colors%s)\n"
|
||||
";\n"
|
||||
"\n",
|
||||
ProgName,
|
||||
GetVersionAsString ());
|
||||
|
||||
GetVersionAsString (),
|
||||
SB_GetLen (S), SB_GetConstBuf (S),
|
||||
GetBitmapWidth (B), GetBitmapHeight (B),
|
||||
GetBitmapColors (B),
|
||||
BitmapIsIndexed (B)? ", indexed" : "");
|
||||
|
||||
/* If we have a segment defined, output a segment directive */
|
||||
if (Segment) {
|
||||
|
||||
Reference in New Issue
Block a user