2020-08-10 01:21:12 +02:00
|
|
|
#include <assert.h>
|
|
|
|
#include "behavior_table.h"
|
2022-03-03 10:04:15 +01:00
|
|
|
#include "pc/lua/smlua_hooks.h"
|
2020-08-10 01:21:12 +02:00
|
|
|
|
2022-04-03 00:14:04 +02:00
|
|
|
struct BehaviorTableEntry {
|
|
|
|
enum BehaviorId id;
|
|
|
|
const BehaviorScript* script;
|
|
|
|
const char* name;
|
2020-08-10 01:21:12 +02:00
|
|
|
};
|
|
|
|
|
2022-04-03 00:14:04 +02:00
|
|
|
#define BHV_ENTRY(BHV) [id_##BHV] = { .id = id_##BHV, .script = BHV, .name = #BHV }
|
|
|
|
|
|
|
|
const struct BehaviorTableEntry gBehaviorTable[id_bhv_max_count] = {
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhv1Up),
|
|
|
|
BHV_ENTRY(bhv1upJumpOnApproach),
|
|
|
|
BHV_ENTRY(bhv1upRunningAway),
|
|
|
|
BHV_ENTRY(bhv1upSliding),
|
|
|
|
BHV_ENTRY(bhv1upWalking),
|
|
|
|
BHV_ENTRY(bhvActivatedBackAndForthPlatform),
|
|
|
|
BHV_ENTRY(bhvActSelector),
|
|
|
|
BHV_ENTRY(bhvActSelectorStarType),
|
|
|
|
BHV_ENTRY(bhvAirborneDeathWarp),
|
|
|
|
BHV_ENTRY(bhvAirborneStarCollectWarp),
|
|
|
|
BHV_ENTRY(bhvAirborneWarp),
|
|
|
|
BHV_ENTRY(bhvAlphaBooKey),
|
|
|
|
BHV_ENTRY(bhvAmbientSounds),
|
|
|
|
BHV_ENTRY(bhvAnimatedTexture),
|
|
|
|
BHV_ENTRY(bhvAnimatesOnFloorSwitchPress),
|
|
|
|
BHV_ENTRY(bhvAnotherElavator),
|
|
|
|
BHV_ENTRY(bhvAnotherTiltingPlatform),
|
|
|
|
BHV_ENTRY(bhvArrowLift),
|
|
|
|
BHV_ENTRY(bhvBalconyBigBoo),
|
|
|
|
BHV_ENTRY(bhvBbhTiltingTrapPlatform),
|
|
|
|
BHV_ENTRY(bhvBbhTumblingBridge),
|
|
|
|
BHV_ENTRY(bhvBeginningLakitu),
|
|
|
|
BHV_ENTRY(bhvBeginningPeach),
|
|
|
|
BHV_ENTRY(bhvBetaBooKey),
|
|
|
|
BHV_ENTRY(bhvBetaBowserAnchor),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvBetaChestBottom),
|
|
|
|
BHV_ENTRY(bhvBetaChestLid),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvBetaFishSplashSpawner),
|
|
|
|
BHV_ENTRY(bhvBetaHoldableObject),
|
|
|
|
BHV_ENTRY(bhvBetaMovingFlames),
|
|
|
|
BHV_ENTRY(bhvBetaMovingFlamesSpawn),
|
|
|
|
BHV_ENTRY(bhvBetaTrampolineSpring),
|
|
|
|
BHV_ENTRY(bhvBetaTrampolineTop),
|
|
|
|
BHV_ENTRY(bhvBigBoulder),
|
|
|
|
BHV_ENTRY(bhvBigBoulderGenerator),
|
|
|
|
BHV_ENTRY(bhvBigBully),
|
|
|
|
BHV_ENTRY(bhvBigBullyWithMinions),
|
|
|
|
BHV_ENTRY(bhvBigChillBully),
|
|
|
|
BHV_ENTRY(bhvBigSnowmanWhole),
|
|
|
|
BHV_ENTRY(bhvBird),
|
|
|
|
BHV_ENTRY(bhvBirdsSoundLoop),
|
|
|
|
BHV_ENTRY(bhvBitfsSinkingCagePlatform),
|
|
|
|
BHV_ENTRY(bhvBitfsSinkingPlatforms),
|
|
|
|
BHV_ENTRY(bhvBitfsTiltingInvertedPyramid),
|
|
|
|
BHV_ENTRY(bhvBlackSmokeBowser),
|
|
|
|
BHV_ENTRY(bhvBlackSmokeMario),
|
|
|
|
BHV_ENTRY(bhvBlackSmokeUpward),
|
|
|
|
BHV_ENTRY(bhvBlueBowserFlame),
|
|
|
|
BHV_ENTRY(bhvBlueCoinJumping),
|
|
|
|
BHV_ENTRY(bhvBlueCoinSliding),
|
2023-02-26 03:15:54 +01:00
|
|
|
BHV_ENTRY(bhvBlueCoinNumber),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvBlueCoinSwitch),
|
|
|
|
BHV_ENTRY(bhvBlueFish),
|
|
|
|
BHV_ENTRY(bhvBlueFlamesGroup),
|
|
|
|
BHV_ENTRY(bhvBobBowlingBallSpawner),
|
|
|
|
BHV_ENTRY(bhvBobomb),
|
|
|
|
BHV_ENTRY(bhvBobombAnchorMario),
|
|
|
|
BHV_ENTRY(bhvBobombBuddy),
|
|
|
|
BHV_ENTRY(bhvBobombBuddyOpensCannon),
|
|
|
|
BHV_ENTRY(bhvBobombBullyDeathSmoke),
|
|
|
|
BHV_ENTRY(bhvBobombExplosionBubble),
|
|
|
|
BHV_ENTRY(bhvBobombExplosionBubble3600),
|
|
|
|
BHV_ENTRY(bhvBobombFuseSmoke),
|
|
|
|
BHV_ENTRY(bhvBoo),
|
|
|
|
BHV_ENTRY(bhvBooBossSpawnedBridge),
|
|
|
|
BHV_ENTRY(bhvBooCage),
|
|
|
|
BHV_ENTRY(bhvBooInCastle),
|
|
|
|
BHV_ENTRY(bhvBookendSpawn),
|
|
|
|
BHV_ENTRY(bhvBookSwitch),
|
|
|
|
BHV_ENTRY(bhvBooWithCage),
|
|
|
|
BHV_ENTRY(bhvBouncingFireball),
|
|
|
|
BHV_ENTRY(bhvBouncingFireballFlame),
|
|
|
|
BHV_ENTRY(bhvBowlingBall),
|
|
|
|
BHV_ENTRY(bhvBowser),
|
|
|
|
BHV_ENTRY(bhvBowserBodyAnchor),
|
|
|
|
BHV_ENTRY(bhvBowserBomb),
|
|
|
|
BHV_ENTRY(bhvBowserBombExplosion),
|
|
|
|
BHV_ENTRY(bhvBowserBombSmoke),
|
|
|
|
BHV_ENTRY(bhvBowserCourseRedCoinStar),
|
|
|
|
BHV_ENTRY(bhvBowserFlameSpawn),
|
|
|
|
BHV_ENTRY(bhvBowserKey),
|
|
|
|
BHV_ENTRY(bhvBowserKeyCourseExit),
|
|
|
|
BHV_ENTRY(bhvBowserKeyUnlockDoor),
|
|
|
|
BHV_ENTRY(bhvBowserShockWave),
|
|
|
|
BHV_ENTRY(bhvBowsersSub),
|
|
|
|
BHV_ENTRY(bhvBowserSubDoor),
|
|
|
|
BHV_ENTRY(bhvBowserTailAnchor),
|
|
|
|
BHV_ENTRY(bhvBreakableBox),
|
|
|
|
BHV_ENTRY(bhvBreakableBoxSmall),
|
|
|
|
BHV_ENTRY(bhvBreakBoxTriangle),
|
|
|
|
BHV_ENTRY(bhvBreathParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvBub),
|
|
|
|
BHV_ENTRY(bhvBubba),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvBubbleMaybe),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvBubbleParticleSpawner),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvBubblePlayer),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvBubbleSplash),
|
|
|
|
BHV_ENTRY(bhvBulletBill),
|
|
|
|
BHV_ENTRY(bhvBulletBillCannon),
|
|
|
|
BHV_ENTRY(bhvButterfly),
|
|
|
|
BHV_ENTRY(bhvCameraLakitu),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvCannon),
|
|
|
|
BHV_ENTRY(bhvCannonBarrel),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvCannonBarrelBubbles),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvCannonBaseUnused),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvCannonClosed),
|
|
|
|
BHV_ENTRY(bhvCapSwitch),
|
|
|
|
BHV_ENTRY(bhvCapSwitchBase),
|
|
|
|
BHV_ENTRY(bhvCarrySomething1),
|
|
|
|
BHV_ENTRY(bhvCarrySomething2),
|
|
|
|
BHV_ENTRY(bhvCarrySomething3),
|
|
|
|
BHV_ENTRY(bhvCarrySomething4),
|
|
|
|
BHV_ENTRY(bhvCarrySomething5),
|
|
|
|
BHV_ENTRY(bhvCarrySomething6),
|
|
|
|
BHV_ENTRY(bhvCastleFlagWaving),
|
|
|
|
BHV_ENTRY(bhvCastleFloorTrap),
|
|
|
|
BHV_ENTRY(bhvCcmTouchedStarSpawn),
|
|
|
|
BHV_ENTRY(bhvCelebrationStar),
|
|
|
|
BHV_ENTRY(bhvCelebrationStarSparkle),
|
|
|
|
BHV_ENTRY(bhvChainChomp),
|
|
|
|
BHV_ENTRY(bhvChainChompChainPart),
|
|
|
|
BHV_ENTRY(bhvChainChompGate),
|
|
|
|
BHV_ENTRY(bhvCheckerboardElevatorGroup),
|
|
|
|
BHV_ENTRY(bhvCheckerboardPlatformSub),
|
|
|
|
BHV_ENTRY(bhvChirpChirp),
|
|
|
|
BHV_ENTRY(bhvChirpChirpUnused),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvChuckya),
|
|
|
|
BHV_ENTRY(bhvChuckyaAnchorMario),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvCirclingAmp),
|
|
|
|
BHV_ENTRY(bhvClamShell),
|
|
|
|
BHV_ENTRY(bhvClockHourHand),
|
|
|
|
BHV_ENTRY(bhvClockMinuteHand),
|
|
|
|
BHV_ENTRY(bhvCloud),
|
|
|
|
BHV_ENTRY(bhvCloudPart),
|
|
|
|
BHV_ENTRY(bhvCoffin),
|
|
|
|
BHV_ENTRY(bhvCoffinSpawner),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvCoinFormation),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvCoinFormationSpawn),
|
|
|
|
BHV_ENTRY(bhvCoinInsideBoo),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvCoinSparkles),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvControllablePlatform),
|
|
|
|
BHV_ENTRY(bhvControllablePlatformSub),
|
|
|
|
BHV_ENTRY(bhvCourtyardBooTriplet),
|
|
|
|
BHV_ENTRY(bhvCutOutObject),
|
|
|
|
BHV_ENTRY(bhvDddMovingPole),
|
|
|
|
BHV_ENTRY(bhvDDDPole),
|
|
|
|
BHV_ENTRY(bhvDddWarp),
|
|
|
|
BHV_ENTRY(bhvDeathWarp),
|
|
|
|
BHV_ENTRY(bhvDecorativePendulum),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvDirtParticleSpawner),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvDonutPlatform),
|
|
|
|
BHV_ENTRY(bhvDonutPlatformSpawner),
|
|
|
|
BHV_ENTRY(bhvDoor),
|
|
|
|
BHV_ENTRY(bhvDoorWarp),
|
|
|
|
BHV_ENTRY(bhvDorrie),
|
|
|
|
BHV_ENTRY(bhvEndBirds1),
|
|
|
|
BHV_ENTRY(bhvEndBirds2),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvEndPeach),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvEndToad),
|
|
|
|
BHV_ENTRY(bhvEnemyLakitu),
|
|
|
|
BHV_ENTRY(bhvExclamationBox),
|
|
|
|
BHV_ENTRY(bhvExitPodiumWarp),
|
|
|
|
BHV_ENTRY(bhvExplosion),
|
|
|
|
BHV_ENTRY(bhvEyerokBoss),
|
|
|
|
BHV_ENTRY(bhvEyerokHand),
|
|
|
|
BHV_ENTRY(bhvFadingWarp),
|
|
|
|
BHV_ENTRY(bhvFallingBowserPlatform),
|
|
|
|
BHV_ENTRY(bhvFallingPillar),
|
|
|
|
BHV_ENTRY(bhvFallingPillarHitbox),
|
|
|
|
BHV_ENTRY(bhvFerrisWheelAxle),
|
|
|
|
BHV_ENTRY(bhvFerrisWheelPlatform),
|
|
|
|
BHV_ENTRY(bhvFewBlueFishSpawner),
|
|
|
|
BHV_ENTRY(bhvFireParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvFirePiranhaPlant),
|
|
|
|
BHV_ENTRY(bhvFireSpitter),
|
|
|
|
BHV_ENTRY(bhvFish),
|
|
|
|
BHV_ENTRY(bhvFishGroup),
|
|
|
|
BHV_ENTRY(bhvFishSpawner),
|
|
|
|
BHV_ENTRY(bhvFlame),
|
|
|
|
BHV_ENTRY(bhvFlameBouncing),
|
|
|
|
BHV_ENTRY(bhvFlameBowser),
|
|
|
|
BHV_ENTRY(bhvFlameFloatingLanding),
|
|
|
|
BHV_ENTRY(bhvFlameLargeBurningOut),
|
|
|
|
BHV_ENTRY(bhvFlameMovingForwardGrowing),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvFlamethrower),
|
|
|
|
BHV_ENTRY(bhvFlamethrowerFlame),
|
|
|
|
BHV_ENTRY(bhvFloorSwitchAnimatesObject),
|
|
|
|
BHV_ENTRY(bhvFloorSwitchGrills),
|
|
|
|
BHV_ENTRY(bhvFloorSwitchHardcodedModel),
|
|
|
|
BHV_ENTRY(bhvFloorSwitchHiddenObjects),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvFloorTrapInCastle),
|
|
|
|
BHV_ENTRY(bhvFlyGuy),
|
|
|
|
BHV_ENTRY(bhvFlyguyFlame),
|
|
|
|
BHV_ENTRY(bhvFlyingBookend),
|
|
|
|
BHV_ENTRY(bhvFlyingWarp),
|
|
|
|
BHV_ENTRY(bhvFreeBowlingBall),
|
|
|
|
BHV_ENTRY(bhvGhostHuntBigBoo),
|
|
|
|
BHV_ENTRY(bhvGhostHuntBoo),
|
|
|
|
BHV_ENTRY(bhvGiantPole),
|
|
|
|
BHV_ENTRY(bhvGoldenCoinSparkles),
|
|
|
|
BHV_ENTRY(bhvGoomba),
|
|
|
|
BHV_ENTRY(bhvGoombaTripletSpawner),
|
|
|
|
BHV_ENTRY(bhvGrandStar),
|
|
|
|
BHV_ENTRY(bhvGrindel),
|
|
|
|
BHV_ENTRY(bhvHardAirKnockBackWarp),
|
|
|
|
BHV_ENTRY(bhvHauntedBookshelf),
|
|
|
|
BHV_ENTRY(bhvHauntedBookshelfManager),
|
|
|
|
BHV_ENTRY(bhvHauntedChair),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvHeaveHo),
|
|
|
|
BHV_ENTRY(bhvHeaveHoThrowMario),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvHidden1up),
|
|
|
|
BHV_ENTRY(bhvHidden1upInPole),
|
|
|
|
BHV_ENTRY(bhvHidden1upInPoleSpawner),
|
|
|
|
BHV_ENTRY(bhvHidden1upInPoleTrigger),
|
|
|
|
BHV_ENTRY(bhvHidden1upTrigger),
|
|
|
|
BHV_ENTRY(bhvHiddenAt120Stars),
|
|
|
|
BHV_ENTRY(bhvHiddenBlueCoin),
|
|
|
|
BHV_ENTRY(bhvHiddenObject),
|
|
|
|
BHV_ENTRY(bhvHiddenRedCoinStar),
|
|
|
|
BHV_ENTRY(bhvHiddenStaircaseStep),
|
|
|
|
BHV_ENTRY(bhvHiddenStar),
|
|
|
|
BHV_ENTRY(bhvHiddenStarTrigger),
|
|
|
|
BHV_ENTRY(bhvHmcElevatorPlatform),
|
|
|
|
BHV_ENTRY(bhvHomingAmp),
|
|
|
|
BHV_ENTRY(bhvHoot),
|
|
|
|
BHV_ENTRY(bhvHorizontalGrindel),
|
|
|
|
BHV_ENTRY(bhvHorStarParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvIdleWaterWave),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvIgloo),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvInitializeChangingWaterLevel),
|
|
|
|
BHV_ENTRY(bhvInsideCannon),
|
|
|
|
BHV_ENTRY(bhvInstantActiveWarp),
|
|
|
|
BHV_ENTRY(bhvInSunkenShip),
|
|
|
|
BHV_ENTRY(bhvInSunkenShip2),
|
|
|
|
BHV_ENTRY(bhvInSunkenShip3),
|
|
|
|
BHV_ENTRY(bhvIntroScene),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvInvisibleObjectsUnderBridge),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvJetStream),
|
|
|
|
BHV_ENTRY(bhvJetStreamRingSpawner),
|
|
|
|
BHV_ENTRY(bhvJetStreamWaterRing),
|
|
|
|
BHV_ENTRY(bhvJrbFloatingBox),
|
|
|
|
BHV_ENTRY(bhvJrbFloatingPlatform),
|
|
|
|
BHV_ENTRY(bhvJrbSlidingBox),
|
|
|
|
BHV_ENTRY(bhvJumpingBox),
|
|
|
|
BHV_ENTRY(bhvKickableBoard),
|
|
|
|
BHV_ENTRY(bhvKingBobomb),
|
|
|
|
BHV_ENTRY(bhvKlepto),
|
|
|
|
BHV_ENTRY(bhvKoopa),
|
|
|
|
BHV_ENTRY(bhvKoopaFlag),
|
|
|
|
BHV_ENTRY(bhvKoopaRaceEndpoint),
|
|
|
|
BHV_ENTRY(bhvKoopaShell),
|
|
|
|
BHV_ENTRY(bhvKoopaShellFlame),
|
|
|
|
BHV_ENTRY(bhvKoopaShellUnderwater),
|
|
|
|
BHV_ENTRY(bhvLargeBomp),
|
|
|
|
BHV_ENTRY(bhvLaunchDeathWarp),
|
|
|
|
BHV_ENTRY(bhvLaunchStarCollectWarp),
|
|
|
|
BHV_ENTRY(bhvLeafParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvLllBowserPuzzle),
|
|
|
|
BHV_ENTRY(bhvLllBowserPuzzlePiece),
|
|
|
|
BHV_ENTRY(bhvLllDrawbridge),
|
|
|
|
BHV_ENTRY(bhvLllDrawbridgeSpawner),
|
|
|
|
BHV_ENTRY(bhvLllFloatingWoodBridge),
|
|
|
|
BHV_ENTRY(bhvLllHexagonalMesh),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvLllMovingOctagonalMeshPlatform),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvLllRollingLog),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvLllRotatingBlockWithFireBars),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvLllRotatingHexagonalPlatform),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvLllRotatingHexagonalRing),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvLllRotatingHexFlame),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvLllSinkingRectangularPlatform),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvLllSinkingRockBlock),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvLllSinkingSquarePlatforms),
|
|
|
|
BHV_ENTRY(bhvLllTiltingInvertedPyramid),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvLllTumblingBridge),
|
|
|
|
BHV_ENTRY(bhvLllVolcanoFallingTrap),
|
|
|
|
BHV_ENTRY(bhvLllWoodPiece),
|
|
|
|
BHV_ENTRY(bhvMacroUkiki),
|
|
|
|
BHV_ENTRY(bhvMadPiano),
|
|
|
|
BHV_ENTRY(bhvMantaRay),
|
|
|
|
BHV_ENTRY(bhvMantaRayRingManager),
|
|
|
|
BHV_ENTRY(bhvMantaRayWaterRing),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvManyBlueFishSpawner),
|
|
|
|
BHV_ENTRY(bhvMario),
|
|
|
|
BHV_ENTRY(bhvMenuButton),
|
|
|
|
BHV_ENTRY(bhvMenuButtonManager),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvMerryGoRound),
|
|
|
|
BHV_ENTRY(bhvMerryGoRoundBigBoo),
|
|
|
|
BHV_ENTRY(bhvMerryGoRoundBoo),
|
|
|
|
BHV_ENTRY(bhvMerryGoRoundBooManager),
|
|
|
|
BHV_ENTRY(bhvMeshElevator),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvMessagePanel),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvMetalCap),
|
|
|
|
BHV_ENTRY(bhvMips),
|
|
|
|
BHV_ENTRY(bhvMistCircParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvMistParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvMoatGrills),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvMoneybag),
|
|
|
|
BHV_ENTRY(bhvMoneybagHidden),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvMontyMole),
|
|
|
|
BHV_ENTRY(bhvMontyMoleHole),
|
|
|
|
BHV_ENTRY(bhvMontyMoleRock),
|
|
|
|
BHV_ENTRY(bhvMovingBlueCoin),
|
|
|
|
BHV_ENTRY(bhvMovingYellowCoin),
|
|
|
|
BHV_ENTRY(bhvMrBlizzard),
|
|
|
|
BHV_ENTRY(bhvMrBlizzardSnowball),
|
|
|
|
BHV_ENTRY(bhvMrI),
|
|
|
|
BHV_ENTRY(bhvMrIBlueCoin),
|
|
|
|
BHV_ENTRY(bhvMrIBody),
|
|
|
|
BHV_ENTRY(bhvMrIParticle),
|
|
|
|
BHV_ENTRY(bhvNormalCap),
|
|
|
|
BHV_ENTRY(bhvObjectBubble),
|
|
|
|
BHV_ENTRY(bhvObjectWaterSplash),
|
|
|
|
BHV_ENTRY(bhvObjectWaterWave),
|
|
|
|
BHV_ENTRY(bhvObjectWaveTrail),
|
|
|
|
BHV_ENTRY(bhvOctagonalPlatformRotating),
|
|
|
|
BHV_ENTRY(bhvOneCoin),
|
|
|
|
BHV_ENTRY(bhvOpenableCageDoor),
|
|
|
|
BHV_ENTRY(bhvOpenableGrill),
|
|
|
|
BHV_ENTRY(bhvOrangeNumber),
|
|
|
|
BHV_ENTRY(bhvPaintingDeathWarp),
|
|
|
|
BHV_ENTRY(bhvPaintingStarCollectWarp),
|
|
|
|
BHV_ENTRY(bhvPenguinBaby),
|
|
|
|
BHV_ENTRY(bhvPenguinRaceFinishLine),
|
|
|
|
BHV_ENTRY(bhvPenguinRaceShortcutCheck),
|
|
|
|
BHV_ENTRY(bhvPillarBase),
|
|
|
|
BHV_ENTRY(bhvPiranhaPlant),
|
|
|
|
BHV_ENTRY(bhvPiranhaPlantBubble),
|
|
|
|
BHV_ENTRY(bhvPiranhaPlantWakingBubbles),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvPitBowlingBall),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvPlatformOnTrack),
|
2023-05-03 09:54:25 +02:00
|
|
|
#ifndef VERSION_JP
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvPlaysMusicTrackWhenTouched),
|
2023-05-03 09:54:25 +02:00
|
|
|
#endif
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvPlungeBubble),
|
|
|
|
BHV_ENTRY(bhvPokey),
|
|
|
|
BHV_ENTRY(bhvPokeyBodyPart),
|
|
|
|
BHV_ENTRY(bhvPoleGrabbing),
|
|
|
|
BHV_ENTRY(bhvPoundTinyStarParticle),
|
|
|
|
BHV_ENTRY(bhvPunchTinyTriangle),
|
|
|
|
BHV_ENTRY(bhvPurpleParticle),
|
|
|
|
BHV_ENTRY(bhvPurpleSwitchHiddenBoxes),
|
|
|
|
BHV_ENTRY(bhvPushableMetalBox),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvPyramidElevator),
|
|
|
|
BHV_ENTRY(bhvPyramidElevatorTrajectoryMarkerBall),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvPyramidPillarTouchDetector),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvPyramidTop),
|
|
|
|
BHV_ENTRY(bhvPyramidTopFragment),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvRacingPenguin),
|
|
|
|
BHV_ENTRY(bhvRandomAnimatedTexture),
|
|
|
|
BHV_ENTRY(bhvRecoveryHeart),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvRedCoin),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvRedCoinStarMarker),
|
|
|
|
BHV_ENTRY(bhvRespawner),
|
|
|
|
BHV_ENTRY(bhvRockSolid),
|
|
|
|
BHV_ENTRY(bhvRotatingCounterClockwise),
|
|
|
|
BHV_ENTRY(bhvRotatingExclamationMark),
|
|
|
|
BHV_ENTRY(bhvRotatingPlatform),
|
|
|
|
BHV_ENTRY(bhvRrCruiserWing),
|
|
|
|
BHV_ENTRY(bhvRrElevatorPlatform),
|
|
|
|
BHV_ENTRY(bhvRrRotatingBridgePlatform),
|
|
|
|
BHV_ENTRY(bhvSandSoundLoop),
|
|
|
|
BHV_ENTRY(bhvScuttlebug),
|
|
|
|
BHV_ENTRY(bhvScuttlebugSpawn),
|
|
|
|
BHV_ENTRY(bhvSeaweed),
|
|
|
|
BHV_ENTRY(bhvSeaweedBundle),
|
|
|
|
BHV_ENTRY(bhvSeesawPlatform),
|
|
|
|
BHV_ENTRY(bhvShallowWaterSplash),
|
|
|
|
BHV_ENTRY(bhvShallowWaterWave),
|
|
|
|
BHV_ENTRY(bhvShipPart3),
|
|
|
|
BHV_ENTRY(bhvSignOnWall),
|
|
|
|
BHV_ENTRY(bhvSingleCoinGetsSpawned),
|
|
|
|
BHV_ENTRY(bhvSkeeter),
|
|
|
|
BHV_ENTRY(bhvSkeeterWave),
|
|
|
|
BHV_ENTRY(bhvSlidingPlatform2),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvSlidingSnowMound),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvSLSnowmanWind),
|
|
|
|
BHV_ENTRY(bhvSLWalkingPenguin),
|
|
|
|
BHV_ENTRY(bhvSmallBomp),
|
|
|
|
BHV_ENTRY(bhvSmallBully),
|
|
|
|
BHV_ENTRY(bhvSmallChillBully),
|
|
|
|
BHV_ENTRY(bhvSmallParticle),
|
|
|
|
BHV_ENTRY(bhvSmallParticleBubbles),
|
|
|
|
BHV_ENTRY(bhvSmallParticleSnow),
|
|
|
|
BHV_ENTRY(bhvSmallPenguin),
|
|
|
|
BHV_ENTRY(bhvSmallPiranhaFlame),
|
|
|
|
BHV_ENTRY(bhvSmallWaterWave),
|
|
|
|
BHV_ENTRY(bhvSmallWaterWave398),
|
|
|
|
BHV_ENTRY(bhvSmallWhomp),
|
|
|
|
BHV_ENTRY(bhvSmoke),
|
|
|
|
BHV_ENTRY(bhvSnowBall),
|
|
|
|
BHV_ENTRY(bhvSnowmansBodyCheckpoint),
|
|
|
|
BHV_ENTRY(bhvSnowmansBottom),
|
|
|
|
BHV_ENTRY(bhvSnowmansHead),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvSnowMoundSpawn),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvSnowParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvSnufit),
|
|
|
|
BHV_ENTRY(bhvSnufitBalls),
|
|
|
|
BHV_ENTRY(bhvSoundSpawner),
|
|
|
|
BHV_ENTRY(bhvSparkle),
|
|
|
|
BHV_ENTRY(bhvSparkleParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvSparkleSpawn),
|
|
|
|
BHV_ENTRY(bhvSpawnedStar),
|
|
|
|
BHV_ENTRY(bhvSpawnedStarNoLevelExit),
|
|
|
|
BHV_ENTRY(bhvSpinAirborneCircleWarp),
|
|
|
|
BHV_ENTRY(bhvSpinAirborneWarp),
|
|
|
|
BHV_ENTRY(bhvSpindel),
|
|
|
|
BHV_ENTRY(bhvSpindrift),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvSpiny),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvSquarishPathMoving),
|
|
|
|
BHV_ENTRY(bhvSquarishPathParent),
|
|
|
|
BHV_ENTRY(bhvSquishablePlatform),
|
|
|
|
BHV_ENTRY(bhvSslMovingPyramidWall),
|
|
|
|
BHV_ENTRY(bhvStar),
|
|
|
|
BHV_ENTRY(bhvStarDoor),
|
|
|
|
BHV_ENTRY(bhvStarKeyCollectionPuffSpawner),
|
2023-02-26 03:15:54 +01:00
|
|
|
BHV_ENTRY(bhvStarNumber),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvStarSpawnCoordinates),
|
|
|
|
BHV_ENTRY(bhvStaticCheckeredPlatform),
|
|
|
|
BHV_ENTRY(bhvStaticObject),
|
|
|
|
BHV_ENTRY(bhvStrongWindParticle),
|
|
|
|
BHV_ENTRY(bhvStub),
|
|
|
|
BHV_ENTRY(bhvStub1D0C),
|
|
|
|
BHV_ENTRY(bhvStub1D70),
|
|
|
|
BHV_ENTRY(bhvSunkenShipPart),
|
|
|
|
BHV_ENTRY(bhvSunkenShipPart2),
|
|
|
|
BHV_ENTRY(bhvSunkenShipSetRotation),
|
|
|
|
BHV_ENTRY(bhvSushiShark),
|
|
|
|
BHV_ENTRY(bhvSushiSharkCollisionChild),
|
|
|
|
BHV_ENTRY(bhvSwimmingWarp),
|
|
|
|
BHV_ENTRY(bhvSwingPlatform),
|
|
|
|
BHV_ENTRY(bhvSwoop),
|
|
|
|
BHV_ENTRY(bhvTankFishGroup),
|
|
|
|
BHV_ENTRY(bhvTemporaryYellowCoin),
|
|
|
|
BHV_ENTRY(bhvTenCoinsSpawn),
|
|
|
|
BHV_ENTRY(bhvThiBowlingBallSpawner),
|
|
|
|
BHV_ENTRY(bhvThiHugeIslandTop),
|
|
|
|
BHV_ENTRY(bhvThiTinyIslandTop),
|
|
|
|
BHV_ENTRY(bhvThreeCoinsSpawn),
|
|
|
|
BHV_ENTRY(bhvThwomp),
|
|
|
|
BHV_ENTRY(bhvThwomp2),
|
|
|
|
BHV_ENTRY(bhvTiltingBowserLavaPlatform),
|
|
|
|
BHV_ENTRY(bhvTinyStrongWindParticle),
|
|
|
|
BHV_ENTRY(bhvToadMessage),
|
|
|
|
BHV_ENTRY(bhvTower),
|
|
|
|
BHV_ENTRY(bhvTowerDoor),
|
|
|
|
BHV_ENTRY(bhvTowerPlatformGroup),
|
|
|
|
BHV_ENTRY(bhvToxBox),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvTrackBall),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvTreasureChestBottom),
|
|
|
|
BHV_ENTRY(bhvTreasureChests),
|
|
|
|
BHV_ENTRY(bhvTreasureChestsJrb),
|
|
|
|
BHV_ENTRY(bhvTreasureChestsShip),
|
|
|
|
BHV_ENTRY(bhvTreasureChestTop),
|
|
|
|
BHV_ENTRY(bhvTree),
|
|
|
|
BHV_ENTRY(bhvTreeLeaf),
|
|
|
|
BHV_ENTRY(bhvTreeSnow),
|
|
|
|
BHV_ENTRY(bhvTriangleParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvTripletButterfly),
|
|
|
|
BHV_ENTRY(bhvTTC2DRotator),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvTTCCog),
|
|
|
|
BHV_ENTRY(bhvTTCElevator),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvTTCMovingBar),
|
|
|
|
BHV_ENTRY(bhvTTCPendulum),
|
|
|
|
BHV_ENTRY(bhvTTCPitBlock),
|
|
|
|
BHV_ENTRY(bhvTTCRotatingSolid),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvTTCSpinner),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvTTCTreadmill),
|
|
|
|
BHV_ENTRY(bhvTtmBowlingBallSpawner),
|
|
|
|
BHV_ENTRY(bhvTtmRollingLog),
|
|
|
|
BHV_ENTRY(bhvTumblingBridgePlatform),
|
|
|
|
BHV_ENTRY(bhvTuxiesMother),
|
|
|
|
BHV_ENTRY(bhvTweester),
|
|
|
|
BHV_ENTRY(bhvTweesterSandParticle),
|
|
|
|
BHV_ENTRY(bhvUkiki),
|
|
|
|
BHV_ENTRY(bhvUkikiCage),
|
|
|
|
BHV_ENTRY(bhvUkikiCageChild),
|
|
|
|
BHV_ENTRY(bhvUkikiCageStar),
|
2022-04-03 00:14:04 +02:00
|
|
|
BHV_ENTRY(bhvUnagi),
|
|
|
|
BHV_ENTRY(bhvUnagiSubobject),
|
2022-04-03 12:30:47 +02:00
|
|
|
BHV_ENTRY(bhvUnlockDoorStar),
|
|
|
|
BHV_ENTRY(bhvUnused05A8),
|
|
|
|
BHV_ENTRY(bhvUnused0DFC),
|
|
|
|
BHV_ENTRY(bhvUnused1820),
|
|
|
|
BHV_ENTRY(bhvUnused1F30),
|
|
|
|
BHV_ENTRY(bhvUnused20E0),
|
|
|
|
BHV_ENTRY(bhvUnused2A10),
|
|
|
|
BHV_ENTRY(bhvUnused2A54),
|
|
|
|
BHV_ENTRY(bhvUnusedFakeStar),
|
|
|
|
BHV_ENTRY(bhvUnusedParticleSpawn),
|
|
|
|
BHV_ENTRY(bhvUnusedPoundablePlatform),
|
|
|
|
BHV_ENTRY(bhvVanishCap),
|
|
|
|
BHV_ENTRY(bhvVertStarParticleSpawner),
|
|
|
|
BHV_ENTRY(bhvVolcanoFlames),
|
|
|
|
BHV_ENTRY(bhvVolcanoSoundLoop),
|
|
|
|
BHV_ENTRY(bhvWallTinyStarParticle),
|
|
|
|
BHV_ENTRY(bhvWarp),
|
|
|
|
BHV_ENTRY(bhvWarpPipe),
|
|
|
|
BHV_ENTRY(bhvWaterAirBubble),
|
|
|
|
BHV_ENTRY(bhvWaterBomb),
|
|
|
|
BHV_ENTRY(bhvWaterBombCannon),
|
|
|
|
BHV_ENTRY(bhvWaterBombShadow),
|
|
|
|
BHV_ENTRY(bhvWaterBombSpawner),
|
|
|
|
BHV_ENTRY(bhvWaterDroplet),
|
|
|
|
BHV_ENTRY(bhvWaterDropletSplash),
|
|
|
|
BHV_ENTRY(bhvWaterfallSoundLoop),
|
|
|
|
BHV_ENTRY(bhvWaterLevelDiamond),
|
|
|
|
BHV_ENTRY(bhvWaterLevelPillar),
|
|
|
|
BHV_ENTRY(bhvWaterMist),
|
|
|
|
BHV_ENTRY(bhvWaterMist2),
|
|
|
|
BHV_ENTRY(bhvWaterSplash),
|
|
|
|
BHV_ENTRY(bhvWaveTrail),
|
|
|
|
BHV_ENTRY(bhvWdwExpressElevator),
|
|
|
|
BHV_ENTRY(bhvWdwExpressElevatorPlatform),
|
|
|
|
BHV_ENTRY(bhvWdwRectangularFloatingPlatform),
|
|
|
|
BHV_ENTRY(bhvWdwSquareFloatingPlatform),
|
|
|
|
BHV_ENTRY(bhvWfBreakableWallLeft),
|
|
|
|
BHV_ENTRY(bhvWfBreakableWallRight),
|
|
|
|
BHV_ENTRY(bhvWfElevatorTowerPlatform),
|
|
|
|
BHV_ENTRY(bhvWfRotatingWoodenPlatform),
|
|
|
|
BHV_ENTRY(bhvWfSlidingPlatform),
|
|
|
|
BHV_ENTRY(bhvWfSlidingTowerPlatform),
|
|
|
|
BHV_ENTRY(bhvWfSolidTowerPlatform),
|
|
|
|
BHV_ENTRY(bhvWfTumblingBridge),
|
|
|
|
BHV_ENTRY(bhvWhirlpool),
|
|
|
|
BHV_ENTRY(bhvWhitePuff1),
|
|
|
|
BHV_ENTRY(bhvWhitePuff2),
|
|
|
|
BHV_ENTRY(bhvWhitePuffExplosion),
|
|
|
|
BHV_ENTRY(bhvWhitePuffSmoke),
|
|
|
|
BHV_ENTRY(bhvWhitePuffSmoke2),
|
|
|
|
BHV_ENTRY(bhvWhompKingBoss),
|
|
|
|
BHV_ENTRY(bhvWigglerBody),
|
|
|
|
BHV_ENTRY(bhvWigglerHead),
|
|
|
|
BHV_ENTRY(bhvWind),
|
|
|
|
BHV_ENTRY(bhvWingCap),
|
|
|
|
BHV_ENTRY(bhvWoodenPost),
|
|
|
|
BHV_ENTRY(bhvYellowBackgroundInMenu),
|
|
|
|
BHV_ENTRY(bhvYellowBall),
|
|
|
|
BHV_ENTRY(bhvYellowCoin),
|
|
|
|
BHV_ENTRY(bhvYoshi),
|
2022-08-26 02:46:33 +02:00
|
|
|
BHV_ENTRY(RM_Scroll_Texture),
|
|
|
|
BHV_ENTRY(editor_Scroll_Texture)
|
2022-04-03 00:14:04 +02:00
|
|
|
};
|
2020-08-10 01:21:12 +02:00
|
|
|
|
|
|
|
enum BehaviorId get_id_from_behavior(const BehaviorScript* behavior) {
|
2022-04-03 00:14:04 +02:00
|
|
|
if (behavior == NULL) { return id_bhv_max_count; }
|
2020-08-10 01:21:12 +02:00
|
|
|
return (enum BehaviorId)(behavior[1] & 0xFFFF);
|
|
|
|
}
|
|
|
|
|
2022-04-03 00:14:04 +02:00
|
|
|
enum BehaviorId get_id_from_vanilla_behavior(const BehaviorScript* behavior) {
|
2022-04-03 12:30:47 +02:00
|
|
|
for (enum BehaviorId i = 0; i < id_bhv_max_count; i++) {
|
|
|
|
if (gBehaviorTable[i].script == behavior) {
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return id_bhv_max_count;
|
2022-04-03 00:14:04 +02:00
|
|
|
}
|
|
|
|
|
2020-08-10 01:21:12 +02:00
|
|
|
const BehaviorScript* get_behavior_from_id(enum BehaviorId id) {
|
2022-06-03 04:33:28 +02:00
|
|
|
const BehaviorScript* behavior = smlua_get_hooked_behavior_from_id(id, true);
|
2022-03-03 10:04:15 +01:00
|
|
|
if (behavior != NULL) { return behavior; }
|
|
|
|
|
2020-10-14 06:44:27 +02:00
|
|
|
if (id < 0 || id >= id_bhv_max_count) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2022-03-03 10:04:15 +01:00
|
|
|
|
2022-04-03 00:14:04 +02:00
|
|
|
return gBehaviorTable[id].script;
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* get_behavior_name_from_id(enum BehaviorId id) {
|
|
|
|
if (id < 0 || id >= id_bhv_max_count) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return gBehaviorTable[id].name;
|
|
|
|
}
|
|
|
|
|
|
|
|
enum BehaviorId get_id_from_behavior_name(const char* name) {
|
|
|
|
for (enum BehaviorId i = 0; i < id_bhv_max_count; i++) {
|
|
|
|
if (!strcmp(name, gBehaviorTable[i].name)) {
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return id_bhv_max_count;
|
2020-08-10 01:21:12 +02:00
|
|
|
}
|