Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@
# dolphin library flags
cflags_dolphin = [
*cflags_base,
"-lang=c",
"-lang=c",
"-fp fmadd",
"-fp_contract off",
"-char signed",
"-str reuse",
"-str reuse",
"-common off",
"-O4,p",
#"-requireprotos"
Expand All @@ -240,11 +240,11 @@
# Renderware library flags
cflags_renderware = [
*cflags_base,
"-lang=c",
"-lang=c",
"-fp fmadd",
"-fp_contract off",
"-char signed",
"-str reuse",
"-str reuse",
"-common off",
"-O4,p",
#"-requireprotos"
Expand All @@ -265,7 +265,7 @@
"-str reuse,pool,readonly",
"-use_lmw_stmw on",
'-pragma "cpp_extensions on"',
"-inline off",
"-inline auto",
"-gccinc",
"-i include/bink",
"-i include/inline",
Expand Down Expand Up @@ -368,15 +368,15 @@ def MatchingFor(*versions):
Object(NonMatching, "SB/Core/x/xModelBlur.cpp"),
Object(NonMatching, "SB/Core/x/xCamera.cpp"),
Object(NonMatching, "SB/Game/zWadNME.cpp"),
Object(NonMatching, "SB/Game/zWad1.cpp"),
Object(NonMatching, "SB/Game/zWad1.cpp"),
Object(NonMatching, "SB/Game/zWad2.cpp"),
Object(NonMatching, "SB/Game/zWad3.cpp"),
Object(NonMatching, "SB/Game/zWadEnt.cpp"),
Object(NonMatching, "SB/Game/zWadHud.cpp"),
Object(NonMatching, "SB/Game/zWadUI.cpp"),
Object(NonMatching, "SB/Game/zMain.cpp"),
Object(NonMatching, "SB/Game/zTalkBox.cpp"),
Object(NonMatching, "SB/Game/zTaskBox.cpp"),
Object(NonMatching, "SB/Game/zTalkBox.cpp", extra_cflags=["-inline off"]),
Object(NonMatching, "SB/Game/zTaskBox.cpp", extra_cflags=["-inline off"]),
Object(NonMatching, "SB/Game/zSmoke.cpp"),
Object(NonMatching, "SB/Game/zSplash.cpp"),
Object(NonMatching, "SB/Game/zExplosion.cpp"),
Expand All @@ -398,7 +398,7 @@ def MatchingFor(*versions):
Object(Matching, "SB/Core/gc/iException.cpp"),
Object(NonMatching, "SB/Core/gc/iScrFX.cpp"),
Object(NonMatching, "SB/Core/gc/iARAMTmp.cpp"),

],
},
{
Expand Down Expand Up @@ -452,7 +452,7 @@ def MatchingFor(*versions):
[
Object(Matching, "dolphin/src/ar/ar.c"),
Object(Matching, "dolphin/src/ar/arq.c")
]
]
),
DolphinLib(
"ax",
Expand Down Expand Up @@ -484,7 +484,7 @@ def MatchingFor(*versions):
"base",
[
Object(Matching, "dolphin/src/base/PPCArch.c")
]
]
),
DolphinLib(
"card",
Expand Down Expand Up @@ -519,7 +519,7 @@ def MatchingFor(*versions):
Object(NonMatching, "dolphin/src/dsp/dsp.c"),
Object(Matching, "dolphin/src/dsp/dsp_debug.c"),
Object(NonMatching, "dolphin/src/dsp/dsp_task.c")
]
]
),
DolphinLib(
"dvd",
Expand Down Expand Up @@ -562,7 +562,7 @@ def MatchingFor(*versions):
]
),
DolphinLib(
"mix",
"mix",
[
Object(NonMatching, "dolphin/src/mix/mix.c")
]
Expand Down Expand Up @@ -683,14 +683,14 @@ def MatchingFor(*versions):
Object(NonMatching, "MSL_C/MSL_Common/strtold.c"),
Object(NonMatching, "MSL_C/MSL_Common/strtoul.c"),
Object(Matching, "MSL_C/MSL_Common/float.c"),
Object(NonMatching, "MSL_C/MSL_Common/char_io.c"),
Object(NonMatching, "MSL_C/MSL_Common/wchar_io.c"),
Object(NonMatching, "MSL_C/MSL_Common/char_io.c"),
Object(NonMatching, "MSL_C/MSL_Common/wchar_io.c"),
Object(NonMatching, "MSL_C/MSL_Common_Embedded/uart_console_io_gcn.c")
]
),
mslLib(
"fdlibm.PPCEABI.H",
[],
[],
[
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c"),
Object(Matching, "MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c"),
Expand Down Expand Up @@ -747,7 +747,7 @@ def MatchingFor(*versions):
Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c"),
#Object(NonMatching, "debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s"),
Object(Matching, "debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c"),
Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"),
Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c"),
Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/usr_put.c"),
Object(NonMatching, "debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c"),
Object(Matching, "debugger/embedded/MetroTRK/Os/dolphin/targcont.c"),
Expand Down
8 changes: 8 additions & 0 deletions src/SB/Core/gc/iWad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ static S32 iSG_mc_fclose(st_ISG_MEMCARD_DATA* mcdata)
return iSG_mc_fclose(mcdata, NULL);
}

// Inlining issue
static S32 iSG_mc_fopen(st_ISG_MEMCARD_DATA* mcdata, const char* fname, S32 fsize,
en_ISG_IOMODE mode, en_ASYNC_OPERR* operr)
{
Expand Down Expand Up @@ -857,6 +858,7 @@ static S32 iSG_bnr_unpack(st_ISG_TPL_TEXPALETTE* tpl)
return iSG_tpl_unpack(tpl);
}

// Inlining issue
static S32 iSG_load_icondata()
{
g_rawicon = (st_ISG_TPL_TEXPALETTE*)iFileLoad("/SBGCIcon.tpl", NULL, &g_iconsize);
Expand Down Expand Up @@ -1516,6 +1518,7 @@ char* iSGFileModDate(st_ISGSESSION* isgdata, const char* fname, S32* sec, S32* m
return datestr;
}

// Inlining issue
char* iSGFileModDate(st_ISGSESSION* isgdata, const char* fname)
{
return iSGFileModDate(isgdata, fname, NULL, NULL, NULL, NULL, NULL, NULL);
Expand Down Expand Up @@ -1559,6 +1562,7 @@ S32 iSGFileSize(st_ISGSESSION* isgdata, const char* fname)
return ret;
}

// Inlining issue
S32 iSGTgtHaveRoomStartup(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const char* dpath,
const char* fname, S32* bytesNeeded, S32* availOnDisk, S32* needFile)
{
Expand Down Expand Up @@ -1633,6 +1637,7 @@ S32 iSGTgtHaveRoomStartup(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const cha
return (count >= 3) ? 0 : is_space;
}

// Inlining issue
S32 iSGTgtHaveRoom(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const char* dpath,
const char* fname, S32* bytesNeeded, S32* availOnDisk, S32* needFile)
{
Expand Down Expand Up @@ -1992,6 +1997,7 @@ S32 iSGShutdown()
return 1;
}

// Inlining issue
S32 iSGStartup() // TO-DO - 92%
{
if (g_isginit++ != 0)
Expand Down Expand Up @@ -2146,6 +2152,7 @@ extern U32 HeapSize;
extern U32 mem_top_alloc;
extern U32 mem_base_alloc;

// Inlining issue
void iMemExit()
{
free((void*)gMemInfo.DRAM.addr);
Expand Down Expand Up @@ -3335,6 +3342,7 @@ void iEnvEndRenderFX(iEnv*)
}
}

// Inlining issue
void iEnvRender(iEnv* env, bool)
{
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
Expand Down
1 change: 1 addition & 0 deletions src/SB/Core/x/xCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ static void _xCameraUpdate(xCamera* cam, F32 dt)
// lol nope
}

// Inlining issue
void xCameraUpdate(xCamera* cam, F32 dt)
{
S32 i;
Expand Down
6 changes: 4 additions & 2 deletions src/SB/Core/x/xEnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,14 @@ void xEntSceneExit();
void xEntSceneInit();
void xEntSetTimePassed(F32 sec);

inline void xEntHide(xEnt* ent)
// Needs to be [gw] but not inline?
void xEntHide(xEnt* ent)
{
ent->flags &= ~0x1;
}

inline void xEntShow(xEnt* ent)
// Needs to be [gw] but not inline?
void xEntShow(xEnt* ent)
{
ent->flags |= 0x1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/SB/Core/x/xGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void xGridCheckPosition(xGrid* grid, xVec3* pos, xQCData* qcd, GridEntCallback h
S32 xGridEntIsTooBig(xGrid* grid, const xEnt* ent);
S32 xGridAdd(xGrid* grid, xEnt* ent);

inline xGridBound* xGridIterFirstCell(xGridBound** head, xGridIterator& it)
xGridBound* xGridIterFirstCell(xGridBound** head, xGridIterator& it)
{
xGridBound* cell = *head;

Expand All @@ -94,7 +94,7 @@ inline xGridBound* xGridIterFirstCell(xGridBound** head, xGridIterator& it)
return cell;
}

inline xGridBound* xGridIterFirstCell(xGrid* grid, S32 grx, S32 grz, xGridIterator& iter)
xGridBound* xGridIterFirstCell(xGrid* grid, S32 grx, S32 grz, xGridIterator& iter)
{
if (grx < 0 || grx >= grid->nx)
{
Expand Down
5 changes: 4 additions & 1 deletion src/SB/Core/x/xWad1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,7 @@ static en_BIO_ASYNC_ERRCODES AsyncReadStatus(st_FILELOADINFO* fli)
return BFD_AsyncReadStatus(fli);
}

// Inlining issue
static S32 AsyncIRead(st_FILELOADINFO* fli, S32 offset, char* data, S32 size, S32 n)
{
return BFD_AsyncRead(fli, offset, data, size, n, LITTLE_ENDIAN);
Expand Down Expand Up @@ -1490,6 +1491,7 @@ static S32 BFD_getLength(tag_xFile* bffp, void* xtradata)
return iFileGetSize(bffp);
}

// Inlining issue
st_FILELOADINFO* xBinioLoadCreate(const char* filename, S32)
{
st_FILELOADINFO* fli = NULL;
Expand Down Expand Up @@ -1844,6 +1846,7 @@ void xAnimPlaySetup(xAnimPlay* play, void* object, xAnimTable* table, xModelInst
xAnimPlaySetState(play->Single, table->StateList, 0.0f);
}

// Inlining issue
xAnimPlay* xAnimPoolAlloc(xMemPool* pool, void* object, xAnimTable* table,
xModelInstance* modelInst)
{
Expand Down Expand Up @@ -1919,7 +1922,7 @@ void xAnimPoolCB(xMemPool* pool, void* data)
clone->Pool = pool;
}

#define ADD_4_BITS(x) (((x)&1) + (((x) >> 1) & 1) + (((x) >> 2) & 1) + (((x) >> 3) & 1))
#define ADD_4_BITS(x) (((x) & 1) + (((x) >> 1) & 1) + (((x) >> 2) & 1) + (((x) >> 3) & 1))
void xAnimPoolInit(xMemPool* pool, U32 count, U32 singles, U32 blendFlags, U32 effectMax)
{
effectMax += effectMax & 1;
Expand Down
3 changes: 3 additions & 0 deletions src/SB/Core/x/xWad2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,7 @@ static void DrawRing(xFXRing* m)
// todo: uses int-to-float conversion
}

// Inlining issue
void xFXRingRender()
{
S32 i;
Expand Down Expand Up @@ -4711,6 +4712,7 @@ namespace
ent.pflags = 0x4;
}

// Inlining issue
void drop_stacked_entity(xEnt& ent)
{
ent.pflags = 0x4;
Expand Down Expand Up @@ -4745,6 +4747,7 @@ namespace
}
} // namespace

// Inlining issue
void xEntUpdate(xEnt* ent, xScene* sc, F32 dt)
{
xEntBeginUpdate(ent, sc, dt);
Expand Down
14 changes: 10 additions & 4 deletions src/SB/Core/x/xWad4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,15 @@ S32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, c
return cnt;
}

// Inlining issue
S32 xSG_cb_leader_load(void*, st_XSAVEGAME_DATA* original_xsgdata, st_XSAVEGAME_READCONTEXT* rctxt,
U32, S32)
{
char fundata[32] = {};
st_XSAVEGAME_LEADER discard = {};
xSGReadData(original_xsgdata, rctxt, discard.gameLabel, sizeof(st_XSAVEGAME_LEADER));
xSGReadData(original_xsgdata, rctxt, fundata, 0x16);
// TODO: Fix last two args in function signature
xSGReadData(original_xsgdata, rctxt, discard.gameLabel, 1, sizeof(st_XSAVEGAME_LEADER));
xSGReadData(original_xsgdata, rctxt, fundata, 1, 0x16);
return 1;
}

Expand All @@ -631,8 +633,9 @@ S32 xSG_cb_leader_svproc(void* cltdata, st_XSAVEGAME_DATA* original_xsgdata,
leader.progress = xsg->progress;
leader.thumbIconIdx = xsg->thumbIconIdx;

xSGWriteData(original_xsgdata, wctxt, leader.gameLabel, sizeof(st_XSAVEGAME_LEADER));
xSGWriteData(original_xsgdata, wctxt, fundata, 0x16);
// TODO: Fix last two args in function signature
xSGWriteData(original_xsgdata, wctxt, leader.gameLabel, 1, sizeof(st_XSAVEGAME_LEADER));
xSGWriteData(original_xsgdata, wctxt, fundata, 1, 0x16);
return 1;
}

Expand Down Expand Up @@ -885,6 +888,7 @@ S32 xSGSetup(st_XSAVEGAME_DATA* xsgdata, S32 gidx, char* label, S32 progress, iT
return result;
}

// Inlining issue
S32 xSGSetup(st_XSAVEGAME_DATA* xsgdata)
{
return xSGSetup(xsgdata, 0, "nothing", -1, 0, 0);
Expand Down Expand Up @@ -1272,6 +1276,7 @@ S32 xSGDone(st_XSAVEGAME_DATA* xsgdata)
return result;
}

// Inlining issue
st_XSAVEGAME_DATA* xSGInit(en_SAVEGAME_MODE mode)
{
st_XSAVEGAME_DATA* xsgdata = &g_xsgdata;
Expand Down Expand Up @@ -2476,6 +2481,7 @@ void PKR_ReadDone(st_PACKER_READ_DATA* pr)
g_loadlock &= ~(1 << lockid);
}

// Inlining issue
st_PACKER_READ_DATA* PKR_ReadInit(void* userdata, const char* pkgfile, U32 opts, S32* cltver,
PKRAssetType* typelist, int)
{
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void zEnvInit(_zEnv* env, xEnvAsset* easset)
}
}

// Inlining issue
void zEnvInit(void* env, void* easset)
{
zEnvInit((_zEnv*)env, (xEnvAsset*)easset);
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zNMETypeBossDennis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void zNMEDennis::MeterRender()
{
}

// Inlining issue
void zNMEDennis::RenderHud()
{
zNMEDennis::MeterRender();
Expand Down
3 changes: 2 additions & 1 deletion src/SB/Game/zSaveLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ S32 xSGT_SaveInfoCB(void* vp, st_XSAVEGAME_DATA* xsgdata, S32* need, S32* most)
return 1;
}


void zSaveLoad_DispatchCB(U32 dispatchEvent, const F32* toParam)
{
switch (dispatchEvent)
Expand Down Expand Up @@ -1237,6 +1236,7 @@ S32 zSaveLoad_CardCheckSlotEmpty(S32 cardNumber, S32 gameNumber)
return 1;
}

// Inlining issue
S32 zSaveLoad_CardCheckGameSlot(S32 cardNumber, S32 gameNumber, S32 mode)
{
if (mode == 1)
Expand Down Expand Up @@ -1293,6 +1293,7 @@ S32 zSaveLoad_CardCheckSpace(S32 cardNumber, S32 mode)
return 1;
}

// Inlining issue
S32 zSaveLoad_CardCheckValid(S32 cardNumber, S32 mode)
{
if (mode == 1)
Expand Down
Loading