![]() |
Routines |
| Prev: 51886 | Up: Map | Next: 52008 |
|
Used by the routine at ProcessDisplayRecord.
Checks this character against Sherlock's disguise and returns when the disguise already matches.
|
||||
| CheckCharacterDisguise | 51887 | CALL CheckCharacterID | Call CheckCharacterID to check the character id. | |
| 51890 | RET Z | Return if the character is 0 1 or Sherlock. | ||
| 51891 | LD A,(50321) | Read the character id saved for the disguise check. | ||
| 51894 | LD HL,40969 | Use Sherlock's disguise as the pointer. | ||
| 51897 | CP (HL) | See whether it matches Sherlock's disguise. | ||
| 51898 | RET Z | Return if they match. | ||
| 51899 | LD A,(41014) | Call GetObjectFirstLocation to read the object's first location. | ||
| 51902 | CALL GetObjectFirstLocation | |||
| 51905 | LD HL,40969 | Jump ahead to CheckCharacterDisguise_DisplayModeBelow if this is not Sherlock's disguise. | ||
| 51908 | CP (HL) | |||
| 51909 | JR NZ,CheckCharacterDisguise_DisplayModeBelow | |||
| 51911 | LD A,(41014) | Read the character being processed and take the exits message, then call ProcessCharacterDisplay_TestDisplayFlagEnd to run character display. | ||
| 51914 | LD DE,26861 | |||
| 51917 | CALL ProcessCharacterDisplay_TestDisplayFlagEnd | |||
| CheckCharacterDisguise_DisplayModeBelow | 51920 | LD A,(40975) | Return if the display mode is below 7. | |
| 51923 | CP 7 | |||
| 51925 | RET C | |||
| 51926 | LD A,(41012) | Call GetObjectFirstLocation to read the object's first location. | ||
| 51929 | CALL GetObjectFirstLocation | |||
| 51932 | CP 255 | Go to CheckCharacterDisguise_OtherCharacterCompare when this is not the 255 end marker. | ||
| 51934 | JR NZ,CheckCharacterDisguise_OtherCharacterCompare | |||
| 51936 | LD B,(IX+0) | Read the record's first byte into B and read Sherlock's disguise. | ||
| 51939 | LD A,(40969) | |||
| CheckCharacterDisguise_TestAttributeMatch | 51942 | CP (IX+15) | Jump ahead to CheckCharacterDisguise_CharacterBeingProcessed if this id matches the character attribute. | |
| 51945 | JR Z,CheckCharacterDisguise_CharacterBeingProcessed | |||
| 51947 | INC IX | Count the next object and repeat from CheckCharacterDisguise_TestAttributeMatch. | ||
| 51949 | DJNZ CheckCharacterDisguise_TestAttributeMatch | |||
| 51951 | RET | Return. | ||
|
Read the character being processed, then store the result in the count, then mark the entry as finished.
|
||||
| CheckCharacterDisguise_CharacterBeingProcessed | 51952 | LD A,(41014) | Read the current character. | |
| 51955 | LD B,A | |||
| 51956 | LD A,255 | |||
| 51958 | LD (41014),A | Record the current character. | ||
| 51961 | LD A,1 | Set the television flag to 1. | ||
| 51963 | LD (23612),A | |||
| 51966 | LD A,(40969) | Read Sherlock's disguise and call FindObjectByFieldTwo to find an object by field two. | ||
| 51969 | CALL FindObjectByFieldTwo | |||
| 51972 | CP 255 | Call ReadSavedCharacter if the entry is not the end marker. | ||
| 51974 | CALL NZ,ReadSavedCharacter | |||
| 51977 | SUB A | Store it in the system variables and store it in the character being processed. | ||
| 51978 | LD (23612),A | |||
| 51981 | LD A,B | |||
| 51982 | LD (41014),A | |||
| 51985 | RET | Return. | ||
|
Read the other character id, compare it with Sherlock's disguise, and return when they match.
|
||||
| CheckCharacterDisguise_OtherCharacterCompare | 51986 | LD A,(50322) | Read the other character id saved for the disguise check. | |
| 51989 | LD HL,40969 | Use Sherlock's disguise as the pointer. | ||
| 51992 | CP (HL) | See whether it matches Sherlock's disguise. | ||
| 51993 | RET Z | Return if they match. | ||
| 51994 | LD A,(41012) | Read the room display parameter. | ||
| 51997 | LD HL,41014 | Use the character being processed as the pointer. | ||
| 52000 | CP (HL) | See whether it matches the character being processed. | ||
| 52001 | RET Z | Return if they match. | ||
| 52002 | LD DE,26861 | Point DE at the message at 26857+4 and jump to ProcessCharacterDisplay_TestDisplayFlagEnd. | ||
| 52005 | JP ProcessCharacterDisplay_TestDisplayFlagEnd | |||
| Prev: 51886 | Up: Map | Next: 52008 |