mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-27 07:30:12 +00:00
tfv: more world map improvements
This commit is contained in:
parent
28b6e90343
commit
b11e1fc9cd
@ -775,7 +775,7 @@ int basic_vlin(int y1, int y2, int at) {
|
||||
|
||||
|
||||
|
||||
int grsim_put_sprite(unsigned char *sprite_data, int xpos, int ypos) {
|
||||
int grsim_put_sprite(int page,unsigned char *sprite_data, int xpos, int ypos) {
|
||||
|
||||
unsigned char i;
|
||||
unsigned char *ptr;
|
||||
@ -791,6 +791,7 @@ int grsim_put_sprite(unsigned char *sprite_data, int xpos, int ypos) {
|
||||
|
||||
while(1) {
|
||||
address=gr_addr_lookup[ypos/2];
|
||||
address+=(page*4)<<8;
|
||||
address+=xpos;
|
||||
for(i=0;i<x;i++) {
|
||||
a=*ptr;
|
||||
|
@ -13,7 +13,7 @@ int bload(char *filename, int address);
|
||||
int scrn(unsigned char xcoord, unsigned char ycoord);
|
||||
int grsim_unrle(unsigned char *rle_data, int address);
|
||||
int home(void);
|
||||
int grsim_put_sprite(unsigned char *sprite_data, int xpos, int ypos);
|
||||
int grsim_put_sprite(int page,unsigned char *sprite_data, int xpos, int ypos);
|
||||
int gr_copy(short source, short dest);
|
||||
int text(void);
|
||||
void basic_htab(int x);
|
||||
|
60
gr-sim/tfv.c
60
gr-sim/tfv.c
@ -179,7 +179,7 @@ static int title(void) {
|
||||
|
||||
grsim_update();
|
||||
|
||||
result=select_menu(12, 21, 3, title_menu);
|
||||
result=select_menu(12, 22, 3, title_menu);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -400,9 +400,9 @@ static int flying(void) {
|
||||
|
||||
gr_copy(0x800,0x400);
|
||||
|
||||
if (direction==0) grsim_put_sprite(ship_forward,xx,yy);
|
||||
if (direction==-1) grsim_put_sprite(ship_left,xx,yy);
|
||||
if (direction==1) grsim_put_sprite(ship_right,xx,yy);
|
||||
if (direction==0) grsim_put_sprite(0,ship_forward,xx,yy);
|
||||
if (direction==-1) grsim_put_sprite(0,ship_left,xx,yy);
|
||||
if (direction==1) grsim_put_sprite(0,ship_right,xx,yy);
|
||||
|
||||
grsim_update();
|
||||
|
||||
@ -718,10 +718,10 @@ static int do_battle(void) {
|
||||
basic_hlin(0,39,i);
|
||||
}
|
||||
|
||||
grsim_put_sprite(tfv_stand_left,tfv_x,20);
|
||||
grsim_put_sprite(tfv_led_sword,tfv_x-5,20);
|
||||
grsim_put_sprite(0,tfv_stand_left,tfv_x,20);
|
||||
grsim_put_sprite(0,tfv_led_sword,tfv_x-5,20);
|
||||
|
||||
grsim_put_sprite(killer_crab,enemy_x,20);
|
||||
grsim_put_sprite(0,killer_crab,enemy_x,20);
|
||||
|
||||
grsim_update();
|
||||
|
||||
@ -757,14 +757,17 @@ static int do_battle(void) {
|
||||
|
||||
0 1 2 3
|
||||
|
||||
0 BEACH ARTIC AR/\TIC BELAIR
|
||||
0 BEACH ARCTIC ARCTIC BELAIR
|
||||
TREE MOUNATIN
|
||||
|
||||
1 BEACH LANDING GR/\ASS FORREST
|
||||
1 BEACH LANDING GRASS FOREST
|
||||
PINETREE MOUNTAIN
|
||||
|
||||
2 BEACH GRASS COLLEGE FORREST
|
||||
|
||||
3 BEACH BEACH BEACH BEACH
|
||||
2 BEACH GRASS COLLEGE FOREST
|
||||
PALMTREE
|
||||
|
||||
3 BEACH BEACH BEACH BEACH
|
||||
MOUNTAIN
|
||||
*/
|
||||
|
||||
/* Walk through bushes, beach water */
|
||||
@ -824,8 +827,8 @@ static int load_map_bg(void) {
|
||||
/* Forest/Right Beach */
|
||||
if ((map_x&3)==3) {
|
||||
for(i=10;i<40;i++) {
|
||||
temp=4+(40-i)/8;
|
||||
|
||||
temp=24+(i/4);
|
||||
/* 32 ... 40 */
|
||||
color_equals(ground_color);
|
||||
hlin(1,0,temp,i);
|
||||
color_equals(COLOR_YELLOW);
|
||||
@ -850,9 +853,15 @@ static int load_map_bg(void) {
|
||||
hlin_double(1,0,40,38);
|
||||
}
|
||||
|
||||
if ((map_x&3)==2) {
|
||||
for(i=0;i<4;i++) {
|
||||
grsim_put_sprite(1,mountain,10+(i%2)*5,(i*8)+2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// grsim_put_sprite(tfv_stand_left,tfv_x,20);
|
||||
|
||||
// grsim_put_sprite(0,tfv_stand_left,tfv_x,20);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -955,14 +964,27 @@ static int world_map(void) {
|
||||
|
||||
gr_copy(0x800,0x400);
|
||||
|
||||
/* Ground Scatter */
|
||||
|
||||
if (map_x==1) if (tfv_y>=20) grsim_put_sprite(0,snowy_tree,10,20);
|
||||
if (map_x==4) if (tfv_y>=15) grsim_put_sprite(0,pine_tree,25,15);
|
||||
if (map_x==8) if (tfv_y>=22) grsim_put_sprite(0,palm_tree,10,20);
|
||||
if (map_x==12) if (tfv_y>=27) grsim_put_sprite(0,palm_tree,20,25);
|
||||
|
||||
if (direction==-1) {
|
||||
if (odd) grsim_put_sprite(tfv_walk_left,tfv_x,tfv_y);
|
||||
else grsim_put_sprite(tfv_stand_left,tfv_x,tfv_y);
|
||||
if (odd) grsim_put_sprite(0,tfv_walk_left,tfv_x,tfv_y);
|
||||
else grsim_put_sprite(0,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);
|
||||
if (odd) grsim_put_sprite(0,tfv_walk_right,tfv_x,tfv_y);
|
||||
else grsim_put_sprite(0,tfv_stand_right,tfv_x,tfv_y);
|
||||
}
|
||||
|
||||
if (map_x==1) if (tfv_y<20) grsim_put_sprite(0,snowy_tree,10,20);
|
||||
if (map_x==4) if (tfv_y<15) grsim_put_sprite(0,pine_tree,25,15);
|
||||
if (map_x==8) if (tfv_y<22) grsim_put_sprite(0,palm_tree,10,20);
|
||||
if (map_x==12) if (tfv_y<27) grsim_put_sprite(0,palm_tree,20,25);
|
||||
|
||||
grsim_update();
|
||||
|
||||
usleep(10000);
|
||||
|
@ -107,7 +107,7 @@ static unsigned char killer_crab[]={
|
||||
|
||||
|
||||
/* Palm Tree */
|
||||
static unsigned palm_tree[]={
|
||||
static unsigned char palm_tree[]={
|
||||
0x08,0x07,
|
||||
0x00,0x00,0x00,0x00,0x00,0x40,0x04,0x40,
|
||||
0x00,0x40,0x04,0x44,0x84,0x40,0x00,0x00,
|
||||
@ -119,7 +119,7 @@ static unsigned palm_tree[]={
|
||||
};
|
||||
|
||||
/* Pine Tree */
|
||||
static unsigned pine_tree[]={
|
||||
static unsigned char pine_tree[]={
|
||||
0x07,0x06,
|
||||
0x00,0x00,0x00,0x44,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x44,0x00,0x00,0x00,
|
||||
@ -130,7 +130,7 @@ static unsigned pine_tree[]={
|
||||
};
|
||||
|
||||
/* Snowy Tree */
|
||||
static unsigned snowy_tree[]={
|
||||
static unsigned char snowy_tree[]={
|
||||
0x07,0x06,
|
||||
0x00,0x00,0x00,0x77,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x77,0x00,0x00,0x00,
|
||||
@ -141,13 +141,13 @@ static unsigned snowy_tree[]={
|
||||
};
|
||||
|
||||
/* Mountain */
|
||||
static unsigned mountain[]={
|
||||
static unsigned char mountain[]={
|
||||
0x0d,0x07,
|
||||
0x00,0x00,0x00,0x00,0x00,0x70,0x77,0x50,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x87,0x77,0x77,0x85,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x90,0x88,0x88,0x48,0x58,0x88,0x80,0x00,0x00,0x00,
|
||||
0x00,0x00,0x80,0x98,0x88,0x88,0x88,0x48,0x88,0x58,0x80,0x00,0x00,
|
||||
0x00,0x80,0x89,0x88,0x88,0x89,0x88,0x88,0x88,0x88,0x85,0x88,0x00,
|
||||
0x80,0x89,0x98,0x88,0x98,0x00,0x84,0x88,0x88,0x88,0x85,0x88,0x58,
|
||||
0x00,0x00,0x00,0x00,0x00,0x70,0xf7,0x70,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x77,0xff,0xff,0x77,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x90,0x8D,0x88,0x48,0x58,0x85,0x50,0x00,0x00,0x00,
|
||||
0x00,0x00,0xD0,0x9D,0x88,0x88,0x88,0x48,0x88,0x55,0x50,0x00,0x00,
|
||||
0x00,0xD0,0x89,0x88,0x88,0x89,0x88,0x88,0x88,0x88,0x85,0x75,0x00,
|
||||
0xD0,0x89,0x98,0x88,0x98,0x88,0x84,0x88,0x88,0x88,0x85,0x88,0x55,
|
||||
0x00,0x00,0x08,0x08,0x08,0x08,0x08,0x88,0x88,0x88,0x08,0x00,0x00,
|
||||
};
|
||||
|
BIN
tfv/landing.png
BIN
tfv/landing.png
Binary file not shown.
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 368 B |
BIN
tfv/sprites.png
BIN
tfv/sprites.png
Binary file not shown.
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 912 B |
Loading…
x
Reference in New Issue
Block a user