From 6d5b75d9189e63f4c12cc608d6efcf4b32e15c59 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 17 Nov 2017 16:54:29 -0500 Subject: [PATCH] tfv: allow landing by pressing return over grass --- tfv/tfv_flying.s | 60 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/tfv/tfv_flying.s b/tfv/tfv_flying.s index 63291a35..6258c9fe 100644 --- a/tfv/tfv_flying.s +++ b/tfv/tfv_flying.s @@ -94,11 +94,11 @@ flying_keyboard: lda LASTKEY - cmp #('Q') ; if quit, then return - bne skipskip - rts +; cmp #('Q') ; if quit, then return +; bne skipskip +; rts -skipskip: +;skipskip: cmp #('W') bne check_down @@ -222,6 +222,57 @@ check_land: ; LAND ;===== + ; finds value in space_x.i,space_y.i + ; returns color in A + lda CX_I + sta SPACEX_I + lda CY_I + sta SPACEY_I + + jsr lookup_map + + cmp #COLOR_BOTH_LIGHTGREEN + bne landing_message + +landing_loop: + + jsr draw_background_mode7 + + ; Draw Shadow + lda #>shadow_forward + sta INH + lda #ship_forward + sta INH + lda #