dos33fsprogs/games/peasant/intro.s

180 lines
2.5 KiB
ArmAsm
Raw Normal View History

2021-08-15 03:31:00 +00:00
; Peasant's Quest Intro Sequence
2021-08-09 05:21:58 +00:00
; by Vince `deater` Weaver vince@deater.net
; with apologies to everyone
.include "hardware.inc"
2021-08-12 01:45:31 +00:00
.include "zp.inc"
2021-08-09 05:21:58 +00:00
.include "qload.inc"
2021-08-10 05:09:35 +00:00
2021-08-09 05:21:58 +00:00
2021-08-15 03:31:00 +00:00
peasant_quest_intro:
2021-08-09 05:21:58 +00:00
2021-08-15 04:02:13 +00:00
lda #0
sta ESC_PRESSED
2021-08-12 02:07:33 +00:00
jsr hgr_make_tables
2021-08-09 05:21:58 +00:00
jsr HGR2 ; Hi-res graphics, no text at bottom
; Y=0, A=0 after this called
2021-08-13 01:01:05 +00:00
;*******************************
; restart music, only drum loop
;******************************
; hack! modify the PT3 file to ignore the latter half
lda #$ff ; end after 4 patterns
sta PT3_LOC+$C9+$4
lda #$0 ; set LOOP to 0
sta PT3_LOC+$66
jsr pt3_init_song
cli
2021-08-09 05:21:58 +00:00
;************************
; Cottage
;************************
2021-08-12 19:41:39 +00:00
jsr cottage
2021-08-09 05:21:58 +00:00
2021-08-15 04:02:13 +00:00
lda ESC_PRESSED
bne escape_handler
2021-08-09 05:21:58 +00:00
;************************
; Lake West
;************************
2021-08-12 19:41:39 +00:00
jsr lake_west
2021-08-10 18:05:41 +00:00
2021-08-15 04:02:13 +00:00
lda ESC_PRESSED
bne escape_handler
2021-08-09 05:21:58 +00:00
;************************
; Lake East
;************************
2021-08-12 19:41:39 +00:00
jsr lake_east
2021-08-09 05:21:58 +00:00
2021-08-15 04:02:13 +00:00
lda ESC_PRESSED
bne escape_handler
2021-08-09 05:21:58 +00:00
;************************
; River
;************************
2021-08-12 19:41:39 +00:00
jsr river
2021-08-09 05:21:58 +00:00
2021-08-15 04:02:13 +00:00
lda ESC_PRESSED
bne escape_handler
2021-08-09 05:21:58 +00:00
;************************
; Knight
;************************
2021-08-11 03:43:30 +00:00
jsr knight
2021-08-09 05:21:58 +00:00
2021-08-11 23:29:47 +00:00
;************************
2021-08-15 03:31:00 +00:00
; Start actual game
2021-08-11 23:29:47 +00:00
;************************
jsr draw_peasant
2021-08-15 04:02:13 +00:00
; wait a bit
lda #10
jsr wait_a_bit
escape_handler:
2021-08-15 03:31:00 +00:00
sei ; turn off music
jsr clear_ay_both ; clear AY state
;=============================
; start new game
;=============================
2021-08-15 03:31:00 +00:00
lda #LOAD_PEASANT2
2021-08-12 02:16:15 +00:00
sta WHICH_LOAD
2021-08-11 23:29:47 +00:00
;=========================
; init peasant position
; draw at 18,108
lda #18
sta PEASANT_X
lda #108
sta PEASANT_Y
lda #PEASANT_DIR_RIGHT
sta PEASANT_DIR
lda #0
sta PEASANT_XADD
sta PEASANT_YADD
lda #1
2021-08-29 03:05:36 +00:00
sta SCORE_HUNDREDS
lda #$33
sta SCORE_TENSONES
2021-08-29 03:05:36 +00:00
lda #4
sta MAP_X
lda #1
sta MAP_Y
2021-09-02 03:27:06 +00:00
lda #$FF
sta INVENTORY_1
2021-09-02 03:27:06 +00:00
sta INVENTORY_2
lda #INV3_SHIRT
sta INVENTORY_3
; 1100 1011
lda #$CB
2021-09-02 03:27:06 +00:00
sta INVENTORY_1_GONE
; 0001 1101
lda #$1d
2021-09-02 03:27:06 +00:00
sta INVENTORY_2_GONE
;
lda #$0
sta INVENTORY_3_GONE
2021-09-02 03:27:06 +00:00
2021-08-12 02:16:15 +00:00
rts
2021-08-09 05:21:58 +00:00
.include "decompress_fast_v2.s"
.include "wait_keypress.s"
.include "intro_cottage.s"
.include "intro_lake_w.s"
.include "intro_lake_e.s"
.include "intro_river.s"
.include "intro_knight.s"
2021-08-10 18:05:41 +00:00
.include "draw_peasant.s"
2021-08-10 05:09:35 +00:00
.include "hgr_font.s"
2021-08-12 02:07:33 +00:00
.include "draw_box.s"
.include "hgr_rectangle.s"
.include "hgr_7x28_sprite.s"
2021-08-12 18:07:19 +00:00
.include "hgr_1x5_sprite.s"
;.include "hgr_save_restore.s"
.include "hgr_partial_save.s"
2021-08-12 19:23:05 +00:00
.include "hgr_input.s"
.include "hgr_tables.s"
.include "hgr_text_box.s"
2021-08-12 19:41:39 +00:00
.include "wait_a_bit.s"
2021-08-10 05:09:35 +00:00
.include "graphics/graphics_intro.inc"