mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-06 16:29:33 +00:00
peasant: hook up the map
This commit is contained in:
parent
c75dffc7ed
commit
72b4c5475b
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 22 KiB |
|
@ -27,7 +27,6 @@ the_map:
|
|||
;=============================
|
||||
;=============================
|
||||
|
||||
new_location:
|
||||
lda #0
|
||||
sta LEVEL_OVER
|
||||
|
||||
|
@ -48,119 +47,19 @@ new_location:
|
|||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
; put peasant text
|
||||
|
||||
; lda #<peasant_text
|
||||
; sta OUTL
|
||||
; lda #>peasant_text
|
||||
; sta OUTH
|
||||
|
||||
; jsr hgr_put_string
|
||||
|
||||
; put score
|
||||
|
||||
; jsr print_score
|
||||
|
||||
;=====================
|
||||
; move peasant
|
||||
; FIXME: don't do this if loading game
|
||||
|
||||
; lda #20
|
||||
; sta PEASANT_X
|
||||
; lda #150
|
||||
; sta PEASANT_Y
|
||||
|
||||
;====================
|
||||
; save background
|
||||
|
||||
; lda PEASANT_X
|
||||
; sta CURSOR_X
|
||||
; lda PEASANT_Y
|
||||
; sta CURSOR_Y
|
||||
|
||||
;=======================
|
||||
; draw initial peasant
|
||||
|
||||
; jsr save_bg_1x28
|
||||
|
||||
; jsr draw_peasant
|
||||
|
||||
game_loop:
|
||||
|
||||
; jsr move_peasant
|
||||
bit KEYRESET
|
||||
|
||||
inc FRAME
|
||||
jsr wait_until_keypress
|
||||
|
||||
jsr check_keyboard
|
||||
lda PREVIOUS_LOCATION
|
||||
|
||||
lda LEVEL_OVER
|
||||
bmi oops_new_location
|
||||
bne game_over
|
||||
jmp update_map_location
|
||||
|
||||
|
||||
; delay
|
||||
|
||||
lda #200
|
||||
jsr wait
|
||||
|
||||
|
||||
jmp game_loop
|
||||
|
||||
oops_new_location:
|
||||
jmp new_location
|
||||
|
||||
|
||||
;************************
|
||||
; exit level
|
||||
;************************
|
||||
game_over:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
.include "draw_peasant.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
.include "peasant_move.s"
|
||||
|
||||
;.include "parse_input.s"
|
||||
|
||||
;.include "inventory.s"
|
||||
|
||||
.include "score.s"
|
||||
|
||||
.include "keyboard.s"
|
||||
|
||||
.include "wait.s"
|
||||
.include "wait_a_bit.s"
|
||||
|
||||
.include "version.inc"
|
||||
|
||||
|
||||
|
||||
; Moved to qload
|
||||
;.include "decompress_fast_v2.s"
|
||||
;.include "hgr_font.s"
|
||||
;.include "draw_box.s"
|
||||
;.include "hgr_rectangle.s"
|
||||
;.include "hgr_1x28_sprite_mask.s"
|
||||
;.include "hgr_1x5_sprite.s"
|
||||
;.include "hgr_partial_save.s"
|
||||
;.include "hgr_input.s"
|
||||
;.include "hgr_tables.s"
|
||||
;.include "hgr_text_box.s"
|
||||
;.include "clear_bottom.s"
|
||||
;.include "hgr_hgr2.s"
|
||||
;.include "loadsave_menu.s"
|
||||
;.include "wait_keypress.s"
|
||||
|
||||
.include "graphics_map/map_graphics.inc"
|
||||
|
||||
;.include "graphics_cliff/priority_cliff.inc"
|
||||
|
||||
|
||||
|
|
|
@ -335,6 +335,23 @@ trees_look:
|
|||
; map
|
||||
;================
|
||||
parse_common_map:
|
||||
|
||||
lda INVENTORY_3
|
||||
and #INV3_MAP
|
||||
beq dont_have_map
|
||||
|
||||
do_have_map:
|
||||
lda MAP_LOCATION
|
||||
sta PREVIOUS_LOCATION
|
||||
lda #LOAD_MAP
|
||||
sta WHICH_LOAD
|
||||
lda #LOCATION_MAP
|
||||
sta MAP_LOCATION
|
||||
lda #1
|
||||
sta LEVEL_OVER
|
||||
jmp done_parse_message
|
||||
|
||||
dont_have_map:
|
||||
ldx #<map_message
|
||||
ldy #>map_message
|
||||
jmp finish_parse_message
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
; want to load this to address $90
|
||||
|
||||
;
|
||||
.byte LOAD_PEASANT2 ; WHICH_LOAD = $90
|
||||
.byte LOAD_PEASANT3 ; WHICH_LOAD = $90
|
||||
.byte 10 ; PEASANT_X = $91
|
||||
.byte 100 ; PEASANT_Y = $92
|
||||
.byte PEASANT_DIR_UP ; PEASANT_DIR = $93
|
||||
.byte 0 ; MAP_X = $94
|
||||
.byte 1 ; MAP_Y = $95
|
||||
.byte LOCATION_HAY_BALE ; MAP_LOCATION = $96
|
||||
.byte LOCATION_YOUR_COTTAGE ; MAP_LOCATION = $96
|
||||
.byte GARY_SCARED|TALKED_TO_MENDELEV
|
||||
; GAME_STATE_0 = $97
|
||||
.byte $00 ; GAME_STATE_1 = $98
|
||||
|
|
|
@ -100,6 +100,7 @@ DONE_PLAYING = $89
|
|||
DONE_SONG = $8A
|
||||
APPLEII_MODEL = $8B
|
||||
ESC_PRESSED = $8C
|
||||
PREVIOUS_LOCATION= $8D
|
||||
|
||||
;=======================
|
||||
; savegame state
|
||||
|
|
Loading…
Reference in New Issue
Block a user