Jump to content
IGNORED

Teacher for Lynx Programming? Eh?Eh?


AtariLynx Lover

Recommended Posts

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 by philippe
Link to comment
Share on other sites

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 by philippe
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...