keen: update maps/items

you can now collect keycards and pogo but can't do anything with them
This commit is contained in:
Vince Weaver 2024-04-22 00:52:08 -04:00
parent 9b418215d1
commit 9c5472339d
17 changed files with 132 additions and 85 deletions

View File

@ -226,7 +226,7 @@ ENGINE: engine.o
engine.o: engine.s zp.inc hardware.inc \
text_help.s gr_fast_clear.s text_quit_yn.s text_drawbox.s \
level1_enemies.s level1_items.s \
level1_enemies.s engine_items.s \
graphics/keen_graphics.inc sprites/keen_sprites.inc \
status_bar.s draw_keen.s move_keen.s gr_putsprite_crop.s \
draw_tilemap.s tilemap_lookup.s \
@ -235,22 +235,6 @@ engine.o: engine.s zp.inc hardware.inc \
ca65 -o engine.o engine.s -l engine.lst
####
#LEVEL2: level2.o
# ld65 -o LEVEL2 level2.o -C ../../linker_scripts/apple2_2000.inc
#
#level2.o: level2.s zp.inc hardware.inc \
# text_help.s gr_fast_clear.s text_quit_yn.s text_drawbox.s \
# level1_enemies.s level1_items.s \
# graphics/keen_graphics.inc sprites/keen_sprites.inc \
# maps/level2_map.zx02 \
# status_bar.s draw_keen.s move_keen.s gr_putsprite_crop.s \
# draw_tilemap.s tilemap_lookup.s \
# level1_sfx.s longer_sound.s level2_data.inc \
# keyboard.s handle_laser.s
# ca65 -o level2.o level2.s -l level2.lst
####
graphics/keen1_title.hgr.zx02:

View File

@ -9,8 +9,6 @@
.include "enemies.inc"
; .include "level1_data.inc"
level_data = $6000
max_tile_x = level_data+0
max_tile_y = level_data+1
@ -97,6 +95,7 @@ level_start:
sta KEEN_FALLING
sta KEEN_SHOOTING
sta KEYCARDS
sta ORACLE_SPOKEN
; debug
@ -324,7 +323,7 @@ level1_levelover:
.include "handle_laser.s"
.include "draw_tilemap.s"
.include "level1_enemies.s"
.include "level1_items.s"
.include "engine_items.s"
.include "level1_sfx.s"
.include "longer_sound.s"

View File

@ -1,3 +1,26 @@
ITEMS_START = 24 ; pogo is first?
ITEMS_MAX = 35 ; green keycard is last
ITEM_DOOR = 11
ITEM_POGO = 24
ITEM_SPECIAL = 25
ITEM_KEYCARD = 32
; POGO= 24
; SPECIAL = 25 (ship part or oracle)
; GUN = 26
; LOLLIPOP = 27
; SODA = 28
; PIZZA = 29
; BOOK = 30
; BEAR = 31
; YELLOW KEYCARD = 32
; RED KEYCARD = 33
; BLUE KEYCARD = 34
; GREEN KEYCARD = 35
;======================
; check touching things
;======================
@ -123,25 +146,33 @@ check_item:
lda (INL),Y
do_check_item:
cmp #26
beq was_oracle
cmp #27
cmp #ITEMS_START
bcc done_check_item ; not an item
cmp #32
cmp #(ITEMS_MAX+1)
bcs done_check_item ; not an item
cmp #ITEM_POGO
beq was_pogo ; if pogo, then pogo
cmp #ITEM_SPECIAL ; if oracle/ship part skip ahead
beq was_special
sec
sbc #27 ; subtract off to get index
sbc #ITEMS_START ; subtract off to get index
; 0 = laser gun
; 1 = lollipop 100 pts
; 2 = book 1000 pts
; 2 = carbonated beverage 200 pts
; 3 = pizza 500 pts
; 4 = carbonated beverage 200 pts
; ? = bear 5000 pts
; 4 = book 1000 pts
; 5 = bear 5000 pts
; 6...9 = keycards
beq get_laser_gun
beq get_laser_gun ; if laser gun skip ahead
cmp #6
bcs get_keycard
; otherwise look up points and add it
@ -163,6 +194,9 @@ get_laser_gun:
; keycards go here too...
get_keycard:
; TODO
done_item_pickup:
; erase big tilemap
@ -186,7 +220,7 @@ done_check_item:
check_door:
ldy #0
lda (INL),Y
cmp #11 ; door tile
cmp #ITEM_DOOR ; door tile
bne done_check_door
at_door:
@ -200,10 +234,31 @@ at_door:
done_check_door:
rts
;==================================
; item pogo
;==================================
was_pogo:
lda #$FF
sta POGO ; pick up pogo
bne done_item_pickup ; bra
;==================================
; item special
;==================================
; if oracle text, then oracle
; otherwise is ship part
was_special:
lda oracle_message
cmp #$ff
beq was_ship_part
was_oracle:
lda ORACLE_SPOKEN
bne done_oracle
bit KEYRESET
inc ORACLE_SPOKEN
bit TEXTGR
@ -232,6 +287,13 @@ done_oracle:
rts
was_ship_part:
; TODO
; play sound effect
jmp done_item_pickup
;=============================
; check if touching enemy
@ -318,8 +380,8 @@ score_lookup:
.byte $00,$01,$10,$05,$02,$50 ; BCD
; 0 = laser gun
; 1 = lollipop 100 pts
; 2 = book 1000 pts
; 2 = carbonated beverage 200 pts
; 3 = pizza 500 pts
; 4 = carbonated beverage 200 pts
; ? = bear 5000 pts
; 4 = book 1000 pts
; 5 = bear 5000 pts

