![]() |
Routines |
| Prev: B4A2 | Up: Map | Next: B4FD |
|
Sets up which room to display based on display flags and processes objects for that room.
|
||||
| CheckFlagAndSetDisplay | B4A3 | LD A,($B4A2) | A=*DisplaySetupFlag. | |
| B4A6 | INC A | Increment A. | ||
| B4A7 | JR NZ,CheckFlagAndSetDisplay_NoAction | Jump to CheckFlagAndSetDisplay_NoAction if display already set up. | ||
| B4A9 | LD ($B4A2),A | Write A to *DisplaySetupFlag. | ||
| B4AC | LD A,($B173) | A=*DisplayModeFlag. | ||
| B4AF | BIT 7,A | Jump to CheckFlagAndSetDisplay_NoAction if special display mode not needed. | ||
| B4B1 | JR Z,CheckFlagAndSetDisplay_NoAction | |||
|
Set up special display mode.
|
||||
| B4B3 | LD A,$FE | Write FE to *RoomDisplayParameter (set room display parameter). | ||
| B4B5 | LD ($A034),A | |||
| B4B8 | LD HL,($B172) | Write *DisplayDataPointer to *DisplayPointer. | ||
| B4BB | LD ($A02F),HL | |||
| B4BE | OR %00000001 | Set bit 0. | ||
| B4C0 | RET | Return. | ||
|
This entry point is used by the routine at InitialiseDisplayBuffer.
|
||||
| CheckFlagAndSetDisplay_Entry | B4C1 | LD A,($A00F) | Jump to CheckFlagAndSetDisplay if *DisplayMode is 05. | |
| B4C4 | CP $05 | |||
| B4C6 | JR Z,CheckFlagAndSetDisplay | |||
| B4C8 | LD A,($B173) | A=*DisplayModeFlag (check display mode flag). | ||
| B4CB | BIT 7,A | Jump to CheckFlagAndSetDisplay_ProcessObjects if special mode isn't needed. | ||
| B4CD | JR Z,CheckFlagAndSetDisplay_ProcessObjects | |||
| CheckFlagAndSetDisplay_NoAction | B4CF | LD A,$FF | A=FF. | |
| B4D1 | CP $FF | Compare with FF. | ||
| B4D3 | RET | Return. | ||
| CheckFlagAndSetDisplay_ProcessObjects | B4D4 | PUSH IY | Stash IY on the stack. | |
| B4D6 | LD IX,($B17E) | IX=*ObjectTablePointer (get object table pointer). | ||
| B4DA | LD A,($A01D) | A=*ObjectAttributeValue (get object attribute). | ||
| B4DD | AND %00000001 | Keep only bit 0. | ||
| B4DF | LD ($A038),A | Write A to *ObjectAttributeFlag (save attribute flag). | ||
| B4E2 | LD A,($A00F) | Compare *DisplayMode with 05. | ||
| B4E5 | CP $05 | |||
| B4E7 | LD IY,$D39B | IY=ProcessObjectEntryAlternate (set object processing routine). | ||
| B4EB | JR C,CheckFlagAndSetDisplay_ProcessLoop | Jump to CheckFlagAndSetDisplay_ProcessLoop if *DisplayMode is less than 05. | ||
| B4ED | LD IY,$D36A | IY=ProcessObjectEntry (use alternate routine). | ||
| CheckFlagAndSetDisplay_ProcessLoop | B4F1 | CALL CheckFlagAndSetDisplay_ProcessPointer | Call CheckFlagAndSetDisplay_ProcessPointer (process display pointer). | |
| B4F4 | CP $FF | Compare with FF. | ||
| B4F6 | LD ($B17E),IX | Write IX to *ObjectTablePointer (save updated object table pointer). | ||
| B4FA | POP IY | Restore IY from the stack. | ||
| B4FC | RET | Return. | ||
| Prev: B4A2 | Up: Map | Next: B4FD |