Merge remote-tracking branch 'upstream/coop' into coop

This commit is contained in:
Sunk 2023-02-24 10:58:34 -05:00
commit 5b5231eca2
41 changed files with 922 additions and 57 deletions

View file

@ -279,6 +279,9 @@ static const Vtx bobomb_seg8_vertex_08023190[] = {
// 0x08023270 - 0x08023378 // 0x08023270 - 0x08023378
const Gfx bobomb_seg8_dl_08023270[] = { const Gfx bobomb_seg8_dl_08023270[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPLight(&bobomb_seg8_lights_08022DE8.l, 1), gsSPLight(&bobomb_seg8_lights_08022DE8.l, 1),
gsSPLight(&bobomb_seg8_lights_08022DE8.a, 2), gsSPLight(&bobomb_seg8_lights_08022DE8.a, 2),
gsSPVertex(bobomb_seg8_vertex_08022E30, 16, 0), gsSPVertex(bobomb_seg8_vertex_08022E30, 16, 0),
@ -302,6 +305,9 @@ const Gfx bobomb_seg8_dl_08023270[] = {
// 0x08023378 - 0x08023480 // 0x08023378 - 0x08023480
const Gfx bobomb_seg8_dl_08023378[] = { const Gfx bobomb_seg8_dl_08023378[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPLight(&bobomb_seg8_lights_08022DE8.l, 1), gsSPLight(&bobomb_seg8_lights_08022DE8.l, 1),
gsSPLight(&bobomb_seg8_lights_08022DE8.a, 2), gsSPLight(&bobomb_seg8_lights_08022DE8.a, 2),
gsSPVertex(bobomb_seg8_vertex_08022F70, 16, 0), gsSPVertex(bobomb_seg8_vertex_08022F70, 16, 0),
@ -325,6 +331,9 @@ const Gfx bobomb_seg8_dl_08023378[] = {
// 0x08023480 - 0x08023528 // 0x08023480 - 0x08023528
const Gfx bobomb_seg8_dl_08023480[] = { const Gfx bobomb_seg8_dl_08023480[] = {
gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPSetGeometryMode(G_LIGHTING),
gsSPLight(&bobomb_seg8_lights_08022E00.l, 1), gsSPLight(&bobomb_seg8_lights_08022E00.l, 1),
gsSPLight(&bobomb_seg8_lights_08022E00.a, 2), gsSPLight(&bobomb_seg8_lights_08022E00.a, 2),
gsSPVertex(bobomb_seg8_vertex_080230B0, 14, 0), gsSPVertex(bobomb_seg8_vertex_080230B0, 14, 0),

View file

@ -37,7 +37,8 @@ in_files = [
"include/dialog_ids.h", "include/dialog_ids.h",
"include/seq_ids.h", "include/seq_ids.h",
"include/surface_terrains.h", "include/surface_terrains.h",
"src/game/level_update.h" "src/game/level_update.h",
"src/pc/network/version.h"
] ]
exclude_constants = { exclude_constants = {

View file

@ -72,7 +72,8 @@ override_field_mutable = {
} }
override_field_invisible = { override_field_invisible = {
"Mod": [ "files" ] "Mod": [ "files" ],
"MarioState": [ "visibleToEnemies" ],
} }
override_field_immutable = { override_field_immutable = {

View file

@ -11400,3 +11400,12 @@ SPTASK_STATE_FINISHED = 3
--- @type SpTaskState --- @type SpTaskState
SPTASK_STATE_FINISHED_DP = 4 SPTASK_STATE_FINISHED_DP = 4
--- @type integer
MAX_VERSION_LENGTH = 10
--- @type integer
MINOR_VERSION_NUMBER = 0
--- @type integer
VERSION_NUMBER = 31

View file

@ -6795,6 +6795,11 @@ function cur_obj_set_behavior(behavior)
-- ... -- ...
end end
--- @return nil
function cur_obj_set_billboard_if_vanilla_cam()
-- ...
end
--- @param a0 Pointer_integer --- @param a0 Pointer_integer
--- @return integer --- @return integer
function cur_obj_set_direction_table(a0) function cur_obj_set_direction_table(a0)
@ -8558,6 +8563,17 @@ function obj_set_vel(o, vx, vy, vz)
-- ... -- ...
end end
--- @param x number
--- @param y number
--- @param z number
--- @param strength integer
--- @param area integer
--- @param index integer
--- @return nil
function set_whirlpools(x, y, z, strength, area, index)
-- ...
end
--- @param behaviorId BehaviorId --- @param behaviorId BehaviorId
--- @param modelId ModelExtendedId --- @param modelId ModelExtendedId
--- @param x number --- @param x number

View file

@ -214,3 +214,10 @@ end
function djui_hud_render_texture_tile_interpolated(texInfo, prevX, prevY, prevScaleW, prevScaleH, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH) function djui_hud_render_texture_tile_interpolated(texInfo, prevX, prevY, prevScaleW, prevScaleH, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH)
-- ... -- ...
end end
--- @param levelNum number
--- @param func fun(areaNum:number, bhv:table)
--- @return nil
function level_script_parse(levelNum, func)
-- ...
end

View file

@ -188,6 +188,7 @@
--- @field public RacingPenguinBigRadius number --- @field public RacingPenguinBigRadius number
--- @field public RacingPenguinHeight number --- @field public RacingPenguinHeight number
--- @field public RacingPenguinRadius number --- @field public RacingPenguinRadius number
--- @field public RespawnShellBoxes integer
--- @field public ShowStarMilestones integer --- @field public ShowStarMilestones integer
--- @field public ToadStar1Requirement integer --- @field public ToadStar1Requirement integer
--- @field public ToadStar2Requirement integer --- @field public ToadStar2Requirement integer
@ -629,6 +630,7 @@
--- @class LevelValues --- @class LevelValues
--- @field public cellHeightLimit integer --- @field public cellHeightLimit integer
--- @field public coinsRequiredForCoinStar integer --- @field public coinsRequiredForCoinStar integer
--- @field public disableActs boolean
--- @field public entryLevel LevelNum --- @field public entryLevel LevelNum
--- @field public exitCastleArea integer --- @field public exitCastleArea integer
--- @field public exitCastleLevel LevelNum --- @field public exitCastleLevel LevelNum
@ -640,14 +642,18 @@
--- @field public floorLowerLimitShadow integer --- @field public floorLowerLimitShadow integer
--- @field public metalCapDuration integer --- @field public metalCapDuration integer
--- @field public metalCapDurationCotmc integer --- @field public metalCapDurationCotmc integer
--- @field public pauseExitAnywhere boolean
--- @field public metalCapSequence integer
--- @field public pssSlideStarIndex integer --- @field public pssSlideStarIndex integer
--- @field public pssSlideStarTime integer --- @field public pssSlideStarTime integer
--- @field public skipCreditsAt LevelNum --- @field public skipCreditsAt LevelNum
--- @field public starPositions StarPositions --- @field public starPositions StarPositions
--- @field public vanishCapDuration integer --- @field public vanishCapDuration integer
--- @field public vanishCapDurationVcutm integer --- @field public vanishCapDurationVcutm integer
--- @field public vanishCapSequence integer
--- @field public wingCapDuration integer --- @field public wingCapDuration integer
--- @field public wingCapDurationTotwc integer --- @field public wingCapDurationTotwc integer
--- @field public wingCapSequence integer
--- @class LinearTransitionPoint --- @class LinearTransitionPoint
--- @field public dist number --- @field public dist number

View file

@ -3202,16 +3202,12 @@ const BehaviorScript bhvFloorTrapInCastle[] = {
const BehaviorScript bhvTree[] = { const BehaviorScript bhvTree[] = {
BEGIN(OBJ_LIST_POLELIKE), BEGIN(OBJ_LIST_POLELIKE),
ID(id_bhvTree), ID(id_bhvTree),
#ifdef BETTERCAMERA
CYLBOARD(),
#else
BILLBOARD(),
#endif
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
SET_INT(oInteractType, INTERACT_POLE), SET_INT(oInteractType, INTERACT_POLE),
SET_HITBOX(/*Radius*/ 80, /*Height*/ 500), SET_HITBOX(/*Radius*/ 80, /*Height*/ 500),
SET_INT(oIntangibleTimer, 0), SET_INT(oIntangibleTimer, 0),
BEGIN_LOOP(), BEGIN_LOOP(),
CALL_NATIVE(cur_obj_set_billboard_if_vanilla_cam),
CALL_NATIVE(bhv_pole_base_loop), CALL_NATIVE(bhv_pole_base_loop),
END_LOOP(), END_LOOP(),
}; };

View file

@ -57,6 +57,10 @@ void dynos_add_level(s32 modIndex, const char *filePath, const char* levelName);
const char* dynos_level_get_token(u32 index); const char* dynos_level_get_token(u32 index);
Trajectory* dynos_level_get_trajectory(const char* name); Trajectory* dynos_level_get_trajectory(const char* name);
void dynos_level_load_background(void *ptr); void dynos_level_load_background(void *ptr);
u64 dynos_level_cmd_get(void *cmd, u64 offset);
void dynos_level_cmd_next(void *cmd, u64 cmdsize);
void dynos_level_parse_script(const void *script, s32 (*aPreprocessFunction)(u8, void *));
void* dynos_level_get_script(s32 level);
// -- behaviors -- // // -- behaviors -- //
void dynos_add_behavior(s32 modIndex, const char *filePath, const char *behaviorName); void dynos_add_behavior(s32 modIndex, const char *filePath, const char *behaviorName);

View file

@ -822,6 +822,9 @@ const u8 *DynOS_Level_GetAreaName(s32 aLevel, s32 aArea, bool aDecaps);
s16 *DynOS_Level_GetWarp(s32 aLevel, s32 aArea, u8 aWarpId); s16 *DynOS_Level_GetWarp(s32 aLevel, s32 aArea, u8 aWarpId);
s16 *DynOS_Level_GetWarpEntry(s32 aLevel, s32 aArea); s16 *DynOS_Level_GetWarpEntry(s32 aLevel, s32 aArea);
s16 *DynOS_Level_GetWarpDeath(s32 aLevel, s32 aArea); s16 *DynOS_Level_GetWarpDeath(s32 aLevel, s32 aArea);
u64 DynOS_Level_CmdGet(void *aCmd, u64 aOffset);
void *DynOS_Level_CmdNext(void *aCmd, u64 aCmdSize);
void DynOS_Level_ParseScript(const void *aScript, s32 (*aPreprocessFunction)(u8, void *));
// //
// Warps // Warps

View file

@ -744,6 +744,11 @@ static void ParseGfxSymbol(GfxData* aGfxData, DataNode<Gfx>* aNode, Gfx*& aHead,
gfx_symbol_1(gsDPSetAlphaCompare, false); gfx_symbol_1(gsDPSetAlphaCompare, false);
gfx_symbol_1(gsDPSetTextureFilter, false); gfx_symbol_1(gsDPSetTextureFilter, false);
gfx_symbol_2(gsSPCullDisplayList, false); gfx_symbol_2(gsSPCullDisplayList, false);
gfx_symbol_1(gsDPSetAlphaDither, false);
gfx_symbol_1(gsDPSetCombineKey, false);
gfx_symbol_1(gsDPSetTextureConvert, false);
gfx_symbol_1(gsDPSetCombineKey, false);
gfx_symbol_1(gsDPSetTextureConvert, false);
gfx_symbol_2(gsSPCopyLightEXT, false); gfx_symbol_2(gsSPCopyLightEXT, false);
gfx_symbol_1(gsSPCopyLightsPlayerPart, false); gfx_symbol_1(gsSPCopyLightsPlayerPart, false);

View file

@ -179,6 +179,22 @@ void dynos_level_load_background(void *ptr) {
DynOS_Lvl_LoadBackground(ptr); DynOS_Lvl_LoadBackground(ptr);
} }
u64 dynos_level_cmd_get(void *cmd, u64 offset) {
return DynOS_Level_CmdGet(cmd, offset);
}
void dynos_level_cmd_next(void *cmd, u64 cmdsize) {
DynOS_Level_CmdNext(cmd, cmdsize);
}
void dynos_level_parse_script(const void *script, s32 (*aPreprocessFunction)(u8, void *)) {
DynOS_Level_ParseScript(script, aPreprocessFunction);
}
void* dynos_level_get_script(s32 level) {
return (void *) DynOS_Level_GetScript(level);
}
// -- Behaviors -- // // -- Behaviors -- //
void dynos_add_behavior(s32 modIndex, const char *filePath, const char *behaviorName) { void dynos_add_behavior(s32 modIndex, const char *filePath, const char *behaviorName) {

View file

@ -51,17 +51,17 @@ static void *sDynosLevelScriptsOriginal[LEVEL_COUNT] = { NULL };
static Array<DynosWarp> sDynosLevelWarps[LEVEL_COUNT] = { Array<DynosWarp>() }; static Array<DynosWarp> sDynosLevelWarps[LEVEL_COUNT] = { Array<DynosWarp>() };
static Array<s32> sDynosLevelList = Array<s32>(); // Ordered by Course Id, COURSE_NONE excluded static Array<s32> sDynosLevelList = Array<s32>(); // Ordered by Course Id, COURSE_NONE excluded
static u64 DynOS_Level_CmdGet(void *aCmd, u64 aOffset) { u64 DynOS_Level_CmdGet(void *aCmd, u64 aOffset) {
u64 _Offset = (((aOffset) & 3llu) | (((aOffset) & ~3llu) << (sizeof(void *) >> 3llu))); u64 _Offset = (((aOffset) & 3llu) | (((aOffset) & ~3llu) << (sizeof(void *) >> 3llu)));
return *((u64 *) (u64(aCmd) + _Offset)); return *((u64 *) (u64(aCmd) + _Offset));
} }
static void *DynOS_Level_CmdNext(void *aCmd, u64 aCmdSize) { void *DynOS_Level_CmdNext(void *aCmd, u64 aCmdSize) {
u64 _Offset = (((aCmdSize) & 3llu) | (((aCmdSize) & ~3llu) << (sizeof(void *) >> 3llu))); u64 _Offset = (((aCmdSize) & 3llu) | (((aCmdSize) & ~3llu) << (sizeof(void *) >> 3llu)));
return (void *) (u64(aCmd) + _Offset); return (void *) (u64(aCmd) + _Offset);
} }
static void DynOS_Level_ParseScript(const void *aScript, s32 (*aPreprocessFunction)(u8, void *)); void DynOS_Level_ParseScript(const void *aScript, s32 (*aPreprocessFunction)(u8, void *));
// //
// Init // Init
@ -752,7 +752,7 @@ static LvlCmd *DynOS_Level_CmdJumpArea(Stack &aStack, LvlCmd *aCmd, s32 (*aPrepr
return (LvlCmd *) DynOS_Level_CmdNext(aCmd, aCmd->mSize); return (LvlCmd *) DynOS_Level_CmdNext(aCmd, aCmd->mSize);
} }
static void DynOS_Level_ParseScript(const void *aScript, s32 (*aPreprocessFunction)(u8, void *)) { void DynOS_Level_ParseScript(const void *aScript, s32 (*aPreprocessFunction)(u8, void *)) {
Stack _Stack; Stack _Stack;
_Stack.mBaseIndex = -1; _Stack.mBaseIndex = -1;
_Stack.mTopIndex = 0; _Stack.mTopIndex = 0;

View file

@ -59,6 +59,7 @@
- [types.h](#typesh) - [types.h](#typesh)
- [enum AreaTimerType](#enum-AreaTimerType) - [enum AreaTimerType](#enum-AreaTimerType)
- [enum SpTaskState](#enum-SpTaskState) - [enum SpTaskState](#enum-SpTaskState)
- [version.h](#versionh)
<br /> <br />
@ -4021,3 +4022,12 @@
<br /> <br />
## [version.h](#version.h)
- MAX_VERSION_LENGTH
- MINOR_VERSION_NUMBER
- VERSION_NUMBER
[:arrow_up_small:](#)
<br />

View file

@ -3726,6 +3726,24 @@
<br /> <br />
## [cur_obj_set_billboard_if_vanilla_cam](#cur_obj_set_billboard_if_vanilla_cam)
### Lua Example
`cur_obj_set_billboard_if_vanilla_cam()`
### Parameters
- None
### Returns
- None
### C Prototype
`void cur_obj_set_billboard_if_vanilla_cam(void);`
[:arrow_up_small:](#)
<br />
## [cur_obj_set_direction_table](#cur_obj_set_direction_table) ## [cur_obj_set_direction_table](#cur_obj_set_direction_table)
### Lua Example ### Lua Example

View file

@ -614,6 +614,31 @@
<br /> <br />
## [set_whirlpools](#set_whirlpools)
### Lua Example
`set_whirlpools(x, y, z, strength, area, index)`
### Parameters
| Field | Type |
| ----- | ---- |
| x | `number` |
| y | `number` |
| z | `number` |
| strength | `integer` |
| area | `integer` |
| index | `integer` |
### Returns
- None
### C Prototype
`void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index);`
[:arrow_up_small:](#)
<br />
## [spawn_non_sync_object](#spawn_non_sync_object) ## [spawn_non_sync_object](#spawn_non_sync_object)
### Lua Example ### Lua Example

View file

@ -1273,6 +1273,7 @@
- [cur_obj_scale](functions-4.md#cur_obj_scale) - [cur_obj_scale](functions-4.md#cur_obj_scale)
- [cur_obj_scale_over_time](functions-4.md#cur_obj_scale_over_time) - [cur_obj_scale_over_time](functions-4.md#cur_obj_scale_over_time)
- [cur_obj_set_behavior](functions-4.md#cur_obj_set_behavior) - [cur_obj_set_behavior](functions-4.md#cur_obj_set_behavior)
- [cur_obj_set_billboard_if_vanilla_cam](functions-4.md#cur_obj_set_billboard_if_vanilla_cam)
- [cur_obj_set_direction_table](functions-4.md#cur_obj_set_direction_table) - [cur_obj_set_direction_table](functions-4.md#cur_obj_set_direction_table)
- [cur_obj_set_face_angle_to_move_angle](functions-4.md#cur_obj_set_face_angle_to_move_angle) - [cur_obj_set_face_angle_to_move_angle](functions-4.md#cur_obj_set_face_angle_to_move_angle)
- [cur_obj_set_hitbox_and_die_if_attacked](functions-4.md#cur_obj_set_hitbox_and_die_if_attacked) - [cur_obj_set_hitbox_and_die_if_attacked](functions-4.md#cur_obj_set_hitbox_and_die_if_attacked)
@ -1579,6 +1580,7 @@
- [obj_move_xyz](functions-5.md#obj_move_xyz) - [obj_move_xyz](functions-5.md#obj_move_xyz)
- [obj_set_model_extended](functions-5.md#obj_set_model_extended) - [obj_set_model_extended](functions-5.md#obj_set_model_extended)
- [obj_set_vel](functions-5.md#obj_set_vel) - [obj_set_vel](functions-5.md#obj_set_vel)
- [set_whirlpools](functions-5.md#set_whirlpools)
- [spawn_non_sync_object](functions-5.md#spawn_non_sync_object) - [spawn_non_sync_object](functions-5.md#spawn_non_sync_object)
- [spawn_sync_object](functions-5.md#spawn_sync_object) - [spawn_sync_object](functions-5.md#spawn_sync_object)

View file

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

View file

@ -29,9 +29,10 @@ Save file locations:
- [Structs](structs.md) - [Structs](structs.md)
### Guides ### Guides
- [Setting up Visual Studio Code](guides/vs-code-setup.md)
- [Hooks](guides/hooks.md) - [Hooks](guides/hooks.md)
- [gMarioStates](guides/mario-state.md) - [gMarioStates](guides/mario-state.md)
- [Setting up Visual Studio Code](guides/vs-code-setup.md) - [Behavior Object Lists](guides/object-lists.md)
## Important notes on player indices ## Important notes on player indices

View file

@ -310,6 +310,7 @@
| RacingPenguinBigRadius | `number` | | | RacingPenguinBigRadius | `number` | |
| RacingPenguinHeight | `number` | | | RacingPenguinHeight | `number` | |
| RacingPenguinRadius | `number` | | | RacingPenguinRadius | `number` | |
| RespawnShellBoxes | `integer` | |
| ShowStarMilestones | `integer` | | | ShowStarMilestones | `integer` | |
| ToadStar1Requirement | `integer` | | | ToadStar1Requirement | `integer` | |
| ToadStar2Requirement | `integer` | | | ToadStar2Requirement | `integer` | |
@ -924,6 +925,7 @@
| ----- | ---- | ------ | | ----- | ---- | ------ |
| cellHeightLimit | `integer` | | | cellHeightLimit | `integer` | |
| coinsRequiredForCoinStar | `integer` | | | coinsRequiredForCoinStar | `integer` | |
| disableActs | `boolean` | |
| entryLevel | [enum LevelNum](constants.md#enum-LevelNum) | | | entryLevel | [enum LevelNum](constants.md#enum-LevelNum) | |
| exitCastleArea | `integer` | | | exitCastleArea | `integer` | |
| exitCastleLevel | [enum LevelNum](constants.md#enum-LevelNum) | | | exitCastleLevel | [enum LevelNum](constants.md#enum-LevelNum) | |
@ -935,14 +937,18 @@
| floorLowerLimitShadow | `integer` | | | floorLowerLimitShadow | `integer` | |
| metalCapDuration | `integer` | | | metalCapDuration | `integer` | |
| metalCapDurationCotmc | `integer` | | | metalCapDurationCotmc | `integer` | |
| pauseExitAnywhere | `boolean` | |
| metalCapSequence | `integer` | |
| pssSlideStarIndex | `integer` | | | pssSlideStarIndex | `integer` | |
| pssSlideStarTime | `integer` | | | pssSlideStarTime | `integer` | |
| skipCreditsAt | [enum LevelNum](constants.md#enum-LevelNum) | | | skipCreditsAt | [enum LevelNum](constants.md#enum-LevelNum) | |
| starPositions | [StarPositions](structs.md#StarPositions) | read-only | | starPositions | [StarPositions](structs.md#StarPositions) | read-only |
| vanishCapDuration | `integer` | | | vanishCapDuration | `integer` | |
| vanishCapDurationVcutm | `integer` | | | vanishCapDurationVcutm | `integer` | |
| vanishCapSequence | `integer` | |
| wingCapDuration | `integer` | | | wingCapDuration | `integer` | |
| wingCapDurationTotwc | `integer` | | | wingCapDurationTotwc | `integer` | |
| wingCapSequence | `integer` | |
[:arrow_up_small:](#) [:arrow_up_small:](#)

View file

@ -28,6 +28,7 @@
#include "src/pc/lua/utils/smlua_model_utils.h" #include "src/pc/lua/utils/smlua_model_utils.h"
#include "src/pc/lua/smlua.h" #include "src/pc/lua/smlua.h"
#include "src/pc/djui/djui.h" #include "src/pc/djui/djui.h"
#include "game/hardcoded.h"
#define CMD_GET(type, offset) (*(type *) (CMD_PROCESS_OFFSET(offset) + (u8 *) sCurrentCmd)) #define CMD_GET(type, offset) (*(type *) (CMD_PROCESS_OFFSET(offset) + (u8 *) sCurrentCmd))
@ -506,7 +507,7 @@ static void level_cmd_place_object(void) {
u16 model; u16 model;
struct SpawnInfo *spawnInfo; struct SpawnInfo *spawnInfo;
if (sCurrAreaIndex != -1 && ((CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) { if (sCurrAreaIndex != -1 && (gLevelValues.disableActs || (CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) {
model = CMD_GET(u8, 3); model = CMD_GET(u8, 3);
spawnInfo = alloc_only_pool_alloc(sLevelPool, sizeof(struct SpawnInfo)); spawnInfo = alloc_only_pool_alloc(sLevelPool, sizeof(struct SpawnInfo));

View file

@ -170,7 +170,8 @@ void exclamation_box_act_4(void) {
spawn_mist_particles_variable(0, 0, 46.0f); spawn_mist_particles_variable(0, 0, 46.0f);
spawn_triangle_break_particles(20, 139, 0.3f, o->oAnimState); spawn_triangle_break_particles(20, 139, 0.3f, o->oAnimState);
create_sound_spawner(SOUND_GENERAL_BREAK_BOX); create_sound_spawner(SOUND_GENERAL_BREAK_BOX);
if (o->oBehParams2ndByte <= 3) { u8 threshold = gBehaviorValues.RespawnShellBoxes ? 3 : 2;
if (o->oBehParams2ndByte <= threshold) {
o->oAction = 5; o->oAction = 5;
cur_obj_hide(); cur_obj_hide();
} else { } else {

View file

@ -58,6 +58,9 @@ struct LevelValues gDefaultLevelValues = {
.wingCapDurationTotwc = 1200, .wingCapDurationTotwc = 1200,
.metalCapDurationCotmc = 600, .metalCapDurationCotmc = 600,
.vanishCapDurationVcutm = 600, .vanishCapDurationVcutm = 600,
.wingCapSequence = SEQ_EVENT_POWERUP,
.metalCapSequence = SEQ_EVENT_METAL_CAP,
.vanishCapSequence = SEQ_EVENT_POWERUP,
.starPositions = { .starPositions = {
.KoopaBobStarPos = { 3030.0f, 4500.0f, -4600.0f }, .KoopaBobStarPos = { 3030.0f, 4500.0f, -4600.0f },
.KoopaThiStarPos = { 7100.0f, -1300.0f, -6000.0f }, .KoopaThiStarPos = { 7100.0f, -1300.0f, -6000.0f },
@ -94,6 +97,8 @@ struct LevelValues gDefaultLevelValues = {
.floorLowerLimit = FLOOR_LOWER_LIMIT, .floorLowerLimit = FLOOR_LOWER_LIMIT,
.floorLowerLimitMisc = FLOOR_LOWER_LIMIT_MISC, .floorLowerLimitMisc = FLOOR_LOWER_LIMIT_MISC,
.floorLowerLimitShadow = FLOOR_LOWER_LIMIT_SHADOW, .floorLowerLimitShadow = FLOOR_LOWER_LIMIT_SHADOW,
.pauseExitAnywhere = 1,
.disableActs = false,
}; };
struct LevelValues gLevelValues = { 0 }; struct LevelValues gLevelValues = { 0 };
@ -126,6 +131,7 @@ struct BehaviorValues gDefaultBehaviorValues = {
.BowlingBallThiSmallSpeed = 10.0f, .BowlingBallThiSmallSpeed = 10.0f,
.GrateStarRequirement = 120, .GrateStarRequirement = 120,
.ShowStarMilestones = TRUE, .ShowStarMilestones = TRUE,
.RespawnShellBoxes = TRUE,
.starsNeededForDialog = { 1, 3, 8, 30, 50, 70 }, .starsNeededForDialog = { 1, 3, 8, 30, 50, 70 },
.dialogs = { .dialogs = {
.BobombBuddyBob1Dialog = DIALOG_004, .BobombBuddyBob1Dialog = DIALOG_004,

View file

@ -1,7 +1,8 @@
#ifndef HARDCODED_H #ifndef HARDCODED_H
#include "types.h" #include "types.h"
#include "level_table.h" #include "level_table.h"
#include "dialog_ids.h" #include "dialog_ids.h"
#include "seq_ids.h"
//////////// ////////////
// Levels // // Levels //
@ -53,11 +54,16 @@ struct LevelValues {
u16 wingCapDurationTotwc; u16 wingCapDurationTotwc;
u16 metalCapDurationCotmc; u16 metalCapDurationCotmc;
u16 vanishCapDurationVcutm; u16 vanishCapDurationVcutm;
u8 wingCapSequence;
u8 metalCapSequence;
u8 vanishCapSequence;
struct StarPositions starPositions; struct StarPositions starPositions;
s16 cellHeightLimit; s16 cellHeightLimit;
s16 floorLowerLimit; s16 floorLowerLimit;
s16 floorLowerLimitMisc; s16 floorLowerLimitMisc;
s16 floorLowerLimitShadow; s16 floorLowerLimitShadow;
bool pauseExitAnywhere;
bool disableActs;
}; };
extern struct LevelValues gLevelValues; extern struct LevelValues gLevelValues;
@ -220,6 +226,7 @@ struct BehaviorValues {
f32 BowlingBallThiSmallSpeed; f32 BowlingBallThiSmallSpeed;
u16 GrateStarRequirement; u16 GrateStarRequirement;
u8 ShowStarMilestones; u8 ShowStarMilestones;
u8 RespawnShellBoxes;
struct StarsNeededForDialog starsNeededForDialog; struct StarsNeededForDialog starsNeededForDialog;
struct BehaviorDialogs dialogs; struct BehaviorDialogs dialogs;
struct BehaviorTrajectories trajectories; struct BehaviorTrajectories trajectories;

View file

@ -33,6 +33,7 @@
#ifdef BETTERCAMERA #ifdef BETTERCAMERA
#include "bettercamera.h" #include "bettercamera.h"
#endif #endif
#include "hardcoded.h"
u16 gDialogColorFadeTimer; u16 gDialogColorFadeTimer;
s8 gLastDialogLineNum; s8 gLastDialogLineNum;
@ -2859,7 +2860,7 @@ s16 render_pause_courses_and_castle(void) {
render_pause_red_coins(); render_pause_red_coins();
/* Always allow exiting from course */ /* Always allow exiting from course */
if (TRUE || (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT)) { if (gLevelValues.pauseExitAnywhere || (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT)) {
render_pause_course_options(99, 93, &gDialogLineNum, 15); render_pause_course_options(99, 93, &gDialogLineNum, 15);
} }

View file

@ -1986,17 +1986,17 @@ u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o
switch (capFlag) { switch (capFlag) {
case MARIO_VANISH_CAP: case MARIO_VANISH_CAP:
capTime = gLevelValues.vanishCapDuration; capTime = gLevelValues.vanishCapDuration;
capMusic = SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP); capMusic = SEQUENCE_ARGS(4, gLevelValues.vanishCapSequence);
break; break;
case MARIO_METAL_CAP: case MARIO_METAL_CAP:
capTime = gLevelValues.metalCapDuration; capTime = gLevelValues.metalCapDuration;
capMusic = SEQUENCE_ARGS(4, SEQ_EVENT_METAL_CAP); capMusic = SEQUENCE_ARGS(4, gLevelValues.metalCapSequence);
break; break;
case MARIO_WING_CAP: case MARIO_WING_CAP:
capTime = gLevelValues.wingCapDuration; capTime = gLevelValues.wingCapDuration;
capMusic = SEQUENCE_ARGS(4, SEQ_EVENT_POWERUP); capMusic = SEQUENCE_ARGS(4, gLevelValues.wingCapSequence);
break; break;
} }

View file

@ -1077,7 +1077,7 @@ void update_hud_values(void) {
gHudDisplay.lives = gMarioState->numLives; gHudDisplay.lives = gMarioState->numLives;
gHudDisplay.keys = gMarioState->numKeys; gHudDisplay.keys = gMarioState->numKeys;
if (numHealthWedges > gHudDisplay.wedges) { if (numHealthWedges > gHudDisplay.wedges && !gDjuiInMainMenu) {
play_sound(SOUND_MENU_POWER_METER, gGlobalSoundSource); play_sound(SOUND_MENU_POWER_METER, gGlobalSoundSource);
} }
gHudDisplay.wedges = numHealthWedges; gHudDisplay.wedges = numHealthWedges;
@ -1548,13 +1548,10 @@ s32 update_level(void) {
changeLevel = play_mode_normal(); changeLevel = play_mode_normal();
break; break;
case PLAY_MODE_PAUSED: case PLAY_MODE_PAUSED:
#ifdef DEVELOPMENT if (!(configSingleplayerPause && network_player_connected_count() == 1)) {
if (configDisableDevPause) {
changeLevel = play_mode_normal(); changeLevel = play_mode_normal();
} }
#else
changeLevel = play_mode_normal();
#endif
if (sCurrPlayMode == PLAY_MODE_PAUSED) { if (sCurrPlayMode == PLAY_MODE_PAUSED) {
changeLevel = play_mode_paused(); changeLevel = play_mode_paused();
} }

View file

@ -1840,6 +1840,16 @@ void obj_set_cylboard(struct Object *obj) {
obj->header.gfx.node.flags |= GRAPH_RENDER_CYLBOARD; obj->header.gfx.node.flags |= GRAPH_RENDER_CYLBOARD;
} }
void cur_obj_set_billboard_if_vanilla_cam(void) {
if (configEnableCamera) {
o->header.gfx.node.flags &= ~GRAPH_RENDER_BILLBOARD;
o->header.gfx.node.flags |= GRAPH_RENDER_CYLBOARD;
} else {
o->header.gfx.node.flags &= ~GRAPH_RENDER_CYLBOARD;
o->header.gfx.node.flags |= GRAPH_RENDER_BILLBOARD;
}
}
void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height) { void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height) {
if (o == NULL) { return; } if (o == NULL) { return; }

View file

@ -204,6 +204,8 @@ void cur_obj_shake_y(f32 amount);
void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent); void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);
void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8); void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8);
void obj_set_billboard(struct Object *obj); void obj_set_billboard(struct Object *obj);
void obj_set_cylboard(struct Object *obj);
void cur_obj_set_billboard_if_vanilla_cam(void);
void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height); void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height);
void obj_set_hurtbox_radius_and_height(struct Object *o, f32 radius, f32 height); void obj_set_hurtbox_radius_and_height(struct Object *o, f32 radius, f32 height);
void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height); void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);

View file

@ -872,6 +872,7 @@ void painting_update_floors(struct Painting *painting) {
enterRight = 0; enterRight = 0;
struct Surface* surface; struct Surface* surface;
find_floor(m->marioObj->oPosX, m->marioObj->oPosY, m->marioObj->oPosZ, &surface); find_floor(m->marioObj->oPosX, m->marioObj->oPosY, m->marioObj->oPosZ, &surface);
if (surface == NULL) { continue; }
s16 floorType = surface->type; s16 floorType = surface->type;
/* The area in front of every painting in the game (except HMC and CotMC, which *\ /* The area in front of every painting in the game (except HMC and CotMC, which *\

View file

@ -142,9 +142,6 @@ bool configUncappedFramerate = true;
unsigned int configFrameLimit = 60; unsigned int configFrameLimit = 60;
unsigned int configDrawDistance = 5; unsigned int configDrawDistance = 5;
bool configDisablePopups = 0; bool configDisablePopups = 0;
#ifdef DEVELOPMENT
bool configDisableDevPause = 1;
#endif
#ifdef LUA_PROFILER #ifdef LUA_PROFILER
bool configLuaProfiler = 1; bool configLuaProfiler = 1;
#endif #endif
@ -152,6 +149,7 @@ bool configDisableDownloadedModels = 0;
unsigned int configInterpolationMode = 1; unsigned int configInterpolationMode = 1;
unsigned int configGamepadNumber = 0; unsigned int configGamepadNumber = 0;
bool configBackgroundGamepad = 1; bool configBackgroundGamepad = 1;
bool configSingleplayerPause = 0;
static const struct ConfigOption options[] = { static const struct ConfigOption options[] = {
{.name = "fullscreen", .type = CONFIG_TYPE_BOOL, .boolValue = &configWindow.fullscreen}, {.name = "fullscreen", .type = CONFIG_TYPE_BOOL, .boolValue = &configWindow.fullscreen},
@ -245,11 +243,9 @@ static const struct ConfigOption options[] = {
{.name = "coop_custom_palette_skin", .type = CONFIG_TYPE_COLOR , .colorValue = &configCustomPalette.parts[SKIN]}, {.name = "coop_custom_palette_skin", .type = CONFIG_TYPE_COLOR , .colorValue = &configCustomPalette.parts[SKIN]},
{.name = "coop_custom_palette_cap", .type = CONFIG_TYPE_COLOR , .colorValue = &configCustomPalette.parts[CAP]}, {.name = "coop_custom_palette_cap", .type = CONFIG_TYPE_COLOR , .colorValue = &configCustomPalette.parts[CAP]},
{.name = "coop_stay_in_level_after_star", .type = CONFIG_TYPE_UINT , .uintValue = &configStayInLevelAfterStar}, {.name = "coop_stay_in_level_after_star", .type = CONFIG_TYPE_UINT , .uintValue = &configStayInLevelAfterStar},
{.name = "coop_singleplayer_pause", .type = CONFIG_TYPE_BOOL , .boolValue = &configSingleplayerPause},
{.name = "share_lives", .type = CONFIG_TYPE_BOOL , .boolValue = &configShareLives}, {.name = "share_lives", .type = CONFIG_TYPE_BOOL , .boolValue = &configShareLives},
{.name = "disable_popups", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisablePopups}, {.name = "disable_popups", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisablePopups},
#ifdef DEVELOPMENT
{.name = "disable_devpause", .type = CONFIG_TYPE_BOOL , .boolValue = &configDisableDevPause},
#endif
#ifdef LUA_PROFILER #ifdef LUA_PROFILER
{.name = "lua_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configLuaProfiler}, {.name = "lua_profiler", .type = CONFIG_TYPE_BOOL , .boolValue = &configLuaProfiler},
#endif #endif

View file

@ -99,14 +99,12 @@ extern bool configUncappedFramerate;
extern unsigned int configFrameLimit; extern unsigned int configFrameLimit;
extern unsigned int configDrawDistance; extern unsigned int configDrawDistance;
extern bool configDisablePopups; extern bool configDisablePopups;
#ifdef DEVELOPMENT
extern bool configDisableDevPause;
#endif
#ifdef LUA_PROFILER #ifdef LUA_PROFILER
extern bool configLuaProfiler; extern bool configLuaProfiler;
#endif #endif
extern bool configDisableDownloadedModels; extern bool configDisableDownloadedModels;
extern unsigned int configInterpolationMode; extern unsigned int configInterpolationMode;
extern bool configSingleplayerPause;
void configfile_load(const char *filename); void configfile_load(const char *filename);
void configfile_save(const char *filename); void configfile_save(const char *filename);

View file

@ -5,35 +5,30 @@
#ifdef DEVELOPMENT #ifdef DEVELOPMENT
void djui_panel_options_debug_create(struct DjuiBase* caller) { void djui_panel_options_debug_create(struct DjuiBase* caller) {
f32 bodyHeight = 32 * 4 + 64 * 1 + 16 * 1; f32 bodyHeight = 32 * 3 + 64 * 1 + 16 * 1;
struct DjuiBase* defaultBase = NULL; struct DjuiBase* defaultBase = NULL;
struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\D\\#1be700\\E\\#00b3ff\\B\\#ffef00\\U\\#ff0800\\G"); struct DjuiThreePanel* panel = djui_panel_menu_create(bodyHeight, "\\#ff0800\\D\\#1be700\\E\\#00b3ff\\B\\#ffef00\\U\\#ff0800\\G");
struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel); struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel);
{ {
struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Disable Development Pause", &configDisableDevPause); struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Fixed Collisions", (bool*)&gLevelValues.fixCollisionBugs);
djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(&checkbox1->base, 1.0f, 32); djui_base_set_size(&checkbox1->base, 1.0f, 32);
defaultBase = &checkbox1->base; defaultBase = &checkbox1->base;
struct DjuiCheckbox* checkbox2 = djui_checkbox_create(&body->base, "Fixed Collisions", (bool*)&gLevelValues.fixCollisionBugs); #ifdef LUA_PROFILER
struct DjuiCheckbox* checkbox2 = djui_checkbox_create(&body->base, "Lua Profiler", &configLuaProfiler);
djui_base_set_size_type(&checkbox2->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(&checkbox2->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(&checkbox2->base, 1.0f, 32); djui_base_set_size(&checkbox2->base, 1.0f, 32);
defaultBase = &checkbox2->base; defaultBase = &checkbox2->base;
#ifdef LUA_PROFILER
struct DjuiCheckbox* checkbox3 = djui_checkbox_create(&body->base, "Lua Profiler", &configLuaProfiler);
djui_base_set_size_type(&checkbox3->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(&checkbox3->base, 1.0f, 32);
defaultBase = &checkbox3->base;
#endif #endif
struct DjuiButton* button2 = djui_button_create(&body->base, "Back"); struct DjuiButton* button1 = djui_button_create(&body->base, "Back");
djui_base_set_size_type(&button2->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(&button1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(&button2->base, 1.0f, 64); djui_base_set_size(&button1->base, 1.0f, 64);
djui_button_set_style(button2, 1); djui_button_set_style(button1, 1);
djui_interactable_hook_click(&button2->base, djui_panel_menu_back); djui_interactable_hook_click(&button1->base, djui_panel_menu_back);
} }
djui_panel_add(caller, &panel->base, defaultBase); djui_panel_add(caller, &panel->base, defaultBase);
@ -42,9 +37,9 @@ void djui_panel_options_debug_create(struct DjuiBase* caller) {
void djui_panel_misc_create(struct DjuiBase* caller) { void djui_panel_misc_create(struct DjuiBase* caller) {
#ifdef DEVELOPMENT #ifdef DEVELOPMENT
f32 bodyHeight = 64 * 3 + 16 * 2; f32 bodyHeight = 64 * 4 + 16 * 3;
#else #else
f32 bodyHeight = 64 * 2 + 16 * 1; f32 bodyHeight = 64 * 3 + 16 * 2;
#endif #endif
struct DjuiBase* defaultBase = NULL; struct DjuiBase* defaultBase = NULL;
@ -52,11 +47,15 @@ void djui_panel_misc_create(struct DjuiBase* caller) {
struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel); struct DjuiFlowLayout* body = (struct DjuiFlowLayout*)djui_three_panel_get_body(panel);
{ {
struct DjuiCheckbox* checkbox1 = djui_checkbox_create(&body->base, "Pause In Singleplayer", &configSingleplayerPause);
djui_base_set_size_type(&checkbox1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(&checkbox1->base, 1.0f, 32);
defaultBase = &checkbox1->base;
struct DjuiButton* button1 = djui_button_create(&body->base, "Menu Options"); struct DjuiButton* button1 = djui_button_create(&body->base, "Menu Options");
djui_base_set_size_type(&button1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(&button1->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(&button1->base, 1.0f, 64); djui_base_set_size(&button1->base, 1.0f, 64);
djui_interactable_hook_click(&button1->base, djui_panel_main_menu_create); djui_interactable_hook_click(&button1->base, djui_panel_main_menu_create);
defaultBase = &button1->base;
#ifdef DEVELOPMENT #ifdef DEVELOPMENT
struct DjuiButton* button2 = djui_button_create(&body->base, "Debug"); struct DjuiButton* button2 = djui_button_create(&body->base, "Debug");

View file

@ -208,7 +208,7 @@ static struct LuaObjectField sBehaviorTrajectoriesFields[LUA_BEHAVIOR_TRAJECTORI
{ "UnagiTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, UnagiTrajectory), false, LOT_POINTER }, { "UnagiTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, UnagiTrajectory), false, LOT_POINTER },
}; };
#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 26 #define LUA_BEHAVIOR_VALUES_FIELD_COUNT 27
static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COUNT] = { static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COUNT] = {
{ "BowlingBallBob2Speed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBob2Speed), false, LOT_NONE }, { "BowlingBallBob2Speed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBob2Speed), false, LOT_NONE },
{ "BowlingBallBobSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBobSpeed), false, LOT_NONE }, { "BowlingBallBobSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBobSpeed), false, LOT_NONE },
@ -229,6 +229,7 @@ static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COU
{ "RacingPenguinBigRadius", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinBigRadius), false, LOT_NONE }, { "RacingPenguinBigRadius", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinBigRadius), false, LOT_NONE },
{ "RacingPenguinHeight", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinHeight), false, LOT_NONE }, { "RacingPenguinHeight", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinHeight), false, LOT_NONE },
{ "RacingPenguinRadius", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinRadius), false, LOT_NONE }, { "RacingPenguinRadius", LVT_F32, offsetof(struct BehaviorValues, RacingPenguinRadius), false, LOT_NONE },
{ "RespawnShellBoxes", LVT_U8, offsetof(struct BehaviorValues, RespawnShellBoxes), false, LOT_NONE },
{ "ShowStarMilestones", LVT_U8, offsetof(struct BehaviorValues, ShowStarMilestones), false, LOT_NONE }, { "ShowStarMilestones", LVT_U8, offsetof(struct BehaviorValues, ShowStarMilestones), false, LOT_NONE },
{ "ToadStar1Requirement", LVT_U16, offsetof(struct BehaviorValues, ToadStar1Requirement), false, LOT_NONE }, { "ToadStar1Requirement", LVT_U16, offsetof(struct BehaviorValues, ToadStar1Requirement), false, LOT_NONE },
{ "ToadStar2Requirement", LVT_U16, offsetof(struct BehaviorValues, ToadStar2Requirement), false, LOT_NONE }, { "ToadStar2Requirement", LVT_U16, offsetof(struct BehaviorValues, ToadStar2Requirement), false, LOT_NONE },
@ -726,10 +727,11 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] =
{ "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE }, { "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
}; };
#define LUA_LEVEL_VALUES_FIELD_COUNT 21 #define LUA_LEVEL_VALUES_FIELD_COUNT 26
static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = { static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = {
{ "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE }, { "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE },
{ "coinsRequiredForCoinStar", LVT_S16, offsetof(struct LevelValues, coinsRequiredForCoinStar), false, LOT_NONE }, { "coinsRequiredForCoinStar", LVT_S16, offsetof(struct LevelValues, coinsRequiredForCoinStar), false, LOT_NONE },
{ "disableActs", LVT_BOOL, offsetof(struct LevelValues, disableActs), false, LOT_NONE },
{ "entryLevel", LVT_S32, offsetof(struct LevelValues, entryLevel), false, LOT_NONE }, { "entryLevel", LVT_S32, offsetof(struct LevelValues, entryLevel), false, LOT_NONE },
{ "exitCastleArea", LVT_S16, offsetof(struct LevelValues, exitCastleArea), false, LOT_NONE }, { "exitCastleArea", LVT_S16, offsetof(struct LevelValues, exitCastleArea), false, LOT_NONE },
{ "exitCastleLevel", LVT_S32, offsetof(struct LevelValues, exitCastleLevel), false, LOT_NONE }, { "exitCastleLevel", LVT_S32, offsetof(struct LevelValues, exitCastleLevel), false, LOT_NONE },
@ -741,14 +743,18 @@ static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] =
{ "floorLowerLimitShadow", LVT_S16, offsetof(struct LevelValues, floorLowerLimitShadow), false, LOT_NONE }, { "floorLowerLimitShadow", LVT_S16, offsetof(struct LevelValues, floorLowerLimitShadow), false, LOT_NONE },
{ "metalCapDuration", LVT_U16, offsetof(struct LevelValues, metalCapDuration), false, LOT_NONE }, { "metalCapDuration", LVT_U16, offsetof(struct LevelValues, metalCapDuration), false, LOT_NONE },
{ "metalCapDurationCotmc", LVT_U16, offsetof(struct LevelValues, metalCapDurationCotmc), false, LOT_NONE }, { "metalCapDurationCotmc", LVT_U16, offsetof(struct LevelValues, metalCapDurationCotmc), false, LOT_NONE },
{ "pauseExitAnywhere", LVT_BOOL, offsetof(struct LevelValues, pauseExitAnywhere), false, LOT_NONE },
{ "metalCapSequence", LVT_U8, offsetof(struct LevelValues, metalCapSequence), false, LOT_NONE },
{ "pssSlideStarIndex", LVT_U8, offsetof(struct LevelValues, pssSlideStarIndex), false, LOT_NONE }, { "pssSlideStarIndex", LVT_U8, offsetof(struct LevelValues, pssSlideStarIndex), false, LOT_NONE },
{ "pssSlideStarTime", LVT_U16, offsetof(struct LevelValues, pssSlideStarTime), false, LOT_NONE }, { "pssSlideStarTime", LVT_U16, offsetof(struct LevelValues, pssSlideStarTime), false, LOT_NONE },
{ "skipCreditsAt", LVT_S32, offsetof(struct LevelValues, skipCreditsAt), false, LOT_NONE }, { "skipCreditsAt", LVT_S32, offsetof(struct LevelValues, skipCreditsAt), false, LOT_NONE },
{ "starPositions", LVT_COBJECT, offsetof(struct LevelValues, starPositions), true, LOT_STARPOSITIONS }, { "starPositions", LVT_COBJECT, offsetof(struct LevelValues, starPositions), true, LOT_STARPOSITIONS },
{ "vanishCapDuration", LVT_U16, offsetof(struct LevelValues, vanishCapDuration), false, LOT_NONE }, { "vanishCapDuration", LVT_U16, offsetof(struct LevelValues, vanishCapDuration), false, LOT_NONE },
{ "vanishCapDurationVcutm", LVT_U16, offsetof(struct LevelValues, vanishCapDurationVcutm), false, LOT_NONE }, { "vanishCapDurationVcutm", LVT_U16, offsetof(struct LevelValues, vanishCapDurationVcutm), false, LOT_NONE },
{ "vanishCapSequence", LVT_U8, offsetof(struct LevelValues, vanishCapSequence), false, LOT_NONE },
{ "wingCapDuration", LVT_U16, offsetof(struct LevelValues, wingCapDuration), false, LOT_NONE }, { "wingCapDuration", LVT_U16, offsetof(struct LevelValues, wingCapDuration), false, LOT_NONE },
{ "wingCapDurationTotwc", LVT_U16, offsetof(struct LevelValues, wingCapDurationTotwc), false, LOT_NONE }, { "wingCapDurationTotwc", LVT_U16, offsetof(struct LevelValues, wingCapDurationTotwc), false, LOT_NONE },
{ "wingCapSequence", LVT_U8, offsetof(struct LevelValues, wingCapSequence), false, LOT_NONE },
}; };
#define LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT 5 #define LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT 5

View file

@ -3976,4 +3976,7 @@ char gSmluaConstants[] = ""
"COOP_OBJ_FLAG_NETWORK = (1 << 0)\n" "COOP_OBJ_FLAG_NETWORK = (1 << 0)\n"
"COOP_OBJ_FLAG_LUA = (1 << 1)\n" "COOP_OBJ_FLAG_LUA = (1 << 1)\n"
"COOP_OBJ_FLAG_NON_SYNC = (1 << 2)\n" "COOP_OBJ_FLAG_NON_SYNC = (1 << 2)\n"
"VERSION_NUMBER = 31\n"
"MINOR_VERSION_NUMBER = 0\n"
"MAX_VERSION_LENGTH = 10\n"
; ;

View file

@ -10,6 +10,8 @@
#include "object_fields.h" #include "object_fields.h"
#include "engine/math_util.h" #include "engine/math_util.h"
#include "pc/djui/djui_hud_utils.h" #include "pc/djui/djui_hud_utils.h"
#include "include/level_misc_macros.h"
#include "include/macro_presets.h"
bool smlua_functions_valid_param_count(lua_State* L, int expected) { bool smlua_functions_valid_param_count(lua_State* L, int expected) {
int top = lua_gettop(L); int top = lua_gettop(L);
@ -459,6 +461,122 @@ int smlua_func_djui_hud_render_texture_tile_interpolated(lua_State* L) {
return 1; return 1;
} }
////////////////////////////////
// level script preprocessing //
////////////////////////////////
struct LuaLevelScriptParse {
int reference;
struct Mod* mod;
};
struct LuaLevelScriptParse sLevelScriptParse = { 0 };
s32 smlua_func_level_script_parse_callback(u8 type, void *cmd) {
if (type != 0x24 && type != 0x39 && type != 0x1F) {
return 0;
}
lua_State* L = gLuaState;
if (L == NULL) { return 0; }
struct LuaLevelScriptParse* preprocess = &sLevelScriptParse;
lua_rawgeti(L, LUA_REGISTRYINDEX, preprocess->reference);
if (type == 0x1F) {
u8 area = (u8) dynos_level_cmd_get(cmd, 2);
lua_pushinteger(L, area);
} else {
lua_pushnil(L);
}
if (type == 0x24) {
const BehaviorScript *bhv = (const BehaviorScript *) dynos_level_cmd_get(cmd, 20);
u32 behaviorArg = (u32) dynos_level_cmd_get(cmd, 16);
lua_newtable(L);
lua_pushstring(L, "behavior");
lua_pushinteger(L, get_id_from_behavior(bhv));
lua_settable(L, -3);
lua_pushstring(L, "behaviorArg");
lua_pushinteger(L, behaviorArg);
lua_settable(L, -3);
} else {
lua_pushnil(L);
}
if (type == 0x39) {
MacroObject *data = (MacroObject *) dynos_level_cmd_get(cmd, 4);
int i = 0;
s32 len = 0;
lua_newtable(L);
int t = lua_gettop(gLuaState);
lua_newtable(L);
int args = lua_gettop(gLuaState);
while (data[len++] != MACRO_OBJECT_END()) {
s32 presetId = (s32) ((data[len - 1] & 0x1FF) - 0x1F);
const BehaviorScript *bhv = (const BehaviorScript *) MacroObjectPresets[presetId].behavior;
s32 presetParams = MacroObjectPresets[presetId].param;
s32 objParams = (data[4] & 0xFF00) + (presetParams & 0x00FF);
u32 behaviorArg = ((objParams & 0x00FF) << 16) + (objParams & 0xFF00);
lua_pushinteger(L, i);
lua_pushinteger(L, get_id_from_behavior(bhv));
lua_settable(L, t);
lua_pushinteger(L, i);
lua_pushinteger(L, behaviorArg);
lua_settable(L, args);
i++;
len += 4;
}
} else {
lua_pushnil(L);
lua_pushnil(L);
}
// call the callback
if (0 != smlua_call_hook(L, 4, 0, 0, preprocess->mod)) {
LOG_LUA("Failed to call the callback behaviors: %u", type);
return 0;
}
}
void smlua_func_level_script_parse(lua_State* L) {
if (!smlua_functions_valid_param_count(L, 2)) { return; }
lua_Integer levelNum = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) {
LOG_LUA_LINE("Invalid level script name");
return;
}
struct LuaLevelScriptParse* preprocess = &sLevelScriptParse;
preprocess->reference = LUA_NOREF;
lua_pushvalue(L, 2);
int ref = luaL_ref(L, LUA_REGISTRYINDEX);
if (ref == -1) {
LOG_LUA_LINE("Level Script Parse: %lld tried to parse using undefined function", levelNum);
return;
}
preprocess->reference = ref;
preprocess->mod = gLuaActiveMod;
void *script = dynos_level_get_script(levelNum);
if (script == NULL) {
LOG_LUA("Failed to find script: %lld", levelNum);
return;
}
dynos_level_parse_script(script, smlua_func_level_script_parse_callback);
}
////////// //////////
// bind // // bind //
////////// //////////
@ -482,4 +600,5 @@ void smlua_bind_functions(void) {
smlua_bind_function(L, "djui_hud_render_texture_tile", smlua_func_djui_hud_render_texture_tile); smlua_bind_function(L, "djui_hud_render_texture_tile", smlua_func_djui_hud_render_texture_tile);
smlua_bind_function(L, "djui_hud_render_texture_interpolated", smlua_func_djui_hud_render_texture_interpolated); smlua_bind_function(L, "djui_hud_render_texture_interpolated", smlua_func_djui_hud_render_texture_interpolated);
smlua_bind_function(L, "djui_hud_render_texture_tile_interpolated", smlua_func_djui_hud_render_texture_tile_interpolated); smlua_bind_function(L, "djui_hud_render_texture_tile_interpolated", smlua_func_djui_hud_render_texture_tile_interpolated);
smlua_bind_function(L, "level_script_parse", smlua_func_level_script_parse);
} }

View file

@ -22252,6 +22252,22 @@ int smlua_func_cur_obj_set_behavior(lua_State* L) {
return 1; return 1;
} }
int smlua_func_cur_obj_set_billboard_if_vanilla_cam(UNUSED lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 0) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_billboard_if_vanilla_cam", 0, top);
return 0;
}
extern void cur_obj_set_billboard_if_vanilla_cam(void);
cur_obj_set_billboard_if_vanilla_cam();
return 1;
}
int smlua_func_cur_obj_set_direction_table(lua_State* L) { int smlua_func_cur_obj_set_direction_table(lua_State* L) {
if (L == NULL) { return 0; } if (L == NULL) { return 0; }
@ -27783,6 +27799,33 @@ int smlua_func_obj_set_vel(lua_State* L) {
return 1; return 1;
} }
int smlua_func_set_whirlpools(lua_State* L) {
if (L == NULL) { return 0; }
int top = lua_gettop(L);
if (top != 6) {
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_whirlpools", 6, top);
return 0;
}
f32 x = smlua_to_number(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_whirlpools"); return 0; }
f32 y = smlua_to_number(L, 2);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_whirlpools"); return 0; }
f32 z = smlua_to_number(L, 3);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_whirlpools"); return 0; }
s16 strength = smlua_to_integer(L, 4);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_whirlpools"); return 0; }
s16 area = smlua_to_integer(L, 5);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "set_whirlpools"); return 0; }
s32 index = smlua_to_integer(L, 6);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "set_whirlpools"); return 0; }
set_whirlpools(x, y, z, strength, area, index);
return 1;
}
int smlua_func_spawn_non_sync_object(lua_State* L) { int smlua_func_spawn_non_sync_object(lua_State* L) {
if (L == NULL) { return 0; } if (L == NULL) { return 0; }
@ -29874,6 +29917,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "cur_obj_scale", smlua_func_cur_obj_scale); smlua_bind_function(L, "cur_obj_scale", smlua_func_cur_obj_scale);
smlua_bind_function(L, "cur_obj_scale_over_time", smlua_func_cur_obj_scale_over_time); smlua_bind_function(L, "cur_obj_scale_over_time", smlua_func_cur_obj_scale_over_time);
smlua_bind_function(L, "cur_obj_set_behavior", smlua_func_cur_obj_set_behavior); smlua_bind_function(L, "cur_obj_set_behavior", smlua_func_cur_obj_set_behavior);
smlua_bind_function(L, "cur_obj_set_billboard_if_vanilla_cam", smlua_func_cur_obj_set_billboard_if_vanilla_cam);
smlua_bind_function(L, "cur_obj_set_direction_table", smlua_func_cur_obj_set_direction_table); smlua_bind_function(L, "cur_obj_set_direction_table", smlua_func_cur_obj_set_direction_table);
smlua_bind_function(L, "cur_obj_set_face_angle_to_move_angle", smlua_func_cur_obj_set_face_angle_to_move_angle); smlua_bind_function(L, "cur_obj_set_face_angle_to_move_angle", smlua_func_cur_obj_set_face_angle_to_move_angle);
smlua_bind_function(L, "cur_obj_set_hitbox_and_die_if_attacked", smlua_func_cur_obj_set_hitbox_and_die_if_attacked); smlua_bind_function(L, "cur_obj_set_hitbox_and_die_if_attacked", smlua_func_cur_obj_set_hitbox_and_die_if_attacked);
@ -30168,6 +30212,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "obj_move_xyz", smlua_func_obj_move_xyz); smlua_bind_function(L, "obj_move_xyz", smlua_func_obj_move_xyz);
smlua_bind_function(L, "obj_set_model_extended", smlua_func_obj_set_model_extended); smlua_bind_function(L, "obj_set_model_extended", smlua_func_obj_set_model_extended);
smlua_bind_function(L, "obj_set_vel", smlua_func_obj_set_vel); smlua_bind_function(L, "obj_set_vel", smlua_func_obj_set_vel);
smlua_bind_function(L, "set_whirlpools", smlua_func_set_whirlpools);
smlua_bind_function(L, "spawn_non_sync_object", smlua_func_spawn_non_sync_object); smlua_bind_function(L, "spawn_non_sync_object", smlua_func_spawn_non_sync_object);
smlua_bind_function(L, "spawn_sync_object", smlua_func_spawn_sync_object); smlua_bind_function(L, "spawn_sync_object", smlua_func_spawn_sync_object);

View file

@ -90,11 +90,16 @@ int smlua_call_hook(lua_State* L, int nargs, int nresults, int errfunc, struct M
gLuaActiveMod = activeMod; gLuaActiveMod = activeMod;
gLuaLastHookMod = activeMod; gLuaLastHookMod = activeMod;
#if defined(LUA_PROFILER) #if defined(LUA_PROFILER)
lua_profiler_start_counter(activeMod); extern bool configLuaProfiler;
if (configLuaProfiler) {
lua_profiler_start_counter(activeMod);
}
#endif #endif
int rc = smlua_pcall(L, nargs, nresults, errfunc); int rc = smlua_pcall(L, nargs, nresults, errfunc);
#if defined(LUA_PROFILER) #if defined(LUA_PROFILER)
lua_profiler_stop_counter(activeMod); if (configLuaProfiler) {
lua_profiler_stop_counter(activeMod);
}
#endif #endif
gLuaActiveMod = prev; gLuaActiveMod = prev;
return rc; return rc;

View file

@ -383,3 +383,13 @@ void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz) {
o->oPosY += dy; o->oPosY += dy;
o->oPosZ += dz; o->oPosZ += dz;
} }
void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index) {
static struct Whirlpool whirlpool;
gAreas[area].whirlpools[index] = &whirlpool;
gAreas[area].whirlpools[index]->pos[0] = x;
gAreas[area].whirlpools[index]->pos[1] = y;
gAreas[area].whirlpools[index]->pos[2] = z;
gAreas[area].whirlpools[index]->strength = strength;
}

View file

@ -53,5 +53,6 @@ bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z,
void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz); void obj_set_vel(struct Object *o, f32 vx, f32 vy, f32 vz);
void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz); void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);
void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index);
#endif #endif

View file

@ -3,9 +3,9 @@
#include "types.h" #include "types.h"
static char sVersionString[MAX_VERSION_LENGTH] = { 0 }; static char sVersionString[MAX_VERSION_LENGTH] = { 0 };
#define VERSION_TEXT "beta " #define VERSION_TEXT "beta"
char* get_version(void) { char* get_version(void) {
snprintf(sVersionString, MAX_VERSION_LENGTH, "%s%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER); snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER);
return sVersionString; return sVersionString;
} }