Routines |
Prev: 7B36 | Up: Map | Next: 7BB5 |
This drops the hero's first held item then moves the second item into the first slot.
Used by the routine at process_player_input_fire.
|
||||
Return if no items are held.
|
||||
drop_item | 7B8B | LD A,($8215) | Fetch the first held item | |
7B8E | CP $FF | Is the item item_NONE? ($FF) | ||
7B90 | RET Z | Return if so - there are no items to drop | ||
If dropping the uniform reset the hero's sprite.
|
||||
7B91 | CP $06 | Does A contain item_UNIFORM? (6) | ||
7B93 | JP NZ,drop_item_0 | Jump if not | ||
7B96 | LD HL,$CE2E | Set the hero's sprite definition pointer to sprite_prisoner to remove the guard's uniform | ||
7B99 | LD ($8015),HL | |||
drop_item_0 | 7B9C | PUSH AF | Save item | |
Shuffle items down.
|
||||
7B9D | LD HL,$8216 | Point HL at the second held item | ||
7BA0 | LD A,(HL) | Fetch its value | ||
7BA1 | LD (HL),$FF | Set it to item_NONE | ||
7BA3 | DEC HL | Now point to the first held item | ||
7BA4 | LD (HL),A | Store the fetched item there | ||
Redraw the items.
|
||||
7BA5 | CALL draw_all_items | Draw held items | ||
7BA8 | LD BC,$3040 | Play the "drop item" sound | ||
7BAB | CALL play_speaker | |||
7BAE | CALL choose_game_window_attributes | Choose game window attributes | ||
7BB1 | CALL set_game_window_attributes | Set game window attributes | ||
7BB4 | POP AF | Restore item | ||
FALL THROUGH into drop_item_tail.
|
Prev: 7B36 | Up: Map | Next: 7BB5 |