diff --git a/autogen/lua_definitions/manual.lua b/autogen/lua_definitions/manual.lua index d45950d5..444dcde5 100644 --- a/autogen/lua_definitions/manual.lua +++ b/autogen/lua_definitions/manual.lua @@ -28,9 +28,6 @@ gGlobalSyncTable = {} --- @type SyncTable[] gPlayerSyncTable = {} ---- @type StarPositions -gStarPositions = {} - --- @type LevelValues gLevelValues = {} diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index c276e5b7..95552689 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -442,6 +442,7 @@ --- @class LevelValues --- @field public entryLevel LevelNum +--- @field public starPositions StarPositions --- @class LinearTransitionPoint --- @field public dist number diff --git a/docs/lua/globals.md b/docs/lua/globals.md index 585e4cd5..c6910f5a 100644 --- a/docs/lua/globals.md +++ b/docs/lua/globals.md @@ -58,13 +58,6 @@ The `gGlobalObjectCollisionData` table contains references to object collision d
-## [gStarPositions](#gLakituState) -`gStarPositions`'s fields are listed in [StarPosition](structs.md#StarPosition). These are where stars will spawn for certain stars. - -[:arrow_up_small:](#) - -
- ## [gLevelValues](#gLevelValues) `gLevelValues`'s fields are listed in [LevelValue](structs.md#LevelValue). diff --git a/docs/lua/structs.md b/docs/lua/structs.md index ec8e0122..bcf3fd30 100644 --- a/docs/lua/structs.md +++ b/docs/lua/structs.md @@ -680,6 +680,7 @@ | Field | Type | Access | | ----- | ---- | ------ | | entryLevel | [enum LevelNum](constants.md#enum-LevelNum) | | +| starPositions | [StarPositions](structs.md#StarPositions) | read-only | [:arrow_up_small:](#) diff --git a/src/game/behaviors/boo.inc.c b/src/game/behaviors/boo.inc.c index 25d08a58..058f88f3 100644 --- a/src/game/behaviors/boo.inc.c +++ b/src/game/behaviors/boo.inc.c @@ -654,19 +654,19 @@ static void big_boo_act_2(void) { } static void big_boo_spawn_ghost_hunt_star(void) { - f32* starPos = gStarPositions.GhostHuntBooStarPos; + f32* starPos = gLevelValues.starPositions.GhostHuntBooStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } static void big_boo_spawn_balcony_star(void) { - f32* starPos = gStarPositions.BalconyBooStarPos; + f32* starPos = gLevelValues.starPositions.BalconyBooStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } static void big_boo_spawn_merry_go_round_star(void) { struct Object *merryGoRound; - f32* starPos = gStarPositions.MerryGoRoundStarPos; + f32* starPos = gLevelValues.starPositions.MerryGoRoundStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); merryGoRound = cur_obj_nearest_object_with_behavior(bhvMerryGoRound); diff --git a/src/game/behaviors/bully.inc.c b/src/game/behaviors/bully.inc.c index 2921d47a..86160032 100644 --- a/src/game/behaviors/bully.inc.c +++ b/src/game/behaviors/bully.inc.c @@ -245,10 +245,10 @@ void bully_act_level_death(void) { spawn_mist_particles(); if (o->oBullySubtype == BULLY_STYPE_CHILL) { - f32* starPos = gStarPositions.ChillBullyStarPos; + f32* starPos = gLevelValues.starPositions.ChillBullyStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } else { - f32* starPos = gStarPositions.BigBullyTrioStarPos; + f32* starPos = gLevelValues.starPositions.BigBullyTrioStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); struct Object* lllTumblingBridge = cur_obj_nearest_object_with_behavior(bhvLllTumblingBridge); if (lllTumblingBridge != NULL) { @@ -340,7 +340,7 @@ void bhv_big_bully_with_minions_init(void) { void big_bully_spawn_star(void) { if (obj_lava_death() == 1) { spawn_mist_particles(); - f32* starPos = gStarPositions.BigBullyStarPos; + f32* starPos = gLevelValues.starPositions.BigBullyStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } } diff --git a/src/game/behaviors/eyerok.inc.c b/src/game/behaviors/eyerok.inc.c index 0221cdda..8c8e2135 100644 --- a/src/game/behaviors/eyerok.inc.c +++ b/src/game/behaviors/eyerok.inc.c @@ -187,7 +187,7 @@ static void eyerok_boss_act_die(void) { /*struct MarioState* marioState = nearest_mario_state_to_object(o); if (o->oTimer == 60) { if (should_start_or_continue_dialog(marioState, o) && cur_obj_update_dialog_with_cutscene(&gMarioStates[0], 2, 0, CUTSCENE_DIALOG, DIALOG_118, eyerok_boss_act_die_continue_dialog)) { - f32* starPos = gStarPositions.EyerockStarPos; + f32* starPos = gLevelValues.starPositions.EyerockStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } else { o->oTimer -= 1; @@ -198,7 +198,7 @@ static void eyerok_boss_act_die(void) { }*/ stop_background_music(SEQUENCE_ARGS(4, SEQ_EVENT_BOSS)); if (network_owns_object(o)) { - f32* starPos = gStarPositions.EyerockStarPos; + f32* starPos = gLevelValues.starPositions.EyerockStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); network_send_object_reliability(o, TRUE); } diff --git a/src/game/behaviors/fire_piranha_plant.inc.c b/src/game/behaviors/fire_piranha_plant.inc.c index 8d981cc4..879cd7d1 100644 --- a/src/game/behaviors/fire_piranha_plant.inc.c +++ b/src/game/behaviors/fire_piranha_plant.inc.c @@ -74,7 +74,7 @@ static void fire_piranha_plant_act_hide(void) { if ((u16)(o->oBehParams >> 16) != 0 && o->oHealth == 0) { if (++sNumKilledFirePiranhaPlants == 5) { - f32* starPos = gStarPositions.BigPiranhasStarPos; + f32* starPos = gLevelValues.starPositions.BigPiranhasStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); network_send_object(o); } diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index 15ba579f..01fe9551 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -241,13 +241,13 @@ void king_bobomb_act_8(void) { f32 objectPosY = o->oPosY; o->oPosY += 200.0f + gDebugInfo[5][0]; - f32* starPos = gStarPositions.KingBobombStarPos; + f32* starPos = gLevelValues.starPositions.KingBobombStarPos; star = spawn_default_star(starPos[0], starPos[1], starPos[2]); o->oPosY = objectPosY; #else o->oPosY += 100.0f; - f32* starPos = gStarPositions.KingBobombStarPos; + f32* starPos = gLevelValues.starPositions.KingBobombStarPos; star = spawn_default_star(starPos[0], starPos[1], starPos[2]); #endif // If we're not the closet to King-Bombomb, diff --git a/src/game/behaviors/klepto.inc.c b/src/game/behaviors/klepto.inc.c index ef49f26f..aad28ec3 100644 --- a/src/game/behaviors/klepto.inc.c +++ b/src/game/behaviors/klepto.inc.c @@ -427,7 +427,7 @@ void bhv_klepto_update(void) { } } else if (o->oAnimState == KLEPTO_ANIM_STATE_HOLDING_STAR) { - f32* starPos = gStarPositions.KleptoStarPos; + f32* starPos = gLevelValues.starPositions.KleptoStarPos; struct Object* star = spawn_default_star(starPos[0], starPos[1], starPos[2]); // If we're not the closet to Klepto, diff --git a/src/game/behaviors/koopa.inc.c b/src/game/behaviors/koopa.inc.c index abf0da51..174d1686 100644 --- a/src/game/behaviors/koopa.inc.c +++ b/src/game/behaviors/koopa.inc.c @@ -868,10 +868,10 @@ static void koopa_the_quick_act_after_race(void) { } } else if (o->parentObj->oKoopaRaceEndpointRaceStatus != 0) { if (o->oKoopaTheQuickRaceIndex == 0) { - f32* starPos = gStarPositions.KoopaBobStarPos; + f32* starPos = gLevelValues.starPositions.KoopaBobStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } else { - f32* starPos = gStarPositions.KoopaThiStarPos; + f32* starPos = gLevelValues.starPositions.KoopaThiStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); } diff --git a/src/game/behaviors/manta_ray.inc.c b/src/game/behaviors/manta_ray.inc.c index 317a186d..8e6b2e99 100644 --- a/src/game/behaviors/manta_ray.inc.c +++ b/src/game/behaviors/manta_ray.inc.c @@ -133,7 +133,7 @@ void bhv_manta_ray_loop(void) { // Spawn a star after collecting 5 rings. if (o->oWaterRingSpawnerRingsCollected == 5) { spawn_mist_particles(); - f32* starPos = gStarPositions.MantaRayStarPos; + f32* starPos = gLevelValues.starPositions.MantaRayStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); o->oAction = MANTA_ACT_NO_RINGS; } diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index facac92e..6f01d434 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -116,7 +116,7 @@ void mr_i_act_3(void) { o->oMrISize = sp1C * 0.6; if (o->oBehParams2ndByte) { o->oPosY += 100.0f; - f32* starPos = gStarPositions.MrIStarPos; + f32* starPos = gLevelValues.starPositions.MrIStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); obj_mark_for_deletion(o); } else diff --git a/src/game/behaviors/racing_penguin.inc.c b/src/game/behaviors/racing_penguin.inc.c index 2f85a97a..a81db946 100644 --- a/src/game/behaviors/racing_penguin.inc.c +++ b/src/game/behaviors/racing_penguin.inc.c @@ -252,7 +252,7 @@ static void racing_penguin_act_show_final_text(void) { } } else if (o->oRacingPenguinMarioWon) { - f32* starPos = gStarPositions.RacingPenguinStarPos; + f32* starPos = gLevelValues.starPositions.RacingPenguinStarPos; #ifdef VERSION_JP spawn_default_star(starPos[0], starPos[1], starPos[2]); #else diff --git a/src/game/behaviors/snowman.inc.c b/src/game/behaviors/snowman.inc.c index 014e45c8..cf300226 100644 --- a/src/game/behaviors/snowman.inc.c +++ b/src/game/behaviors/snowman.inc.c @@ -243,7 +243,7 @@ void bhv_snowmans_head_loop(void) { case 4: if (trigger_obj_dialog_when_facing(&gMarioStates[0], &o->oSnowmansHeadUnkF4, DIALOG_111, 700.0f, 2, bhv_snowmans_head_action_4_continue_dialog)) { spawn_mist_particles(); - f32* starPos = gStarPositions.SnowmanHeadStarPos; + f32* starPos = gLevelValues.starPositions.SnowmanHeadStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); o->oAction = 1; network_send_object(o); diff --git a/src/game/behaviors/spawn_star_exit.inc.c b/src/game/behaviors/spawn_star_exit.inc.c index 24ab41b7..a53507b0 100644 --- a/src/game/behaviors/spawn_star_exit.inc.c +++ b/src/game/behaviors/spawn_star_exit.inc.c @@ -5,7 +5,7 @@ void bhv_ccm_touched_star_spawn_loop(void) { o->oPosY += 100.0f; o->oPosX = 2780.0f; o->oPosZ = 4666.0f; - f32* starPos = gStarPositions.CcmSlideStarPos; + f32* starPos = gLevelValues.starPositions.CcmSlideStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); obj_mark_for_deletion(o); } diff --git a/src/game/behaviors/treasure_chest.inc.c b/src/game/behaviors/treasure_chest.inc.c index 85a315d5..cf34f474 100644 --- a/src/game/behaviors/treasure_chest.inc.c +++ b/src/game/behaviors/treasure_chest.inc.c @@ -255,7 +255,7 @@ void bhv_treasure_chest_jrb_loop(void) { if (o->oTimer == 60) { spawn_mist_particles(); - f32* starPos = gStarPositions.TreasureJrbStarPos; + f32* starPos = gLevelValues.starPositions.TreasureJrbStarPos; spawn_networked_default_star(starPos[0], starPos[1], starPos[2], o->oTreasureChestLastNetworkPlayerIndex); o->oAction = 2; @@ -323,7 +323,7 @@ void bhv_treasure_chest_loop(void) { if (o->oTimer == 60) { spawn_mist_particles(); - f32* starPos = gStarPositions.TreasureJrbStarPos; + f32* starPos = gLevelValues.starPositions.TreasureJrbStarPos; spawn_networked_default_star(starPos[0], starPos[1], starPos[2], o->oTreasureChestLastNetworkPlayerIndex); o->oAction = 2; diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index 8b15dd20..9d98f0c7 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -85,7 +85,7 @@ void tuxies_mother_act_1(void) { o->prevObj->OBJECT_FIELD_S32(o->oInteractionSubtype) &= ~INT_SUBTYPE_DROP_IMMEDIATELY; obj_set_behavior(o->prevObj, bhvUnused20E0); - f32* starPos = gStarPositions.TuxieMotherStarPos; + f32* starPos = gLevelValues.starPositions.TuxieMotherStarPos; #ifndef VERSION_JP cur_obj_spawn_star_at_y_offset(starPos[0], starPos[1], starPos[2], 200.0f); #else diff --git a/src/game/behaviors/ukiki_cage.inc.c b/src/game/behaviors/ukiki_cage.inc.c index 90b99687..6ef80bd1 100644 --- a/src/game/behaviors/ukiki_cage.inc.c +++ b/src/game/behaviors/ukiki_cage.inc.c @@ -37,7 +37,7 @@ void bhv_ukiki_cage_star_loop(void) { obj_mark_for_deletion(o); spawn_mist_particles(); spawn_triangle_break_particles(20, 138, 0.7, 3); - f32* starPos = gStarPositions.UkikiCageStarPos; + f32* starPos = gLevelValues.starPositions.UkikiCageStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); break; } diff --git a/src/game/behaviors/unagi.inc.c b/src/game/behaviors/unagi.inc.c index 76cbdc19..c726ed39 100644 --- a/src/game/behaviors/unagi.inc.c +++ b/src/game/behaviors/unagi.inc.c @@ -215,7 +215,7 @@ void bhv_unagi_subobject_loop(void) { if (o->oBehParams2ndByte == -4) { if (o->parentObj->oAnimState != 0 && distanceToPlayer < 150.0f) { o->oBehParams = o->parentObj->oBehParams; - f32* starPos = gStarPositions.UnagiStarPos; + f32* starPos = gLevelValues.starPositions.UnagiStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); o->parentObj->oAnimState = 0; } diff --git a/src/game/behaviors/water_ring.inc.c b/src/game/behaviors/water_ring.inc.c index 09e4d62e..e8e10264 100644 --- a/src/game/behaviors/water_ring.inc.c +++ b/src/game/behaviors/water_ring.inc.c @@ -194,7 +194,7 @@ void bhv_jet_stream_ring_spawner_loop(void) { if (o->oWaterRingSpawnerRingsCollected == 5) { spawn_mist_particles(); - f32* starPos = gStarPositions.JetstreamRingStarPos; + f32* starPos = gLevelValues.starPositions.JetstreamRingStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); o->oAction = JS_RING_SPAWNER_ACT_INACTIVE; diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index e1935db4..97888aa8 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -242,7 +242,7 @@ void whomp_act_8(void) { cur_obj_shake_screen(SHAKE_POS_SMALL); o->oPosY += 100.0f; - f32* starPos = gStarPositions.KingWhompStarPos; + f32* starPos = gLevelValues.starPositions.KingWhompStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); cur_obj_play_sound_2(SOUND_OBJ_KING_WHOMP_DEATH); diff --git a/src/game/behaviors/wiggler.inc.c b/src/game/behaviors/wiggler.inc.c index 2fdd7b5c..b5dc2023 100644 --- a/src/game/behaviors/wiggler.inc.c +++ b/src/game/behaviors/wiggler.inc.c @@ -366,7 +366,7 @@ static void wiggler_act_shrink(void) { // 4 is the default scale, so shrink to 1/4 of regular size if (approach_f32_ptr(&o->header.gfx.scale[0], 1.0f, 0.1f)) { - f32* starPos = gStarPositions.WigglerStarPos; + f32* starPos = gLevelValues.starPositions.WigglerStarPos; struct Object *star = spawn_default_star(starPos[0], starPos[1], starPos[2]); // If we're not the closet to Wiggler, diff --git a/src/game/hardcoded.c b/src/game/hardcoded.c index 9cf825da..e65a00ec 100644 --- a/src/game/hardcoded.c +++ b/src/game/hardcoded.c @@ -2,37 +2,36 @@ struct LevelValues gLevelValues = { .entryLevel = LEVEL_CASTLE_GROUNDS, -}; - -struct StarPositions gStarPositions = { - .KoopaBobStarPos = { 3030.0f, 4500.0f, -4600.0f }, - .KoopaThiStarPos = { 7100.0f, -1300.0f, -6000.0f }, - .KingBobombStarPos = { 2000.0f, 4500.0f, -4500.0f }, - .KingWhompStarPos = { 180.0f, 3880.0f, 340.0f }, - .EyerockStarPos = { 0.0f, -900.0f, -3700.0f }, - .BigBullyStarPos = { 3700.0f, 600.0f, -5500.0f }, - .ChillBullyStarPos = { 130.0f, 1600.0f, -4335.0f }, - .BigPiranhasStarPos = { -6300.0f, -1850.0f, -6300.0f }, + .starPositions = { + .KoopaBobStarPos = { 3030.0f, 4500.0f, -4600.0f }, + .KoopaThiStarPos = { 7100.0f, -1300.0f, -6000.0f }, + .KingBobombStarPos = { 2000.0f, 4500.0f, -4500.0f }, + .KingWhompStarPos = { 180.0f, 3880.0f, 340.0f }, + .EyerockStarPos = { 0.0f, -900.0f, -3700.0f }, + .BigBullyStarPos = { 3700.0f, 600.0f, -5500.0f }, + .ChillBullyStarPos = { 130.0f, 1600.0f, -4335.0f }, + .BigPiranhasStarPos = { -6300.0f, -1850.0f, -6300.0f }, #ifdef VERSION_JP - .TuxieMotherStarPos = { 3500.0f, -4300.0f, 4650.0f }, + .TuxieMotherStarPos = { 3500.0f, -4300.0f, 4650.0f }, #else - .TuxieMotherStarPos = { 3167.0f, -4300.0f, 5108.0f }, + .TuxieMotherStarPos = { 3167.0f, -4300.0f, 5108.0f }, #endif - .WigglerStarPos = { 0.0f, 2048.0f, 0.0f }, - .PssSlideStarPos = { -6358.0f, -4300.0f, 4700.0f }, - .RacingPenguinStarPos = { -7339.0f, -5700.0f, -6774.0f }, - .TreasureJrbStarPos = { -1800.0f, -2500.0f, -1700.0f }, - .TreasureChestStarPos = { -1900.0f, -4000.0f, -1400.0f }, - .GhostHuntBooStarPos = { 980.0f, 1100.0f, 250.0f }, - .KleptoStarPos = { -5550.0f, 300.0f, -930.0f }, - .MerryGoRoundStarPos = { -1600.0f, -2100.0f, 205.0f }, - .MrIStarPos = { 1370.0f, 2000.0f, -320.0f }, - .BalconyBooStarPos = { 700.0f, 3200.0f, 1900.0f }, - .BigBullyTrioStarPos = { 0.0f, 950.0f, -6800.0f }, - .MantaRayStarPos = { -3180.0f, -3600.0f, 120.0f }, - .SnowmanHeadStarPos = { -4700.0f, -1024.0f, 1890.0f }, - .CcmSlideStarPos = { 2500.0f, -4350.0f, 5750.0f }, - .UkikiCageStarPos = { 2500.0f, -1200.0f, 1300.0f }, - .UnagiStarPos = { 6833.0f, -3654.0f, 2230.0f }, - .JetstreamRingStarPos = { 3400.0f, -3200.0f, -500.0f }, + .WigglerStarPos = { 0.0f, 2048.0f, 0.0f }, + .PssSlideStarPos = { -6358.0f, -4300.0f, 4700.0f }, + .RacingPenguinStarPos = { -7339.0f, -5700.0f, -6774.0f }, + .TreasureJrbStarPos = { -1800.0f, -2500.0f, -1700.0f }, + .TreasureChestStarPos = { -1900.0f, -4000.0f, -1400.0f }, + .GhostHuntBooStarPos = { 980.0f, 1100.0f, 250.0f }, + .KleptoStarPos = { -5550.0f, 300.0f, -930.0f }, + .MerryGoRoundStarPos = { -1600.0f, -2100.0f, 205.0f }, + .MrIStarPos = { 1370.0f, 2000.0f, -320.0f }, + .BalconyBooStarPos = { 700.0f, 3200.0f, 1900.0f }, + .BigBullyTrioStarPos = { 0.0f, 950.0f, -6800.0f }, + .MantaRayStarPos = { -3180.0f, -3600.0f, 120.0f }, + .SnowmanHeadStarPos = { -4700.0f, -1024.0f, 1890.0f }, + .CcmSlideStarPos = { 2500.0f, -4350.0f, 5750.0f }, + .UkikiCageStarPos = { 2500.0f, -1200.0f, 1300.0f }, + .UnagiStarPos = { 6833.0f, -3654.0f, 2230.0f }, + .JetstreamRingStarPos = { 3400.0f, -3200.0f, -500.0f }, + }, }; diff --git a/src/game/hardcoded.h b/src/game/hardcoded.h index fb0685a8..eab461fc 100644 --- a/src/game/hardcoded.h +++ b/src/game/hardcoded.h @@ -2,10 +2,6 @@ #include "types.h" #include "level_table.h" -struct LevelValues { - enum LevelNum entryLevel; -}; - struct StarPositions { Vec3f KoopaBobStarPos; Vec3f KoopaThiStarPos; @@ -35,7 +31,11 @@ struct StarPositions { Vec3f JetstreamRingStarPos; }; +struct LevelValues { + enum LevelNum entryLevel; + struct StarPositions starPositions; +}; + extern struct LevelValues gLevelValues; -extern struct StarPositions gStarPositions; #endif \ No newline at end of file diff --git a/src/game/interaction.c b/src/game/interaction.c index c8c81b20..f7ea69af 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -2245,7 +2245,7 @@ void pss_end_slide(struct MarioState *m) { // PSS secret star uses oBehParams to spawn s32 tmp = m->marioObj->oBehParams; m->marioObj->oBehParams = (1 << 24); - f32* starPos = gStarPositions.PssSlideStarPos; + f32* starPos = gLevelValues.starPositions.PssSlideStarPos; spawn_default_star(starPos[0], starPos[1], starPos[2]); m->marioObj->oBehParams = tmp; } diff --git a/src/pc/lua/smlua_cobject.c b/src/pc/lua/smlua_cobject.c index 802705b7..0b32be49 100644 --- a/src/pc/lua/smlua_cobject.c +++ b/src/pc/lua/smlua_cobject.c @@ -566,11 +566,6 @@ void smlua_cobject_init_globals(void) { lua_setglobal(L, "gServerSettings"); } - { - smlua_push_object(L, LOT_STARPOSITIONS, &gStarPositions); - lua_setglobal(L, "gStarPositions"); - } - { smlua_push_object(L, LOT_LEVELVALUES, &gLevelValues); lua_setglobal(L, "gLevelValues"); diff --git a/src/pc/lua/smlua_cobject_autogen.c b/src/pc/lua/smlua_cobject_autogen.c index 5e9ca77c..a16f3eae 100644 --- a/src/pc/lua/smlua_cobject_autogen.c +++ b/src/pc/lua/smlua_cobject_autogen.c @@ -530,9 +530,10 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] = { "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE }, }; -#define LUA_LEVEL_VALUES_FIELD_COUNT 1 +#define LUA_LEVEL_VALUES_FIELD_COUNT 2 static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = { - { "entryLevel", LVT_S32, offsetof(struct LevelValues, entryLevel), false, LOT_NONE }, + { "entryLevel", LVT_S32, offsetof(struct LevelValues, entryLevel), false, LOT_NONE }, + { "starPositions", LVT_COBJECT, offsetof(struct LevelValues, starPositions), true, LOT_STARPOSITIONS }, }; #define LUA_LINEAR_TRANSITION_POINT_FIELD_COUNT 5