Prev: 691A Up: Map Next: 6939
6920: Set hero sprite for room
This is called by enter_room to select an appropriate hero sprite for the current room. This forces the use of the prisoner sprite set with the crawl flag enabled, when the hero is in a tunnel room.
This routine doesn't remember the hero's uniform state, so if he enters a tunnel while wearing a guard's uniform you will find it removed when he exits from the tunnel.
Used by the routine at enter_room.
set_hero_sprite_for_room 6920 LD HL,$800D Set the hero's visible character input field to input_KICK
6923 LD (HL),$80
6925 INC L Point HL at vischar.direction ($800E)
vischar_DIRECTION_CRAWL is set, or cleared, here but not tested directly anywhere else so it must be an offset into animindices[].
When in tunnel rooms force the hero sprite to 'prisoner' and set the crawl flag appropriately.
6926 LD A,($68A0) If the global current room index is room_29_SECOND_TUNNEL_START or above...
6929 CP $1D
692B JR C,set_hero_sprite_for_room_0
We're in a tunnel room.
692D SET 2,(HL) Set the vischar_DIRECTION_CRAWL bit on vischar.direction
692F LD HL,$CE2E Set vischar.mi.sprite to the prisoner sprite set
6932 LD ($8015),HL
6935 RET Return
We're not in a tunnel room.
set_hero_sprite_for_room_0 6936 RES 2,(HL) Clear the vischar_DIRECTION_CRAWL bit from vischar.direction
6938 RET Return
Prev: 691A Up: Map Next: 6939