Skip to content

Commit 343b8c6

Browse files
committed
Remove pragmas and general cleanup
Wrote comments in their place, until there's a better way to match them
1 parent a5282b3 commit 343b8c6

File tree

14 files changed

+37
-56
lines changed

14 files changed

+37
-56
lines changed

configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ def MatchingFor(*versions):
375375
Object(NonMatching, "SB/Game/zWadHud.cpp"),
376376
Object(NonMatching, "SB/Game/zWadUI.cpp"),
377377
Object(NonMatching, "SB/Game/zMain.cpp"),
378-
Object(NonMatching, "SB/Game/zTalkBox.cpp"),
379-
Object(NonMatching, "SB/Game/zTaskBox.cpp"),
378+
Object(NonMatching, "SB/Game/zTalkBox.cpp", extra_cflags=["-inline off"]),
379+
Object(NonMatching, "SB/Game/zTaskBox.cpp", extra_cflags=["-inline off"]),
380380
Object(NonMatching, "SB/Game/zSmoke.cpp"),
381381
Object(NonMatching, "SB/Game/zSplash.cpp"),
382382
Object(NonMatching, "SB/Game/zExplosion.cpp"),

src/SB/Core/gc/iWad.cpp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ static S32 iSG_mc_fclose(st_ISG_MEMCARD_DATA* mcdata)
423423
return iSG_mc_fclose(mcdata, NULL);
424424
}
425425

426+
// Inlining issue
426427
static S32 iSG_mc_fopen(st_ISG_MEMCARD_DATA* mcdata, const char* fname, S32 fsize,
427428
en_ISG_IOMODE mode, en_ASYNC_OPERR* operr)
428429
{
@@ -857,7 +858,7 @@ static S32 iSG_bnr_unpack(st_ISG_TPL_TEXPALETTE* tpl)
857858
return iSG_tpl_unpack(tpl);
858859
}
859860

860-
#pragma inline_depth(0)
861+
// Inlining issue
861862
static S32 iSG_load_icondata()
862863
{
863864
g_rawicon = (st_ISG_TPL_TEXPALETTE*)iFileLoad("/SBGCIcon.tpl", NULL, &g_iconsize);
@@ -867,7 +868,6 @@ static S32 iSG_load_icondata()
867868

868869
return g_rawicon && (S32)g_iconsize && g_rawbanr && (S32)g_banrsize ? 1 : 0;
869870
}
870-
#pragma inline_depth(5)
871871

872872
static S32 iSG_get_finfo(st_ISG_MEMCARD_DATA* mcdata, const char* dpath)
873873
{
@@ -1518,12 +1518,11 @@ char* iSGFileModDate(st_ISGSESSION* isgdata, const char* fname, S32* sec, S32* m
15181518
return datestr;
15191519
}
15201520

1521-
#pragma inline_depth(0)
1521+
// Inlining issue
15221522
char* iSGFileModDate(st_ISGSESSION* isgdata, const char* fname)
15231523
{
15241524
return iSGFileModDate(isgdata, fname, NULL, NULL, NULL, NULL, NULL, NULL);
15251525
}
1526-
#pragma inline_depth(5)
15271526

15281527
static S32 iSG_get_fsize(st_ISG_MEMCARD_DATA* mcdata, const char* param2)
15291528
{
@@ -1563,7 +1562,7 @@ S32 iSGFileSize(st_ISGSESSION* isgdata, const char* fname)
15631562
return ret;
15641563
}
15651564

1566-
#pragma inline_depth(0)
1565+
// Inlining issue
15671566
S32 iSGTgtHaveRoomStartup(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const char* dpath,
15681567
const char* fname, S32* bytesNeeded, S32* availOnDisk, S32* needFile)
15691568
{
@@ -1637,9 +1636,8 @@ S32 iSGTgtHaveRoomStartup(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const cha
16371636
}
16381637
return (count >= 3) ? 0 : is_space;
16391638
}
1640-
#pragma inline_depth(5)
16411639

1642-
#pragma inline_depth(0)
1640+
// Inlining issue
16431641
S32 iSGTgtHaveRoom(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const char* dpath,
16441642
const char* fname, S32* bytesNeeded, S32* availOnDisk, S32* needFile)
16451643
{
@@ -1708,7 +1706,6 @@ S32 iSGTgtHaveRoom(st_ISGSESSION* isgdata, S32 tidx, S32 fsize, const char* dpat
17081706

17091707
return (*bytesNeeded > *availOnDisk) ? 0 : is_space;
17101708
}
1711-
#pragma inline_depth(5)
17121709

17131710
static S32 iSG_mc_exists(S32 slot)
17141711
{
@@ -2000,7 +1997,7 @@ S32 iSGShutdown()
20001997
return 1;
20011998
}
20021999

2003-
#pragma inline_depth(0)
2000+
// Inlining issue
20042001
S32 iSGStartup() // TO-DO - 92%
20052002
{
20062003
if (g_isginit++ != 0)
@@ -2014,7 +2011,6 @@ S32 iSGStartup() // TO-DO - 92%
20142011
return g_isginit;
20152012
}
20162013
}
2017-
#pragma inline_depth(5)
20182014

20192015
// iPar
20202016

@@ -2156,13 +2152,12 @@ extern U32 HeapSize;
21562152
extern U32 mem_top_alloc;
21572153
extern U32 mem_base_alloc;
21582154

2159-
#pragma inline_depth(0)
2155+
// Inlining issue
21602156
void iMemExit()
21612157
{
21622158
free((void*)gMemInfo.DRAM.addr);
21632159
gMemInfo.DRAM.addr = 0;
21642160
}
2165-
#pragma inline_depth(5)
21662161

21672162
// I dont have a name for these yet
21682163

@@ -3347,7 +3342,7 @@ void iEnvEndRenderFX(iEnv*)
33473342
}
33483343
}
33493344

