Prev: 60169 Up: Map Next: 60317
60176: Change Room
Input
A Destination room ID
ChangeRoom 60176 LD (42867),A Store the room ID in *TemporaryStorage_SingleByte.
Look up the destination room in the list of room IDs at Table_ActionPreEnterRoomIDs.
60179 LD HL,60218 HL=Table_ActionPreEnterRoomIDs.
60182 LD DE,60229 DE=Table_ActionPreEnterRoom.
60185 LD BC,11 BC=0011.
60188 CALL EventRouting Call EventRouting.
Set the destination room ID as the current room.
60191 LD A,(42867) Restore the destination room ID from *TemporaryStorage_SingleByte.
60194 CALL MovePlayerToRoom Call MovePlayerToRoom.
60197 LD E,0 Call Handler_DisplayRoomImage with E set to 0 (which does not display room images).
60199 CALL Handler_DisplayRoomImage
Now look up the current room in the list of room IDs at Table_ActionEnteredRoomIDs.
60202 LD A,(42947) A=*CurrentRoom.
60205 LD HL,60251 HL=Table_ActionEnteredRoomIDs.
60208 LD DE,60273 DE=Table_ActionEnteredRoom.
60211 LD BC,22 BC=22.
60214 CALL EventRouting Call EventRouting.
60217 RET Return.
The room ID table to identify which rooms are applicable:
Table_ActionPreEnterRoomIDs 60218 DEFB 67 Room 1: The Crystal Cavern.
60219 DEFB 79 Room 2: The Fomorians' Cavern.
60220 DEFB 82 Room 3: The Danaan Settlement.
60221 DEFB 43 Room 4: The Village Of Bridon.
60222 DEFB 5 Room 5: The Sea Cavern.
60223 DEFB 58 Room 6: The Cadwell Hillfort.
60224 DEFB 26 Room 7: A Mountain Path.
60225 DEFB 65 Room 8: A Narrow Gorge.
60226 DEFB 27 Room 9: The Causeway.
60227 DEFB 66 Room 10: Inside A Rock Cavern.
60228 DEFB 34 Room 11: The Bridon Road.
The actions table for before the player enters a room:
Table_ActionPreEnterRoom 60229 DEFW Process_PreEnterCrystalCavern Action 1.
60231 DEFW Process_PreEnterFomoriansCavern Action 2.
60233 DEFW Process_PreEnterFomoriansCavern Action 3.
60235 DEFW Process_PreEnterVarious Action 4.
60237 DEFW Process_PreEnterVarious Action 5.
60239 DEFW Process_PreEnterVarious Action 6.
60241 DEFW Process_PreEnterVarious Action 7.
60243 DEFW Process_PreEnterVarious Action 8.
60245 DEFW Process_PreEnterCauseway Action 9.
60247 DEFW Process_PreEnterInsideRockCavern Action 10.
60249 DEFW Process_PreEnterBridonRoad Action 11.
The room ID table to identify which rooms are applicable:
Table_ActionEnteredRoomIDs 60251 DEFB 55 Room 1: A Forest Path.
60252 DEFB 13 Room 2: A Narrow Underwater Passage.
60253 DEFB 86 Room 3: Congratulations!!.
60254 DEFB 39 Room 4: In An Oozing Quagmire.
60255 DEFB 79 Room 5: The Fomorians' Cavern.
60256 DEFB 20 Room 6: Lug's Cavern.
60257 DEFB 87 Room 7: The Vale Of Cuchulainn.
60258 DEFB 99 Room 8: The Inner Courtyard.
60259 DEFB 76 Room 9: The Enchanted Hills.
60260 DEFB 12 Room 10: In A Deep Pool Of Water. Inside The Sea Cavern.
60261 DEFB 24 Room 11: Bleak Moorland.
60262 DEFB 67 Room 12: The Crystal Cavern.
60263 DEFB 30 Room 13: The Vale Of Rhia.
60264 DEFB 27 Room 14: The Causeway.
60265 DEFB 44 Room 15: A Small Clearing.
60266 DEFB 37 Room 16: The Swamp.
60267 DEFB 38 Room 17: The Swamp.
60268 DEFB 45 Room 18: The Swamp.
60269 DEFB 53 Room 19: The Swamp.
60270 DEFB 54 Room 20: The Swamp.
60271 DEFB 61 Room 21: The Swamp.
60272 DEFB 62 Room 22: The Swamp.
The actions table for when a player enters a room:
Table_ActionEnteredRoom 60273 DEFW Process_EnterForestPath Action 1.
60275 DEFW Process_EnterNarrowUnderwaterPassage Action 2.
60277 DEFW Process_CongratulationsGameOver Action 3.
60279 DEFW Process_EnterOozingQuagmire Action 4.
60281 DEFW Process_EnterFomoriansCavern Action 5.
60283 DEFW Process_EnterLugsCavern Action 6.
60285 DEFW Process_EnterValeOfCuchulainn Action 7.
60287 DEFW Process_EnterInnerCourtyard Action 8.
60289 DEFW Process_EnterEnchantedHills Action 9.
60291 DEFW Process_EnterDeepPoolOfWater Action 10.
60293 DEFW Process_EnterBleakMoorland Action 11.
60295 DEFW Process_EnterCrystalCavern Action 12.
60297 DEFW Process_EnterValeOfRhia Action 13.
60299 DEFW Process_EnterCauseway Action 14.
60301 DEFW Process_EnterSmallClearing Action 15.
60303 DEFW Process_EnterSwamp_01 Action 16.
60305 DEFW Process_EnterSwamp_01 Action 17.
60307 DEFW Process_EnterSwamp_02 Action 18.
60309 DEFW Process_EnterSwamp_03 Action 19.
60311 DEFW Process_EnterSwamp_04 Action 20.
60313 DEFW Process_EnterSwamp_05 Action 21.
60315 DEFW Process_EnterSwamp_05 Action 22.
Prev: 60169 Up: Map Next: 60317