Prev: 46242 Up: Map Next: 46333
46243: Check Flag And Set Display
Sets up which room to display based on display flags and processes objects for that room.
CheckFlagAndSetDisplay 46243 LD A,(46242) A=*DisplaySetupFlag.
46246 INC A Increment A.
46247 JR NZ,CheckFlagAndSetDisplay_NoAction Jump to CheckFlagAndSetDisplay_NoAction if display already set up.
46249 LD (46242),A Write A to *DisplaySetupFlag.
46252 LD A,(45427) A=*DisplayModeFlag.
46255 BIT 7,A Jump to CheckFlagAndSetDisplay_NoAction if special display mode not needed.
46257 JR Z,CheckFlagAndSetDisplay_NoAction
Set up special display mode.
46259 LD A,254 Write 254 to *RoomDisplayParameter (set room display parameter).
46261 LD (41012),A
46264 LD HL,(45426) Write *DisplayDataPointer to *DisplayPointer.
46267 LD (41007),HL
46270 OR %00000001 Set bit 0.
46272 RET Return.
This entry point is used by the routine at InitialiseDisplayBuffer.
CheckFlagAndSetDisplay_Entry 46273 LD A,(40975) Jump to CheckFlagAndSetDisplay if *DisplayMode is 5.
46276 CP 5
46278 JR Z,CheckFlagAndSetDisplay
46280 LD A,(45427) A=*DisplayModeFlag (check display mode flag).
46283 BIT 7,A Jump to CheckFlagAndSetDisplay_ProcessObjects if special mode isn't needed.
46285 JR Z,CheckFlagAndSetDisplay_ProcessObjects
CheckFlagAndSetDisplay_NoAction 46287 LD A,255 A=255.
46289 CP 255 Compare with 255.
46291 RET Return.
CheckFlagAndSetDisplay_ProcessObjects 46292 PUSH IY Stash IY on the stack.
46294 LD IX,(45438) IX=*ObjectTablePointer (get object table pointer).
46298 LD A,(40989) A=*ObjectAttributeValue (get object attribute).
46301 AND %00000001 Keep only bit 0.
46303 LD (41016),A Write A to *ObjectAttributeFlag (save attribute flag).
46306 LD A,(40975) Compare *DisplayMode with 5.
46309 CP 5
46311 LD IY,54171 IY=ProcessObjectEntryAlternate (set object processing routine).
46315 JR C,CheckFlagAndSetDisplay_ProcessLoop Jump to CheckFlagAndSetDisplay_ProcessLoop if *DisplayMode is less than 5.
46317 LD IY,54122 IY=ProcessObjectEntry (use alternate routine).
CheckFlagAndSetDisplay_ProcessLoop 46321 CALL CheckFlagAndSetDisplay_ProcessPointer Call CheckFlagAndSetDisplay_ProcessPointer (process display pointer).
46324 CP 255 Compare with 255.
46326 LD (45438),IX Write IX to *ObjectTablePointer (save updated object table pointer).
46330 POP IY Restore IY from the stack.
46332 RET Return.
Prev: 46242 Up: Map Next: 46333