3350-
#pragma inline_depth(0)
3345+
// Inlining issue
33513346
void iEnvRender(iEnv* env, bool)
33523347
{
33533348
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
@@ -3364,7 +3359,6 @@ void iEnvRender(iEnv* env, bool)
33643359

33653360
lastEnv = env;
33663361
}
3367-
#pragma inline_depth(5)
33683362

33693363
void iEnvSetup(iEnv* env)
33703364
{

src/SB/Core/x/xCamera.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static void _xCameraUpdate(xCamera* cam, F32 dt)
385385
// lol nope
386386
}
387387

388-
#pragma inline_depth(0)
388+
// Inlining issue
389389
void xCameraUpdate(xCamera* cam, F32 dt)
390390
{
391391
S32 i;
@@ -403,7 +403,6 @@ void xCameraUpdate(xCamera* cam, F32 dt)
403403
_xCameraUpdate(cam, sdt);
404404
}
405405
}
406-
#pragma inline_depth(5)
407406

408407
void SweptSphereHitsCameraEnt(xScene*, xRay3* ray, xQCData* qcd, xEnt* ent, void* data)
409408
{

src/SB/Core/x/xEnt.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ void xEntSceneExit();
232232
void xEntSceneInit();
233233
void xEntSetTimePassed(F32 sec);
234234

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

240-
inline void xEntShow(xEnt* ent)
241+
// Needs to be [gw] but not inline?
242+
void xEntShow(xEnt* ent)
241243
{
242244
ent->flags |= 0x1;
243245
}

src/SB/Core/x/xGrid.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void xGridCheckPosition(xGrid* grid, xVec3* pos, xQCData* qcd, GridEntCallback h
7676
S32 xGridEntIsTooBig(xGrid* grid, const xEnt* ent);
7777
S32 xGridAdd(xGrid* grid, xEnt* ent);
7878

79-
inline xGridBound* xGridIterFirstCell(xGridBound** head, xGridIterator& it)
79+
xGridBound* xGridIterFirstCell(xGridBound** head, xGridIterator& it)
8080
{
8181
xGridBound* cell = *head;
8282

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

97-
inline xGridBound* xGridIterFirstCell(xGrid* grid, S32 grx, S32 grz, xGridIterator& iter)
97+
xGridBound* xGridIterFirstCell(xGrid* grid, S32 grx, S32 grz, xGridIterator& iter)
9898
{
9999
if (grx < 0 || grx >= grid->nx)
100100
{

src/SB/Core/x/xWad1.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ static en_BIO_ASYNC_ERRCODES AsyncReadStatus(st_FILELOADINFO* fli)
11501150
return BFD_AsyncReadStatus(fli);
11511151
}
11521152

1153-
#pragma inline_depth(0)
1153+
// Inlining issue
11541154
static S32 AsyncIRead(st_FILELOADINFO* fli, S32 offset, char* data, S32 size, S32 n)
11551155
{
11561156
return BFD_AsyncRead(fli, offset, data, size, n, LITTLE_ENDIAN);
@@ -1160,7 +1160,6 @@ static S32 AsyncMRead(st_FILELOADINFO* fli, S32 offset, char* data, S32 size, S3
11601160
{
11611161
return BFD_AsyncRead(fli, offset, data, size, n, BIG_ENDIAN);
11621162
}
1163-
#pragma inline_depth(5)
11641163

11651164
static S32 ReadRaw(st_FILELOADINFO* fli, void* data, S32 size, S32 count)
11661165
{
@@ -1492,7 +1491,7 @@ static S32 BFD_getLength(tag_xFile* bffp, void* xtradata)
14921491
return iFileGetSize(bffp);
14931492
}
14941493

1495-
#pragma inline_depth(0)
1494+
// Inlining issue
14961495
st_FILELOADINFO* xBinioLoadCreate(const char* filename, S32)
14971496
{
14981497
st_FILELOADINFO* fli = NULL;
@@ -1561,7 +1560,6 @@ st_FILELOADINFO* xBinioLoadCreate(const char* filename, S32)
15611560

15621561
return fli;
15631562
}
1564-
#pragma inline_depth(5)
15651563

15661564
// xGoal
15671565

@@ -1848,7 +1846,7 @@ void xAnimPlaySetup(xAnimPlay* play, void* object, xAnimTable* table, xModelInst
18481846
xAnimPlaySetState(play->Single, table->StateList, 0.0f);
18491847
}
18501848

1851-
#pragma inline_depth(0)
1849+
// Inlining issue
18521850
xAnimPlay* xAnimPoolAlloc(xMemPool* pool, void* object, xAnimTable* table,
18531851
xModelInstance* modelInst)
18541852
{
@@ -1860,7 +1858,6 @@ xAnimPlay* xAnimPoolAlloc(xMemPool* pool, void* object, xAnimTable* table,
18601858

18611859
return play;
18621860
}
1863-
#pragma inline_depth(5)
18641861

18651862
void xAnimPoolCB(xMemPool* pool, void* data)
18661863
{

src/SB/Core/x/xWad2.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,7 @@ static void DrawRing(xFXRing* m)
13111311
// todo: uses int-to-float conversion
13121312
}
13131313

1314+
// Inlining issue
13141315
void xFXRingRender()
13151316
{
13161317
S32 i;
@@ -4711,14 +4712,13 @@ namespace
47114712
ent.pflags = 0x4;
47124713
}
47134714

4714-
#pragma inline_depth(0)
4715+
// Inlining issue
47154716
void drop_stacked_entity(xEnt& ent)
47164717
{
47174718
ent.pflags = 0x4;
47184719

47194720
dismount_stacked_entity(ent);
47204721
}
4721-
#pragma inline_depth(5)
47224722

47234723
void stop_stacked_entity(xEnt& ent)
47244724
{
@@ -4747,6 +4747,7 @@ namespace
47474747
}
47484748
} // namespace
47494749

4750+
// Inlining issue
47504751
void xEntUpdate(xEnt* ent, xScene* sc, F32 dt)
47514752
{
47524753
xEntBeginUpdate(ent, sc, dt);

src/SB/Core/x/xWad4.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ S32 xSGWriteData(st_XSAVEGAME_DATA* xsgdata, st_XSAVEGAME_WRITECONTEXT* wctxt, c
608608
return cnt;
609609
}
610610

611-
#pragma inline_depth(0)
611+
// Inlining issue
612612
S32 xSG_cb_leader_load(void*, st_XSAVEGAME_DATA* original_xsgdata, st_XSAVEGAME_READCONTEXT* rctxt,
613613
U32, S32)
614614
{
@@ -638,7 +638,6 @@ S32 xSG_cb_leader_svproc(void* cltdata, st_XSAVEGAME_DATA* original_xsgdata,
638638
xSGWriteData(original_xsgdata, wctxt, fundata, 1, 0x16);
639639
return 1;
640640
}
641-
#pragma inline_depth(5)
642641

643642
S32 xSG_cb_leader_svinfo(void*, st_XSAVEGAME_DATA*, S32* cur_space, S32* max_fullgame)
644643
{
@@ -843,7 +842,6 @@ S32 xSGProcess(st_XSAVEGAME_DATA* xsgdata)
843842
return result;
844843
}
845844

846-
847845
S32 xSGSetup(st_XSAVEGAME_DATA* xsgdata, S32 gidx, char* label, S32 progress, iTime playtime,
848846
S32 thumbIconIdx)
849847
{
@@ -890,12 +888,11 @@ S32 xSGSetup(st_XSAVEGAME_DATA* xsgdata, S32 gidx, char* label, S32 progress, iT
890888
return result;
891889
}
892890

893-
#pragma inline_depth(0)
891+
// Inlining issue
894892
S32 xSGSetup(st_XSAVEGAME_DATA* xsgdata)
895893
{
896894
return xSGSetup(xsgdata, 0, "nothing", -1, 0, 0);
897895
}
898-
#pragma inline_depth(5)
899896

900897
S32 xSGAddLoadClient(st_XSAVEGAME_DATA* xsgdata, U32 clttag, void* cltdata,
901898
S32 (*loadfunc)(void*, st_XSAVEGAME_DATA*, st_XSAVEGAME_READCONTEXT*, U32,
@@ -1279,7 +1276,7 @@ S32 xSGDone(st_XSAVEGAME_DATA* xsgdata)
12791276
return result;
12801277
}
12811278

1282-
#pragma inline_depth(0)
1279+
// Inlining issue
12831280
st_XSAVEGAME_DATA* xSGInit(en_SAVEGAME_MODE mode)
12841281
{
12851282
st_XSAVEGAME_DATA* xsgdata = &g_xsgdata;
@@ -1308,7 +1305,6 @@ st_XSAVEGAME_DATA* xSGInit(en_SAVEGAME_MODE mode)
13081305
memset(&g_leaders, 0, sizeof(g_leaders));
13091306
return xsgdata;
13101307
}
1311-
#pragma inline_depth(5)
13121308

13131309
S32 xSGShutdown()
13141310
{
@@ -2485,7 +2481,7 @@ void PKR_ReadDone(st_PACKER_READ_DATA* pr)
24852481
g_loadlock &= ~(1 << lockid);
24862482
}
24872483

2488-
#pragma inline_depth(0)
2484+
// Inlining issue
24892485
st_PACKER_READ_DATA* PKR_ReadInit(void* userdata, const char* pkgfile, U32 opts, S32* cltver,
24902486
PKRAssetType* typelist, int)
24912487
{
@@ -2553,7 +2549,6 @@ st_PACKER_READ_DATA* PKR_ReadInit(void* userdata, const char* pkgfile, U32 opts,
25532549
tocbuf_RAW[0] = NULL;
25542550
return pr;
25552551
}
2556-
#pragma inline_depth(5)
25572552

25582553
S32 PKRLoadStep(S32)
25592554
{

src/SB/Game/zEnv.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ void zEnvInit(_zEnv* env, xEnvAsset* easset)
140140
}
141141
}
142142

143-
#pragma inline_depth(0)
143+
// Inlining issue
144144
void zEnvInit(void* env, void* easset)
145145
{
146146
zEnvInit((_zEnv*)env, (xEnvAsset*)easset);
147147
}
148-
#pragma inline_depth(5)

src/SB/Game/zNMETypeBossDennis.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ void zNMEDennis::MeterRender()
2020
{
2121
}
2222

23-
#pragma inline_depth(0)
23+
// Inlining issue
2424
void zNMEDennis::RenderHud()
2525
{
2626
zNMEDennis::MeterRender();
2727
}
28-
#pragma inline_depth(5)
2928

3029
S32 zNMEDennis::DfltVulnFlags()
3130
{

0 commit comments

Comments
 (0)