LX.NET Posted December 13, 2012 Share Posted December 13, 2012 You could do it quick and dirty like this: sprpck.exe -t6 -p2 -a000000 fda.bmp ca65 -t lynx -o fda.o fda.s And create a fda.s file that has the following content .global _fda .segment "RODATA" _fda: .incbin "fda.spr" Quote Link to comment Share on other sites More sharing options...
philippe Posted December 14, 2012 Share Posted December 14, 2012 (edited) You could do it quick and dirty like this: sprpck.exe -t6 -p2 -a000000 fda.bmp ca65 -t lynx -o fda.o fda.s And create a fda.s file that has the following content .global _fda .segment "RODATA" _fda: .incbin "fda.spr" Thanks. But there is a new error, if I include the following lines in the source code. : typedef struct { unsigned char b0; unsigned char b1; unsigned char b2; void *next; void *bitmap; int posx, posy, sizex, sizey; char palette[8]; } sprite_t; extern char fda[]; static sprite_t SCB11 = { 0xc0,0x10,0x20, 0,0, 0,0,0x100,0x100, {0x01,0x23,0x45,0x67,0x89,0xAb,0xcd,0xef} }; ... ... void main(void) { unsigned char joy; unsigned char waitForRelease = 0; initialize(); SCB11.bitmap=&fda; // here ici image tgi_sprite(&SCB11); sprite1b.zip http://www.mirari.fr/9gFH Edited December 14, 2012 by philippe Quote Link to comment Share on other sites More sharing options...
philippe Posted December 18, 2012 Share Posted December 18, 2012 (edited) Hello at all, Batch file for TGI with sprite (fda.bmp) @REM import/export sprite fda.bmp @set CC65_HOME="C:\cc65" @REM @set CC65_HOME="C:\Program Files (x86)\cc65" @REM @set CC65_ASMINC="C:\Program Files (x86)\cc65\asminc" @set SPRPCK=sprpck -t6 -p2 @set AS=ca65 @set ECHO=echo copy %CC65_HOME%\tgi\lynx-160-102-16.tgi co65 --code-label _lynxtgi lynx-160-102-16.tgi ca65 -t lynx -o lynx-160-102-16.o lynx-160-102-16.s rm lynx-160-102-16.tgi rm lynx-160-102-16.s copy %CC65_HOME%\joy\lynx-stdjoy.joy co65 --code-label _lynxjoy lynx-stdjoy.joy ca65 -t lynx -o lynx-stdjoy.o lynx-stdjoy.s rm lynx-stdjoy.joy rm lynx-stdjoy.s @REM premiere image : fda.bmp sprpck.exe -t6 -p2 -a000000 fda.bmp @%echo% .global _fda > fda.s @%echo% .segment "RODATA" >> fda.s @%echo% _fda: .incbin "fda.spr" >> fda.s ca65 -t lynx -o fda.o fda.s cc65 --code-name CODE --rodata-name RODATA --bss-name BSS --data-name DATA -t lynx game2.c ca65 -t lynx -o game2.o game2.s cl65 -t lynx -o game2.lnx lynx-160-102-16.o lynx-stdjoy.o fda.o game2.o lynx.lib up: sprite1b.zip http://www.mirari.fr/pB67 Edited December 18, 2012 by philippe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.