Prev: B803 Up: Map Next: B82A
B804: Put the scene's objects in the object records
Used by the routine at GAME_ENDED.
From the first record on, one record for each five-byte entry of the list at DE until a zero: the graphic to +0, the flags to +7, the colour to +10, and the place on the screen to +1A and +1B, x and line of the buffer. The scene's update routines draw from there and colour what they draw with +10 (the second entry of SCENE_SPARKS). The records were cleared before (CLEAR_OBJECTS).
Input
DE the list: SCENE_LOST after a lost game, or the one at SCENE_WON after a won one (SCENE_LOST_END)
SET_UP_SCENE B804 LD IY,OBJECTS IY at the first record
B808 LD BC,$0020
SET_UP_SCENE_0 B80B LD A,(DE) zero ends the list
B80C INC DE
B80D AND A
B80E RET Z
B80F LD (IY+$00),A graphic, flags, colour, x, line
B812 LD A,(DE)
B813 INC DE
B814 LD (IY+$07),A
B817 LD A,(DE)
B818 INC DE
B819 LD (IY+$10),A
B81C LD A,(DE)
B81D INC DE
B81E LD (IY+$1A),A
B821 LD A,(DE)
B822 INC DE
B823 LD (IY+$1B),A
B826 ADD IY,BC the next record
B828 JR SET_UP_SCENE_0
Prev: B803 Up: Map Next: B82A