2019-10-02 04:03:00 +00:00
|
|
|
; starbase
|
|
|
|
|
|
|
|
starbase:
|
|
|
|
|
|
|
|
; Initialize some variables
|
|
|
|
|
2019-11-05 17:35:47 +00:00
|
|
|
lda #<starbase_keypresses
|
|
|
|
sta KEYPTRL
|
|
|
|
lda #>starbase_keypresses
|
|
|
|
sta KEYPTRH
|
|
|
|
lda #1
|
|
|
|
sta KEY_COUNTDOWN
|
|
|
|
|
2019-10-02 04:03:00 +00:00
|
|
|
;=======================
|
|
|
|
; Run the "intro"
|
|
|
|
;=======================
|
|
|
|
; just us falling?
|
|
|
|
|
|
|
|
jsr starbase_init
|
|
|
|
|
|
|
|
;=========================
|
|
|
|
; starbase_new_room
|
|
|
|
;=========================
|
|
|
|
; enter new room on starbase
|
|
|
|
|
|
|
|
starbase_new_room:
|
|
|
|
lda #0
|
|
|
|
sta GAME_OVER
|
|
|
|
|
2019-11-04 02:58:21 +00:00
|
|
|
jsr starbase_setup_room
|
2019-10-02 04:03:00 +00:00
|
|
|
|
|
|
|
c4_check_done:
|
|
|
|
lda GAME_OVER
|
|
|
|
cmp #$ff
|
|
|
|
beq quit_starbase
|
|
|
|
|
|
|
|
;====================
|
|
|
|
; go to next level
|
|
|
|
l4_defeated:
|
|
|
|
lda WHICH_ROOM
|
|
|
|
cmp #5
|
|
|
|
bne starbase_new_room
|
|
|
|
|
|
|
|
;===========================
|
|
|
|
; quit_starbase
|
|
|
|
;===========================
|
|
|
|
|
|
|
|
quit_starbase:
|
|
|
|
|
|
|
|
wait_loop:
|
2019-11-05 03:47:52 +00:00
|
|
|
; lda KEYPRESS
|
|
|
|
; bpl wait_loop
|
2019-10-02 04:03:00 +00:00
|
|
|
|
2019-11-05 03:47:52 +00:00
|
|
|
bit KEYRESET ; clear strobe
|
2019-10-02 04:03:00 +00:00
|
|
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
.include "starbase_action.s"
|
|
|
|
.include "gr_hlin.s"
|
|
|
|
.include "gr_putsprite.s"
|
|
|
|
.include "gr_putsprite_crop.s"
|
|
|
|
.include "keyboard.s"
|
|
|
|
|
2019-10-02 04:38:01 +00:00
|
|
|
.include "starbase_astronaut.s"
|
2019-10-02 04:03:00 +00:00
|
|
|
.include "starbase_alien.s"
|
|
|
|
|
|
|
|
.include "starbase_doors.s"
|
|
|
|
.include "starbase_charger.s"
|
|
|
|
.include "starbase_gun.s"
|
|
|
|
.include "starbase_laser.s"
|
|
|
|
.include "starbase_shield.s"
|
|
|
|
.include "starbase_blast.s"
|
|
|
|
.include "starbase_collision.s"
|
|
|
|
.include "starbase_friend.s"
|
|
|
|
.include "starbase_alien_laser.s"
|
|
|
|
|
|
|
|
; sprites
|
2019-10-02 04:38:01 +00:00
|
|
|
.include "graphics/sprites/astronaut.inc"
|
2019-10-02 04:03:00 +00:00
|
|
|
.include "graphics/sprites/alien.inc"
|
|
|
|
|
|
|
|
|