Calculator Community > Calculator C

What's the best sprite editor for TI 68k C/ASM?

<< < (2/2)

Eeems:

--- Quote from: Jonson26 on May 29, 2020, 06:16:39 am ---Well, I don't really see how I would go about importing a BMP file in c. The #include statement is only for code, and in the new file menu in the IDE there's no way to add a BMP. There is the import binary function, but I'm not sure if it can be used for this purpose.

--- End quote ---
With spasm you can #include a bmp file (e.g. images.asm). Have you tried to see if it will just embed the data?

Jonson26:
Why would I use spasm for 68k?  ???
Isn't that made for the z80?

Eeems:

--- Quote from: Jonson26 on June 01, 2020, 07:54:04 am ---Why would I use spasm for 68k?  ???
Isn't that made for the z80?

--- End quote ---
That's not what I meant. Have you tried to see if the 68k assembler you are using will allow you to include bmp files?

Jonson26:
I'm using GCC4TI, which is a C compiler. I've read the included documentation along with some tutorials (there was a nice one on technoplaza.net, back when it was still up) and every single time sprites were declared as arrays of either unsigned chars, unsigned short ints or unsigned long ints. Example smiley face sprite:

--- Code: ---unsigned char sprite[] = {
0b01111110,
0b10000001,
0b10100101,
0b10000001,
0b10100101,
0b10011001,
0b10000001,
0b01111110
};

--- End code ---
Equivalent to:

--- Code: ---unsigned char sprite[] = {0x7E, 0x81, 0xA5, 0x81, 0xA5, 0x99, 0x81, 0x7E};

--- End code ---
As far as the standard assembler for 68k programming, to my knowledge it's always been A68K, which originates from the Amiga (in fact, some of the early Fargo programmers seem to have used only this system) so microsoft BMP's kinda seem out-of-place.

Eeems:
It looks like you can't include bmp files (https://debrouxl.github.io/gcc4ti/faq.html#15). You should open a feature request: https://github.com/debrouxl/gcc4ti/issues

Navigation

[0] Message Index

[*] Previous page

Go to full version