Fix error in LOAD_MODEL_FROM_GEO_EXT (level gen)
This commit is contained in:
parent
d92c9dcfd4
commit
4a89900a8b
|
@ -1369,6 +1369,7 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) {
|
||||||
|
|
||||||
static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode<LevelScript>* aNode, u64& aTokenIndex, bool* found) {
|
static LevelScript ParseLevelScriptSymbolArgInternal(GfxData* aGfxData, DataNode<LevelScript>* aNode, u64& aTokenIndex, bool* found) {
|
||||||
String _Arg = aNode->mTokens[aTokenIndex++];
|
String _Arg = aNode->mTokens[aTokenIndex++];
|
||||||
|
*found = true;
|
||||||
|
|
||||||
// Integers
|
// Integers
|
||||||
bool integerFound = false;
|
bool integerFound = false;
|
||||||
|
@ -1766,7 +1767,7 @@ static void ParseLevelScriptSymbol(GfxData* aGfxData, DataNode<LevelScript>* aNo
|
||||||
// LOAD_MODEL_FROM_GEO
|
// LOAD_MODEL_FROM_GEO
|
||||||
if (_Symbol == "LOAD_MODEL_FROM_GEO") {
|
if (_Symbol == "LOAD_MODEL_FROM_GEO") {
|
||||||
u64 topTokenIndex = aTokenIndex;
|
u64 topTokenIndex = aTokenIndex;
|
||||||
bool foundGeo = true;
|
bool foundGeo = false;
|
||||||
LevelScript model = ParseLevelScriptSymbolArg(aGfxData, aNode, aTokenIndex);
|
LevelScript model = ParseLevelScriptSymbolArg(aGfxData, aNode, aTokenIndex);
|
||||||
LevelScript geo = ParseLevelScriptSymbolArgInternal(aGfxData, aNode, aTokenIndex, &foundGeo);
|
LevelScript geo = ParseLevelScriptSymbolArgInternal(aGfxData, aNode, aTokenIndex, &foundGeo);
|
||||||
if (foundGeo) {
|
if (foundGeo) {
|
||||||
|
@ -1776,7 +1777,7 @@ static void ParseLevelScriptSymbol(GfxData* aGfxData, DataNode<LevelScript>* aNo
|
||||||
aHead += (sizeof(_Ls) / sizeof(_Ls[0]));
|
aHead += (sizeof(_Ls) / sizeof(_Ls[0]));
|
||||||
} else {
|
} else {
|
||||||
u32 geoIndex = DynOS_Lua_RememberVariable(aGfxData, aHead + 1, aNode->mTokens[topTokenIndex + 1]);
|
u32 geoIndex = DynOS_Lua_RememberVariable(aGfxData, aHead + 1, aNode->mTokens[topTokenIndex + 1]);
|
||||||
LevelScript _Ls[] = { LOAD_MODEL_FROM_GEO_EXT(model, geo) };
|
LevelScript _Ls[] = { LOAD_MODEL_FROM_GEO_EXT(model, geoIndex) };
|
||||||
memcpy(aHead, _Ls, sizeof(_Ls));
|
memcpy(aHead, _Ls, sizeof(_Ls));
|
||||||
aHead += (sizeof(_Ls) / sizeof(_Ls[0]));
|
aHead += (sizeof(_Ls) / sizeof(_Ls[0]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ const LevelScript level_main_scripts_entry[] = {
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_STAR, star_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_STAR, star_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_TRANSPARENT_STAR, transparent_star_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_TRANSPARENT_STAR, transparent_star_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_WOODEN_SIGNPOST, wooden_signpost_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_WOODEN_SIGNPOST, wooden_signpost_geo),
|
||||||
LOAD_MODEL_FROM_DL( MODEL_WHITE_PARTICLE_SMALL, white_particle_small_dl, LAYER_ALPHA),
|
LOAD_MODEL_FROM_DL (MODEL_WHITE_PARTICLE_SMALL, white_particle_small_dl, LAYER_ALPHA),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME, red_flame_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME, red_flame_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BLUE_FLAME, blue_flame_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BLUE_FLAME, blue_flame_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BURN_SMOKE, burn_smoke_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BURN_SMOKE, burn_smoke_geo),
|
||||||
|
@ -88,13 +88,13 @@ const LevelScript level_main_scripts_entry[] = {
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_FISH, fish_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_FISH, fish_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_FISH_SHADOW, fish_shadow_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_FISH_SHADOW, fish_shadow_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_SPARKLES_ANIMATION, sparkles_animation_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_SPARKLES_ANIMATION, sparkles_animation_geo),
|
||||||
LOAD_MODEL_FROM_DL( MODEL_SAND_DUST, sand_seg3_dl_0302BCD0, LAYER_ALPHA),
|
LOAD_MODEL_FROM_DL (MODEL_SAND_DUST, sand_seg3_dl_0302BCD0, LAYER_ALPHA),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BUTTERFLY, butterfly_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BUTTERFLY, butterfly_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BURN_SMOKE_UNUSED, burn_smoke_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BURN_SMOKE_UNUSED, burn_smoke_geo),
|
||||||
LOAD_MODEL_FROM_DL( MODEL_PEBBLE, pebble_seg3_dl_0301CB00, LAYER_ALPHA),
|
LOAD_MODEL_FROM_DL (MODEL_PEBBLE, pebble_seg3_dl_0301CB00, LAYER_ALPHA),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_MIST, mist_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_MIST, mist_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_WHITE_PUFF, white_puff_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_WHITE_PUFF, white_puff_geo),
|
||||||
LOAD_MODEL_FROM_DL( MODEL_WHITE_PARTICLE_DL, white_particle_dl, LAYER_ALPHA),
|
LOAD_MODEL_FROM_DL (MODEL_WHITE_PARTICLE_DL, white_particle_dl, LAYER_ALPHA),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_WHITE_PARTICLE, white_particle_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_WHITE_PARTICLE, white_particle_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_YELLOW_COIN_NO_SHADOW, yellow_coin_no_shadow_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_YELLOW_COIN_NO_SHADOW, yellow_coin_no_shadow_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN, blue_coin_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN, blue_coin_geo),
|
||||||
|
@ -103,7 +103,7 @@ const LevelScript level_main_scripts_entry[] = {
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_METAL_CAP, marios_metal_cap_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_METAL_CAP, marios_metal_cap_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_WING_CAP, marios_wing_cap_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_WING_CAP, marios_wing_cap_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), // repeated
|
//LOAD_MODEL_FROM_GEO(MODEL_MARIOS_CAP, marios_cap_geo), // repeated
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY_CUTSCENE, bowser_key_cutscene_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY_CUTSCENE, bowser_key_cutscene_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY, bowser_key_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_KEY, bowser_key_geo),
|
||||||
LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME_SHADOW, red_flame_shadow_geo),
|
LOAD_MODEL_FROM_GEO(MODEL_RED_FLAME_SHADOW, red_flame_shadow_geo),
|
||||||
|
|
Loading…
Reference in New Issue