![]() |
Routines |
| Prev: 60849 | Up: Map | Next: 61138 |
|
Used by the routine at Dispatch_Events.
Dispatches the event ID in A. Each ID is a collectible, door or scenery action for the current room.
|
||||
| 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 | |||
| 60899 | LD HL,31856 | Write Buffer_ActiveFont to *CHARS. | ||
| 60902 | LD (23606),HL | |||
| 60905 | CP 38 | Return if the event is 38. | ||
| 60907 | RET Z | |||
| 60908 | LD L,A | Return if *EventTimer is already running. | ||
| 60909 | LD A,(25759) | |||
| 60912 | OR A | |||
| 60913 | RET NZ | |||
| 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 | |||
|
Jump to the handler for this event ID.
|
||||
| Handler_Events_Dispatch | 60923 | LD A,L | Copy the event ID into A. | |
| 60924 | AND %01111111 | Keep only bits 0-6. | ||
| 60926 | OR A | Jump to Event_DrawHeader if the event is 0. | ||
| 60927 | JP Z,Event_DrawHeader | |||
| 60930 | CP 1 | Jump to Event_DrawHeaderNext if the event is 1. | ||
| 60932 | JP Z,Event_DrawHeaderNext | |||
| 60935 | CP 3 | Jump to Event_DrawHeaderPair if the event is 3. | ||
| 60937 | JP Z,Event_DrawHeaderPair | |||
| 60940 | CP 2 | Jump to Event_NudgeActor if the event is 2. | ||
| 60942 | JP Z,Event_NudgeActor | |||
| 60945 | CP 4 | Jump to Event_PrintMessage if the event is 4. | ||
| 60947 | JP Z,Event_PrintMessage | |||
| 60950 | CP 5 | Jump to Event_StartEnemy if the event is 5. | ||
| 60952 | JP Z,Event_StartEnemy | |||
| 60955 | CP 6 | Jump to Event_RevealHeader if the event is 6. | ||
| 60957 | JP Z,Event_RevealHeader | |||
| 60960 | CP 7 | Jump to Event_RevealHeaderTriple if the event is 7. | ||
| 60962 | JP Z,Event_RevealHeaderTriple | |||
| 60965 | CP 8 | Jump to Event_StartActor if the event is 8. | ||
| 60967 | JP Z,Event_StartActor | |||
| 60970 | CP 9 | Jump to Event_ToggleTune if the event is 9. | ||
| 60972 | JP Z,Event_ToggleTune | |||
| 60975 | CP 10 | Jump to Event_ShortTimer if the event is 10. | ||
| 60977 | JP Z,Event_ShortTimer | |||
| 60980 | CP 11 | Jump to Event_RevealDecorAndMover if the event is 11. | ||
| 60982 | JP Z,Event_RevealDecorAndMover | |||
| 60985 | CP 12 | Jump to Event_RevealNextPair if the event is 12. | ||
| 60987 | JP Z,Event_RevealNextPair | |||
| 60990 | CP 13 | Jump to Event_HideLaterActor if the event is 13. | ||
| 60992 | JP Z,Event_HideLaterActor | |||
| 60995 | CP 14 | Jump to Event_SwapKeys if the event is 14. | ||
| 60997 | JP Z,Event_SwapKeys | |||
| 61000 | CP 15 | Jump to Event_HideActor if the event is 15. | ||
| 61002 | JP Z,Event_HideActor | |||
| 61005 | CP 17 | Jump to Event_HideFurniture if the event is 17. | ||
| 61007 | JP Z,Event_HideFurniture | |||
| 61010 | CP 18 | Jump to Event_RevealDoor if the event is 18. | ||
| 61012 | JP Z,Event_RevealDoor | |||
| 61015 | CP 19 | Jump to Event_RevealNextDoor if the event is 19. | ||
| 61017 | JP Z,Event_RevealNextDoor | |||
| 61020 | CP 20 | Jump to Event_RevealDecorations if the event is 20. | ||
| 61022 | JP Z,Event_RevealDecorations | |||
| 61025 | CP 21 | Jump to Event_RevealThirdDoor if the event is 21. | ||
| 61027 | JP Z,Event_RevealThirdDoor | |||
| 61030 | CP 22 | Jump to Event_RandomCombination if the event is 22. | ||
| 61032 | JP Z,Event_RandomCombination | |||
| 61035 | CP 23 | Jump to Event_HeaderAndTimer if the event is 23. | ||
| 61037 | JP Z,Event_HeaderAndTimer | |||
| 61040 | CP 24 | Jump to Event_ShowEnemy if the event is 24. | ||
| 61042 | JP Z,Event_ShowEnemy | |||
| 61045 | CP 25 | Jump to Event_RevealFurniture if the event is 25. | ||
| 61047 | JP Z,Event_RevealFurniture | |||
| 61050 | CP 26 | Jump to Event_RevealPair if the event is 26. | ||
| 61052 | JP Z,Event_RevealPair | |||
| 61055 | CP 27 | Jump to Event_RevealLadder if the event is 27. | ||
| 61057 | JP Z,Event_RevealLadder | |||
| 61060 | CP 28 | Jump to Event_RevealTriple if the event is 28. | ||
| 61062 | JP Z,Event_RevealTriple | |||
| 61065 | CP 29 | Jump to Event_RevealAllDecorations if the event is 29. | ||
| 61067 | JP Z,Event_RevealAllDecorations | |||
| 61070 | CP 30 | Jump to Event_RevealThreeDecorations if the event is 30. | ||
| 61072 | JP Z,Event_RevealThreeDecorations | |||
| 61075 | CP 31 | Jump to Event_ShowMovers if the event is 31. | ||
| 61077 | JP Z,Event_ShowMovers | |||
| 61080 | CP 32 | Jump to Event_DigitFour if the event is 32. | ||
| 61082 | JP Z,Event_DigitFour | |||
| 61085 | CP 33 | Jump to Event_DigitThree if the event is 33. | ||
| 61087 | JP Z,Event_DigitThree | |||
| 61090 | CP 34 | Jump to Event_AwardDigit if the event is 34. | ||
| 61092 | JP Z,Event_AwardDigit | |||
| 61095 | CP 35 | Jump to Event_DigitTwo if the event is 35. | ||
| 61097 | JP Z,Event_DigitTwo | |||
| 61100 | CP 36 | Jump to Event_HideHeaderPair if the event is 36. | ||
| 61102 | JP Z,Event_HideHeaderPair | |||
| 61105 | CP 37 | Jump to Event_DigitOne if the event is 37. | ||
| 61107 | JP Z,Event_DigitOne | |||
| 61110 | CP 39 | Jump to Event_DrawHeaderFourth if the event is 39. | ||
| 61112 | JP Z,Event_DrawHeaderFourth | |||
| 61115 | CP 40 | Jump to Event_HideHeaderFourth if the event is 40. | ||
| 61117 | JP Z,Event_HideHeaderFourth | |||
| 61120 | CP 41 | Jump to Event_TestHeader if the event is 41. | ||
| 61122 | JP Z,Event_TestHeader | |||
| 61125 | CP 42 | Jump to Event_HideEnemies if the event is 42. | ||
| 61127 | JP Z,Event_HideEnemies | |||
| Handler_Events_Done | 61130 | POP HL | Drop the unused return address. | |
| Handler_Events_Restore | 61131 | POP HL | Restore *CHARS from the stack. | |
| 61132 | LD (23606),HL | Write it back to *CHARS. | ||
| 61135 | POP IX | Restore IX from the stack. | ||
| 61137 | RET | Return. | ||
| Prev: 60849 | Up: Map | Next: 61138 |