Add Overworld locations.

Refactor dungeon module to locations to reflect what it contains.
This commit is contained in:
Lyle Mantooth 2022-06-12 15:17:54 -04:00
parent 5500d628f1
commit b343a0cb80
Signed by: IslandUsurper
GPG key ID: 6DB52EAE123A5789

View file

@ -5,8 +5,8 @@ use lazy_static::lazy_static;
use super::item::ItemId; use super::item::ItemId;
#[derive(Debug, thiserror::Error)] #[derive(Debug, thiserror::Error)]
#[error("{0} is not a dungeon room")] #[error("{0} is not a dungeon super tile")]
pub struct NotADungeonRoom(u8); pub struct NotADungeonSuperTile(u8);
#[derive(Clone, Copy, Eq, Hash, PartialEq)] #[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub enum Dungeon { pub enum Dungeon {
@ -25,14 +25,14 @@ pub enum Dungeon {
GanonsTower, GanonsTower,
} }
pub fn get_dungeon_from_room(room_id: u8) -> Result<Dungeon, NotADungeonRoom> { pub fn get_dungeon_from_room(room_id: u8) -> Result<Dungeon, NotADungeonSuperTile> {
for (dungeon, rooms) in DUNGEON_ROOMS.iter() { for (dungeon, rooms) in DUNGEON_ROOMS.iter() {
if let Ok(_) = rooms.binary_search(&room_id) { if let Ok(_) = rooms.binary_search(&room_id) {
return Ok(*dungeon); return Ok(*dungeon);
} }
} }
Err(NotADungeonRoom(room_id)) Err(NotADungeonSuperTile(room_id))
} }
const HYRULE_CASTLE_ROOMS: [u8; 21] = [ const HYRULE_CASTLE_ROOMS: [u8; 21] = [
@ -145,309 +145,391 @@ lazy_static! {
#[derive(Clone, Copy, Eq, PartialEq, Hash)] #[derive(Clone, Copy, Eq, PartialEq, Hash)]
#[repr(u16)] #[repr(u16)]
pub enum Room { pub enum SuperTile {
Ganon = 0, Ganon = 0x0,
HyruleCastleNorthCorridor, HyruleCastleNorthCorridor = 0x1,
HyruleCastleSwitchRoom, HyruleCastleSwitchRoom = 0x2,
HoulihanRoom, HoulihanRoom = 0x3,
TurtleRockCrystalRollerRoom, TurtleRockCrystalRollerRoom = 0x4,
EmptyCloneRoom0x05, EmptyCloneRoom0x05 = 0x5,
SwampPalaceArrghus, SwampPalaceArrghus = 0x6,
TowerOfHeraMoldorm, TowerOfHeraMoldorm = 0x7,
CaveHealingFairy, CaveHealingFairy = 0x8,
PalaceOfDarknessMedusaChestRoom, PalaceOfDarknessMedusaChestRoom = 0x9,
PalaceOfDarknessStalfossTrapRoom, PalaceOfDarknessStalfossTrapRoom = 0xa,
PalaceOfDarknessTurtleRoom, PalaceOfDarknessTurtleRoom = 0xb,
GanonsTowerEntranceRoom, GanonsTowerEntranceRoom = 0xc,
GanonsTowerAgahnim2, GanonsTowerAgahnim2 = 0xd,
IcePalaceEntranceRoom, IcePalaceEntranceRoom = 0xe,
EmptyCloneRoom0x0F, EmptyCloneRoom0x0F = 0xf,
GanonEvacuationRoute, GanonEvacuationRoute = 0x10,
HyruleCastleBombableStockRoom, HyruleCastleBombableStockRoom = 0x11,
Sanctuary, InsideSanctuary = 0x12,
TurtleRockHokkuBokkuKeyRoom2, TurtleRockHokkuBokkuKeyRoom2 = 0x13,
TurtleRockBigKeyRoom, TurtleRockBigKeyRoom = 0x14,
TurtleRockUselessTubes, TurtleRockUselessTubes = 0x15,
SwampPalaceSwimmingTreadmill, SwampPalaceSwimmingTreadmill = 0x16,
TowerOfHeraMoldormFallRoom, TowerOfHeraMoldormFallRoom = 0x17,
Cave0x18BigFairyDropEntrance, Cave0x18BigFairyDropEntrance = 0x18,
PalaceOfDarknessDarkMaze, PalaceOfDarknessDarkMaze = 0x19,
PalaceOfDarknessBigChestRoom, PalaceOfDarknessBigChestRoom = 0x1a,
PalaceOfDarknessMimicsMovingWallRoom, PalaceOfDarknessMimicsMovingWallRoom = 0x1b,
GanonsTowerIceArmos, GanonsTowerIceArmos = 0x1c,
GanonsTowerFinalHallway, GanonsTowerFinalHallway = 0x1d,
IcePalaceBombFloorBariRoom, IcePalaceBombFloorBariRoom = 0x1e,
IcePalacePengatorBigKeyRoom, IcePalacePengatorBigKeyRoom = 0x1f,
AgahnimsTowerAgahnim, AgahnimsTowerAgahnim = 0x20,
HyruleCastleKeyRatRoom, HyruleCastleKeyRatRoom = 0x21,
HyruleCastleSewerTextTriggerRoom, HyruleCastleSewerTextTriggerRoom = 0x22,
TurtleRockWestExitToBalcony, TurtleRockWestExitToBalcony = 0x23,
TurtleRockDoubleHokkuBokkuBigChestRoom, TurtleRockDoubleHokkuBokkuBigChestRoom = 0x24,
EmptyCloneRoom0x25, EmptyCloneRoom0x25 = 0x25,
SwampPalaceStatueRoom, SwampPalaceStatueRoom = 0x26,
TowerOfHeraBigChest, TowerOfHeraBigChest = 0x27,
SwampPalaceEntranceRoom, SwampPalaceEntranceRoom = 0x28,
SkullWoodsMothula, SkullWoodsMothula = 0x29,
PalaceOfDarknessBigHubRoom, PalaceOfDarknessBigHubRoom = 0x2a,
PalaceOfDarknessMapChestFairyRoom, PalaceOfDarknessMapChestFairyRoom = 0x2b,
CaveHookshotCaveBackdoor, CaveHookshotCaveBackdoor = 0x2c,
EmptyCloneRoom0x2D, EmptyCloneRoom0x2D = 0x2d,
IcePalaceCompassRoom, IcePalaceCompassRoom = 0x2e,
CaveKakarikoWellHP, CaveKakarikoWellHP = 0x2f,
AgahnimsTowerMaidenSacrificeChamber, AgahnimsTowerMaidenSacrificeChamber = 0x30,
TowerOfHeraHardhatBeetleRoom, TowerOfHeraHardhatBeetleRoom = 0x31,
HyruleCastleSewerKeyChestRoom, HyruleCastleSewerKeyChestRoom = 0x32,
DesertPalaceLanmolas, DesertPalaceLanmolas = 0x33,
SwampPalacePushBlockPuzzlePreBigKeyRoom, SwampPalacePushBlockPuzzlePreBigKeyRoom = 0x34,
SwampPalaceBigKeyBsRoom, SwampPalaceBigKeyBsRoom = 0x35,
SwampPalaceBigChestRoom, SwampPalaceBigChestRoom = 0x36,
SwampPalaceMapChestWaterFillRoom, SwampPalaceMapChestWaterFillRoom = 0x37,
SwampPalaceKeyPotRoom, SwampPalaceKeyPotRoom = 0x38,
SkullWoodsGibdoKeyMothulaHoleRoom, SkullWoodsGibdoKeyMothulaHoleRoom = 0x39,
PalaceOfDarknessBombableFloorRoom, PalaceOfDarknessBombableFloorRoom = 0x3a,
PalaceOfDarknessSpikeBlockConveyorRoom, PalaceOfDarknessSpikeBlockConveyorRoom = 0x3b,
CaveHookshotCave, CaveHookshotCave = 0x3c,
GanonsTowerTorchRoom2, GanonsTowerTorchRoom2 = 0x3d,
IcePalaceStalfosKnightConveyorHellway, IcePalaceStalfosKnightConveyorHellway = 0x3e,
IcePalaceMapChestRoom, IcePalaceMapChestRoom = 0x3f,
AgahnimsTowerFinalBridgeRoom, AgahnimsTowerFinalBridgeRoom = 0x40,
HyruleCastleFirstDarkRoom, HyruleCastleFirstDarkRoom = 0x41,
HyruleCastle6RopesRoom, HyruleCastle6RopesRoom = 0x42,
DesertPalaceTorchPuzzleMovingWallRoom, DesertPalaceTorchPuzzleMovingWallRoom = 0x43,
ThievesTownBigChestRoom, ThievesTownBigChestRoom = 0x44,
ThievesTownJailCellsRoom, ThievesTownJailCellsRoom = 0x45,
SwampPalaceCompassChestRoom, SwampPalaceCompassChestRoom = 0x46,
EmptyCloneRoom0x47, EmptyCloneRoom0x47 = 0x47,
EmptyCloneRoom0x48, EmptyCloneRoom0x48 = 0x48,
SkullWoodsGibdoTorchPuzzleRoom, SkullWoodsGibdoTorchPuzzleRoom = 0x49,
PalaceOfDarknessEntranceRoom, PalaceOfDarknessEntranceRoom = 0x4a,
PalaceOfDarknessWarpsSouthMimicRoom, PalaceOfDarknessWarpsSouthMimicRoom = 0x4b,
GanonsTowerMiniHelmasaurConveyorRoom, GanonsTowerMiniHelmasaurConveyorRoom = 0x4c,
GanonsTowerMoldormRoom, GanonsTowerMoldormRoom = 0x4d,
IcePalaceBombJumpRoom, IcePalaceBombJumpRoom = 0x4e,
IcePalaceCloneRoomFairyRoom, IcePalaceCloneRoomFairyRoom = 0x4f,
HyruleCastleWestCorridor, HyruleCastleWestCorridor = 0x50,
HyruleCastleThroneRoom, HyruleCastleThroneRoom = 0x51,
HyruleCastleEastCorridor, HyruleCastleEastCorridor = 0x52,
DesertPalacePopos2BeamosHellwayRoom, DesertPalacePopos2BeamosHellwayRoom = 0x53,
SwampPalaceUpstairsPitsRoom, SwampPalaceUpstairsPitsRoom = 0x54,
CastleSecretEntranceUncleRoom, CastleSecretEntranceUncleRoom = 0x55,
SkullWoodsKeyPotTrapRoom, SkullWoodsKeyPotTrapRoom = 0x56,
SkullWoodsBigKeyRoom, SkullWoodsBigKeyRoom = 0x57,
SkullWoodsBigChestRoom, SkullWoodsBigChestRoom = 0x58,
SkullWoodsFinalSectionEntranceRoom, SkullWoodsFinalSectionEntranceRoom = 0x59,
PalaceOfDarknessHelmasaurKing, PalaceOfDarknessHelmasaurKing = 0x5a,
GanonsTowerSpikePitRoom, GanonsTowerSpikePitRoom = 0x5b,
GanonsTowerGanonBallZ, GanonsTowerGanonBallZ = 0x5c,
GanonsTowerGauntlet123, GanonsTowerGauntlet123 = 0x5d,
IcePalaceLonelyFirebar, IcePalaceLonelyFirebar = 0x5e,
IcePalaceHiddenChestSpikeFloorRoom, IcePalaceHiddenChestSpikeFloorRoom = 0x5f,
HyruleCastleWestEntranceRoom, HyruleCastleWestEntranceRoom = 0x60,
HyruleCastleMainEntranceRoom, HyruleCastleMainEntranceRoom = 0x61,
HyruleCastleEastEntranceRoom, HyruleCastleEastEntranceRoom = 0x62,
DesertPalaceFinalSectionEntranceRoom, DesertPalaceFinalSectionEntranceRoom = 0x63,
ThievesTownWestAtticRoom, ThievesTownWestAtticRoom = 0x64,
ThievesTownEastAtticRoom, ThievesTownEastAtticRoom = 0x65,
SwampPalaceHiddenChestHiddenDoorRoom, SwampPalaceHiddenChestHiddenDoorRoom = 0x66,
SkullWoodsCompassChestRoom, SkullWoodsCompassChestRoom = 0x67,
SkullWoodsKeyChestTrapRoom, SkullWoodsKeyChestTrapRoom = 0x68,
EmptyCloneRoom0x69, EmptyCloneRoom0x69 = 0x69,
PalaceOfDarknessRupeeRoom, PalaceOfDarknessRupeeRoom = 0x6a,
GanonsTowerMimicsRoom, GanonsTowerMimicsRoom = 0x6b,
GanonsTowerLanmolasRoom, GanonsTowerLanmolasRoom = 0x6c,
GanonsTowerGauntlet45, GanonsTowerGauntlet45 = 0x6d,
IcePalacePengatorsRoom, IcePalacePengatorsRoom = 0x6e,
EmptyCloneRoom0x6F, EmptyCloneRoom0x6F = 0x6f,
HyruleCastleSmallCorridorToJailCells, HyruleCastleSmallCorridorToJailCells = 0x70,
HyruleCastleBoomerangChestRoom, HyruleCastleBoomerangChestRoom = 0x71,
HyruleCastleMapChestRoom, HyruleCastleMapChestRoom = 0x72,
DesertPalaceBigChestRoom, DesertPalaceBigChestRoom = 0x73,
DesertPalaceMapChestRoom, DesertPalaceMapChestRoom = 0x74,
DesertPalaceBigKeyChestRoom, DesertPalaceBigKeyChestRoom = 0x75,
SwampPalaceWaterDrainRoom, SwampPalaceWaterDrainRoom = 0x76,
TowerOfHeraEntranceRoom, TowerOfHeraEntranceRoom = 0x77,
EmptyCloneRoom0x78, EmptyCloneRoom0x78 = 0x78,
EmptyCloneRoom0x79, EmptyCloneRoom0x79 = 0x79,
EmptyCloneRoom0x7A, EmptyCloneRoom0x7A = 0x7a,
GanonsTowerMisc, GanonsTowerMisc = 0x7b,
GanonsTowerEastSideCollapsingBridgeExplodingWallRoom, GanonsTowerEastSideCollapsingBridgeExplodingWallRoom = 0x7c,
GanonsTowerWinderWarpMazeRoom, GanonsTowerWinderWarpMazeRoom = 0x7d,
IcePalaceHiddenChestBombableFloorRoom, IcePalaceHiddenChestBombableFloorRoom = 0x7e,
IcePalaceBigSpikeTrapsRoom, IcePalaceBigSpikeTrapsRoom = 0x7f,
HyruleCastleJailCellRoom, HyruleCastleJailCellRoom = 0x80,
HyruleCastleNextToChasmRoom, HyruleCastleNextToChasmRoom = 0x81,
HyruleCastleBasementChasmRoom, HyruleCastleBasementChasmRoom = 0x82,
DesertPalaceWestEntranceRoom, DesertPalaceWestEntranceRoom = 0x83,
DesertPalaceMainEntranceRoom, DesertPalaceMainEntranceRoom = 0x84,
DesertPalaceEastEntranceRoom, DesertPalaceEastEntranceRoom = 0x85,
EmptyCloneRoom0x86, EmptyCloneRoom0x86 = 0x86,
TowerOfHeraTileRoom, TowerOfHeraTileRoom = 0x87,
EmptyCloneRoom0x88, EmptyCloneRoom0x88 = 0x88,
EasternPalaceFairyRoom, EasternPalaceFairyRoom = 0x89,
EmptyCloneRoom0x8A, EmptyCloneRoom0x8A = 0x8a,
GanonsTowerBlockPuzzleSpikeSkipMapChestRoom, GanonsTowerBlockPuzzleSpikeSkipMapChestRoom = 0x8b,
GanonsTowerEastAndWestDownstairsBigChestRoom, GanonsTowerEastAndWestDownstairsBigChestRoom = 0x8c,
GanonsTowerTileTorchPuzzleRoom, GanonsTowerTileTorchPuzzleRoom = 0x8d,
IcePalaceBlobsWithTetrisBarrier, IcePalaceBlobsWithTetrisBarrier = 0x8e,
EmptyCloneRoom0x8F, EmptyCloneRoom0x8F = 0x8f,
MiseryMireVitreous, MiseryMireVitreous = 0x90,
MiseryMireFinalSwitchRoom, MiseryMireFinalSwitchRoom = 0x91,
MiseryMireDarkBombWallSwitchesRoom, MiseryMireDarkBombWallSwitchesRoom = 0x92,
MiseryMireDarkCaneFLoorSwitchPuzzleRoom, MiseryMireDarkCaneFLoorSwitchPuzzleRoom = 0x93,
EmptyCloneRoom0x94, EmptyCloneRoom0x94 = 0x94,
GanonsTowerFinalCollapsingBridgeRoom, GanonsTowerFinalCollapsingBridgeRoom = 0x95,
GanonsTowerTorches1Room, GanonsTowerTorches1Room = 0x96,
MiseryMireTorchPuzzleMovingWallRoom, MiseryMireTorchPuzzleMovingWallRoom = 0x97,
MiseryMireEntranceRoom, MiseryMireEntranceRoom = 0x98,
EasternPalaceEyegoreKeyRoom, EasternPalaceEyegoreKeyRoom = 0x99,
EmptyCloneRoom0x9A, EmptyCloneRoom0x9A = 0x9a,
GanonsTowerManySpikesWarpMazeRoom, GanonsTowerManySpikesWarpMazeRoom = 0x9b,
GanonsTowerInvisibleFloorMazeRoom, GanonsTowerInvisibleFloorMazeRoom = 0x9c,
GanonsTowerCompassChestInvisibleFloorRoom, GanonsTowerCompassChestInvisibleFloorRoom = 0x9d,
IcePalaceBigChestRoom, IcePalaceBigChestRoom = 0x9e,
IcePalaceIceFloorPotsKeyAndSwitch, IcePalaceIceFloorPotsKeyAndSwitch = 0x9f,
MiseryMirePreVitreousRoom, MiseryMirePreVitreousRoom = 0xa0,
MiseryMireFishRoom, MiseryMireFishRoom = 0xa1,
MiseryMireBridgeKeyChestRoom, MiseryMireBridgeKeyChestRoom = 0xa2,
MiseryMireEmptyLConnectingRoom, MiseryMireEmptyLConnectingRoom = 0xa3,
TurtleRockTrinexx, TurtleRockTrinexx = 0xa4,
GanonsTowerWizzrobesRooms, GanonsTowerWizzrobesRooms = 0xa5,
GanonsTowerMoldormFallRoom, GanonsTowerMoldormFallRoom = 0xa6,
TowerOfHeraFairyRoom, TowerOfHeraFairyRoom = 0xa7,
EasternPalaceStalfosSpawnRoom, EasternPalaceStalfosSpawnRoom = 0xa8,
EasternPalaceBigChestRoom, EasternPalaceBigChestRoom = 0xa9,
EasternPalaceMapChestRoom, EasternPalaceMapChestRoom = 0xaa,
ThievesTownMovingSpikesKeyPotRoom, ThievesTownMovingSpikesKeyPotRoom = 0xab,
ThievesTownBlindTheThief, ThievesTownBlindTheThief = 0xac,
EmptyCloneRoom0xAD, EmptyCloneRoom0xAD = 0xad,
IcePalaceIceTRoom, IcePalaceIceTRoom = 0xae,
IcePalaceIceBridgeRoom, IcePalaceIceBridgeRoom = 0xaf,
AgahnimsTowerCircleOfPots, AgahnimsTowerCircleOfPots = 0xb0,
MiseryMireHourglassRoom, MiseryMireHourglassRoom = 0xb1,
MiseryMireSlugRoom, MiseryMireSlugRoom = 0xb2,
MiseryMireSpikeKeyChestRoom, MiseryMireSpikeKeyChestRoom = 0xb3,
TurtleRockPreTrinexxRoom, TurtleRockPreTrinexxRoom = 0xb4,
TurtleRockDarkMaze, TurtleRockDarkMaze = 0xb5,
TurtleRockChainChompsRoom, TurtleRockChainChompsRoom = 0xb6,
TurtleRockMapChestKeyChestRollerRoom, TurtleRockMapChestKeyChestRollerRoom = 0xb7,
EasternPalaceBigKeyRoom, EasternPalaceBigKeyRoom = 0xb8,
EasternPalaceLobbyCannonballsRoom, EasternPalaceLobbyCannonballsRoom = 0xb9,
EasternPalaceDarkAntifairyKeyPotRoom, EasternPalaceDarkAntifairyKeyPotRoom = 0xba,
ThievesTownHellway, ThievesTownHellway = 0xbb,
ThievesTownConveyorToilet, ThievesTownConveyorToilet = 0xbc,
EmptyCloneRoom0xBD, EmptyCloneRoom0xBD = 0xbd,
IcePalaceBlockPuzzleRoom, IcePalaceBlockPuzzleRoom = 0xbe,
IcePalaceCloneRoomSwitchRoom, IcePalaceCloneRoomSwitchRoom = 0xbf,
AgahnimsTowerDarkBridgeRoom, AgahnimsTowerDarkBridgeRoom = 0xc0,
MiseryMireCompassChestTileRoom, MiseryMireCompassChestTileRoom = 0xc1,
MiseryMireBigHubRoom, MiseryMireBigHubRoom = 0xc2,
MiseryMireBigChestRoom, MiseryMireBigChestRoom = 0xc3,
TurtleRockFinalCrystalSwitchPuzzleRoom, TurtleRockFinalCrystalSwitchPuzzleRoom = 0xc4,
TurtleRockLaserBridge, TurtleRockLaserBridge = 0xc5,
TurtleRockSomariaHub, TurtleRockSomariaHub = 0xc6,
TurtleRockTorchPuzzle, TurtleRockTorchPuzzle = 0xc7,
EasternPalaceArmosKnights, EasternPalaceArmosKnights = 0xc8,
EasternPalaceEntranceRoom, EasternPalaceEntranceRoom = 0xc9,
UnknownRoom, UnknownRoom = 0xca,
ThievesTownNorthWestEntranceRoom, ThievesTownNorthWestEntranceRoom = 0xcb,
ThievesTownNorthEastEntranceRoom, ThievesTownNorthEastEntranceRoom = 0xcc,
EmptyCloneRoom0xCD, EmptyCloneRoom0xCD = 0xcd,
IcePalaceHoleToKholdstareRoom, IcePalaceHoleToKholdstareRoom = 0xce,
EmptyCloneRoom0xCF, EmptyCloneRoom0xCF = 0xcf,
AgahnimsTowerDarkMaze, AgahnimsTowerDarkMaze = 0xd0,
MiseryMireConveyorSlugBigKeyRoom, MiseryMireConveyorSlugBigKeyRoom = 0xd1,
MiseryMireWizzrobesRoom, MiseryMireWizzrobesRoom = 0xd2,
EmptyCloneRoom0xD3, EmptyCloneRoom0xD3 = 0xd3,
EmptyCloneRoom0xD4, EmptyCloneRoom0xD4 = 0xd4,
TurtleRockLaserKeyRoom, TurtleRockLaserKeyRoom = 0xd5,
TurtleRockEntranceRoom, TurtleRockEntranceRoom = 0xd6,
EmptyCloneRoom0xD7, EmptyCloneRoom0xD7 = 0xd7,
EasternPalacePreArmosKnightsRoom, EasternPalacePreArmosKnightsRoom = 0xd8,
EasternPalaceCannonballRoom, EasternPalaceCannonballRoom = 0xd9,
EasternPalacePotSwitchRoom, EasternPalacePotSwitchRoom = 0xda,
ThievesTownSouthWestEntranceRoom, ThievesTownSouthWestEntranceRoom = 0xdb,
ThievesTownSouthEastEntranceRoom, ThievesTownSouthEastEntranceRoom = 0xdc,
EmptyCloneRoom0xDD, EmptyCloneRoom0xDD = 0xdd,
IcePalaceKholdstare, IcePalaceKholdstare = 0xde,
CaveBackwardsDeathMountainTopFloor, CaveBackwardsDeathMountainTopFloor = 0xdf,
AgahnimsTowerEntranceRoom, AgahnimsTowerEntranceRoom = 0xe0,
CaveLostWoodsHP, CaveLostWoodsHP = 0xe1,
CaveLumberjacksTreeHP, CaveLumberjacksTreeHP = 0xe2,
CaveMagicBat, CaveMagicBat = 0xe3,
CaveLostOldManHouse, CaveLostOldManHouse = 0xe4,
CaveLostOldManHouseBack, CaveLostOldManHouseBack = 0xe5,
Cave0xE6, Cave0xE6 = 0xe6,
Cave0xE7, Cave0xE7 = 0xe7,
CaveSuperBunnyTop, CaveSuperBunnyTop = 0xe8,
EmptyCloneRoom0xE9, EmptyCloneRoom0xE9 = 0xe9,
CaveSpectacleRockHP, CaveSpectacleRockHP = 0xea,
CaveBumperCaveTop, CaveBumperCaveTop = 0xeb,
EmptyCloneRoom0xEC, EmptyCloneRoom0xEC = 0xec,
Cave0xED, Cave0xED = 0xed,
CaveSpiralCave, CaveSpiralCave = 0xee,
CaveCrystalSwitch5ChestsRoom, CaveCrystalSwitch5ChestsRoom = 0xef,
CaveLostOldManStartingCaveBottom, CaveLostOldManStartingCaveBottom = 0xf0,
CaveLostOldManStartingCaveTop, CaveLostOldManStartingCaveTop = 0xf1,
HouseOldWomanNextDoor, HouseOldWomanNextDoor = 0xf2,
HouseOldWomanSahasrahlasWifeMaybe, HouseOldWomanSahasrahlasWifeMaybe = 0xf3,
HouseAngryBrothersWest, HouseAngryBrothersWest = 0xf4,
HouseAngryBrothersEast, HouseAngryBrothersEast = 0xf5,
EmptyCloneRoom0xF6, EmptyCloneRoom0xF6 = 0xf6,
EmptyCloneRoom0xF7, EmptyCloneRoom0xF7 = 0xf7,
CaveSuperBunnyBottom, CaveSuperBunnyBottom = 0xf8,
CaveSpectacleRockExit, CaveSpectacleRockExit = 0xf9,
CaveSpectacleRockPrizeEntrance, CaveSpectacleRockPrizeEntrance = 0xfa,
CaveBumperCaveBottom, CaveBumperCaveBottom = 0xfb,
EmptyCloneRoom0xFC, EmptyCloneRoom0xFC = 0xfc,
Cave0xFD, Cave0xFD = 0xfd,
CaveSpiralCaveExit, CaveSpiralCaveExit = 0xfe,
CaveParadoxCaveMiddleEntrance, CaveParadoxCaveMiddleEntrance = 0xff,
ShopInLostWoods0x100, ShopInLostWoods0x100 = 0x100,
ScaredLadyHouses, ScaredLadyHouses = 0x101,
SickKid, SickKid = 0x102,
InnBushHouse, InnBushHouse = 0x103,
LinksHouse, InsideLinksHouse = 0x104,
ShabadooHouse, ShabadooHouse = 0x105,
ChestGameBombHouse, ChestGameBombHouse = 0x106,
LibraryBombFarmRoom, LibraryBombFarmRoom = 0x107,
ChickenHouse, ChickenHouse = 0x108,
WitchHut, InsideWitchHut = 0x109,
Aginah, Aginah = 0x10a,
Dam, Dam = 0x10b,
MimicCave, MimicCave = 0x10c,
CaveOutsideMiseryMire, CaveOutsideMiseryMire = 0x10d,
CaveDarkHyliaLedgeHint, CaveDarkHyliaLedgeHint = 0x10e,
ShopDarkWorldShops, ShopDarkWorldShops = 0x10f,
ShopFireShieldShop, ShopFireShieldShop = 0x110,
ArcherGame, ArcherGame = 0x111,
CaveShop, CaveShop = 0x112,
KingsTomb, KingsTomb = 0x113,
WaterfallCaveMireHint, WaterfallCaveMireHint = 0x114,
BigFairy, BigFairy = 0x115,
FatFairy, FatFairy = 0x116,
SpikeCave, SpikeCave = 0x117,
ChestGamblingGame, ChestGamblingGame = 0x118,
BlindsHouse, BlindsHouse = 0x119,
Mutant, Mutant = 0x11a,
MirrorCaveGroveAndTomb, MirrorCaveGroveAndTomb = 0x11b,
BombShop, InsideBombShop = 0x11c,
BlindsBasement, BlindsBasement = 0x11d,
HypeCave, HypeCave = 0x11e,
KakarikoShopLumberjackHouse, KakarikoShopLumberjackHouse = 0x11f,
IceRodCave, IceRodCave = 0x120,
SmithHouse, SmithHouse = 0x121,
FortuneTellers, FortuneTellers = 0x122,
MiniMoldormCave, MiniMoldormCave = 0x123,
FiftyRupeeCaveBonkCave, FiftyRupeeCaveBonkCave = 0x124,
TwentyRupeeCaveDarkHyliaSpikeHintCave, TwentyRupeeCaveDarkHyliaSpikeHintCave = 0x125,
CheckerBoardCave, CheckerBoardCave = 0x126,
HammerPegCave, HammerPegCave = 0x127,
LostWoods = 0x8000,
LumberjackHouse = 0x8002,
DeathMountainWest = 0x8003,
DeathMountainEast = 0x8005,
DeathMountainTurtleWarp = 0x8007,
EntranceDeathMountain = 0x800a,
EntranceZorasDomain = 0x800f,
PathFromLostWoodsToKakariko = 0x8010,
KakarikoFortuneTeller = 0x8011,
NorthWestWhirlpoolWarp = 0x8012,
Sanctuary = 0x8013,
Graveyard = 0x8014,
River = 0x8015,
WitchHut = 0x8016,
EastOfWitchHut = 0x8017,
Kakariko = 0x8018,
CastleWoods = 0x801a,
HyruleCastle = 0x801b,
WitchGraveyardBridge = 0x801d,
EasternPalace = 0x801e,
Smithy = 0x8022,
StonyFieldNorth = 0x8025,
KakarikoMazeRace = 0x8028,
KakarikoLibrary = 0x8029,
HauntedGrove = 0x802a,
BetweenGroveAndLinksHouse = 0x802b,
LinksHouse = 0x802c,
StonyFieldSouth = 0x802d,
BetweenLakeHyliaAndEasternPalace = 0x802e,
FluteSpot5 = 0x802f,
Desert = 0x8030,
SouthOfHauntedGrove = 0x8032,
NorthwestSwamp = 0x8033,
NortheastSwamp = 0x8034,
LakeHylia = 0x8035,
IceCave = 0x8037,
DesertPass = 0x803a,
SouthwestSwamp = 0x803b,
SoutheastSwamp = 0x803c,
SouthShore = 0x803f,
ShullWoods = 0x8040,
DarkLumberjackShop = 0x8042,
DarkDeathMountainWest = 0x8043,
DarkDeathMountainEast = 0x8045,
TurtleRock = 0x8047,
BumperCave = 0x804a,
Catfish = 0x804f,
PathFromSkullWoodsToVillage = 0x8050,
OutcastFortuneTeller = 0x8051,
NorthWestPond = 0x8052,
DarkChapel = 0x8053,
DarkGraveyard = 0x8054,
DarkRiver = 0x8055,
DarkWitchHut = 0x8056,
EastOfDarkWitchHut = 0x8057,
VillageOfOutcasts = 0x8058,
FireShieldShopForest = 0x805a,
Pyramid = 0x805b,
BrokenBridge = 0x805d,
PalaceOfDarkness = 0x805e,
PurpleChestHouse = 0x8062,
DarkStonyFieldNorth = 0x8065,
DiggingGame = 0x8068,
TrappedFrog = 0x8069,
StumpysGrove = 0x806a,
BetweenGroveAndBombShop = 0x806b,
BombShop = 0x806c,
HammerPegBridge = 0x806d,
BetweenPODAndIceLake = 0x806e,
DarkFluteSpot5 = 0x806f,
MiseryMire = 0x8070,
SouthOfStumpysGrove = 0x8072,
DarkNorthwestSwamp = 0x8073,
DarkNortheastSwamp = 0x8074,
IceLake = 0x8075,
DarkIceCave = 0x8077,
BoxCanyonBetweenMireAndSwamp = 0x807a,
DarkSouthwestSwamp = 0x807b,
DarkSoutheastSwamp = 0x807c,
DarkSouthShore = 0x807f,
MasterSwordGladeAndUnderBridge = 0x8080,
ZorasDomain = 0x8081,
} }
use Room::*; use SuperTile::*;
lazy_static! { lazy_static! {
pub static ref ROOM_NAMES: HashMap<Room, &'static str> = { pub static ref ROOM_NAMES: HashMap<SuperTile, &'static str> = {
let names = [ let names = [
(Ganon, "Ganon"), (Ganon, "Ganon"),
@ -752,7 +834,7 @@ lazy_static! {
}; };
} }
pub const NEED_KILLABLE_ROOMS: [Room; 39] = [ pub const NEED_KILLABLE_ROOMS: [SuperTile; 39] = [
EasternPalaceBigKeyRoom, // For anti-fairy circle around pot switch EasternPalaceBigKeyRoom, // For anti-fairy circle around pot switch
PalaceOfDarknessTurtleRoom, PalaceOfDarknessTurtleRoom,
PalaceOfDarknessMimicsMovingWallRoom, PalaceOfDarknessMimicsMovingWallRoom,
@ -797,7 +879,7 @@ pub const NEED_KILLABLE_ROOMS: [Room; 39] = [
// All the rooms that require special handling. // All the rooms that require special handling.
/// These rooms need to be locked to GFX ID 28. /// These rooms need to be locked to GFX ID 28.
pub const FREEZOR_ROOMS: [Room; 5] = [ pub const FREEZOR_ROOMS: [SuperTile; 5] = [
IcePalaceEntranceRoom, IcePalaceEntranceRoom,
IcePalaceHiddenChestBombableFloorRoom, IcePalaceHiddenChestBombableFloorRoom,
IcePalaceBlobsWithTetrisBarrier, IcePalaceBlobsWithTetrisBarrier,
@ -806,7 +888,7 @@ pub const FREEZOR_ROOMS: [Room; 5] = [
]; ];
/// These rooms need to be locked to GFX ID 17. /// These rooms need to be locked to GFX ID 17.
pub const WATER_ROOMS: [Room; 33] = [ pub const WATER_ROOMS: [SuperTile; 33] = [
GanonsTowerEntranceRoom, GanonsTowerEntranceRoom,
GanonsTowerAgahnim2, GanonsTowerAgahnim2,
SwampPalaceSwimmingTreadmill, SwampPalaceSwimmingTreadmill,
@ -842,12 +924,12 @@ pub const WATER_ROOMS: [Room; 33] = [
GanonsTowerMoldormFallRoom, GanonsTowerMoldormFallRoom,
]; ];
pub const SHADOW_ROOMS: [Room; 2] = [ pub const SHADOW_ROOMS: [SuperTile; 2] = [
IcePalaceStalfosKnightConveyorHellway, IcePalaceStalfosKnightConveyorHellway,
IcePalaceIceFloorPotsKeyAndSwitch, IcePalaceIceFloorPotsKeyAndSwitch,
]; ];
pub const WALL_MASTER_ROOMS: [Room; 5] = [ pub const WALL_MASTER_ROOMS: [SuperTile; 5] = [
SkullWoodsGibdoKeyMothulaHoleRoom, SkullWoodsGibdoKeyMothulaHoleRoom,
SkullWoodsGibdoTorchPuzzleRoom, SkullWoodsGibdoTorchPuzzleRoom,
SkullWoodsKeyPotTrapRoom, SkullWoodsKeyPotTrapRoom,
@ -855,7 +937,7 @@ pub const WALL_MASTER_ROOMS: [Room; 5] = [
GanonsTowerTileTorchPuzzleRoom, GanonsTowerTileTorchPuzzleRoom,
]; ];
pub const BUMPER_CRYSTAL_LASER_ROOMS: [Room; 42] = [ pub const BUMPER_CRYSTAL_LASER_ROOMS: [SuperTile; 42] = [
TurtleRockCrystalRollerRoom, TurtleRockCrystalRollerRoom,
PalaceOfDarknessTurtleRoom, PalaceOfDarknessTurtleRoom,
TurtleRockHokkuBokkuKeyRoom2, TurtleRockHokkuBokkuKeyRoom2,
@ -900,14 +982,14 @@ pub const BUMPER_CRYSTAL_LASER_ROOMS: [Room; 42] = [
CaveCrystalSwitch5ChestsRoom, CaveCrystalSwitch5ChestsRoom,
]; ];
pub const PULL_SWITCH_ROOMS: [Room; 4] = [ pub const PULL_SWITCH_ROOMS: [SuperTile; 4] = [
HyruleCastleSwitchRoom, HyruleCastleSwitchRoom,
SkullWoodsBigChestRoom, SkullWoodsBigChestRoom,
ThievesTownWestAtticRoom, ThievesTownWestAtticRoom,
Dam, Dam,
]; ];
pub const TONGUE_ROOMS: [Room; 7] = [ pub const TONGUE_ROOMS: [SuperTile; 7] = [
TurtleRockCrystalRollerRoom, TurtleRockCrystalRollerRoom,
TurtleRockWestExitToBalcony, TurtleRockWestExitToBalcony,
SwampPalaceBigKeyBsRoom, SwampPalaceBigKeyBsRoom,
@ -917,7 +999,7 @@ pub const TONGUE_ROOMS: [Room; 7] = [
IcePalaceHoleToKholdstareRoom, IcePalaceHoleToKholdstareRoom,
]; ];
pub const NO_STATUE_ROOMS: [Room; 12] = [ pub const NO_STATUE_ROOMS: [SuperTile; 12] = [
SwampPalaceSwimmingTreadmill, SwampPalaceSwimmingTreadmill,
SwampPalaceStatueRoom, SwampPalaceStatueRoom,
SwampPalaceEntranceRoom, SwampPalaceEntranceRoom,
@ -932,19 +1014,19 @@ pub const NO_STATUE_ROOMS: [Room; 12] = [
AgahnimsTowerDarkMaze, AgahnimsTowerDarkMaze,
]; ];
pub const MOVING_CANNONS_ROOMS: [Room; 2] = [ pub const MOVING_CANNONS_ROOMS: [SuperTile; 2] = [
GanonsTowerGanonBallZ, GanonsTowerGanonBallZ,
DesertPalaceBigKeyChestRoom, DesertPalaceBigKeyChestRoom,
]; ];
pub const CANNON_ROOMS: [Room; 3] = [ pub const CANNON_ROOMS: [SuperTile; 3] = [
EasternPalaceLobbyCannonballsRoom, EasternPalaceLobbyCannonballsRoom,
EasternPalaceCannonballRoom, EasternPalaceCannonballRoom,
MimicCave, // ??? MimicCave, // ???
]; ];
/// These rooms have no enemies to randomize, or are special bosses that can't be switched out. /// These rooms have no enemies to randomize, or are special bosses that can't be switched out.
pub const DONT_RANDOMIZE_ROOMS: [Room; 8] = [ pub const DONT_RANDOMIZE_ROOMS: [SuperTile; 8] = [
Ganon, Ganon,
HyruleCastleNorthCorridor, HyruleCastleNorthCorridor,
HoulihanRoom, HoulihanRoom,
@ -955,7 +1037,7 @@ pub const DONT_RANDOMIZE_ROOMS: [Room; 8] = [
IcePalaceBigSpikeTrapsRoom, // Anything else would be too easy? IcePalaceBigSpikeTrapsRoom, // Anything else would be too easy?
]; ];
pub const NO_SPECIAL_ENEMIES_IN_STANDARD_MODE_ROOMS: [Room; 21] = [ pub const NO_SPECIAL_ENEMIES_IN_STANDARD_MODE_ROOMS: [SuperTile; 21] = [
HyruleCastleNorthCorridor, HyruleCastleNorthCorridor,
HyruleCastleSwitchRoom, HyruleCastleSwitchRoom,
HyruleCastleBombableStockRoom, HyruleCastleBombableStockRoom,
@ -979,7 +1061,7 @@ pub const NO_SPECIAL_ENEMIES_IN_STANDARD_MODE_ROOMS: [Room; 21] = [
HyruleCastleBasementChasmRoom, HyruleCastleBasementChasmRoom,
]; ];
pub const BOSS_ROOMS: [Room; 16] = [ pub const BOSS_ROOMS: [SuperTile; 16] = [
Ganon, Ganon,
SwampPalaceArrghus, SwampPalaceArrghus,
TowerOfHeraMoldorm, TowerOfHeraMoldorm,
@ -998,7 +1080,7 @@ pub const BOSS_ROOMS: [Room; 16] = [
IcePalaceKholdstare, IcePalaceKholdstare,
]; ];
pub const DONT_USE_IMMOVABLE_ENEMIES: [Room; 57] = [ pub const DONT_USE_IMMOVABLE_ENEMIES: [SuperTile; 57] = [
PalaceOfDarknessTurtleRoom, // for single terrorpin in L shaped section PalaceOfDarknessTurtleRoom, // for single terrorpin in L shaped section
SwampPalaceSwimmingTreadmill, SwampPalaceSwimmingTreadmill,
PalaceOfDarknessDarkMaze, // top placement will probably block maze PalaceOfDarknessDarkMaze, // top placement will probably block maze
@ -1058,7 +1140,7 @@ pub const DONT_USE_IMMOVABLE_ENEMIES: [Room; 57] = [
MimicCave, MimicCave,
]; ];
pub const DONT_USE_FLYING_ENEMIES: [Room; 2] = [ pub const DONT_USE_FLYING_ENEMIES: [SuperTile; 2] = [
MiseryMireWizzrobesRoom, MiseryMireWizzrobesRoom,
MimicCave, MimicCave,
]; ];