mist: meche: use the common page grabbing code

note: did not test this yet
This commit is contained in:
Vince Weaver 2020-07-14 18:26:22 -04:00
parent dfbc2ea12c
commit f99a3ff105
3 changed files with 13 additions and 55 deletions

View File

@ -397,7 +397,8 @@ clean:
LOADER MIST_TITLE \
MIST OCTAGON VIEWER DENTIST \
MECHE SELENA SHIP STONEY CHANNEL ARBOR NIBEL \
GENERATOR
GENERATOR \
generate_common
cd graphics_title && make clean
cd graphics_mist && make clean
cd graphics_octagon && make clean

View File

@ -266,24 +266,6 @@ no_draw_page:
; includes
;==========================
.if 0
.include "gr_copy.s"
.include "gr_offsets.s"
.include "gr_pageflip.s"
.include "gr_putsprite_crop.s"
.include "text_print.s"
.include "gr_fast_clear.s"
.include "decompress_fast_v2.s"
.include "keyboard.s"
.include "draw_pointer.s"
.include "end_level.s"
.include "audio.s"
.include "common_sprites.inc"
.include "page_sprites.inc"
.endif
; puzzles
.include "meche_rotation.s"
@ -296,6 +278,7 @@ no_draw_page:
.include "link_book_meche.s"
.include "link_book_mist.s"
.include "handle_pages.s"
; level data

View File

@ -3,57 +3,31 @@
; book page stuff
;==============================
take_blue_page:
grab_blue_page:
; FIXME: if we came back we could return page
; should check to see if carrying first
; also what if holding red, click blu
lda BLUE_PAGES_TAKEN
eor #MECHE_PAGE
sta BLUE_PAGES_TAKEN
; FIXME: if holding another page, put it down?
and #MECHE_PAGE
beq dropped_blue_page
bne missing_page
lda #HOLDING_BLUE_PAGE
sta HOLDING_PAGE
rts
lda #MECHE_PAGE
jmp take_blue_page
dropped_blue_page:
lda #0
sta HOLDING_PAGE
rts
take_red_page:
; FIXME: if we came back we could return page
; should check to see if carrying first
; also what if holding red, click blu
grab_red_page:
lda RED_PAGES_TAKEN
eor #MECHE_PAGE
sta RED_PAGES_TAKEN
; FIXME: if holding another page, put it down?
and #MECHE_PAGE
beq dropped_red_page
bne missing_page
lda #HOLDING_RED_PAGE
sta HOLDING_PAGE
lda #MECHE_PAGE
jmp take_red_page
missing_page:
rts
dropped_red_page:
lda #0
sta HOLDING_PAGE
rts
enter_blue_secret: