peasant: update inn/inside to new page1 background code
This commit is contained in:
parent
bedb385b31
commit
b469b4d564
|
@ -74,29 +74,8 @@ new_location:
|
|||
sta INH
|
||||
jsr load_custom_verb_table
|
||||
|
||||
;=====================
|
||||
; load bg
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
sta getsrc_smc+1
|
||||
; sta last_bg_l
|
||||
lda map_backgrounds_hi,X
|
||||
sta getsrc_smc+2
|
||||
; sta last_bg_h
|
||||
|
||||
lda #$40
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
;===========================
|
||||
; load priority
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
|
@ -114,6 +93,30 @@ new_location:
|
|||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
;=====================
|
||||
; load bg
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
sta getsrc_smc+1
|
||||
|
||||
lda map_backgrounds_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr hgr_copy
|
||||
|
||||
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
|
@ -238,6 +241,7 @@ level_over:
|
|||
.include "draw_peasant.s"
|
||||
|
||||
.include "gr_copy.s"
|
||||
.include "hgr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
|
|
|
@ -74,29 +74,9 @@ new_location:
|
|||
sta INH
|
||||
jsr load_custom_verb_table
|
||||
|
||||
;=====================
|
||||
; load bg
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
sta getsrc_smc+1
|
||||
; sta last_bg_l
|
||||
lda map_backgrounds_hi,X
|
||||
sta getsrc_smc+2
|
||||
; sta last_bg_h
|
||||
|
||||
lda #$40
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
;======================
|
||||
; load priority to $400
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
|
@ -114,6 +94,30 @@ new_location:
|
|||
|
||||
jsr gr_copy_to_page1
|
||||
|
||||
|
||||
;=====================
|
||||
; load bg
|
||||
|
||||
; we are INSIDE so locations 24...26 map to 0...2
|
||||
|
||||
lda MAP_LOCATION
|
||||
sec
|
||||
sbc #LOCATION_BASE
|
||||
tax
|
||||
|
||||
lda map_backgrounds_low,X
|
||||
sta getsrc_smc+1
|
||||
|
||||
lda map_backgrounds_hi,X
|
||||
sta getsrc_smc+2
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr hgr_copy
|
||||
|
||||
|
||||
; put peasant text
|
||||
|
||||
lda #<peasant_text
|
||||
|
@ -130,24 +134,47 @@ new_location:
|
|||
;====================
|
||||
; save background
|
||||
|
||||
lda PEASANT_X
|
||||
sta CURSOR_X
|
||||
lda PEASANT_Y
|
||||
sta CURSOR_Y
|
||||
; lda PEASANT_X
|
||||
; sta CURSOR_X
|
||||
; lda PEASANT_Y
|
||||
; sta CURSOR_Y
|
||||
|
||||
;=======================
|
||||
; draw initial peasant
|
||||
|
||||
jsr save_bg_1x28
|
||||
; jsr save_bg_1x28
|
||||
|
||||
jsr draw_peasant
|
||||
; jsr draw_peasant
|
||||
|
||||
|
||||
;============================
|
||||
;============================
|
||||
;============================
|
||||
; main loop
|
||||
;============================
|
||||
;============================
|
||||
;============================
|
||||
|
||||
game_loop:
|
||||
|
||||
;=====================
|
||||
; move peasant
|
||||
|
||||
jsr move_peasant
|
||||
|
||||
;=====================
|
||||
; always draw peasant
|
||||
|
||||
jsr draw_peasant
|
||||
|
||||
;=====================
|
||||
; increment frame
|
||||
|
||||
inc FRAME
|
||||
|
||||
;=====================
|
||||
; check keyboard
|
||||
|
||||
jsr check_keyboard
|
||||
|
||||
;=====================
|
||||
|
@ -336,6 +363,7 @@ to_left:
|
|||
|
||||
|
||||
.include "gr_copy.s"
|
||||
.include "hgr_copy.s"
|
||||
|
||||
.include "new_map_location.s"
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ really_move_peasant:
|
|||
|
||||
; restore bg behind peasant
|
||||
|
||||
|
||||
lda PEASANT_Y
|
||||
sta SAVED_Y1
|
||||
clc
|
||||
|
|
Loading…
Reference in New Issue