mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-08 16:30:38 +00:00
ootw: more underwater
you can sorta swim now, and the console sinks
This commit is contained in:
parent
1909896922
commit
e0ddb03979
@ -40,6 +40,7 @@ ootw_c1.o: ootw_c1.s \
|
||||
ootw_graphics/l1rope/ootw_swing.inc \
|
||||
ootw_graphics/l1end/ootw_l1end.inc \
|
||||
ootw_graphics/sprites/sprites_physicist.inc \
|
||||
ootw_graphics/sprites/physicist_swim.inc \
|
||||
ootw_graphics/sprites/sprites_slugs.inc \
|
||||
ootw_graphics/sprites/sprites_ootw.inc \
|
||||
ootw_graphics/sprites/sprites_beast.inc \
|
||||
|
@ -152,6 +152,7 @@ end_message:
|
||||
; sprites
|
||||
.include "ootw_graphics/sprites/sprites_ootw.inc"
|
||||
.include "ootw_graphics/sprites/sprites_physicist.inc"
|
||||
.include "ootw_graphics/sprites/physicist_swim.inc"
|
||||
.include "ootw_graphics/sprites/sprites_slugs.inc"
|
||||
.include "ootw_graphics/sprites/sprites_beast.inc"
|
||||
; cutscene data
|
||||
|
@ -38,11 +38,15 @@ ootw_c1_arrival:
|
||||
|
||||
lda #0
|
||||
sta GAME_OVER
|
||||
sta GAIT
|
||||
|
||||
lda #20
|
||||
sta BUBBLES_Y
|
||||
sta CONSOLE_Y
|
||||
sta PHYSICIST_Y
|
||||
|
||||
|
||||
lda #17
|
||||
sta PHYSICIST_X
|
||||
|
||||
bit KEYRESET ; clear keypress
|
||||
|
||||
@ -68,23 +72,33 @@ underwater_loop:
|
||||
; draw console
|
||||
;======================
|
||||
|
||||
lda #11
|
||||
lda #16
|
||||
sta XPOS
|
||||
lda #0
|
||||
lda CONSOLE_Y
|
||||
sta YPOS
|
||||
|
||||
; lda #<cage_center_sprite
|
||||
; sta INL
|
||||
; lda #>cage_center_sprite
|
||||
; sta INH
|
||||
; jsr put_sprite_crop
|
||||
; jmp done_drawing_cage
|
||||
|
||||
lda #<console_sprite
|
||||
sta INL
|
||||
lda #>console_sprite
|
||||
sta INH
|
||||
jsr put_sprite_crop
|
||||
|
||||
;=================================
|
||||
; draw physicist
|
||||
;=================================
|
||||
|
||||
lda PHYSICIST_X
|
||||
sta XPOS
|
||||
lda PHYSICIST_Y
|
||||
sta YPOS
|
||||
|
||||
ldy GAIT
|
||||
lda swim_progression,Y
|
||||
sta INL
|
||||
lda swim_progression+1,Y
|
||||
sta INH
|
||||
jsr put_sprite_crop
|
||||
|
||||
;======================
|
||||
; draw monster
|
||||
;======================
|
||||
@ -123,15 +137,25 @@ no_draw_bubbles:
|
||||
cmp #27+$80
|
||||
beq underwater_escape
|
||||
|
||||
; cmp #'A'+$80
|
||||
; beq cage_left_pressed
|
||||
; cmp #8+$80
|
||||
; beq cage_left_pressed
|
||||
cmp #'A'+$80
|
||||
beq uw_left_pressed
|
||||
cmp #8+$80
|
||||
beq uw_left_pressed
|
||||
|
||||
; cmp #'D'+$80
|
||||
; beq cage_right_pressed
|
||||
; cmp #$15+$80
|
||||
; beq cage_right_pressed
|
||||
cmp #'D'+$80
|
||||
beq uw_right_pressed
|
||||
cmp #$15+$80
|
||||
beq uw_right_pressed
|
||||
|
||||
cmp #'W'+$80
|
||||
beq uw_up_pressed
|
||||
cmp #$0B+$80
|
||||
beq uw_up_pressed
|
||||
|
||||
cmp #'S'+$80
|
||||
beq uw_down_pressed
|
||||
cmp #$0A+$80
|
||||
beq uw_down_pressed
|
||||
|
||||
jmp underwater_done_keyboard
|
||||
|
||||
@ -141,15 +165,27 @@ underwater_escape:
|
||||
bne underwater_done_keyboard ; bra
|
||||
|
||||
|
||||
;cage_left_pressed:
|
||||
; lda CAGE_AMPLITUDE
|
||||
; bne cage_left_already_moving
|
||||
; lda #8 ; *2
|
||||
; sta CAGE_OFFSET
|
||||
; jmp cage_inc_amplitude
|
||||
uw_left_pressed:
|
||||
dec PHYSICIST_X
|
||||
jmp underwater_done_keyboard
|
||||
|
||||
uw_right_pressed:
|
||||
inc PHYSICIST_X
|
||||
jmp underwater_done_keyboard
|
||||
|
||||
uw_up_pressed:
|
||||
dec PHYSICIST_Y
|
||||
dec PHYSICIST_Y
|
||||
jmp underwater_done_keyboard
|
||||
|
||||
uw_down_pressed:
|
||||
inc PHYSICIST_Y
|
||||
inc PHYSICIST_Y
|
||||
jmp underwater_done_keyboard
|
||||
|
||||
|
||||
underwater_done_keyboard:
|
||||
|
||||
bit KEYRESET
|
||||
|
||||
;=================================
|
||||
; move things
|
||||
@ -172,6 +208,58 @@ underwater_done_keyboard:
|
||||
|
||||
no_move_bubbles:
|
||||
|
||||
;===================
|
||||
; move console
|
||||
;===================
|
||||
|
||||
lda FRAMEL
|
||||
and #$1f
|
||||
bne no_move_console
|
||||
|
||||
ldx CONSOLE_Y
|
||||
cpx #34
|
||||
bcs no_move_console ; bge
|
||||
|
||||
inx
|
||||
inx
|
||||
stx CONSOLE_Y
|
||||
|
||||
no_move_console:
|
||||
|
||||
|
||||
;===================
|
||||
; move physicist
|
||||
;===================
|
||||
; gradually pull you down
|
||||
|
||||
lda FRAMEL
|
||||
and #$f
|
||||
bne no_move_swim
|
||||
|
||||
lda GAIT
|
||||
clc
|
||||
adc #$2
|
||||
and #$f
|
||||
sta GAIT
|
||||
|
||||
no_move_swim:
|
||||
|
||||
lda FRAMEL
|
||||
and #$1f
|
||||
bne no_move_physicist
|
||||
|
||||
ldx PHYSICIST_Y
|
||||
cpx #34
|
||||
bcs no_move_console ; bge
|
||||
|
||||
inx
|
||||
inx
|
||||
stx PHYSICIST_Y
|
||||
|
||||
no_move_physicist:
|
||||
|
||||
|
||||
|
||||
|
||||
;===============
|
||||
; page flip
|
||||
@ -197,6 +285,12 @@ underwater_frame_no_oflo:
|
||||
beq done_underwater
|
||||
|
||||
|
||||
; check if leaving the pool
|
||||
|
||||
lda PHYSICIST_Y
|
||||
cmp #$FE
|
||||
beq done_underwater
|
||||
|
||||
|
||||
; loop forever
|
||||
|
||||
@ -220,7 +314,13 @@ bubbles_sprite:
|
||||
|
||||
|
||||
|
||||
|
||||
console_sprite:
|
||||
.byte 6,5
|
||||
.byte $AA,$A5,$55,$5A,$AA,$AA
|
||||
.byte $AA,$AA,$00,$05,$05,$AA
|
||||
.byte $5A,$05,$00,$00,$00,$55
|
||||
.byte $AA,$A5,$55,$00,$00,$55
|
||||
.byte $AA,$AA,$A5,$A0,$A0,$A5
|
||||
|
||||
|
||||
|
||||
|
99
ootw/ootw_graphics/sprites/physicist_swim.inc
Normal file
99
ootw/ootw_graphics/sprites/physicist_swim.inc
Normal file
@ -0,0 +1,99 @@
|
||||
swim_progression:
|
||||
.word swimming1
|
||||
.word swimming2
|
||||
.word swimming3
|
||||
.word swimming4
|
||||
.word swimming5
|
||||
.word swimming6
|
||||
.word swimming7
|
||||
.word swimming8
|
||||
|
||||
|
||||
swimming1:
|
||||
.byte 2,8
|
||||
.byte $77,$AA
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $22,$22
|
||||
.byte $55,$77
|
||||
|
||||
swimming2:
|
||||
.byte 2,8
|
||||
.byte $77,$7A
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $52,$22
|
||||
.byte $A5,$77
|
||||
|
||||
swimming3:
|
||||
.byte 2,8
|
||||
.byte $77,$77
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $55,$22
|
||||
.byte $AA,$77
|
||||
|
||||
swimming4:
|
||||
.byte 2,8
|
||||
.byte $7A,$77
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $52,$22
|
||||
.byte $A5,$77
|
||||
|
||||
swimming5:
|
||||
.byte 2,8
|
||||
.byte $AA,$77
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $22,$22
|
||||
.byte $55,$77
|
||||
|
||||
swimming6:
|
||||
.byte 2,8
|
||||
.byte $7A,$77
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $22,$72
|
||||
.byte $55,$A7
|
||||
|
||||
swimming7:
|
||||
.byte 2,8
|
||||
.byte $77,$77
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $22,$77
|
||||
.byte $55,$AA
|
||||
|
||||
swimming8:
|
||||
.byte 2,8
|
||||
.byte $77,$7A
|
||||
.byte $55,$55
|
||||
.byte $05,$05
|
||||
.byte $00,$00
|
||||
.byte $00,$00
|
||||
.byte $22,$22
|
||||
.byte $22,$72
|
||||
.byte $55,$A7
|
||||
|
@ -1,7 +1,6 @@
|
||||
;=======================================
|
||||
; Move physicist based on current state
|
||||
;
|
||||
; TODO: only update on even frames to slow things down?
|
||||
|
||||
move_physicist:
|
||||
lda PHYSICIST_STATE
|
||||
|
@ -123,6 +123,7 @@ ON_ELEVATOR = $DF ; ALL
|
||||
LEFT_LIMIT = $E0 ; ALL
|
||||
RIGHT_LIMIT = $E1 ; ALL
|
||||
|
||||
CONSOLE_Y = $E2 ; C1 arrival
|
||||
WHICH_SLUG = $E2 ; C1
|
||||
TELEPORTING = $E2 ; C2 jail
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user