View File

@ -1,5 +1,5 @@
5 HOME
10 PRINT "LOADING KEEN V0.06"
10 PRINT "LOADING KEEN V0.07"
20 PRINT " KEEN1 PROOF-OF-CONCEPT DEMAKE"
30 PRINT:PRINT
70 PRINT "BASED ON KEEN1 BY ID"

View File

@ -16,8 +16,8 @@ level1_data:
.byte 8 ;NUM_ENEMIES = 8
.byte 32 ;HARDTOP_TILES = 32 ; start at 32
.byte 40 ;ALLHARD_TILES = 40 ; start at 40
.byte 40 ;HARDTOP_TILES = 40
.byte 48 ;ALLHARD_TILES = 48
.align $100
@ -40,7 +40,7 @@ enemy_data_count: .byte 8, 8, 8, 8, 8, 8, 8, 8
; at $6200
oracle_message:
.byte $0
.byte $FF ; no message
.align $100

View File

@ -29,9 +29,9 @@ enemy_data:
; at $6200
oracle_message:
; 012345678901234567890123456789012345678
.byte 2,21,"YOU HEAR IN YOUR MIND:",0
.byte 2,22,"IT IS TOO BAD THAT YOU CANNOT READ",0
.byte 2,23,"THE STANDARD GALACTIC ALPHABET, HUMAN",0
.byte 2,21,"A YORPY MIND-THOUGHT BELLOWS:",0
.byte 2,22,"YOU CANNOT KILL THE",0
.byte 2,23,"VORTICON COMMANDER DIRECTLY.",0
.align $100

View File

@ -14,30 +14,30 @@ SFX_YORPBOPSND = 8
play_sfx:
lda sounds_low,Y
sta INL
sta SOUNDL
lda sounds_high,Y
sta INH
sta SOUNDH
ldy #0
sty SOUND_OFFSET
play_sfx_loop:
ldy SOUND_OFFSET
lda (INL),Y
lda (SOUNDL),Y
sta speaker_frequency
iny
lda (INL),Y
lda (SOUNDL),Y
cmp #$FF
beq play_done
asl
; clc
; adc (INL),Y
; adc (SOUNDL),Y
sta speaker_duration
iny
bne no_wrap
inc INH
inc SOUNDH
no_wrap:
sty SOUND_OFFSET

View File

@ -14,8 +14,8 @@ level2_data:
.byte 0 ;NUM_ENEMIES = 8
.byte 32 ;HARDTOP_TILES = 32 ; start at 32
.byte 40 ;ALLHARD_TILES = 40 ; start at 40
.byte 40 ;HARDTOP_TILES = 40
.byte 48 ;ALLHARD_TILES = 48
.align $100

View File

@ -16,8 +16,8 @@ level3_data:
.byte 8 ;NUM_ENEMIES = 8
.byte 32 ;HARDTOP_TILES = 32 ; start at 32
.byte 40 ;ALLHARD_TILES = 40 ; start at 40
.byte 40 ;HARDTOP_TILES = 40
.byte 48 ;ALLHARD_TILES = 48
.align $100
@ -56,7 +56,7 @@ enemy_data_count: .byte 8, 8, 8, 8, 8, 8, 8, 8
; at $6200
oracle_message:
.byte $0
.byte $FF ; no message
.align $100

View File

