Prev: F30A Up: Map Next: F3A0
F345: Initialize game data and make all objects visible
Used by the routine at C881.
F345 LD HL,$69EA Point HL to the flags in the first room.
F348 LD DE,$0007 Increment by 7 bytes from the start of an entry to a moving object list.
F34B LD BC,$0005 Increment by 5 bytes from the moving object list to the start of an entry.
F34E LD A,$30 Number of rooms to check.
F350 RES 5,(HL)
F352 RES 4,(HL)
F354 ADD HL,DE Move to the moving object list in this room.
F355 LD (HL),$00 Set it to empty.
F357 ADD HL,BC Move to the next room data.
F358 DEC A Loop back while there are more rooms to look at.
F359 JR NZ,$F350
F35B LD HL,$F3A0 Get the flags for what to set on initialisation.
F35E LD (HL),$20
F360 INC HL
F361 LD (HL),$30
F363 LD HL,$69EA Set the object data pointer to the first room.
F366 LD ($F3A2),HL
F369 LD B,$08
F36B CALL $F3A4
F36E LD A,$10
F370 LD ($F3A0),A
F373 LD B,$0F
F375 CALL $F3A4
F378 LD HL,$F3A0
F37B LD (HL),$01
F37D INC HL
F37E LD (HL),$07
F380 LD HL,$69F1 Set the object data pointer to more flags in the first room.
F383 LD ($F3A2),HL
F386 LD B,$02
F388 CALL $F3A4
F38B LD A,$02
F38D LD ($F3A0),A
F390 LD B,$08
F392 CALL $F3A4
F395 LD A,$04
F397 LD ($F3A0),A
F39A LD B,$04
F39C CALL $F3A4
F39F RET
Prev: F30A Up: Map Next: F3A0