diff --git a/data/dynos.c.h b/data/dynos.c.h index 920a85a6f..0732a02e9 100644 --- a/data/dynos.c.h +++ b/data/dynos.c.h @@ -40,4 +40,3 @@ LevelScript* dynos_level_get(const char* levelName); #endif #endif - \ No newline at end of file diff --git a/data/dynos_bin_geo.cpp b/data/dynos_bin_geo.cpp index 229012c91..5442b58ef 100644 --- a/data/dynos_bin_geo.cpp +++ b/data/dynos_bin_geo.cpp @@ -4,6 +4,7 @@ extern "C" { #include "geo_commands.h" #include "src/game/camera.h" #include "src/game/envfx_snow.h" +#include "src/game/paintings.h" } #pragma GCC diagnostic push @@ -113,6 +114,13 @@ static s64 ParseGeoSymbolArg(GfxData* aGfxData, DataNode* aNode, u64& return (s64) x; } + // Complex + s32 a; + s32 b; + if (sscanf(_Arg.begin(), "PAINTING_ID(%d,%d)", &a, &b) == 2) { + return PAINTING_ID(a, b); + } + // Unknown PrintError(" ERROR: Unknown geo arg: %s", _Arg.begin()); return 0; diff --git a/data/dynos_bin_gfx.cpp b/data/dynos_bin_gfx.cpp index c5da0bc1e..c2423f58c 100644 --- a/data/dynos_bin_gfx.cpp +++ b/data/dynos_bin_gfx.cpp @@ -661,6 +661,7 @@ static void ParseGfxSymbol(GfxData* aGfxData, DataNode* aNode, Gfx*& aHead, gfx_symbol_2(gsSPCopyLightEXT, false); gfx_symbol_2(gsSPFogFactor, false); + gfx_symbol_1(gsDPSetTextureLOD, false); // Special symbols if (_Symbol == "gsSPTexture") { diff --git a/data/dynos_bin_lvl.cpp b/data/dynos_bin_lvl.cpp index 1ce42330a..72448f1a6 100644 --- a/data/dynos_bin_lvl.cpp +++ b/data/dynos_bin_lvl.cpp @@ -9,6 +9,7 @@ extern "C" { #include "src/game/level_update.h" #include "include/dialog_ids.h" #include "levels/scripts.h" +#include "src/game/area.h" } // Free data pointers, but keep nodes and tokens intact @@ -658,6 +659,8 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) { lvl_constant(TERRAIN_MASK); // Seq ids constants + lvl_constant(SEQ_BASE_ID); + lvl_constant(SEQ_VARIATION); lvl_constant(SEQ_SOUND_PLAYER); lvl_constant(SEQ_EVENT_CUTSCENE_COLLECT_STAR); lvl_constant(SEQ_MENU_TITLE_SCREEN); @@ -1376,6 +1379,18 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) { lvl_constant(REGULAR_FACE); lvl_constant(DIZZY_FACE); + // warp transitions + lvl_constant(WARP_TRANSITION_FADE_FROM_COLOR); + lvl_constant(WARP_TRANSITION_FADE_INTO_COLOR); + lvl_constant(WARP_TRANSITION_FADE_FROM_STAR); + lvl_constant(WARP_TRANSITION_FADE_INTO_STAR); + lvl_constant(WARP_TRANSITION_FADE_FROM_CIRCLE); + lvl_constant(WARP_TRANSITION_FADE_INTO_CIRCLE); + lvl_constant(WARP_TRANSITION_FADE_FROM_MARIO); + lvl_constant(WARP_TRANSITION_FADE_INTO_MARIO); + lvl_constant(WARP_TRANSITION_FADE_FROM_BOWSER); + lvl_constant(WARP_TRANSITION_FADE_INTO_BOWSER); + // vanilla geos s32 actorCount = DynOS_Geo_GetActorCount(); for (s32 i = 0; i < actorCount; i++) { @@ -1406,6 +1421,7 @@ static LevelScript ParseLevelScriptSymbolArg(GfxData* aGfxData, DataNodemLevelScripts) { @@ -1983,7 +1999,6 @@ static void DynOS_Lvl_GeneratePack_Recursive(const SysPath &directory, GfxData * void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) { Print("---------- Level pack folder: \"%s\" ----------", aPackFolder.c_str()); Array> _ActorsFolders; - GfxData *_GfxData = New(); DIR *aPackDir = opendir(aPackFolder.c_str()); if (aPackDir) { @@ -2001,14 +2016,16 @@ void DynOS_Lvl_GeneratePack(const SysPath &aPackFolder) { // Only parse folders with a 'script.c' if (!fs_sys_file_exists(fstring("%s/script.c", _Folder.c_str()).c_str())) continue; + GfxData *_GfxData = New(); _GfxData->mModelIdentifier = 0; + DynOS_Lvl_GeneratePack_Recursive(_Folder, _GfxData); + + // Generate a binary file for each level found in the GfxData + DynOS_Lvl_GeneratePack_Internal(aPackFolder, _ActorsFolders, _GfxData); + DynOS_Gfx_Free(_GfxData); + } closedir(aPackDir); } - - // Generate a binary file for each actor found in the GfxData - DynOS_Lvl_GeneratePack_Internal(aPackFolder, _ActorsFolders, _GfxData); - - DynOS_Gfx_Free(_GfxData); } diff --git a/data/dynos_level.cpp b/data/dynos_level.cpp index e3fd7d06e..6537d010f 100644 --- a/data/dynos_level.cpp +++ b/data/dynos_level.cpp @@ -226,7 +226,7 @@ s32 DynOS_Level_GetCourse(s32 aLevel) { const void *DynOS_Level_GetScript(s32 aLevel) { DynOS_Level_Init(); - return DynOS_Lvl_Get("level_jrb_entry"); // DO NOT COMMIT + return DynOS_Lvl_Get("level_castle_inside_entry"); // DO NOT COMMIT return sDynosLevelScripts[aLevel]; } diff --git a/data/dynos_misc.cpp b/data/dynos_misc.cpp index 9518839cc..d3dde864e 100644 --- a/data/dynos_misc.cpp +++ b/data/dynos_misc.cpp @@ -630,6 +630,11 @@ void DynOS_Lvl_Add(const SysPath &aPackFolder, const char *aLevelName) { } LevelScript* DynOS_Lvl_Get(const char* levelName) { + static u32 index = 0; // DO NOT COMMIT + index = (index + 1) % sDynosCustomLevelScripts.Count(); // DO NOT COMMIT + auto& scripts = sDynosCustomLevelScripts[index].second->mLevelScripts; // DO NOT COMMIT + return scripts[scripts.Count() - 1]->mData; // DO NOT COMMIT + for (s32 i = 0; i < sDynosCustomLevelScripts.Count(); ++i) { if (!strcmp(sDynosCustomLevelScripts[i].first, levelName)) { auto& scripts = sDynosCustomLevelScripts[i].second->mLevelScripts; diff --git a/src/pc/mods/mods.h b/src/pc/mods/mods.h index 0247d4253..b1b05b2c1 100644 --- a/src/pc/mods/mods.h +++ b/src/pc/mods/mods.h @@ -6,7 +6,7 @@ #include "src/pc/platform.h" #include "mod.h" -#define MAX_MOD_SIZE (2 * 1048576) // 2MB +#define MAX_MOD_SIZE (5 * 1048576) // 5MB #define TMP_DIRECTORY "tmp" struct Mods {