@ -14,10 +14,10 @@ level4_data:
.byte 0 ;START_TILEMAP_X = 0
.byte 8 ;START_TILEMAP_Y = 8
.byte 0 ;NUM_ENEMIES = 8
.byte 8 ;NUM_ENEMIES = 8
.byte 32 ;HARDTOP_TILES = 32 ; start at 32
.byte 40 ;ALLHARD_TILES = 40 ; start at 40
.byte 40 ;HARDTOP_TILES = 40
.byte 48 ;ALLHARD_TILES = 48
.align $100
@ -28,38 +28,37 @@ enemy_data:
enemy_data_out: .byte 1, 0, 0, 0, 0, 0, 0, 0
enemy_data_exploding: .byte 0, 0, 0, 0, 0, 0, 0, 0
enemy_data_type: .byte YORP, YORP, YORP, YORP, YORP, YORP,YORP,YORP
enemy_data_direction: .byte RIGHT, LEFT, LEFT, RIGHT, LEFT, RIGHT,LEFT,LEFT
enemy_data_tilex: .byte 16, 19, 23, 14, 14, 16, 42, 70
enemy_data_tiley: .byte 9, 9, 9, 45, 38, 43, 44, 34
enemy_data_direction: .byte LEFT, LEFT, LEFT, LEFT, RIGHT, RIGHT,RIGHT,RIGHT
enemy_data_tilex: .byte 18, 31, 18, 43, 17, 32, 105, 103
enemy_data_tiley: .byte 3, 3, 7, 7 , 16, 16, 11, 16
enemy_data_x: .byte 0, 0, 0, 0, 0, 0, 0, 0
enemy_data_y: .byte 0, 0, 0, 0, 0, 0, 0, 0
enemy_data_state: .byte 0, 0, 0, 0, 0, 0, 0, 0
enemy_data_count: .byte 8, 8, 8, 8, 8, 8, 8, 8
; FIXME: this is not correct
; enemy1: yorp @16,9, right
; enemy2: yorp @19,9 left
; enemy3: yorp @23,9 left
; enemy4: yorp @14,45 right
; enemy5: yorp @14,38 left
; enemy6: yorp @16,43 right
; enemy7: yorp @42,44 left
; enemy8: yorp @70,34 left
; enemy9: garg @50,31 right
; enemy10: garg @63,45 right
; enemy1: yorp @18,3, leftt
; enemy2: yorp @31,3 left
; enemy3: yorp @18,7 left
; enemy4: yorp @43,7 left
; enemy5: yorp @17,16 right
; enemy6: yorp @32,16 right
; enemy7: yorp @105,11 right
; enemy8: yorp @103,16 right
; enemy?: butler robot@27,7 left
; enemy?: vorticon @53,8 right
; enemy9: garg @63,16 right
; enemy?: vorticon @97,4 right
.align $100
; at $6200
oracle_message:
.byte $0
.byte $FF ; no message
.align $100
; at $6300
level1_data_zx02:
level4_data_zx02:
.incbin "maps/level4_map.zx02"

View File

@ -2,20 +2,20 @@
; at $6000
level2_data:
.byte 20 ;MAX_TILE_X = 116 ; 116 wide
.byte 26 ;MAX_TILE_Y = 16 ; 16 tall
level5_data:
.byte 24 ;MAX_TILE_X
.byte 37 ;MAX_TILE_Y
.byte 1 ;START_KEEN_TILEX = 1
.byte 13 ;START_KEEN_TILEY = 13
.byte 1 ;START_KEEN_TILEX
.byte 29 ;START_KEEN_TILEY
.byte 0 ;START_TILEMAP_X = 0
.byte 5 ;START_TILEMAP_Y = 5
.byte 0 ;START_TILEMAP_X
.byte 21 ;START_TILEMAP_Y
.byte 0 ;NUM_ENEMIES = 8
.byte 0 ;NUM_ENEMIES
.byte 32 ;HARDTOP_TILES = 32 ; start at 32
.byte 40 ;ALLHARD_TILES = 40 ; start at 40
.byte 40 ;HARDTOP_TILES
.byte 48 ;ALLHARD_TILES
.align $100
@ -24,14 +24,15 @@ level2_data:
enemy_data:
.byte $0
; enemy0: garg at 7,7, right
.align $100
; at $6200
oracle_message:
.byte $FF ; no message
; 012345678901234567890123456789012345678
.byte 2,21,"YOU HEAR IN YOUR MIND:",0
.byte 2,22,"IT IS TOO BAD THAT YOU CANNOT READ",0
.byte 2,23,"THE STANDARD GALACTIC ALPHABET, HUMAN",0
.align $100

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -155,6 +155,8 @@ MAX_TILE_Y = $AA
NUM_ENEMIES = $AF
HARDTOP_TILES = $B0
ALLHARD_TILES = $B1
SOUNDL = $B2
SOUNDH = $B3
WHICH_SLOT = $DA
JS_BUTTON_STATE = $DB