Prev: A884 Up: Map Next: A90C
A89D: Configure current room
Used by the routines at 947A and A915.
A89D LD A,$03 Reset channel 3 for explosion sound (modified in Rex explosion at routine 981F)
A89F LD ($D790),A
A8A2 CALL $A133 Initialise time bar loops counter
A8A5 LD HL,$E9FF Set A039 to the base address of attribute buffer for score points
A8A8 LD ($A039),HL
A8AB CALL $C8EF Configure room connections and enemies of the room
A8AE LD HL,$5B60 Reset projectiles configuration data buffer
A8B1 LD DE,$5B61
A8B4 LD BC,$02ED
A8B7 LD (HL),$00
A8B9 LDIR
A8BB CALL $C745 Initialize graphic and attribute data buffers for current room
A8BE LD HL,$5860 Reset attribute file for room
A8C1 LD DE,$5861
A8C4 LD BC,$029F
A8C7 LD (HL),$00
A8C9 LDIR
A8CB CALL $B205 Reset room graphic buffer
A8CE CALL $B33E Copy tile graphic into room graphic data
A8D1 CALL $A28A Copy room graphic buffer to display file
A8D4 CALL $C8BF Copy room color attribute buffer to attribute file
A8D7 CALL $CB52 Configure static enemies for the current room
A8DA XOR A Set A=0
A8DB LD ($A017),A Set tilt #0 for arrow keys in room
A8DE LD ($A045),A No train generating on room
A8E1 LD A,($A0B8) Set A to the current room number
A8E4 CP $02 If number of room is $02, $03, $04, $06 or $14 jump to initialize train variables
A8E6 JR Z,$A8FD
A8E8 CP $03
A8EA JR Z,$A8FD
A8EC CP $04
A8EE JR Z,$A8FD
A8F0 CP $06
A8F2 JP Z,$A8FD
A8F5 CP $14
A8F7 JP Z,$A8FD
A8FA JP $A903 Jump forward if not
A8FD LD HL,$A9F4 Set HL to data definition for train
A900 CALL $C965 Initilaize train in current room
A903 CALL $99FA Draw shield power
A906 LD A,$01 Set current room configured
A908 LD ($A05C),A
A90B RET
Prev: A884 Up: Map Next: A90C