tfv: add bird sprites

This commit is contained in:
Vince Weaver 2017-10-21 23:48:21 -04:00
parent 1cf33eeea9
commit 7844a43608
5 changed files with 121 additions and 11 deletions

View File

@ -48,6 +48,96 @@ unsigned char tfv_led_sword[]={
/* Bird Sprites */ /* Bird Sprites */
unsigned char bird_stand_right[] = {
0x6,0x7,
0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xdd,0x90,
0x00,0x00,0x00,0x00,0xdd,0x00,
0x0d,0xdd,0xdd,0xdd,0xdd,0x00,
0x00,0x00,0x0d,0xdd,0x0d,0x00,
0x00,0x00,0x00,0x99,0x00,0x00,
0x00,0x00,0x00,0x99,0x90,0x00,
};
unsigned char bird_stand_left[] = {
0x6,0x7,
0x00,0x00,0x00,0x00,0x00,0x00,
0x90,0xdd,0x00,0x00,0x00,0x00,
0x00,0xdd,0x00,0x00,0x00,0x00,
0x00,0xdd,0xdd,0xdd,0xdd,0x0d,
0x00,0x0d,0xdd,0x0d,0x00,0x00,
0x00,0x00,0x99,0x00,0x00,0x00,
0x00,0x90,0x99,0x00,0x00,0x00,
};
unsigned char bird_walk_right[] = {
0x6,0x7,
0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xdd,0x90,
0x00,0x00,0x00,0x00,0xdd,0x00,
0x0d,0xdd,0xdd,0xdd,0xdd,0x00,
0x00,0x00,0x0d,0xdd,0x0d,0x00,
0x00,0x00,0x00,0x99,0x00,0x00,
0x00,0x00,0x99,0x00,0x99,0x00,
};
unsigned char bird_walk_left[] = {
0x6,0x7,
0x00,0x00,0x00,0x00,0x00,0x00,
0x90,0xdd,0x00,0x00,0x00,0x00,
0x00,0xdd,0x00,0x00,0x00,0x00,
0x00,0xdd,0xdd,0xdd,0xdd,0x0d,
0x00,0x0d,0xdd,0x0d,0x00,0x00,
0x00,0x00,0x99,0x00,0x00,0x00,
0x00,0x99,0x00,0x99,0x00,0x00,
};
/* with rider */
unsigned char bird_rider_stand_right[] = {
0x6,0x7,
0x00,0xdd,0xbd,0x00,0x00,0x00,
0x00,0xdd,0xdb,0x00,0xdd,0x90,
0x00,0x00,0x22,0x02,0xdd,0x00,
0x0d,0xdd,0xd2,0x22,0xdd,0x00,
0x00,0x00,0x0d,0x82,0x8d,0x00,
0x00,0x00,0x00,0x99,0x00,0x00,
0x00,0x00,0x00,0x99,0x90,0x00,
};
unsigned char bird_rider_walk_right[] = {
0x6,0x7,
0x00,0xdd,0xbd,0x00,0x00,0x00,
0x00,0xdd,0xdb,0x00,0xdd,0x90,
0x00,0x00,0x22,0x02,0xdd,0x00,
0x0d,0xdd,0xd2,0x22,0xdd,0x00,
0x00,0x00,0x0d,0x82,0x8d,0x00,
0x00,0x00,0x00,0x99,0x00,0x00,
0x00,0x00,0x99,0x00,0x99,0x00,
};
unsigned char bird_rider_stand_left[] = {
0x6,0x7,
0x00,0x00,0x00,0xbd,0xdd,0x00,
0x90,0xdd,0x00,0xdb,0xdd,0x00,
0x00,0xdd,0x02,0x22,0x00,0x00,
0x00,0xdd,0x22,0xd2,0xdd,0x0d,
0x00,0x8d,0x82,0x0d,0x00,0x00,
0x00,0x00,0x99,0x00,0x00,0x00,
0x00,0x90,0x99,0x00,0x00,0x00,
};
unsigned char bird_rider_walk_left[] = {
0x6,0x7,
0x00,0x00,0x00,0xbd,0xdd,0x00,
0x90,0xdd,0x00,0xdb,0xdd,0x00,
0x00,0xdd,0x02,0x22,0x00,0x00,
0x00,0xdd,0x22,0xd2,0xdd,0x0d,
0x00,0x8d,0x82,0x0d,0x00,0x00,
0x00,0x00,0x99,0x00,0x00,0x00,
0x00,0x99,0x00,0x99,0x00,0x00,
};

View File

@ -4,6 +4,16 @@ extern unsigned char tfv_stand_left[];
extern unsigned char tfv_walk_left[]; extern unsigned char tfv_walk_left[];
extern unsigned char tfv_led_sword[]; extern unsigned char tfv_led_sword[];
extern unsigned char bird_stand_right[];
extern unsigned char bird_walk_right[];
extern unsigned char bird_stand_left[];
extern unsigned char bird_walk_left[];
extern unsigned char bird_rider_stand_right[];
extern unsigned char bird_rider_walk_right[];
extern unsigned char bird_rider_stand_left[];
extern unsigned char bird_rider_walk_left[];
extern unsigned char ship_forward[]; extern unsigned char ship_forward[];
extern unsigned char ship_right[]; extern unsigned char ship_right[];
extern unsigned char ship_left[]; extern unsigned char ship_left[];

View File

@ -187,6 +187,7 @@ int world_map(void) {
direction=1; direction=1;
int odd=0; int odd=0;
int refresh=1; int refresh=1;
int on_bird=1;
while(1) { while(1) {
moved=0; moved=0;
@ -304,18 +305,25 @@ int world_map(void) {
} }
} }
if (on_bird) {
if (direction==-1) {
if (odd) grsim_put_sprite(bird_rider_walk_left,tfv_x,tfv_y);
else grsim_put_sprite(bird_rider_stand_left,tfv_x,tfv_y);
}
if (direction==-1) { if (direction==1) {
if (odd) grsim_put_sprite(tfv_walk_left,tfv_x,tfv_y); if (odd) grsim_put_sprite(bird_rider_walk_right,tfv_x,tfv_y);
else grsim_put_sprite(tfv_stand_left,tfv_x,tfv_y); else grsim_put_sprite(bird_rider_stand_right,tfv_x,tfv_y);
}
} }
if (direction==1) { else {
if (odd) grsim_put_sprite(tfv_walk_right,tfv_x,tfv_y); if (direction==-1) {
else grsim_put_sprite(tfv_stand_right,tfv_x,tfv_y); if (odd) grsim_put_sprite(tfv_walk_left,tfv_x,tfv_y);
else grsim_put_sprite(tfv_stand_left,tfv_x,tfv_y);
}
if (direction==1) {
if (odd) grsim_put_sprite(tfv_walk_right,tfv_x,tfv_y);
else grsim_put_sprite(tfv_stand_right,tfv_x,tfv_y);
}
} }
/* Draw Below Ground Scatter */ /* Draw Below Ground Scatter */

View File

@ -1,3 +1,5 @@
Add horizontal-flipped sprite mode to save sprite table space?
Could make VLIN faster by writing in chunks of two Could make VLIN faster by writing in chunks of two
6502 assembly woes: 6502 assembly woes:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB