mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-21 19:45:10 +00:00
537 lines
25 KiB
C
537 lines
25 KiB
C
#include <assert.h>
|
|
#include "behavior_table.h"
|
|
#include "pc/lua/smlua_hooks.h"
|
|
|
|
const BehaviorScript* gBehaviorTable[id_bhv_max_count] = {
|
|
[id_bhvStarDoor] = bhvStarDoor,
|
|
[id_bhvMrI] = bhvMrI,
|
|
[id_bhvMrIBody] = bhvMrIBody,
|
|
[id_bhvMrIParticle] = bhvMrIParticle,
|
|
[id_bhvPurpleParticle] = bhvPurpleParticle,
|
|
[id_bhvGiantPole] = bhvGiantPole,
|
|
[id_bhvPoleGrabbing] = bhvPoleGrabbing,
|
|
[id_bhvThiHugeIslandTop] = bhvThiHugeIslandTop,
|
|
[id_bhvThiTinyIslandTop] = bhvThiTinyIslandTop,
|
|
[id_bhvCapSwitchBase] = bhvCapSwitchBase,
|
|
[id_bhvCapSwitch] = bhvCapSwitch,
|
|
[id_bhvKingBobomb] = bhvKingBobomb,
|
|
[id_bhvBobombAnchorMario] = bhvBobombAnchorMario,
|
|
[id_bhvBetaChestBottom] = bhvBetaChestBottom,
|
|
[id_bhvBetaChestLid] = bhvBetaChestLid,
|
|
[id_bhvBubbleParticleSpawner] = bhvBubbleParticleSpawner,
|
|
[id_bhvBubbleMaybe] = bhvBubbleMaybe,
|
|
[id_bhvBubblePlayer] = bhvBubblePlayer,
|
|
[id_bhvSmallWaterWave] = bhvSmallWaterWave,
|
|
[id_bhvWaterAirBubble] = bhvWaterAirBubble,
|
|
[id_bhvSmallParticle] = bhvSmallParticle,
|
|
[id_bhvPlungeBubble] = bhvPlungeBubble,
|
|
[id_bhvSmallParticleSnow] = bhvSmallParticleSnow,
|
|
[id_bhvSmallParticleBubbles] = bhvSmallParticleBubbles,
|
|
[id_bhvFishGroup] = bhvFishGroup,
|
|
[id_bhvCannon] = bhvCannon,
|
|
[id_bhvCannonBarrel] = bhvCannonBarrel,
|
|
[id_bhvCannonBaseUnused] = bhvCannonBaseUnused,
|
|
[id_bhvChuckya] = bhvChuckya,
|
|
[id_bhvChuckyaAnchorMario] = bhvChuckyaAnchorMario,
|
|
[id_bhvUnused05A8] = bhvUnused05A8,
|
|
[id_bhvRotatingPlatform] = bhvRotatingPlatform,
|
|
[id_bhvTower] = bhvTower,
|
|
[id_bhvBulletBillCannon] = bhvBulletBillCannon,
|
|
[id_bhvWfBreakableWallRight] = bhvWfBreakableWallRight,
|
|
[id_bhvWfBreakableWallLeft] = bhvWfBreakableWallLeft,
|
|
[id_bhvKickableBoard] = bhvKickableBoard,
|
|
[id_bhvTowerDoor] = bhvTowerDoor,
|
|
[id_bhvRotatingCounterClockwise] = bhvRotatingCounterClockwise,
|
|
[id_bhvWfRotatingWoodenPlatform] = bhvWfRotatingWoodenPlatform,
|
|
[id_bhvKoopaShellUnderwater] = bhvKoopaShellUnderwater,
|
|
[id_bhvExitPodiumWarp] = bhvExitPodiumWarp,
|
|
[id_bhvFadingWarp] = bhvFadingWarp,
|
|
[id_bhvWarp] = bhvWarp,
|
|
[id_bhvWarpPipe] = bhvWarpPipe,
|
|
[id_bhvWhitePuffExplosion] = bhvWhitePuffExplosion,
|
|
[id_bhvSpawnedStar] = bhvSpawnedStar,
|
|
[id_bhvSpawnedStarNoLevelExit] = bhvSpawnedStarNoLevelExit,
|
|
[id_bhvMrIBlueCoin] = bhvMrIBlueCoin,
|
|
[id_bhvCoinInsideBoo] = bhvCoinInsideBoo,
|
|
[id_bhvCoinFormationSpawn] = bhvCoinFormationSpawn,
|
|
[id_bhvCoinFormation] = bhvCoinFormation,
|
|
[id_bhvOneCoin] = bhvOneCoin,
|
|
[id_bhvYellowCoin] = bhvYellowCoin,
|
|
[id_bhvTemporaryYellowCoin] = bhvTemporaryYellowCoin,
|
|
[id_bhvThreeCoinsSpawn] = bhvThreeCoinsSpawn,
|
|
[id_bhvTenCoinsSpawn] = bhvTenCoinsSpawn,
|
|
[id_bhvSingleCoinGetsSpawned] = bhvSingleCoinGetsSpawned,
|
|
[id_bhvCoinSparkles] = bhvCoinSparkles,
|
|
[id_bhvGoldenCoinSparkles] = bhvGoldenCoinSparkles,
|
|
[id_bhvWallTinyStarParticle] = bhvWallTinyStarParticle,
|
|
[id_bhvVertStarParticleSpawner] = bhvVertStarParticleSpawner,
|
|
[id_bhvPoundTinyStarParticle] = bhvPoundTinyStarParticle,
|
|
[id_bhvHorStarParticleSpawner] = bhvHorStarParticleSpawner,
|
|
[id_bhvPunchTinyTriangle] = bhvPunchTinyTriangle,
|
|
[id_bhvTriangleParticleSpawner] = bhvTriangleParticleSpawner,
|
|
[id_bhvDoorWarp] = bhvDoorWarp,
|
|
[id_bhvDoor] = bhvDoor,
|
|
[id_bhvGrindel] = bhvGrindel,
|
|
[id_bhvThwomp2] = bhvThwomp2,
|
|
[id_bhvThwomp] = bhvThwomp,
|
|
[id_bhvTumblingBridgePlatform] = bhvTumblingBridgePlatform,
|
|
[id_bhvWfTumblingBridge] = bhvWfTumblingBridge,
|
|
[id_bhvBbhTumblingBridge] = bhvBbhTumblingBridge,
|
|
[id_bhvLllTumblingBridge] = bhvLllTumblingBridge,
|
|
[id_bhvFlame] = bhvFlame,
|
|
[id_bhvAnotherElavator] = bhvAnotherElavator,
|
|
[id_bhvRrElevatorPlatform] = bhvRrElevatorPlatform,
|
|
[id_bhvHmcElevatorPlatform] = bhvHmcElevatorPlatform,
|
|
[id_bhvWaterMist] = bhvWaterMist,
|
|
[id_bhvBreathParticleSpawner] = bhvBreathParticleSpawner,
|
|
[id_bhvBreakBoxTriangle] = bhvBreakBoxTriangle,
|
|
[id_bhvWaterMist2] = bhvWaterMist2,
|
|
[id_bhvUnused0DFC] = bhvUnused0DFC,
|
|
[id_bhvMistCircParticleSpawner] = bhvMistCircParticleSpawner,
|
|
[id_bhvDirtParticleSpawner] = bhvDirtParticleSpawner,
|
|
[id_bhvSnowParticleSpawner] = bhvSnowParticleSpawner,
|
|
[id_bhvWind] = bhvWind,
|
|
[id_bhvEndToad] = bhvEndToad,
|
|
[id_bhvEndPeach] = bhvEndPeach,
|
|
[id_bhvUnusedParticleSpawn] = bhvUnusedParticleSpawn,
|
|
[id_bhvUkiki] = bhvUkiki,
|
|
[id_bhvUkikiCageChild] = bhvUkikiCageChild,
|
|
[id_bhvUkikiCageStar] = bhvUkikiCageStar,
|
|
[id_bhvUkikiCage] = bhvUkikiCage,
|
|
[id_bhvBitfsSinkingPlatforms] = bhvBitfsSinkingPlatforms,
|
|
[id_bhvBitfsSinkingCagePlatform] = bhvBitfsSinkingCagePlatform,
|
|
[id_bhvDddMovingPole] = bhvDddMovingPole,
|
|
[id_bhvBitfsTiltingInvertedPyramid] = bhvBitfsTiltingInvertedPyramid,
|
|
[id_bhvSquishablePlatform] = bhvSquishablePlatform,
|
|
[id_bhvCutOutObject] = bhvCutOutObject,
|
|
[id_bhvBetaMovingFlames] = bhvBetaMovingFlames,
|
|
[id_bhvRrRotatingBridgePlatform] = bhvRrRotatingBridgePlatform,
|
|
[id_bhvFlamethrower] = bhvFlamethrower,
|
|
[id_bhvFlamethrowerFlame] = bhvFlamethrowerFlame,
|
|
[id_bhvBouncingFireball] = bhvBouncingFireball,
|
|
[id_bhvBouncingFireballFlame] = bhvBouncingFireballFlame,
|
|
[id_bhvBowserShockWave] = bhvBowserShockWave,
|
|
[id_bhvFireParticleSpawner] = bhvFireParticleSpawner,
|
|
[id_bhvBlackSmokeMario] = bhvBlackSmokeMario,
|
|
[id_bhvBlackSmokeBowser] = bhvBlackSmokeBowser,
|
|
[id_bhvBlackSmokeUpward] = bhvBlackSmokeUpward,
|
|
[id_bhvBetaFishSplashSpawner] = bhvBetaFishSplashSpawner,
|
|
[id_bhvSpindrift] = bhvSpindrift,
|
|
[id_bhvTowerPlatformGroup] = bhvTowerPlatformGroup,
|
|
[id_bhvWfSlidingTowerPlatform] = bhvWfSlidingTowerPlatform,
|
|
[id_bhvWfElevatorTowerPlatform] = bhvWfElevatorTowerPlatform,
|
|
[id_bhvWfSolidTowerPlatform] = bhvWfSolidTowerPlatform,
|
|
[id_bhvLeafParticleSpawner] = bhvLeafParticleSpawner,
|
|
[id_bhvTreeSnow] = bhvTreeSnow,
|
|
[id_bhvTreeLeaf] = bhvTreeLeaf,
|
|
[id_bhvAnotherTiltingPlatform] = bhvAnotherTiltingPlatform,
|
|
[id_bhvSquarishPathMoving] = bhvSquarishPathMoving,
|
|
[id_bhvSquarishPathParent] = bhvSquarishPathParent,
|
|
[id_bhvPiranhaPlantBubble] = bhvPiranhaPlantBubble,
|
|
[id_bhvPiranhaPlantWakingBubbles] = bhvPiranhaPlantWakingBubbles,
|
|
[id_bhvFloorSwitchAnimatesObject] = bhvFloorSwitchAnimatesObject,
|
|
[id_bhvFloorSwitchGrills] = bhvFloorSwitchGrills,
|
|
[id_bhvFloorSwitchHardcodedModel] = bhvFloorSwitchHardcodedModel,
|
|
[id_bhvFloorSwitchHiddenObjects] = bhvFloorSwitchHiddenObjects,
|
|
[id_bhvHiddenObject] = bhvHiddenObject,
|
|
[id_bhvBreakableBox] = bhvBreakableBox,
|
|
[id_bhvPushableMetalBox] = bhvPushableMetalBox,
|
|
[id_bhvHeaveHo] = bhvHeaveHo,
|
|
[id_bhvHeaveHoThrowMario] = bhvHeaveHoThrowMario,
|
|
[id_bhvCcmTouchedStarSpawn] = bhvCcmTouchedStarSpawn,
|
|
[id_bhvUnusedPoundablePlatform] = bhvUnusedPoundablePlatform,
|
|
[id_bhvBetaTrampolineTop] = bhvBetaTrampolineTop,
|
|
[id_bhvBetaTrampolineSpring] = bhvBetaTrampolineSpring,
|
|
[id_bhvJumpingBox] = bhvJumpingBox,
|
|
[id_bhvBooCage] = bhvBooCage,
|
|
[id_bhvStub] = bhvStub,
|
|
[id_bhvIgloo] = bhvIgloo,
|
|
[id_bhvBowserKey] = bhvBowserKey,
|
|
[id_bhvGrandStar] = bhvGrandStar,
|
|
[id_bhvBetaBooKey] = bhvBetaBooKey,
|
|
[id_bhvAlphaBooKey] = bhvAlphaBooKey,
|
|
[id_bhvBulletBill] = bhvBulletBill,
|
|
[id_bhvWhitePuffSmoke] = bhvWhitePuffSmoke,
|
|
[id_bhvUnused1820] = bhvUnused1820,
|
|
[id_bhvBowserTailAnchor] = bhvBowserTailAnchor,
|
|
[id_bhvBowser] = bhvBowser,
|
|
[id_bhvBowserBodyAnchor] = bhvBowserBodyAnchor,
|
|
[id_bhvBowserFlameSpawn] = bhvBowserFlameSpawn,
|
|
[id_bhvTiltingBowserLavaPlatform] = bhvTiltingBowserLavaPlatform,
|
|
[id_bhvFallingBowserPlatform] = bhvFallingBowserPlatform,
|
|
[id_bhvBlueBowserFlame] = bhvBlueBowserFlame,
|
|
[id_bhvFlameFloatingLanding] = bhvFlameFloatingLanding,
|
|
[id_bhvBlueFlamesGroup] = bhvBlueFlamesGroup,
|
|
[id_bhvFlameBouncing] = bhvFlameBouncing,
|
|
[id_bhvFlameMovingForwardGrowing] = bhvFlameMovingForwardGrowing,
|
|
[id_bhvFlameBowser] = bhvFlameBowser,
|
|
[id_bhvFlameLargeBurningOut] = bhvFlameLargeBurningOut,
|
|
[id_bhvBlueFish] = bhvBlueFish,
|
|
[id_bhvTankFishGroup] = bhvTankFishGroup,
|
|
[id_bhvCheckerboardElevatorGroup] = bhvCheckerboardElevatorGroup,
|
|
[id_bhvCheckerboardPlatformSub] = bhvCheckerboardPlatformSub,
|
|
[id_bhvBowserKeyUnlockDoor] = bhvBowserKeyUnlockDoor,
|
|
[id_bhvBowserKeyCourseExit] = bhvBowserKeyCourseExit,
|
|
[id_bhvInvisibleObjectsUnderBridge] = bhvInvisibleObjectsUnderBridge,
|
|
[id_bhvWaterLevelPillar] = bhvWaterLevelPillar,
|
|
[id_bhvDddWarp] = bhvDddWarp,
|
|
[id_bhvMoatGrills] = bhvMoatGrills,
|
|
[id_bhvClockMinuteHand] = bhvClockMinuteHand,
|
|
[id_bhvClockHourHand] = bhvClockHourHand,
|
|
[id_bhvMacroUkiki] = bhvMacroUkiki,
|
|
[id_bhvStub1D0C] = bhvStub1D0C,
|
|
[id_bhvLllRotatingHexagonalPlatform] = bhvLllRotatingHexagonalPlatform,
|
|
[id_bhvLllSinkingRockBlock] = bhvLllSinkingRockBlock,
|
|
[id_bhvStub1D70] = bhvStub1D70,
|
|
[id_bhvLllMovingOctagonalMeshPlatform] = bhvLllMovingOctagonalMeshPlatform,
|
|
[id_bhvLllRotatingBlockWithFireBars] = bhvLllRotatingBlockWithFireBars,
|
|
[id_bhvLllRotatingHexFlame] = bhvLllRotatingHexFlame,
|
|
[id_bhvLllWoodPiece] = bhvLllWoodPiece,
|
|
[id_bhvLllFloatingWoodBridge] = bhvLllFloatingWoodBridge,
|
|
[id_bhvVolcanoFlames] = bhvVolcanoFlames,
|
|
[id_bhvLllRotatingHexagonalRing] = bhvLllRotatingHexagonalRing,
|
|
[id_bhvLllSinkingRectangularPlatform] = bhvLllSinkingRectangularPlatform,
|
|
[id_bhvLllSinkingSquarePlatforms] = bhvLllSinkingSquarePlatforms,
|
|
[id_bhvLllTiltingInvertedPyramid] = bhvLllTiltingInvertedPyramid,
|
|
[id_bhvUnused1F30] = bhvUnused1F30,
|
|
[id_bhvKoopaShell] = bhvKoopaShell,
|
|
[id_bhvKoopaShellFlame] = bhvKoopaShellFlame,
|
|
[id_bhvToxBox] = bhvToxBox,
|
|
[id_bhvPiranhaPlant] = bhvPiranhaPlant,
|
|
[id_bhvLllHexagonalMesh] = bhvLllHexagonalMesh,
|
|
[id_bhvLllBowserPuzzlePiece] = bhvLllBowserPuzzlePiece,
|
|
[id_bhvLllBowserPuzzle] = bhvLllBowserPuzzle,
|
|
[id_bhvTuxiesMother] = bhvTuxiesMother,
|
|
[id_bhvPenguinBaby] = bhvPenguinBaby,
|
|
[id_bhvUnused20E0] = bhvUnused20E0,
|
|
[id_bhvSmallPenguin] = bhvSmallPenguin,
|
|
[id_bhvFish2] = bhvFish2,
|
|
[id_bhvFish3] = bhvFish3,
|
|
[id_bhvLargeFishGroup] = bhvLargeFishGroup,
|
|
[id_bhvFish] = bhvFish,
|
|
[id_bhvWdwExpressElevator] = bhvWdwExpressElevator,
|
|
[id_bhvWdwExpressElevatorPlatform] = bhvWdwExpressElevatorPlatform,
|
|
[id_bhvChirpChirp] = bhvChirpChirp,
|
|
[id_bhvBub] = bhvBub,
|
|
[id_bhvExclamationBox] = bhvExclamationBox,
|
|
[id_bhvRotatingExclamationMark] = bhvRotatingExclamationMark,
|
|
[id_bhvSoundSpawner] = bhvSoundSpawner,
|
|
[id_bhvRockSolid] = bhvRockSolid,
|
|
[id_bhvBowserSubDoor] = bhvBowserSubDoor,
|
|
[id_bhvBowsersSub] = bhvBowsersSub,
|
|
[id_bhvSushiShark] = bhvSushiShark,
|
|
[id_bhvSushiSharkCollisionChild] = bhvSushiSharkCollisionChild,
|
|
[id_bhvJrbSlidingBox] = bhvJrbSlidingBox,
|
|
[id_bhvShipPart3] = bhvShipPart3,
|
|
[id_bhvInSunkenShip3] = bhvInSunkenShip3,
|
|
[id_bhvSunkenShipPart] = bhvSunkenShipPart,
|
|
[id_bhvSunkenShipPart2] = bhvSunkenShipPart2,
|
|
[id_bhvInSunkenShip] = bhvInSunkenShip,
|
|
[id_bhvInSunkenShip2] = bhvInSunkenShip2,
|
|
[id_bhvMistParticleSpawner] = bhvMistParticleSpawner,
|
|
[id_bhvWhitePuff1] = bhvWhitePuff1,
|
|
[id_bhvWhitePuff2] = bhvWhitePuff2,
|
|
[id_bhvWhitePuffSmoke2] = bhvWhitePuffSmoke2,
|
|
[id_bhvPurpleSwitchHiddenBoxes] = bhvPurpleSwitchHiddenBoxes,
|
|
[id_bhvBlueCoinSwitch] = bhvBlueCoinSwitch,
|
|
[id_bhvHiddenBlueCoin] = bhvHiddenBlueCoin,
|
|
[id_bhvOpenableCageDoor] = bhvOpenableCageDoor,
|
|
[id_bhvOpenableGrill] = bhvOpenableGrill,
|
|
[id_bhvWaterLevelDiamond] = bhvWaterLevelDiamond,
|
|
[id_bhvInitializeChangingWaterLevel] = bhvInitializeChangingWaterLevel,
|
|
[id_bhvTweesterSandParticle] = bhvTweesterSandParticle,
|
|
[id_bhvTweester] = bhvTweester,
|
|
[id_bhvMerryGoRoundBooManager] = bhvMerryGoRoundBooManager,
|
|
[id_bhvAnimatedTexture] = bhvAnimatedTexture,
|
|
[id_bhvBooInCastle] = bhvBooInCastle,
|
|
[id_bhvBooWithCage] = bhvBooWithCage,
|
|
[id_bhvBalconyBigBoo] = bhvBalconyBigBoo,
|
|
[id_bhvMerryGoRoundBigBoo] = bhvMerryGoRoundBigBoo,
|
|
[id_bhvGhostHuntBigBoo] = bhvGhostHuntBigBoo,
|
|
[id_bhvCourtyardBooTriplet] = bhvCourtyardBooTriplet,
|
|
[id_bhvBoo] = bhvBoo,
|
|
[id_bhvMerryGoRoundBoo] = bhvMerryGoRoundBoo,
|
|
[id_bhvGhostHuntBoo] = bhvGhostHuntBoo,
|
|
[id_bhvHiddenStaircaseStep] = bhvHiddenStaircaseStep,
|
|
[id_bhvBooBossSpawnedBridge] = bhvBooBossSpawnedBridge,
|
|
[id_bhvBbhTiltingTrapPlatform] = bhvBbhTiltingTrapPlatform,
|
|
[id_bhvHauntedBookshelf] = bhvHauntedBookshelf,
|
|
[id_bhvMeshElevator] = bhvMeshElevator,
|
|
[id_bhvMerryGoRound] = bhvMerryGoRound,
|
|
[id_bhvPlaysMusicTrackWhenTouched] = bhvPlaysMusicTrackWhenTouched,
|
|
[id_bhvBetaBowserAnchor] = bhvBetaBowserAnchor,
|
|
[id_bhvStaticCheckeredPlatform] = bhvStaticCheckeredPlatform,
|
|
[id_bhvUnused2A10] = bhvUnused2A10,
|
|
[id_bhvUnusedFakeStar] = bhvUnusedFakeStar,
|
|
[id_bhvStaticObject] = bhvStaticObject,
|
|
[id_bhvUnused2A54] = bhvUnused2A54,
|
|
[id_bhvCastleFloorTrap] = bhvCastleFloorTrap,
|
|
[id_bhvFloorTrapInCastle] = bhvFloorTrapInCastle,
|
|
[id_bhvTree] = bhvTree,
|
|
[id_bhvSparkle] = bhvSparkle,
|
|
[id_bhvSparkleSpawn] = bhvSparkleSpawn,
|
|
[id_bhvSparkleParticleSpawner] = bhvSparkleParticleSpawner,
|
|
[id_bhvScuttlebug] = bhvScuttlebug,
|
|
[id_bhvScuttlebugSpawn] = bhvScuttlebugSpawn,
|
|
[id_bhvWhompKingBoss] = bhvWhompKingBoss,
|
|
[id_bhvSmallWhomp] = bhvSmallWhomp,
|
|
[id_bhvWaterSplash] = bhvWaterSplash,
|
|
[id_bhvWaterDroplet] = bhvWaterDroplet,
|
|
[id_bhvWaterDropletSplash] = bhvWaterDropletSplash,
|
|
[id_bhvBubbleSplash] = bhvBubbleSplash,
|
|
[id_bhvIdleWaterWave] = bhvIdleWaterWave,
|
|
[id_bhvObjectWaterSplash] = bhvObjectWaterSplash,
|
|
[id_bhvShallowWaterWave] = bhvShallowWaterWave,
|
|
[id_bhvShallowWaterSplash] = bhvShallowWaterSplash,
|
|
[id_bhvObjectWaveTrail] = bhvObjectWaveTrail,
|
|
[id_bhvWaveTrail] = bhvWaveTrail,
|
|
[id_bhvTinyStrongWindParticle] = bhvTinyStrongWindParticle,
|
|
[id_bhvStrongWindParticle] = bhvStrongWindParticle,
|
|
[id_bhvSLSnowmanWind] = bhvSLSnowmanWind,
|
|
[id_bhvSLWalkingPenguin] = bhvSLWalkingPenguin,
|
|
[id_bhvYellowBall] = bhvYellowBall,
|
|
[id_bhvMario] = bhvMario,
|
|
[id_bhvToadMessage] = bhvToadMessage,
|
|
[id_bhvUnlockDoorStar] = bhvUnlockDoorStar,
|
|
[id_bhvRandomAnimatedTexture] = bhvRandomAnimatedTexture,
|
|
[id_bhvYellowBackgroundInMenu] = bhvYellowBackgroundInMenu,
|
|
[id_bhvMenuButton] = bhvMenuButton,
|
|
[id_bhvMenuButtonManager] = bhvMenuButtonManager,
|
|
[id_bhvActSelectorStarType] = bhvActSelectorStarType,
|
|
[id_bhvActSelector] = bhvActSelector,
|
|
[id_bhvMovingYellowCoin] = bhvMovingYellowCoin,
|
|
[id_bhvMovingBlueCoin] = bhvMovingBlueCoin,
|
|
[id_bhvBlueCoinSliding] = bhvBlueCoinSliding,
|
|
[id_bhvBlueCoinJumping] = bhvBlueCoinJumping,
|
|
[id_bhvSeaweed] = bhvSeaweed,
|
|
[id_bhvSeaweedBundle] = bhvSeaweedBundle,
|
|
[id_bhvBobomb] = bhvBobomb,
|
|
[id_bhvBobombFuseSmoke] = bhvBobombFuseSmoke,
|
|
[id_bhvBobombBuddy] = bhvBobombBuddy,
|
|
[id_bhvBobombBuddyOpensCannon] = bhvBobombBuddyOpensCannon,
|
|
[id_bhvCannonClosed] = bhvCannonClosed,
|
|
[id_bhvWhirlpool] = bhvWhirlpool,
|
|
[id_bhvJetStream] = bhvJetStream,
|
|
[id_bhvMessagePanel] = bhvMessagePanel,
|
|
[id_bhvSignOnWall] = bhvSignOnWall,
|
|
[id_bhvHomingAmp] = bhvHomingAmp,
|
|
[id_bhvCirclingAmp] = bhvCirclingAmp,
|
|
[id_bhvButterfly] = bhvButterfly,
|
|
[id_bhvHoot] = bhvHoot,
|
|
[id_bhvBetaHoldableObject] = bhvBetaHoldableObject,
|
|
[id_bhvCarrySomething1] = bhvCarrySomething1,
|
|
[id_bhvCarrySomething2] = bhvCarrySomething2,
|
|
[id_bhvCarrySomething3] = bhvCarrySomething3,
|
|
[id_bhvCarrySomething4] = bhvCarrySomething4,
|
|
[id_bhvCarrySomething5] = bhvCarrySomething5,
|
|
[id_bhvCarrySomething6] = bhvCarrySomething6,
|
|
[id_bhvObjectBubble] = bhvObjectBubble,
|
|
[id_bhvObjectWaterWave] = bhvObjectWaterWave,
|
|
[id_bhvExplosion] = bhvExplosion,
|
|
[id_bhvBobombBullyDeathSmoke] = bhvBobombBullyDeathSmoke,
|
|
[id_bhvSmoke] = bhvSmoke,
|
|
[id_bhvBobombExplosionBubble] = bhvBobombExplosionBubble,
|
|
[id_bhvRespawner] = bhvRespawner,
|
|
[id_bhvSmallBully] = bhvSmallBully,
|
|
[id_bhvBigBully] = bhvBigBully,
|
|
[id_bhvBigBullyWithMinions] = bhvBigBullyWithMinions,
|
|
[id_bhvSmallChillBully] = bhvSmallChillBully,
|
|
[id_bhvBigChillBully] = bhvBigChillBully,
|
|
[id_bhvJetStreamRingSpawner] = bhvJetStreamRingSpawner,
|
|
[id_bhvJetStreamWaterRing] = bhvJetStreamWaterRing,
|
|
[id_bhvMantaRayWaterRing] = bhvMantaRayWaterRing,
|
|
[id_bhvMantaRayRingManager] = bhvMantaRayRingManager,
|
|
[id_bhvBowserBomb] = bhvBowserBomb,
|
|
[id_bhvBowserBombExplosion] = bhvBowserBombExplosion,
|
|
[id_bhvBowserBombSmoke] = bhvBowserBombSmoke,
|
|
[id_bhvCelebrationStar] = bhvCelebrationStar,
|
|
[id_bhvCelebrationStarSparkle] = bhvCelebrationStarSparkle,
|
|
[id_bhvStarKeyCollectionPuffSpawner] = bhvStarKeyCollectionPuffSpawner,
|
|
[id_bhvLllDrawbridgeSpawner] = bhvLllDrawbridgeSpawner,
|
|
[id_bhvLllDrawbridge] = bhvLllDrawbridge,
|
|
[id_bhvSmallBomp] = bhvSmallBomp,
|
|
[id_bhvLargeBomp] = bhvLargeBomp,
|
|
[id_bhvWfSlidingPlatform] = bhvWfSlidingPlatform,
|
|
[id_bhvMoneybag] = bhvMoneybag,
|
|
[id_bhvMoneybagHidden] = bhvMoneybagHidden,
|
|
[id_bhvPitBowlingBall] = bhvPitBowlingBall,
|
|
[id_bhvFreeBowlingBall] = bhvFreeBowlingBall,
|
|
[id_bhvBowlingBall] = bhvBowlingBall,
|
|
[id_bhvTtmBowlingBallSpawner] = bhvTtmBowlingBallSpawner,
|
|
[id_bhvBobBowlingBallSpawner] = bhvBobBowlingBallSpawner,
|
|
[id_bhvThiBowlingBallSpawner] = bhvThiBowlingBallSpawner,
|
|
[id_bhvRrCruiserWing] = bhvRrCruiserWing,
|
|
[id_bhvSpindel] = bhvSpindel,
|
|
[id_bhvSslMovingPyramidWall] = bhvSslMovingPyramidWall,
|
|
[id_bhvPyramidElevator] = bhvPyramidElevator,
|
|
[id_bhvPyramidElevatorTrajectoryMarkerBall] = bhvPyramidElevatorTrajectoryMarkerBall,
|
|
[id_bhvPyramidTop] = bhvPyramidTop,
|
|
[id_bhvPyramidTopFragment] = bhvPyramidTopFragment,
|
|
[id_bhvPyramidPillarTouchDetector] = bhvPyramidPillarTouchDetector,
|
|
[id_bhvWaterfallSoundLoop] = bhvWaterfallSoundLoop,
|
|
[id_bhvVolcanoSoundLoop] = bhvVolcanoSoundLoop,
|
|
[id_bhvCastleFlagWaving] = bhvCastleFlagWaving,
|
|
[id_bhvBirdsSoundLoop] = bhvBirdsSoundLoop,
|
|
[id_bhvAmbientSounds] = bhvAmbientSounds,
|
|
[id_bhvSandSoundLoop] = bhvSandSoundLoop,
|
|
[id_bhvHiddenAt120Stars] = bhvHiddenAt120Stars,
|
|
[id_bhvSnowmansBottom] = bhvSnowmansBottom,
|
|
[id_bhvSnowmansHead] = bhvSnowmansHead,
|
|
[id_bhvSnowmansBodyCheckpoint] = bhvSnowmansBodyCheckpoint,
|
|
[id_bhvBigSnowmanWhole] = bhvBigSnowmanWhole,
|
|
[id_bhvBigBoulder] = bhvBigBoulder,
|
|
[id_bhvBigBoulderGenerator] = bhvBigBoulderGenerator,
|
|
[id_bhvWingCap] = bhvWingCap,
|
|
[id_bhvMetalCap] = bhvMetalCap,
|
|
[id_bhvNormalCap] = bhvNormalCap,
|
|
[id_bhvVanishCap] = bhvVanishCap,
|
|
[id_bhvStar] = bhvStar,
|
|
[id_bhvStarSpawnCoordinates] = bhvStarSpawnCoordinates,
|
|
[id_bhvHiddenRedCoinStar] = bhvHiddenRedCoinStar,
|
|
[id_bhvRedCoin] = bhvRedCoin,
|
|
[id_bhvBowserCourseRedCoinStar] = bhvBowserCourseRedCoinStar,
|
|
[id_bhvHiddenStar] = bhvHiddenStar,
|
|
[id_bhvHiddenStarTrigger] = bhvHiddenStarTrigger,
|
|
[id_bhvTtmRollingLog] = bhvTtmRollingLog,
|
|
[id_bhvLllVolcanoFallingTrap] = bhvLllVolcanoFallingTrap,
|
|
[id_bhvLllRollingLog] = bhvLllRollingLog,
|
|
[id_bhv1upWalking] = bhv1upWalking,
|
|
[id_bhv1upRunningAway] = bhv1upRunningAway,
|
|
[id_bhv1upSliding] = bhv1upSliding,
|
|
[id_bhv1Up] = bhv1Up,
|
|
[id_bhv1upJumpOnApproach] = bhv1upJumpOnApproach,
|
|
[id_bhvHidden1up] = bhvHidden1up,
|
|
[id_bhvHidden1upTrigger] = bhvHidden1upTrigger,
|
|
[id_bhvHidden1upInPole] = bhvHidden1upInPole,
|
|
[id_bhvHidden1upInPoleTrigger] = bhvHidden1upInPoleTrigger,
|
|
[id_bhvHidden1upInPoleSpawner] = bhvHidden1upInPoleSpawner,
|
|
[id_bhvControllablePlatform] = bhvControllablePlatform,
|
|
[id_bhvControllablePlatformSub] = bhvControllablePlatformSub,
|
|
[id_bhvBreakableBoxSmall] = bhvBreakableBoxSmall,
|
|
[id_bhvSlidingSnowMound] = bhvSlidingSnowMound,
|
|
[id_bhvSnowMoundSpawn] = bhvSnowMoundSpawn,
|
|
[id_bhvWdwSquareFloatingPlatform] = bhvWdwSquareFloatingPlatform,
|
|
[id_bhvWdwRectangularFloatingPlatform] = bhvWdwRectangularFloatingPlatform,
|
|
[id_bhvJrbFloatingPlatform] = bhvJrbFloatingPlatform,
|
|
[id_bhvArrowLift] = bhvArrowLift,
|
|
[id_bhvOrangeNumber] = bhvOrangeNumber,
|
|
[id_bhvMantaRay] = bhvMantaRay,
|
|
[id_bhvFallingPillar] = bhvFallingPillar,
|
|
[id_bhvFallingPillarHitbox] = bhvFallingPillarHitbox,
|
|
[id_bhvPillarBase] = bhvPillarBase,
|
|
[id_bhvJrbFloatingBox] = bhvJrbFloatingBox,
|
|
[id_bhvDecorativePendulum] = bhvDecorativePendulum,
|
|
[id_bhvTreasureChestsShip] = bhvTreasureChestsShip,
|
|
[id_bhvTreasureChestsJrb] = bhvTreasureChestsJrb,
|
|
[id_bhvTreasureChests] = bhvTreasureChests,
|
|
[id_bhvTreasureChestBottom] = bhvTreasureChestBottom,
|
|
[id_bhvTreasureChestTop] = bhvTreasureChestTop,
|
|
[id_bhvMips] = bhvMips,
|
|
[id_bhvYoshi] = bhvYoshi,
|
|
[id_bhvKoopa] = bhvKoopa,
|
|
[id_bhvKoopaRaceEndpoint] = bhvKoopaRaceEndpoint,
|
|
[id_bhvKoopaFlag] = bhvKoopaFlag,
|
|
[id_bhvPokey] = bhvPokey,
|
|
[id_bhvPokeyBodyPart] = bhvPokeyBodyPart,
|
|
[id_bhvSwoop] = bhvSwoop,
|
|
[id_bhvFlyGuy] = bhvFlyGuy,
|
|
[id_bhvGoomba] = bhvGoomba,
|
|
[id_bhvGoombaTripletSpawner] = bhvGoombaTripletSpawner,
|
|
[id_bhvChainChomp] = bhvChainChomp,
|
|
[id_bhvChainChompChainPart] = bhvChainChompChainPart,
|
|
[id_bhvWoodenPost] = bhvWoodenPost,
|
|
[id_bhvChainChompGate] = bhvChainChompGate,
|
|
[id_bhvWigglerHead] = bhvWigglerHead,
|
|
[id_bhvWigglerBody] = bhvWigglerBody,
|
|
[id_bhvEnemyLakitu] = bhvEnemyLakitu,
|
|
[id_bhvCameraLakitu] = bhvCameraLakitu,
|
|
[id_bhvCloud] = bhvCloud,
|
|
[id_bhvCloudPart] = bhvCloudPart,
|
|
[id_bhvSpiny] = bhvSpiny,
|
|
[id_bhvMontyMole] = bhvMontyMole,
|
|
[id_bhvMontyMoleHole] = bhvMontyMoleHole,
|
|
[id_bhvMontyMoleRock] = bhvMontyMoleRock,
|
|
[id_bhvPlatformOnTrack] = bhvPlatformOnTrack,
|
|
[id_bhvTrackBall] = bhvTrackBall,
|
|
[id_bhvSeesawPlatform] = bhvSeesawPlatform,
|
|
[id_bhvFerrisWheelAxle] = bhvFerrisWheelAxle,
|
|
[id_bhvFerrisWheelPlatform] = bhvFerrisWheelPlatform,
|
|
[id_bhvWaterBombSpawner] = bhvWaterBombSpawner,
|
|
[id_bhvWaterBomb] = bhvWaterBomb,
|
|
[id_bhvWaterBombShadow] = bhvWaterBombShadow,
|
|
[id_bhvTTCRotatingSolid] = bhvTTCRotatingSolid,
|
|
[id_bhvTTCPendulum] = bhvTTCPendulum,
|
|
[id_bhvTTCTreadmill] = bhvTTCTreadmill,
|
|
[id_bhvTTCMovingBar] = bhvTTCMovingBar,
|
|
[id_bhvTTCCog] = bhvTTCCog,
|
|
[id_bhvTTCPitBlock] = bhvTTCPitBlock,
|
|
[id_bhvTTCElevator] = bhvTTCElevator,
|
|
[id_bhvTTC2DRotator] = bhvTTC2DRotator,
|
|
[id_bhvTTCSpinner] = bhvTTCSpinner,
|
|
[id_bhvMrBlizzard] = bhvMrBlizzard,
|
|
[id_bhvMrBlizzardSnowball] = bhvMrBlizzardSnowball,
|
|
[id_bhvSlidingPlatform2] = bhvSlidingPlatform2,
|
|
[id_bhvOctagonalPlatformRotating] = bhvOctagonalPlatformRotating,
|
|
[id_bhvAnimatesOnFloorSwitchPress] = bhvAnimatesOnFloorSwitchPress,
|
|
[id_bhvActivatedBackAndForthPlatform] = bhvActivatedBackAndForthPlatform,
|
|
[id_bhvRecoveryHeart] = bhvRecoveryHeart,
|
|
[id_bhvWaterBombCannon] = bhvWaterBombCannon,
|
|
[id_bhvCannonBarrelBubbles] = bhvCannonBarrelBubbles,
|
|
[id_bhvUnagi] = bhvUnagi,
|
|
[id_bhvUnagiSubobject] = bhvUnagiSubobject,
|
|
[id_bhvDorrie] = bhvDorrie,
|
|
[id_bhvHauntedChair] = bhvHauntedChair,
|
|
[id_bhvMadPiano] = bhvMadPiano,
|
|
[id_bhvFlyingBookend] = bhvFlyingBookend,
|
|
[id_bhvBookendSpawn] = bhvBookendSpawn,
|
|
[id_bhvHauntedBookshelfManager] = bhvHauntedBookshelfManager,
|
|
[id_bhvBookSwitch] = bhvBookSwitch,
|
|
[id_bhvFirePiranhaPlant] = bhvFirePiranhaPlant,
|
|
[id_bhvSmallPiranhaFlame] = bhvSmallPiranhaFlame,
|
|
[id_bhvFireSpitter] = bhvFireSpitter,
|
|
[id_bhvFlyguyFlame] = bhvFlyguyFlame,
|
|
[id_bhvSnufit] = bhvSnufit,
|
|
[id_bhvSnufitBalls] = bhvSnufitBalls,
|
|
[id_bhvHorizontalGrindel] = bhvHorizontalGrindel,
|
|
[id_bhvEyerokBoss] = bhvEyerokBoss,
|
|
[id_bhvEyerokHand] = bhvEyerokHand,
|
|
[id_bhvKlepto] = bhvKlepto,
|
|
[id_bhvBird] = bhvBird,
|
|
[id_bhvRacingPenguin] = bhvRacingPenguin,
|
|
[id_bhvPenguinRaceFinishLine] = bhvPenguinRaceFinishLine,
|
|
[id_bhvPenguinRaceShortcutCheck] = bhvPenguinRaceShortcutCheck,
|
|
[id_bhvCoffinSpawner] = bhvCoffinSpawner,
|
|
[id_bhvCoffin] = bhvCoffin,
|
|
[id_bhvClamShell] = bhvClamShell,
|
|
[id_bhvSkeeter] = bhvSkeeter,
|
|
[id_bhvSkeeterWave] = bhvSkeeterWave,
|
|
[id_bhvSwingPlatform] = bhvSwingPlatform,
|
|
[id_bhvDonutPlatformSpawner] = bhvDonutPlatformSpawner,
|
|
[id_bhvDonutPlatform] = bhvDonutPlatform,
|
|
[id_bhvDDDPole] = bhvDDDPole,
|
|
[id_bhvRedCoinStarMarker] = bhvRedCoinStarMarker,
|
|
[id_bhvTripletButterfly] = bhvTripletButterfly,
|
|
[id_bhvBubba] = bhvBubba,
|
|
[id_bhvBeginningLakitu] = bhvBeginningLakitu,
|
|
[id_bhvBeginningPeach] = bhvBeginningPeach,
|
|
[id_bhvEndBirds1] = bhvEndBirds1,
|
|
[id_bhvEndBirds2] = bhvEndBirds2,
|
|
[id_bhvIntroScene] = bhvIntroScene,
|
|
};
|
|
|
|
|
|
enum BehaviorId get_id_from_behavior(const BehaviorScript* behavior) {
|
|
if (behavior == NULL) { return 0; }
|
|
return (enum BehaviorId)(behavior[1] & 0xFFFF);
|
|
}
|
|
|
|
const BehaviorScript* get_behavior_from_id(enum BehaviorId id) {
|
|
const BehaviorScript* behavior = get_lua_behavior_from_id(id, true);
|
|
if (behavior != NULL) { return behavior; }
|
|
|
|
if (id < 0 || id >= id_bhv_max_count) {
|
|
return NULL;
|
|
}
|
|
|
|
return gBehaviorTable[id];
|
|
}
|