diff --git a/configure.py b/configure.py index 09be59faa..87984685d 100755 --- a/configure.py +++ b/configure.py @@ -259,9 +259,17 @@ cflags_framework = [ "-fp_contract off", ] +# TWW game code flags +cflags_dolzel = [ + *cflags_framework, +] + +if config.version == "D44J01": + cflags_dolzel.extend(['-pragma "opt_propagation off"']) + # REL flags cflags_rel = [ - *cflags_framework, + *cflags_dolzel, "-sdata 0", "-sdata2 0", ] @@ -329,7 +337,7 @@ config.libs = [ { "lib": "machine", "mw_version": "GC/1.3.2", - "cflags": cflags_framework, + "cflags": cflags_dolzel, "progress_category": "core", "host": True, "objects": [ @@ -355,7 +363,7 @@ config.libs = [ { "lib": "c", "mw_version": "GC/1.3.2", - "cflags": cflags_framework, + "cflags": cflags_dolzel, "progress_category": "game", "host": True, "objects": [ @@ -366,7 +374,7 @@ config.libs = [ { "lib": "framework", "mw_version": "GC/1.3.2", - "cflags": cflags_framework, + "cflags": cflags_dolzel, "progress_category": "core", "host": True, "objects": [ @@ -433,7 +441,7 @@ config.libs = [ { "lib": "dolzel", "mw_version": "GC/1.3.2", - "cflags": cflags_framework, + "cflags": cflags_dolzel, "progress_category": "game", "host": True, "objects": [ @@ -602,11 +610,11 @@ config.libs = [ { "lib": "DynamicLink", "mw_version": "GC/1.3.2", - "cflags": cflags_framework, + "cflags": cflags_dolzel, "progress_category": "core", "host": True, "objects": [ - Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "DynamicLink.cpp"), + Object(Matching, "DynamicLink.cpp"), ], }, { diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h index aa9bc1884..687b2e87e 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/include/JSystem/JUtility/JUTAssert.h @@ -6,7 +6,7 @@ #define JUT_SHOW_ASSERT(LINE, COND) JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND) -#define JUT_ASSERT(LINE, COND) (void)((COND) || (JUT_SHOW_ASSERT(LINE, COND), OSPanic(__FILE__, LINE, "Halt"), 0)); +#define JUT_ASSERT(LINE, COND) (COND) ? (void)0 : (JUT_SHOW_ASSERT(LINE, COND), OSPanic(__FILE__, LINE, "Halt")); // Favored by JAI (JAudio) #define JUT_ASSERT_MSG(LINE, COND, MSG) \ diff --git a/src/DynamicLink.cpp b/src/DynamicLink.cpp index e16f788b6..304c787f3 100644 --- a/src/DynamicLink.cpp +++ b/src/DynamicLink.cpp @@ -193,7 +193,7 @@ JKRArchive* DynamicModuleControl::mountCallback(void* param_0) { } void DynamicModuleControl::mountCreate() { - mDoDvdThd_callback_c::create((mDoDvdThd_callback_func)DynamicModuleControl::callback, NULL); + mDoDvdThd_callback_c::create((mDoDvdThd_callback_func)DynamicModuleControl::mountCallback, NULL); } bool DynamicModuleControl::initialize() { @@ -221,7 +221,6 @@ static u32 calcSum2(u16 const* data, u32 size) { #if VERSION == VERSION_DEMO bool DynamicModuleControl::do_load() { - /* Nonmatching - sArchive load order */ if (mModule != NULL) { return true; } diff --git a/src/c/c_dylink.cpp b/src/c/c_dylink.cpp index 1ddade5f7..6e0019bf4 100644 --- a/src/c/c_dylink.cpp +++ b/src/c/c_dylink.cpp @@ -566,9 +566,6 @@ cPhs_State cDyl_LinkASync(s16 i_ProfName) { OSReport_Error("初期化が終わってないのに呼んでもらっても困ります %d\n", i_ProfName); return cPhs_INIT_e; } -#endif - -#if VERSION == VERSION_DEMO JUT_ASSERT(203, cDyl_Initialized); #else JUT_ASSERT(257, DMC_initialized); @@ -610,11 +607,7 @@ BOOL cDyl_InitCallback(void*) { JKRFileCache* loader = JKRMountDvdDrive("/", mDoExt_getArchiveHeap(), NULL); DynamicModuleControl::initialize(); -#if VERSION == VERSION_DEMO - void* strTbl = (void*)JKRGetResource("/dvd/framework.str"); -#else void* strTbl = JKRGetResource("/dvd/framework.str"); -#endif JKRDetachResource(strTbl, loader); JKRUnmountDvdDrive(loader); OSSetStringTable(strTbl);