Prev: 9109 Up: Map Next: 917A
9132: Room handler for Galleries.
Input
Output
Room_GalleryHandler 9132 LD IX,(Room_CurrentInfoDataPtr) Get data for current room.
9136 LD A,(IX+$01) See if there is an object on the one object placement plinth.
9139 AND $7F Do nothing if not.
913B RET Z
913C LD B,$04
913E LD HL,PictureMatrix_Gallery_Image1 Address of pictures character matrix.
Room_GalleryHandler_0 9141 CP (IX+$04) See if object on the plinth matches a picture's object.
9144 JR Z,Room_GalleryHandler_1
9146 LD DE,$0003
9149 ADD IX,DE
914B LD DE,$0009
914E ADD HL,DE
914F DJNZ Room_GalleryHandler_0
9151 RET Object not found in pictures, ignore it.
Object found.
Room_GalleryHandler_1 9152 LD A,(IX+$05) Replace character being displayed.
9155 LD (HL),A
9156 LD (IX+$03),$00 Reset character displayed in room data to show correct object has been placed.
915A LD IX,(Room_CurrentInfoDataPtr)
915E LD (IX+$01),$00 Clear object on plinth
9162 LD A,(IX+$03) See if all objects have been placed.
9165 OR (IX+$06)
9168 OR (IX+$09)
916B OR (IX+$0C)
916E JP NZ,Bg_DrawAll
9171 LD A,(IX+$02) Get index of reward object and place on plinth.
9174 LD (IX+$01),A
9177 JP Bg_DrawAll
Prev: 9109 Up: Map Next: 917A