Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shaymanjohn committed Dec 27, 2020
1 parent e300e83 commit 436d5ae
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 16 deletions.
Binary file modified aticatac.dsk
Binary file not shown.
15 changes: 9 additions & 6 deletions boss.asm
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@ init_hunchback
ld (boss_mover), hl

ld iy, boss_hunchback
ld ix, boss

ld a, state_active
ld (ix + spr_state), a
jp init_sprite
jp common_boss_init

init_devil
ld hl, move_devil_and_frank
Expand Down Expand Up @@ -343,10 +339,17 @@ update_hunchy
ld a, (ix + spr_x)
add d
ld (ix + spr_x), a
ld b, a

ld a, (ix + spr_y)
add e
ld (ix + spr_y), a
push iy
ld iy, boss_hunchback
ld (iy + 14), b
ld (iy + 15), a
pop iy

ld a, d
or e
Expand All @@ -359,7 +362,7 @@ update_hunchy
push ix
push iy

; remove leaf and move to another room
; remove item
SELECT_BANK room_bank_config
pop ix

Expand Down
6 changes: 6 additions & 0 deletions chicken.asm
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ health_decay
and a
ret z
dec a
if GOD_MODE
ret
endif
ld (health), a
ret

health_down
if GOD_MODE
ret
endif
ld a, (health)
and a
ret z
Expand Down
4 changes: 2 additions & 2 deletions data/item_list.asm
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,11 @@ room_bank_item_list ;0x645d
defb 0x12, 0x1B, 0x00, 0x70, 0x50, 0x04, 0xCC, 0x49
defb 0x12, 0x2E, 0x00, 0x38, 0x57, 0x04, 0xCC, 0x49
defb 0x12, 0x7D, 0x00, 0x48, 0x50, 0x04, 0xCC, 0x49
defb 0x12, 0x2E, 0x00, 0x60, 0x7F, 0x04, 0xCC, 0x49
defb 0x12, 0x2E, 0x00, 0x68, 0x7F, 0x04, 0xCC, 0x49
defb 0x12, 0x7D, 0x00, 0x58, 0x80, 0x04, 0xCC, 0x49
defb 0x12, 0x2A, 0x00, 0x38, 0x57, 0x04, 0xCC, 0x49
defb 0x12, 0x2D, 0x00, 0x30, 0x80, 0x04, 0xCC, 0x49
defb 0x12, 0x2A, 0x00, 0x60, 0x7F, 0x04, 0xCC, 0x49
defb 0x12, 0x2A, 0x00, 0x68, 0x7F, 0x04, 0xCC, 0x49
defb 0x12, 0x2D, 0x00, 0x70, 0x80, 0x04, 0xCC, 0x49
defb 0x1C, 0x8D, 0x00, 0x28, 0x67, 0xE0, 0x00, 0x00
defb 0x1D, 0x8C, 0x00, 0x28, 0x67, 0xE0, 0x00, 0x00
Expand Down
4 changes: 4 additions & 0 deletions doors.asm
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,10 @@ found_door_locked ; if any pocket contains value in c, remove
cp c
jr z, got_the_right_key

if GOD_MODE
jr got_the_right_key
endif

set 7, e ; not carrying the right key - collision close

got_the_right_key
Expand Down
22 changes: 21 additions & 1 deletion food.asm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ food_init_loop
ld (ix + 17), 0xff
ret

replen_food
SELECT_BANK sprite_bank_config

ld ix, food_items
ld b, (food_items_end - food_items) / 8
ld de, 8

food_replen_loop
ld a, (ix + 2)
and a
jr z, no_replen

dec a
ld (ix + 2), a

no_replen
add ix, de
djnz food_replen_loop
ret

add_tombstone
ld ix, tombstones
ld a, (num_lives)
Expand Down Expand Up @@ -124,7 +144,7 @@ remove_food
call draw_food_item2

SELECT_BANK sprite_bank_config
ld a, 1
ld a, food_respawn
ld (ix + 2), a
ld (erase_food_with_index), ix

Expand Down
2 changes: 2 additions & 0 deletions macros.asm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
GOD_MODE=0

macro SET_MODE screenmode
ld bc, 0x7f00 + 128 + 8 + 4 + {screenmode}
out (c), c
Expand Down
1 change: 1 addition & 0 deletions room.asm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ draw_room
call update_collision_grid_for_items

call try_teleport_dracula
call replen_food

; Reset data for new room.
xor a
Expand Down
10 changes: 3 additions & 7 deletions state_manager.asm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ select_game
ld (room_changed), a
ld (saved_room_number), a

; ld a, 0x57
; ld a, 0x64
; ld (room_number), a

call init_player
Expand Down Expand Up @@ -131,13 +131,9 @@ reset_room_count_loop
ldir

; hunchback should be moved back to doorway
ld ix, boss
ld iy, boss_hunchback
ld a, (iy + 14)
ld (ix + spr_x), a

ld a, (iy + 15)
ld (ix + spr_y), a
ld (iy + 14), 44
ld (iy + 15), 32
ret

select_end
Expand Down
2 changes: 2 additions & 0 deletions utils/constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ max_doors equ 16 ; per room
max_food equ 5 ; per room (includes mushrooms)
player_width equ 5 ; bytes

food_respawn equ 20 ; replen food after visiting this many rooms after pickup

knight_height equ 20
wizard_height equ 21
serf_height equ 19
Expand Down

0 comments on commit 436d5ae

Please sign in to comment.