![]() |
Routines |
| Prev: 60849 | Up: Map | Next: 61138 |
|
Used by the routine at Dispatch_Events.
Dispatches the event ID in A to a room action. Bit 7 marks a collectible pickup.
|
||||||||||
|
Stash the caller context.
|
||||||||||
| Handler_Events | 60889 | PUSH IX | Stash IX and *CHARS on the stack. | |||||||
| 60891 | LD HL,(23606) | |||||||||
| 60894 | PUSH HL | |||||||||
| 60895 | LD HL,61131 | Push Handler_Events_Restore as the return address. | ||||||||
| 60898 | PUSH HL | |||||||||
|
Use the in-game font.
|
||||||||||
| 60899 | LD HL,31856 | Write Buffer_ActiveFont to *CHARS. | ||||||||
| 60902 | LD (23606),HL | |||||||||
|
Ignore event 38.
|
||||||||||
| 60905 | CP 38 | Return through Handler_Events_Restore if the event is 38. | ||||||||
| 60907 | RET Z | |||||||||
|
Return if a timer is already running.
|
||||||||||
| 60908 | LD L,A | Copy the event ID into L. | ||||||||
| 60909 | LD A,(25759) | Return through Handler_Events_Restore if *EventTimer is already running. | ||||||||
| 60912 | OR A | |||||||||
| 60913 | RET NZ | |||||||||
|
Collectibles skip the event sound.
|
||||||||||
| 60914 | BIT 7,L | Jump to Handler_Events_Dispatch if this is a collectible event. | ||||||||
| 60916 | JR NZ,Handler_Events_Dispatch | |||||||||
| 60918 | LD A,16 | Write 16 to *SoundFlags. | ||||||||
| 60920 | LD (25714),A | |||||||||
|
Keep only the event ID.
|
||||||||||
| Handler_Events_Dispatch | 60923 | LD A,L | Copy the event ID into A. | |||||||
| 60924 | AND %01111111 | Keep only bits 0-6. | ||||||||
|
Jump to the handler for this event ID.
|
||||||||||
| 60926 | OR A | Jump to Event_DrawHeader if the event is 0 (draw the first header item). | ||||||||
| 60927 | JP Z,Event_DrawHeader | |||||||||
| 60930 | CP 1 | Jump to Event_DrawHeaderNext if the event is 1 (draw the next header item). | ||||||||
| 60932 | JP Z,Event_DrawHeaderNext | |||||||||
| 60935 | CP 3 | Jump to Event_DrawHeaderPair if the event is 3 (draw the first two header items). | ||||||||
| 60937 | JP Z,Event_DrawHeaderPair | |||||||||
| 60940 | CP 2 | Jump to Event_NudgeActor if the event is 2 (nudge the first actor). | ||||||||
| 60942 | JP Z,Event_NudgeActor | |||||||||
| 60945 | CP 4 | Jump to Event_PrintMessage if the event is 4 (print the event message). | ||||||||
| 60947 | JP Z,Event_PrintMessage | |||||||||
| 60950 | CP 5 | Jump to Event_StartEnemy if the event is 5 (start the first enemy). | ||||||||
| 60952 | JP Z,Event_StartEnemy | |||||||||
| 60955 | CP 6 | Jump to Event_RevealHeader if the event is 6 (reveal the room-header item). | ||||||||
| 60957 | JP Z,Event_RevealHeader | |||||||||
| 60960 | CP 7 | Jump to Event_RevealHeaderTriple if the event is 7 (reveal three header items). | ||||||||
| 60962 | JP Z,Event_RevealHeaderTriple | |||||||||
| 60965 | CP 8 | Jump to Event_StartActor if the event is 8 (start an actor walking). | ||||||||
| 60967 | JP Z,Event_StartActor | |||||||||
| 60970 | CP 9 | Jump to Event_ToggleTune if the event is 9 (toggle the silent-tune flag). | ||||||||
| 60972 | JP Z,Event_ToggleTune | |||||||||
| 60975 | CP 10 | Jump to Event_ShortTimer if the event is 10 (start a short event timer). | ||||||||
| 60977 | JP Z,Event_ShortTimer | |||||||||
| 60980 | CP 11 | Jump to Event_RevealDecorAndMover if the event is 11 (reveal a decoration and a mover). | ||||||||
| 60982 | JP Z,Event_RevealDecorAndMover | |||||||||
| 60985 | CP 12 | Jump to Event_RevealNextPair if the event is 12 (reveal the next decoration and mover). | ||||||||
| 60987 | JP Z,Event_RevealNextPair | |||||||||
| 60990 | CP 13 | Jump to Event_HideLaterActor if the event is 13 (hide a later actor). | ||||||||
| 60992 | JP Z,Event_HideLaterActor | |||||||||
| 60995 | CP 14 | Jump to Event_SwapKeys if the event is 14 (swap the left/right keys). | ||||||||
| 60997 | JP Z,Event_SwapKeys | |||||||||
| 61000 | CP 15 | Jump to Event_HideActor if the event is 15 (hide the first active actor). | ||||||||
| 61002 | JP Z,Event_HideActor | |||||||||
| 61005 | CP 17 | Jump to Event_HideFurniture if the event is 17 (hide the first furniture item). | ||||||||
| 61007 | JP Z,Event_HideFurniture | |||||||||
| 61010 | CP 18 | Jump to Event_RevealDoor if the event is 18 (reveal the first door). | ||||||||
| 61012 | JP Z,Event_RevealDoor | |||||||||
| 61015 | CP 19 | Jump to Event_RevealNextDoor if the event is 19 (reveal the next door). | ||||||||
| 61017 | JP Z,Event_RevealNextDoor | |||||||||
| 61020 | CP 20 | Jump to Event_RevealDecorations if the event is 20 (reveal two decorations). | ||||||||
| 61022 | JP Z,Event_RevealDecorations | |||||||||
| 61025 | CP 21 | Jump to Event_RevealThirdDoor if the event is 21 (reveal the third door). | ||||||||
| 61027 | JP Z,Event_RevealThirdDoor | |||||||||
| 61030 | CP 22 | Jump to Event_RandomCombination if the event is 22 (randomise the combination). | ||||||||
| 61032 | JP Z,Event_RandomCombination | |||||||||
| 61035 | CP 23 | Jump to Event_HeaderAndTimer if the event is 23 (draw two header items and start a timer). | ||||||||
| 61037 | JP Z,Event_HeaderAndTimer | |||||||||
| 61040 | CP 24 | Jump to Event_ShowEnemy if the event is 24 (show the first hidden enemy). | ||||||||
| 61042 | JP Z,Event_ShowEnemy | |||||||||
| 61045 | CP 25 | Jump to Event_RevealFurniture if the event is 25 (reveal the first furniture item). | ||||||||
| 61047 | JP Z,Event_RevealFurniture | |||||||||
| 61050 | CP 26 | Jump to Event_RevealPair if the event is 26 (reveal two decorations and a mover). | ||||||||
| 61052 | JP Z,Event_RevealPair | |||||||||
| 61055 | CP 27 | Jump to Event_RevealLadder if the event is 27 (reveal the first ladder). | ||||||||
| 61057 | JP Z,Event_RevealLadder | |||||||||
| 61060 | CP 28 | Jump to Event_RevealTriple if the event is 28 (reveal three decorations and three movers). | ||||||||
| 61062 | JP Z,Event_RevealTriple | |||||||||
| 61065 | CP 29 | Jump to Event_RevealAllDecorations if the event is 29 (reveal every decoration). | ||||||||
| 61067 | JP Z,Event_RevealAllDecorations | |||||||||
| 61070 | CP 30 | Jump to Event_RevealThreeDecorations if the event is 30 (reveal three decorations). | ||||||||
| 61072 | JP Z,Event_RevealThreeDecorations | |||||||||
| 61075 | CP 31 | Jump to Event_ShowMovers if the event is 31 (show every moving object). | ||||||||
| 61077 | JP Z,Event_ShowMovers | |||||||||
| 61080 | CP 32 | Jump to Event_DigitFour if the event is 32 (increment combination digit 4). | ||||||||
| 61082 | JP Z,Event_DigitFour | |||||||||
| 61085 | CP 33 | Jump to Event_DigitThree if the event is 33 (increment combination digit 3). | ||||||||
| 61087 | JP Z,Event_DigitThree | |||||||||
| 61090 | CP 34 | Jump to Event_AwardDigit if the event is 34 (award a combination digit). | ||||||||
| 61092 | JP Z,Event_AwardDigit | |||||||||
| 61095 | CP 35 | Jump to Event_DigitTwo if the event is 35 (increment combination digit 2). | ||||||||
| 61097 | JP Z,Event_DigitTwo | |||||||||
| 61100 | CP 36 | Jump to Event_HideHeaderPair if the event is 36 (hide two header items). | ||||||||
| 61102 | JP Z,Event_HideHeaderPair | |||||||||
| 61105 | CP 37 | Jump to Event_DigitOne if the event is 37 (increment combination digit 1). | ||||||||
| 61107 | JP Z,Event_DigitOne | |||||||||
| 61110 | CP 39 | Jump to Event_DrawHeaderFourth if the event is 39 (draw the fourth header item). | ||||||||
| 61112 | JP Z,Event_DrawHeaderFourth | |||||||||
| 61115 | CP 40 | Jump to Event_HideHeaderFourth if the event is 40 (hide the fourth header item). | ||||||||
| 61117 | JP Z,Event_HideHeaderFourth | |||||||||
| 61120 | CP 41 | Jump to Event_TestHeader if the event is 41 (test the second header item). | ||||||||
| 61122 | JP Z,Event_TestHeader | |||||||||
| 61125 | CP 42 | Jump to Event_HideEnemies if the event is 42 (hide the first two enemies). | ||||||||
| 61127 | JP Z,Event_HideEnemies | |||||||||
|
Ignore an unhandled event ID.
|
||||||||||
| Handler_Events_Done | 61130 | POP HL | Drop the unused return address. | |||||||
|
Restore the font and IX.
|
||||||||||
| Handler_Events_Restore | 61131 | POP HL | Restore *CHARS from the stack. | |||||||
| 61132 | LD (23606),HL | |||||||||
| 61135 | POP IX | Restore IX from the stack. | ||||||||
|
Return.
|
||||||||||
| 61137 | RET | Return. | ||||||||
| Prev: 60849 | Up: Map | Next: 61138 |