![]() |
Routines |
| Prev: 57025 | Up: Map | Next: 57179 |
|
Used by the routine at CheckCharacterForRoomGraphics.
Fails the script unless the low three bits of IY+4 are set and IY+2 is above IX+2 by more than the object count of the value in A. A non-zero return means the script step succeeded.
|
||||
| CombineCharacterRoom | 57060 | LD B,A | Keep the value in A as the count. | |
|
None of the bits 7 are set in IY+4?
|
||||
| 57061 | LD A,(IY+4) | Return zero through ParseInputNumber_ReturnZero if none of the bits 7 are set in the byte at IY+4. | ||
| 57064 | AND 7 | |||
| 57066 | JP Z,ParseInputNumber_ReturnZero | |||
| 57069 | LD A,(IY+2) | Go to CombineCharacterRoom_ClearResult if the byte at IY+2 is below the byte at IX+2. | ||
| 57072 | SUB (IX+2) | |||
| 57075 | JR C,CombineCharacterRoom_ClearResult | |||
| 57077 | PUSH AF | Save the difference, take the value in B and call StartTheAttributeCount. | ||
| 57078 | LD A,B | |||
| 57079 | CALL StartTheAttributeCount | |||
| 57082 | LD B,A | Go to CombineCharacterRoom_ClearResult if that difference is below the object count from StartTheAttributeCount. | ||
| 57083 | POP AF | |||
| 57084 | SUB B | |||
| 57085 | JR C,CombineCharacterRoom_ClearResult | |||
| 57087 | RET NZ | Return if that difference is above the count from StartTheAttributeCount. | ||
| CombineCharacterRoom_ClearResult | 57088 | XOR A | Clear A. | |
| 57089 | RET | Return. | ||
| 57090 | DEFB 106,29,36,223 | Display record read by ProcessDisplayRecord: flags 106 value 29 handler 57124. | ||
| 57094 | LD IY,(40981) | Read the secondary pointer at 40981. | ||
| 57098 | LD IX,(40979) | Read the current object. | ||
| 57102 | LD A,(41013) | |||
| 57105 | LD (IX+1),A | Store the moved marker. | ||
| 57108 | LD A,(IY+15) | Store the character attribute. | ||
| 57111 | LD (IX+15),A | |||
| 57114 | LD B,A | |||
| 57115 | LD A,(41012) | Read the room display parameter, then call ProcessObjectLocationRecursively to run object location recursively. | ||
| 57118 | CALL ProcessObjectLocationRecursively | |||
| 57121 | OR %00000001 | Reset the zero flag. | ||
| 57123 | RET | Return. | ||
|
Reached through the display record at 57090, dispatched by DispatchLookedUpHandlerThird.
|
||||
| 57124 | LD A,(41012) | Pass the room display parameter in B and the room graphics parameter in A, and carry on at ProcessObjectAttribute_LookObjectRun. | ||
| 57127 | LD B,A | |||
| 57128 | LD A,(41013) | |||
| 57131 | JP ProcessObjectAttribute_LookObjectRun | |||
|
|
||||
| 57134 | LD A,(41012) | Go to CombineCharacterRoom_TestActionSucceeded if the mother id is 255. | ||
| 57137 | CALL GetObjectMotherID | |||
| 57140 | JR Z,CombineCharacterRoom_TestActionSucceeded | |||
| 57142 | LD HL,41014 | Go to ParseInputNumber_ReturnZero if the containing object is not this character. | ||
| 57145 | CP (HL) | |||
| 57146 | JP NZ,ParseInputNumber_ReturnZero | |||
| CombineCharacterRoom_TestActionSucceeded | 57149 | OR %00000001 | Reset the zero flag. | |
| 57151 | RET | Return. | ||
| 57152 | DEFB 120,16,46,223,128,64,0,0 | Display record read by ProcessDisplayRecord: flags 120 value 16 handler 57134, parameters 128 64 0 0 0. | ||
| 57160 | DEFB 0 | |||
| 57161 | LD A,1 | Take 1 as the room flag. | ||
| 57163 | LD (51886),A | Store the room flag. | ||
| 57166 | CALL CheckCharacterID | Call CheckCharacterID to check the character id. | ||
| 57169 | RET NZ | Return unless the character is Sherlock, 1 or zero. | ||
| 57170 | CALL PrintObjectDescriptionText | Call PrintObjectDescriptionText to print the object's description. | ||
| 57173 | CALL PrintNewline | Call PrintNewline to print a new line. | ||
| 57176 | OR %00000001 | Reset the zero flag. | ||
| 57178 | RET | Return. | ||
| Prev: 57025 | Up: Map | Next: 57179 |