diff --git a/gr-sim/tfv_worldmap.c b/gr-sim/tfv_worldmap.c index 31178777..833d09db 100644 --- a/gr-sim/tfv_worldmap.c +++ b/gr-sim/tfv_worldmap.c @@ -289,7 +289,7 @@ int world_map(void) { /* Draw Above Ground Scatter */ - if (map_x==1) if (tfv_y>=20) grsim_put_sprite(snowy_tree,10,20); + if (map_x==1) if (tfv_y>=22) grsim_put_sprite(snowy_tree,10,22); if (map_x==4) if (tfv_y>=15) grsim_put_sprite(pine_tree,25,15); if (map_x==8) if (tfv_y>=22) grsim_put_sprite(palm_tree,10,20); if (map_x==12) if (tfv_y>=22) grsim_put_sprite(palm_tree,20,20); @@ -327,7 +327,7 @@ int world_map(void) { } /* Draw Below Ground Scatter */ - if (map_x==1) if (tfv_y<20) grsim_put_sprite(snowy_tree,10,20); + if (map_x==1) if (tfv_y<22) grsim_put_sprite(snowy_tree,10,22); if (map_x==4) if (tfv_y<15) grsim_put_sprite(pine_tree,25,15); if (map_x==8) if (tfv_y<22) grsim_put_sprite(palm_tree,10,20); if (map_x==12) if (tfv_y<22) grsim_put_sprite(palm_tree,20,20); diff --git a/tfv/TODO b/tfv/TODO index 7623690e..b8b9275e 100644 --- a/tfv/TODO +++ b/tfv/TODO @@ -6,4 +6,8 @@ longer term: map -- adjust x/y to better match real position name entry screen inventory screen + collision detection + after game over, return to title screen + save/restore game + diff --git a/tfv/tfv_worldmap.s b/tfv/tfv_worldmap.s index 25abf4d8..74a8c8fa 100644 --- a/tfv/tfv_worldmap.s +++ b/tfv/tfv_worldmap.s @@ -246,17 +246,142 @@ worldmap_refresh_screen: worldmap_copy_background: - + ;================ ; Copy background + ;================ jsr gr_copy_to_current - ; Handle ground scatter + ;================================= + ; Handle background ground scatter + ;================================= - ; Draw background trees + ; if (map_x==1) if (tfv_y>=22) grsim_put_sprite(snowy_tree,10,20); + lda MAP_X + cmp #1 + bne back_not_snow + + lda TFV_Y + cmp #22 + bmi no_back_scatter + + ; snowy tree + + lda #>snowy_tree + sta INH + lda #=16) grsim_put_sprite(pine_tree,25,16); + + cmp #4 + bne back_not_pine + + lda TFV_Y + cmp #16 + bmi no_back_scatter + + ; pine tree + + lda #>pine_tree + sta INH + lda #=22) grsim_put_sprite(palm_tree,10,20); + + cmp #8 + bne back_not_palm + + lda #10 + sta XPOS + + bne back_palm + +back_not_palm: + ; palm tree 2 + ; if (map_x==12) if (tfv_y>=22) grsim_put_sprite(palm_tree,20,20); + + cmp #12 + bne back_not_palm2 + + lda #20 + sta XPOS + +back_palm: + + lda TFV_Y + cmp #22 + bmi no_back_scatter + + lda #>palm_tree + sta INH + lda #=16) grsim_put_sprite(cactus,25,16); + lda #>cactus + sta INH + lda #snowy_tree + sta INH + lda #pine_tree + sta INH + lda #palm_tree + sta INH + lda #cactus + sta INH + lda #25) && (tfv_x<30) && (tfv_y<12)) { + ; printf("HIT! %d %d\n\n",steps,hp); + ; if (hp>11) { + ; hp=10; + ; } + ; } + ; } + ; } jsr page_flip