diff --git a/monkey/Makefile b/monkey/Makefile index 4703a0a8..2bdfefe6 100644 --- a/monkey/Makefile +++ b/monkey/Makefile @@ -55,7 +55,8 @@ monkey.o: monkey.s zp.inc hardware.inc common_defines.inc \ keyboard.s joystick.s \ leveldata_monkey.inc \ monkey_actions.s update_bottom.s \ - guy.brush + guy.brush \ + monkey_lookout.s ca65 -o monkey.o monkey.s -l monkey.lst graphics/graphics.inc: diff --git a/monkey/graphics/lookout.png b/monkey/graphics/lookout.png index 03b9fd69..f55c411d 100644 Binary files a/monkey/graphics/lookout.png and b/monkey/graphics/lookout.png differ diff --git a/monkey/monkey.s b/monkey/monkey.s index 545c4de0..29a1dc0f 100644 --- a/monkey/monkey.s +++ b/monkey/monkey.s @@ -85,15 +85,15 @@ game_loop: ;==================================== lda LOCATION -; cmp #NIBEL_BLUE_PATH_2P5 -; beq animate_gate_n + cmp #MONKEY_LOOKOUT + beq animate_flame jmp nothing_special -animate_gate_n: -; jsr update_gate_n +animate_flame: + jsr draw_fire jmp nothing_special @@ -172,6 +172,19 @@ done_move_guybrush: ; draw foreground sprites ;==================================== + lda LOCATION + cmp #MONKEY_LOOKOUT + beq do_draw_wall + + jmp nothing_foreground + +do_draw_wall: + jsr draw_wall + jmp nothing_foreground + + +nothing_foreground: + ;==================================== ; what are we pointing too @@ -250,5 +263,8 @@ really_exit: .include "common_sprites.inc" .include "guy.brush" + .include "monkey_lookout.s" + .include "monkey_actions.s" .include "update_bottom.s" + diff --git a/monkey/monkey_lookout.s b/monkey/monkey_lookout.s new file mode 100644 index 00000000..15d3d196 --- /dev/null +++ b/monkey/monkey_lookout.s @@ -0,0 +1,79 @@ + +draw_fire: + lda FRAMEL + and #$18 + lsr + lsr + tay + lda fire_sprites,Y + sta INL + lda fire_sprites+1,Y + sta INH + + lda #16 + sta XPOS + lda #18 + sta YPOS + + jsr put_sprite_crop + + rts + + + + + +fire_sprites: + .word fire1_sprite + .word fire2_sprite + .word fire3_sprite + .word fire2_sprite + +fire1_sprite: + .byte 2,4 + .byte $dA,$AA + .byte $dd,$9A + .byte $99,$dd + .byte $dd,$dd + +fire2_sprite: + .byte 2,4 + .byte $AA,$AA + .byte $dd,$dd + .byte $9d,$99 + .byte $dd,$dd + +fire3_sprite: + .byte 2,4 + .byte $AA,$aa + .byte $9A,$dd + .byte $d9,$9d + .byte $dd,$dd + + + +draw_wall: + + lda #wall_sprite + sta INH + + lda #18 + sta XPOS + lda #22 + sta YPOS + + jsr put_sprite_crop + + rts + +wall_sprite: + .byte 9,6 + .byte $AA,$AA,$8A,$0A,$5A,$AA,$AA,$AA,$AA + .byte $AA,$8A,$50,$05,$60,$AA,$AA,$6A,$6A + .byte $58,$08,$55,$60,$60,$AA,$AA,$66,$60 + .byte $06,$66,$26,$00,$66,$AA,$AA,$66,$00 + .byte $06,$05,$65,$60,$50,$5A,$5A,$66,$00 + .byte $00,$60,$00,$60,$06,$60,$06,$06,$06 +