diff --git a/src/game/bondbike.c b/src/game/bondbike.c index 1e426b2cb..b7c7abee5 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -302,7 +302,7 @@ static void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct coord sp60; struct coord sp54; - cdGetEdge(&sp78, &sp6c, 333, "bondbike.c"); + cdGetEdge(&sp78, &sp6c); sp60 = bike->prop->pos; @@ -586,7 +586,7 @@ static s32 bbike0f0d3680(struct coord *arg0, struct coord *arg1, struct coord *a s32 result = bbikeCalculateNewPositionWithPush(arg0, 0); if (!result) { - cdGetEdge(arg1, arg2, 659, "bondbike.c"); + cdGetEdge(arg1, arg2); } return result; @@ -610,7 +610,7 @@ static s32 bbike0f0d36d4(struct coord *arg0, struct coord *arg1, struct coord *a } if (someint == 0) { - cdGetEdge(arg3, arg4, 685, "bondbike.c"); + cdGetEdge(arg3, arg4); if (arg3->f[0] != arg1->f[0] || arg3->f[1] != arg1->f[1] diff --git a/src/game/bondeyespy.c b/src/game/bondeyespy.c index 1438a7276..16811e4c2 100644 --- a/src/game/bondeyespy.c +++ b/src/game/bondeyespy.c @@ -231,7 +231,7 @@ static bool eyespyCalculateNewPositionWithPush(struct coord *vel) struct coord sp2c; struct coord sp20; - cdGetEdge(&sp2c, &sp20, 286, "bondeyespy.c"); + cdGetEdge(&sp2c, &sp20); // Nothing is actually done with these coordinates... // This code was likely copied from bondwalk then the bounce @@ -282,7 +282,7 @@ static s32 eyespy0f0cf890(struct coord *arg0, struct coord *arg1, struct coord * } if (someint == 0) { - cdGetEdge(arg3, arg4, 350, "bondeyespy.c"); + cdGetEdge(arg3, arg4); if (arg3->f[0] != arg1->f[0] || arg3->f[1] != arg1->f[1] @@ -401,7 +401,7 @@ static s32 eyespy0f0cfdd0(struct coord *vel, struct coord *arg1, struct coord *a bool result = eyespyCalculateNewPositionWithPush(vel); if (result != CDRESULT_NOCOLLISION) { - cdGetEdge(arg1, arg2, 473, "bondeyespy.c"); + cdGetEdge(arg1, arg2); } return result; diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index 200b7f195..99281ec18 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -179,7 +179,7 @@ static void bgrab0f0ccbf0(struct coord *delta, f32 angle, struct defaultobj *obj sp98.y = g_Vars.currentplayer->prop->pos.y; sp98.z = delta->z + g_Vars.currentplayer->prop->pos.z; - cdGetEdge(&spb0, &spa4, 201, "bondgrab.c"); + cdGetEdge(&spb0, &spa4); spc8.x = spa4.z - spb0.z; spc8.y = 0.0f; @@ -207,7 +207,7 @@ static void bgrab0f0ccbf0(struct coord *delta, f32 angle, struct defaultobj *obj struct coord sp50; struct coord sp44; - cdGetEdge(&sp68, &sp5c, 228, "bondgrab.c"); + cdGetEdge(&sp68, &sp5c); if (cdGetSavedPos(&sp50, &sp44)) { sp44.x -= sp50.x; @@ -590,7 +590,7 @@ static bool bgrab0f0cdb68(f32 angle) f32 ymax; f32 ymin; - cdGetEdge(&spa4, &sp98, 678, "bondgrab.c"); + cdGetEdge(&spa4, &sp98); sp7c = sp98.f[0] - spa4.f[0]; sp78 = sp98.f[2] - spa4.f[2]; @@ -690,7 +690,7 @@ static bool bgrab0f0cdf64(struct coord *delta, struct coord *arg1, struct coord bool result = bgrabCalculateNewPositiontWithPush(delta, 0, true); if (!result) { - cdGetEdge(arg1, arg2, 815, "bondgrab.c"); + cdGetEdge(arg1, arg2); } return result; diff --git a/src/game/bondmove.c b/src/game/bondmove.c index 3942ef869..057c4267a 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -375,7 +375,7 @@ static f32 bmoveCalculateLookahead(void) if (cdExamLos08(&spf0, spe0, &sp150, CDTYPE_BG | CDTYPE_CLOSEDDOORS, GEOFLAG_FLOOR1 | GEOFLAG_FLOOR2 | GEOFLAG_WALL | GEOFLAG_BLOCK_SIGHT) == CDRESULT_COLLISION) { - cdGetPos(&sp150, 455, "bondmove.c"); + cdGetPos(&sp150); flags = cdGetGeoFlags(); sp160 = sqrtf((sp150.x - spf0.x) * (sp150.x - spf0.x) diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index 48081b7f5..2654c1c40 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -143,7 +143,7 @@ static void bwalk0f0c3b38(struct coord *reltarget, struct defaultobj *obj) abstarget.y = g_Vars.currentplayer->prop->pos.y; abstarget.z = reltarget->z + g_Vars.currentplayer->prop->pos.z; - cdGetEdge(&globalthinga, &globalthingb, 223, "bondwalk.c"); + cdGetEdge(&globalthinga, &globalthingb); vector.x = globalthingb.z - globalthinga.z; vector.y = 0; @@ -343,7 +343,7 @@ static bool bwalkCalculateNewPositionWithPush(struct coord *delta, f32 rotateamo if (door->doorflags & DOORFLAG_DAMAGEONCONTACT) { if (!g_Vars.currentplayer->isdead) { - cdGetEdge(&sp84, &sp78, 465, "bondwalk.c"); + cdGetEdge(&sp84, &sp78); sp90.x = sp78.f[2] - sp84.f[2]; sp90.y = 0; @@ -473,7 +473,7 @@ static s32 bwalk0f0c4764(struct coord *delta, struct coord *arg1, struct coord * s32 result = bwalkCalculateNewPositionWithPush(delta, 0, true, 0, types); if (result == CDRESULT_COLLISION) { - cdGetEdge(arg1, arg2, 607, "bondwalk.c"); + cdGetEdge(arg1, arg2); } return result; @@ -497,7 +497,7 @@ static s32 bwalk0f0c47d0(struct coord *a, struct coord *b, struct coord *c, } if (result == CDRESULT_COLLISION) { - cdGetEdge(d, e, 635, "bondwalk.c"); + cdGetEdge(d, e); if (b->x != d->x || b->y != d->y diff --git a/src/game/chr.c b/src/game/chr.c index ac9903212..78cf39933 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -170,7 +170,7 @@ void chrCalculatePushPos(struct chrdata *chr, struct coord *dstpos, s16 *dstroom moveok = true; } else { - cdGetEdge(&sp78, &sp6c, 453, "chr/chr.c"); + cdGetEdge(&sp78, &sp6c); // Attempt to find a valid position - method #1 sp60.x = dstpos->x - prop->pos.x; diff --git a/src/game/chraction.c b/src/game/chraction.c index a36f85b02..58d595eb0 100644 --- a/src/game/chraction.c +++ b/src/game/chraction.c @@ -1418,7 +1418,7 @@ void func0f02e4f8(struct coord *arg0, struct coord *arg1, struct coord *dst) struct coord sp2c; struct coord sp20; - cdGetEdge(&sp2c, &sp20, 2298, "chraction.c"); + cdGetEdge(&sp2c, &sp20); func0f02e3dc(&sp2c, &sp20, arg0, arg1, dst); } @@ -1446,7 +1446,7 @@ static f32 func0f02e550(struct prop *prop, f32 arg1, f32 arg2, u32 cdtypes, f32 if (cdExamCylMove03(&prop->pos, prop->rooms, &sp50, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) { result = arg2; } else { - cdGetPos(&sp3c, 2377, "chraction.c"); + cdGetPos(&sp3c); xdiff = sp3c.x - prop->pos.x; zdiff = sp3c.z - prop->pos.z; @@ -9191,7 +9191,7 @@ static void chrTickShoot(struct chrdata *chr, s32 handnum) if (cdExamLos08(&gunpos, gunrooms, &hitpos, cdtypes, GEOFLAG_BLOCK_SHOOT) == CDRESULT_COLLISION) { hitsomething = true; - cdGetPos(&hitpos, 12072, "chraction.c"); + cdGetPos(&hitpos); hitprop = cdGetObstacleProp(); } @@ -10904,7 +10904,7 @@ static bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 * if (cdExamCylMove07(chrpos, chrrooms, &sp6c, sp50, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION || cdExamCylMove03(&sp6c, sp50, &sp60, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION) { spbc = true; - cdGetEdge(&spac, &spa0, 14145, "chraction.c"); + cdGetEdge(&spac, &spa0); func0f044b68(&spac, &spa0, &spd4); } @@ -10919,7 +10919,7 @@ static bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 * if (cdExamCylMove07(chrpos, chrrooms, &sp6c, sp50, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION || cdExamCylMove03(&sp6c, chrrooms, &sp60, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION) { spb8 = true; - cdGetEdge(&sp94, &sp88, 14160, "chraction.c"); + cdGetEdge(&sp94, &sp88); func0f044b68(&sp94, &sp88, &spd4); } @@ -10942,7 +10942,7 @@ static bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 * && (!arg9 || cdExamCylMove01(chrpos, aimpos, chrradius, sp40, cdtypes, CHECKVERTICAL_YES, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION)) { result = true; } else { - cdGetEdge(leftpos, rightpos, 14230, "chraction.c"); + cdGetEdge(leftpos, rightpos); func0f044b68(leftpos, rightpos, &spd4); } @@ -11021,7 +11021,7 @@ static bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s1 if (cdExamCylMove07(chrpos, chrrooms, &sp6c, sp50, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION || cdExamCylMove03(&sp6c, sp50, &sp60, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION) { spbc = true; - cdGetEdge(&spac, &spa0, 14310, "chraction.c"); + cdGetEdge(&spac, &spa0); func0f044b68(&spac, &spa0, &spd4); value1 = cd00024e40(); } @@ -11037,7 +11037,7 @@ static bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s1 if (cdExamCylMove07(chrpos, chrrooms, &sp6c, sp50, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION || cdExamCylMove03(&sp6c, chrrooms, &sp60, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) == CDRESULT_COLLISION) { spb8 = true; - cdGetEdge(&sp94, &sp88, 14325, "chraction.c"); + cdGetEdge(&sp94, &sp88); func0f044b68(&sp94, &sp88, &spd4); value2 = cd00024e40(); } @@ -11064,7 +11064,7 @@ static bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s1 && (!hasobstacle || cdExamCylMove01(chrpos, aimpos, chrradius, sp40, cdtypes, CHECKVERTICAL_YES, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION)) { result = true; } else { - cdGetEdge(leftpos, rightpos, 14395, "chraction.c"); + cdGetEdge(leftpos, rightpos); func0f044b68(leftpos, rightpos, &spd4); } @@ -14111,7 +14111,7 @@ bool chrRunFromPos(struct chrdata *chr, u32 goposflags, f32 rundist, struct coor chrSetPerimEnabled(chr, false); if (cdExamLos08(&chr->prop->pos, chr->prop->rooms, &delta, CDTYPE_ALL, GEOFLAG_WALL) == CDRESULT_COLLISION) { - cdGetPos(&delta, 18547, "chraction.c"); + cdGetPos(&delta); } chrSetPerimEnabled(chr, true); @@ -14245,7 +14245,7 @@ bool chr0f04c874(struct chrdata *chr, u32 angle360, struct coord *pos, u8 arg3, f32 zdiff; f32 tmp; - cdGetPos(pos, 18686, "chraction.c"); + cdGetPos(pos); xdiff = pos->x - chrpos.x; zdiff = pos->z - chrpos.z; diff --git a/src/game/dlights.c b/src/game/dlights.c index 7ae93235e..12cff1976 100644 --- a/src/game/dlights.c +++ b/src/game/dlights.c @@ -916,13 +916,13 @@ bool lightTickBroken(s32 roomnum, s32 lightnum) sp80.y = -sp8c.f[1]; sp80.z = -sp8c.f[2]; - func0f177164(&sp98, &spa4, 0, "dlights.c"); + func0f177164(&sp98, &spa4); spa4.x += sp80.x; spa4.y += sp80.y; spa4.z += sp80.z; - func0f177164(&spa4, &spa4, 0, "dlights.c"); + func0f177164(&spa4, &spa4); // Mismatch: Goal loads roomnum * 0x14 into sp58 here but doesn't // use it until after lightGetBboxCentre. The below statement does diff --git a/src/game/padhalllv.c b/src/game/padhalllv.c index 8fbbac44b..eac8b2e00 100644 --- a/src/game/padhalllv.c +++ b/src/game/padhalllv.c @@ -128,7 +128,7 @@ struct waypoint *waypointFindClosestToPos(struct coord *pos, s16 *rooms) checkmore[i] = false; } else if (cdresult == CDRESULT_COLLISION) { checkmore[i] = true; - cdGetEdge(&sp250[i], &sp1d8[i], 441, "padhalllv.c"); + cdGetEdge(&sp250[i], &sp1d8[i]); } else { closest = candwaypoints[i]; break; diff --git a/src/game/pak.c b/src/game/pak.c index 8a9c0f491..77cb3b330 100644 --- a/src/game/pak.c +++ b/src/game/pak.c @@ -106,7 +106,7 @@ static u32 pak0f119298(s8 device); static s32 pakCreateFilesystem(s8 device); static void pakCalculateChecksum(u8 *start, u8 *end, u16 *checksum); -static void pak0f11a32c(s8 device, u8 arg1, u32 line, char *file); +static void pak0f11a32c(s8 device, u8 arg1); static bool pakQueryTotalUsage(s8 device); static PakErr1 pakDeleteGameNote3(OSPfs *pfs, u16 company_code, u32 game_code, char *game_name, char *ext_name); static u32 pakGetPdNumBytes(s8 device); @@ -117,7 +117,7 @@ static s32 _pakDeleteGameNote(s8 device, u16 company_code, u32 game_code, char * static PakErr1 pakReadEeprom(u8 address, u8 *buffer, u32 len); static bool pakGetFilesystemLength(s8 device, u32 *outlen); static void pakProbeEeprom(void); -static bool pakHandleResult(s32 err1, s8 device, bool arg2, u32 line); +static bool pakHandleResult(s32 err1, s8 device, bool arg2); static s32 gbpakIdentifyGame(s8 device); static PakErr1 pakWriteEeprom(u8 address, u8 *buffer, u32 len); static void pak0f11df94(s8 device); @@ -138,26 +138,6 @@ static bool pakRepairAsBlank(s8 device, u32 *offsetptr, struct pakfileheader *he #define MAX_HEADERCACHE_ENTRIES 50 -#define LINE_825 825 -#define LINE_1058 1058 -#define LINE_1551 1551 -#define LINE_1802 1802 -#define LINE_3486 3486 -#define LINE_3495 3495 -#define LINE_3599 3599 -#define LINE_3654 3654 -#define LINE_3668 3668 -#define LINE_3829 3829 -#define LINE_3865 3865 -#define LINE_3889 3889 -#define LINE_3948 3948 -#define LINE_4140 4140 -#define LINE_4394 4394 -#define LINE_4742 4742 -#define LINE_4801 4801 - -#define JOYARGS(line) - const char g_N64FontCodeMap[] = "\0************** 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#'*+,-./:=?@"; struct pak g_Paks[5]; @@ -393,11 +373,11 @@ static s32 _pakDeleteGameNote(s8 device, u16 company_code, u32 game_code, char * s32 result; if (pak0f116b5c(device)) { - joyDisableCyclicPolling(JOYARGS(738)); + joyDisableCyclicPolling(); result = pakDeleteGameNote3(PFS(device), company_code, game_code, game_name, ext_name); - joyEnableCyclicPolling(JOYARGS(740)); + joyEnableCyclicPolling(); - if (pakHandleResult(result, device, true, LINE_825)) { + if (pakHandleResult(result, device, true)) { g_Paks[device].unk2b8_02 = 1; return 0; } @@ -509,7 +489,7 @@ static PakErr2 pakReadHeaderAtOffset(s8 device, u32 offset, struct pakfileheader if (!pakRetrieveHeaderFromCache(device, blocknum, headerptr)) { result = pakReadWriteBlock(device, PFS(device), g_Paks[device].pdnoteindex, 0, offset, sizeof(sp38), sp38); - if (pakHandleResult(result, device, true, LINE_1058) == 0) { + if (pakHandleResult(result, device, true) == 0) { if (result == PAK_ERR1_NOPAK) { return PAK_ERR2_NOPAK; } @@ -697,9 +677,9 @@ static PakErr1 pakQueryNumNotes(OSPfs *pfs, s32 *max_files, s32 *files_used) if (pfs) { s32 result; - joyDisableCyclicPolling(JOYARGS(1308)); + joyDisableCyclicPolling(); result = osPfsNumFiles(pfs, max_files, files_used); - joyEnableCyclicPolling(JOYARGS(1310)); + joyEnableCyclicPolling(); return result; } @@ -719,9 +699,9 @@ static PakErr1 pakQueryNumFreeBytes(OSPfs *pfs, s32 *bytes_not_used) if (pfs) { s32 result; - joyDisableCyclicPolling(JOYARGS(1337)); + joyDisableCyclicPolling(); result = osPfsFreeBlocks(pfs, bytes_not_used); - joyEnableCyclicPolling(JOYARGS(1339)); + joyEnableCyclicPolling(); return result; } @@ -740,9 +720,9 @@ static PakErr1 pakQueryNoteState(OSPfs *pfs, s32 file_no, OSPfsState *note) if (pfs) { s32 result; - joyDisableCyclicPolling(JOYARGS(1363)); + joyDisableCyclicPolling(); result = osPfsFileState(pfs, file_no, note); - joyEnableCyclicPolling(JOYARGS(1365)); + joyEnableCyclicPolling(); return result; } @@ -969,7 +949,7 @@ void paksInit(void) } for (i = 0; i < 5; i++) { - pak0f11a32c(i, 7, 2049, "pak/pak.c"); + pak0f11a32c(i, 7); } pakProbeEeprom(); @@ -1676,7 +1656,7 @@ static s32 pakFindMaxFileId(s8 device) return max; } -static void pak0f11a32c(s8 device, u8 arg1, u32 line, char *file) +static void pak0f11a32c(s8 device, u8 arg1) { if (g_Paks[device].unk014 == 0) { g_Paks[device].unk014 = arg1; @@ -1696,9 +1676,9 @@ static PakErr1 pakReadWriteBlock(s8 device, OSPfs *pfs, s32 file_no, u8 flag, u3 s32 result; len = pakAlign(device, len); - joyDisableCyclicPolling(JOYARGS(3096)); + joyDisableCyclicPolling(); result = _pakReadWriteBlock(pfs, file_no, flag, address, len, buffer); - joyEnableCyclicPolling(JOYARGS(3098)); + joyEnableCyclicPolling(); return result; } @@ -1717,7 +1697,7 @@ static bool pakQueryTotalUsage(s8 device) ret = pakQueryNumNotes(PFS(device), &pak->notestotal, &pak->notesused); - if (!pakHandleResult(ret, device, true, LINE_3486)) { + if (!pakHandleResult(ret, device, true)) { pak->unk2b8_02 = false; return false; } @@ -1725,7 +1705,7 @@ static bool pakQueryTotalUsage(s8 device) ret = pakQueryNumFreeBytes(PFS(device), &bytesfree); pak->pakdata.pagesfree = ((bytesfree + 255) & 0xffff) >> 8; - if (!pakHandleResult(ret, device, true, LINE_3495)) { + if (!pakHandleResult(ret, device, true)) { pak->unk2b8_02 = false; return false; } @@ -1757,11 +1737,11 @@ static void pakQueryPdSize(s8 device) OSPfsState note; s32 result; - joyDisableCyclicPolling(JOYARGS(3242)); + joyDisableCyclicPolling(); result = pakQueryNoteState(PFS(device), g_Paks[device].pdnoteindex, ¬e); - joyEnableCyclicPolling(JOYARGS(3244)); + joyEnableCyclicPolling(); - if (pakHandleResult(result, device, true, LINE_3599)) { + if (pakHandleResult(result, device, true)) { g_Paks[device].pdnumbytes = note.file_size; g_Paks[device].pdnumblocks = g_Paks[device].pdnumbytes / pakGetBlockSize(device); g_Paks[device].pdnumpages = g_Paks[device].pdnumbytes / 256; @@ -1794,27 +1774,27 @@ static bool mempakPrepare(s8 device) } // Find the PD note if it exists - joyDisableCyclicPolling(JOYARGS(3319)); + joyDisableCyclicPolling(); sp48 = pakFindNote(PFS(device), ROM_COMPANYCODE, ROM_GAMECODE, g_PakNoteGameName, g_PakNoteExtName, &g_Paks[device].pdnoteindex); - joyEnableCyclicPolling(JOYARGS(3321)); + joyEnableCyclicPolling(); // If it doesn't exist, allocate it if (sp48 != PAK_ERR1_OK) { struct pak *pak = &g_Paks[device]; - pakHandleResult(sp48, device, false, LINE_3654); + pakHandleResult(sp48, device, false); g_Paks[device].pdnumnotes = (pak->pakdata.pagesfree > 128) ? 2 : 1; notesize = g_Paks[device].pdnumnotes * (256 * NUM_PAGES); - joyDisableCyclicPolling(JOYARGS(3336)); + joyDisableCyclicPolling(); sp48 = pakAllocateNote(PFS(device), ROM_COMPANYCODE, ROM_GAMECODE, g_PakNoteGameName, g_PakNoteExtName, notesize, &g_Paks[device].pdnoteindex); - joyEnableCyclicPolling(JOYARGS(3338)); + joyEnableCyclicPolling(); g_Paks[device].unk2b8_02 = true; - if (pakHandleResult(sp48, device, true, LINE_3668)) { + if (pakHandleResult(sp48, device, true)) { isnewnote = true; } else { return false; @@ -1891,7 +1871,7 @@ static bool pakProbe(s8 device) // Try memory pak ret = pakInitPak(&g_PiMesgQueue, PFS(device), device, NULL); - if (pakHandleResult(ret, device, true, LINE_3829)) { + if (pakHandleResult(ret, device, true)) { g_Paks[device].unk010 = PAK010_03; if (device == SAVEDEVICE_GAMEPAK) { @@ -1916,7 +1896,7 @@ static bool pakProbe(s8 device) // Try rumble pak ret = osMotorProbe(&g_PiMesgQueue, PFS(device), device); - if (pakHandleResult(ret, device, false, LINE_3865)) { + if (pakHandleResult(ret, device, false)) { g_Paks[device].type = PAKTYPE_RUMBLE; g_Paks[device].unk010 = PAK010_11; g_Paks[device].rumblestate = RUMBLESTATE_1; @@ -1933,7 +1913,7 @@ static bool pakProbe(s8 device) // Try game boy pak ret = osGbpakInit(&g_PiMesgQueue, PFS(device), device); - if (pakHandleResult(ret, device, false, LINE_3889)) { + if (pakHandleResult(ret, device, false)) { g_Paks[device].type = PAKTYPE_GAMEBOY; g_Paks[device].unk010 = PAK010_08; g_Paks[device].unk2b8_01 = false; @@ -2053,7 +2033,7 @@ static s32 pakCreateFilesystem(s8 device) result = pakReadWriteBlock(device, PFS(device), g_Paks[device].pdnoteindex, PFS_WRITE, address, pakGetBlockSize(device), data); - if (pakHandleResult(result, device, true, LINE_4140) == 0) { + if (pakHandleResult(result, device, true) == 0) { return -1; } @@ -2157,7 +2137,7 @@ static s32 pak0f11b86c(s8 device, u32 offset, u8 *data, struct pakfileheader *he filelen = alignedfilelen; } - joyDisableCyclicPolling(JOYARGS(4008)); + joyDisableCyclicPolling(); for (i = 0; i != filelen; i++) { offsetinblock = i % pakGetBlockSize(device); @@ -2169,8 +2149,8 @@ static s32 pak0f11b86c(s8 device, u32 offset, u8 *data, struct pakfileheader *he ret = pakReadWriteBlock(device, PFS(device), g_Paks[device].pdnoteindex, OS_READ, absoluteoffset, pakGetBlockSize(device), sp58); - if (!pakHandleResult(ret, device, true, LINE_4394)) { - joyEnableCyclicPolling(JOYARGS(4032)); + if (!pakHandleResult(ret, device, true)) { + joyEnableCyclicPolling(); if (ret == 1) { return 1; @@ -2186,7 +2166,7 @@ static s32 pak0f11b86c(s8 device, u32 offset, u8 *data, struct pakfileheader *he } } - joyEnableCyclicPolling(JOYARGS(4054)); + joyEnableCyclicPolling(); return 0; } @@ -2290,7 +2270,7 @@ static s32 pakWriteFileAtOffset(s8 device, u32 offset, u32 filetype, u8 *newdata numblocks++; } - joyDisableCyclicPolling(JOYARGS(4292)); + joyDisableCyclicPolling(); // Write the header with writecompleted = 0, followed by the data, then // rewrite the header with writecompleted = 1. This allows the game to @@ -2337,8 +2317,8 @@ static s32 pakWriteFileAtOffset(s8 device, u32 offset, u32 filetype, u8 *newdata if (writethisblock) { result = pakReadWriteBlock(device, PFS(device), g_Paks[device].pdnoteindex, OS_WRITE, offset + i * blocksize, pakGetBlockSize(device), &newfilebytes[offsetinfile]); - if (!pakHandleResult(result, device, true, LINE_4742)) { - joyEnableCyclicPolling(JOYARGS(4380)); + if (!pakHandleResult(result, device, true)) { + joyEnableCyclicPolling(); if (result == PAK_ERR1_NOPAK) { return 1; @@ -2350,7 +2330,7 @@ static s32 pakWriteFileAtOffset(s8 device, u32 offset, u32 filetype, u8 *newdata } } - joyEnableCyclicPolling(JOYARGS(4393)); + joyEnableCyclicPolling(); if (g_PakDebugPakCache) { pakSaveHeaderToCache(device, offset / pakGetBlockSize(device), newheader); @@ -2368,16 +2348,16 @@ bool pakRepair(s8 device) case PAK010_19: break; default: - joyDisableCyclicPolling(JOYARGS(4425)); + joyDisableCyclicPolling(); result = osPfsChecker(PFS(device)); - joyEnableCyclicPolling(JOYARGS(4427)); + joyEnableCyclicPolling(); if (result == PAK_ERR1_OK) { g_Paks[device].unk010 = PAK010_02; return true; } - pakHandleResult(result, device, false, LINE_4801); + pakHandleResult(result, device, false); g_Paks[device].unk010 = PAK010_22; break; @@ -2386,7 +2366,7 @@ bool pakRepair(s8 device) return false; } -static bool pakHandleResult(s32 err1, s8 device, bool arg2, u32 line) +static bool pakHandleResult(s32 err1, s8 device, bool arg2) { if (err1 == PAK_ERR1_OK) { return true; @@ -2828,9 +2808,9 @@ static void pakProbeEeprom(void) { s32 type; - joyDisableCyclicPolling(JOYARGS(6199)); + joyDisableCyclicPolling(); type = osEepromProbe(&g_PiMesgQueue); - joyEnableCyclicPolling(JOYARGS(6201)); + joyEnableCyclicPolling(); if (type == EEPROM_TYPE_16K) { g_PakHasEeprom = true; @@ -2847,9 +2827,9 @@ static PakErr1 pakReadEeprom(u8 address, u8 *buffer, u32 len) { s32 result; - joyDisableCyclicPolling(JOYARGS(6234)); + joyDisableCyclicPolling(); result = osEepromLongRead(&g_PiMesgQueue, address, buffer, len); - joyEnableCyclicPolling(JOYARGS(6236)); + joyEnableCyclicPolling(); return result == PAK_ERR1_OK ? PAK_ERR1_OK : PAK_ERR1_EEPROMREADFAILED; } @@ -2858,9 +2838,9 @@ static PakErr1 pakWriteEeprom(u8 address, u8 *buffer, u32 len) { s32 result; - joyDisableCyclicPolling(JOYARGS(6269)); + joyDisableCyclicPolling(); result = osEepromLongWrite(&g_PiMesgQueue, address, buffer, len); - joyEnableCyclicPolling(JOYARGS(6271)); + joyEnableCyclicPolling(); return result == PAK_ERR1_OK ? PAK_ERR1_OK : PAK_ERR1_EEPROMWRITEFAILED; } diff --git a/src/game/propobj.c b/src/game/propobj.c index 9bea7dfcc..d5450aa96 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -2490,8 +2490,8 @@ static bool func0f06b488(struct prop *prop, struct coord *arg1, struct coord *ar struct coord sp20; if (!cd0002ded8(arg1, arg2, prop)) { - cdGetEdge(&sp3c, &sp30, 2909, "propobj.c"); - cdGetPos(&sp20, 2910, "propobj.c"); + cdGetEdge(&sp3c, &sp30); + cdGetPos(&sp20); f0 = (sp20.f[0] - arg1->f[0]) * arg3->f[0] + (sp20.f[1] - arg1->f[1]) * arg3->f[1] @@ -3137,7 +3137,7 @@ static s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord if (cdExamLos09(&prop->pos, spa0, &sp1c4, CDTYPE_BG) == CDRESULT_COLLISION) { s0 = true; - cdGetPos(&hitthing.unk00, 4257, "propobj.c"); + cdGetPos(&hitthing.unk00); cdGetObstacleNormal(&hitthing.unk0c); } } @@ -3236,7 +3236,7 @@ static bool func0f06d37c(struct defaultobj *obj, struct coord *arg1, struct coor } if (!result) { - cdGetEdge(&sp64, &sp58, 4385, "propobj.c"); + cdGetEdge(&sp64, &sp58); arg3->x = sp58.z - sp64.z; arg3->y = 0.0f; @@ -5418,7 +5418,7 @@ static f32 objCollide(struct defaultobj *movingobj, struct coord *movingvel, f32 objApplyMomentum(obstacleobj, &obstaclevel, 0.0f, true, true); - cdGetEdge(&sp70, &sp64, 7355, "propobj.c"); + cdGetEdge(&sp70, &sp64); if (cdGetSavedPos(&sp58, &sp4c)) { sp4c.x -= sp58.x; @@ -6123,7 +6123,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded) sp3c4.y -= sp3d0.y; sp3c4.z -= sp3d0.z; } else { - cdGetEdge(&sp3d0, &sp3c4, 8339, "propobj.c"); + cdGetEdge(&sp3d0, &sp3c4); sp3d0.x -= sp3c4.x; sp3d0.y -= sp3c4.y; @@ -6155,7 +6155,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded) projectile->unk0dc += f0; - cdGetEdge(&sp3e8, &sp3dc, 8377, "propobj.c"); + cdGetEdge(&sp3e8, &sp3dc); sp3f4.x = sp3dc.z - sp3e8.z; sp3f4.y = 0.0f; @@ -8601,7 +8601,7 @@ static void autogunTickShoot(struct prop *autogunprop) || (targetprop && (targetprop->type == PROPTYPE_CHR)) || (g_Vars.antiplayernum >= 0 && targetprop && targetprop == g_Vars.anti->prop)) { if (cdExamLos08(&gunpos, gunrooms, &hitpos, CDTYPE_ALL, GEOFLAG_BLOCK_SHOOT) == CDRESULT_COLLISION) { - cdGetPos(&hitpos, 11458, "propobj.c"); + cdGetPos(&hitpos); hitprop = cdGetObstacleProp(); @@ -8650,7 +8650,7 @@ static void autogunTickShoot(struct prop *autogunprop) if (cdExamLos08(&gunpos, gunrooms, &hitpos, CDTYPE_ALL & ~CDTYPE_PLAYERS, GEOFLAG_BLOCK_SHOOT) == CDRESULT_COLLISION) { - cdGetPos(&hitpos, 11513, "propobj.c"); + cdGetPos(&hitpos); hitprop = cdGetObstacleProp(); missed = true; @@ -8680,7 +8680,7 @@ static void autogunTickShoot(struct prop *autogunprop) if (cdExamLos08(&gunpos, gunrooms, &hitpos, CDTYPE_DOORS | CDTYPE_BG, GEOFLAG_BLOCK_SHOOT) == CDRESULT_COLLISION) { - cdGetPos(&hitpos, 11539, "propobj.c"); + cdGetPos(&hitpos); missed = true; } @@ -9543,7 +9543,7 @@ static void chopperTickFall(struct prop *chopperprop) ground = cdFindGroundAtCyl(&chopperprop->pos, 5, chopperprop->rooms, NULL, NULL); chopperprop->pos.y -= 100; - cdGetPos(&sp64, 12449, "propobj.c"); + cdGetPos(&sp64); newpos.x = sp64.x; newpos.y = ground + 20; @@ -18384,7 +18384,7 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct CDTYPE_OBJS | CDTYPE_DOORS | CDTYPE_CHRS | CDTYPE_PATHBLOCKER| CDTYPE_BG, GEOFLAG_BLOCK_SHOOT) == CDRESULT_COLLISION) { blocked = true; - cdGetPos(&endpos, 24482, "propobj.c"); + cdGetPos(&endpos); obstacle = cdGetObstacleProp(); } diff --git a/src/game/splat.c b/src/game/splat.c index c737190d7..33955d03d 100644 --- a/src/game/splat.c +++ b/src/game/splat.c @@ -192,8 +192,8 @@ static s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct shotdata *s mtx4RotateVec(&spa4, &spfc, &shotdata->dir); mtx4RotateVec(&spa4, &spf0, &shotdata->unk0c); - func0f177164(&shotdata->dir, &shotdata->dir, 403, "splat.c"); - func0f177164(&shotdata->unk0c, &shotdata->unk0c, 404, "splat.c"); + func0f177164(&shotdata->dir, &shotdata->dir); + func0f177164(&shotdata->unk0c, &shotdata->unk0c); if (splat0f149274(arg1, prop, shotdata, /*reused var*/ dist, isskedar, splattype, timermax, chr, timerspeed)) { numdropped++; diff --git a/src/game/utils.c b/src/game/utils.c index fdab28fd9..412547bf7 100644 --- a/src/game/utils.c +++ b/src/game/utils.c @@ -80,7 +80,7 @@ void func0f1770ac(struct coord *a, struct coord *b, struct coord *out) out->z = a->x * b->y - a->y * b->x; } -bool func0f177164(struct coord *arg0, struct coord *arg1, u32 line, char *file) +bool func0f177164(struct coord *arg0, struct coord *arg1) { f32 sqdist = arg0->x * arg0->x + arg0->y * arg0->y + arg0->z * arg0->z; f32 mult; diff --git a/src/game/wallhit.c b/src/game/wallhit.c index c5ffe600a..88b0f3de1 100644 --- a/src/game/wallhit.c +++ b/src/game/wallhit.c @@ -682,7 +682,7 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co sp1b8 = *arg1; - func0f177164(&sp1b8, &sp1b8, 956, "wallhit.c"); + func0f177164(&sp1b8, &sp1b8); paintball = chrIsUsingPaintball(chr); @@ -822,8 +822,8 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co sp130.y = arg4[1]; sp130.z = arg4[2]; - func0f177164(&sp13c, &sp13c, 1151, "wallhit.c"); - func0f177164(&sp130, &sp130, 1152, "wallhit.c"); + func0f177164(&sp13c, &sp13c); + func0f177164(&sp130, &sp130); f0 = (sp13c.x * sp130.x + sp13c.y * sp130.y + sp13c.z * sp130.z) * -1.0f; diff --git a/src/include/game/camdraw.h b/src/include/game/camdraw.h index 4ff657d28..e69de29bb 100644 --- a/src/include/game/camdraw.h +++ b/src/include/game/camdraw.h @@ -1,100 +0,0 @@ -#ifndef _IN_GAME_CAMDRAW_H -#define _IN_GAME_CAMDRAW_H -#include -#include "data.h" -#include "types.h" - -void func0f149c90(struct textureconfig *tconfig); -void *func0f149d58(u32 size, u32 line, char *file); -void func0f149e58(u8 *arg0, u32 size); -void func0f14a00c(bool arg0); -struct var8007f8e0 *func0f14a06c(s32 index); -void func0f14a16c(s32 arg0); -char *phGetStyleName(s32 stylenum); -char *phGetColourName(s32 colournum); -struct var8007f8dc *func0f14a20c(void); -void func0f14a240(void); -bool func0f14a2fc(s32 index, u32 line, char *file); -void pheadInit(void); -void pheadReset(void); -void func0f14a52c(void); -void func0f14a560(void); -void func0f14a594(s32 arg0); -s32 func0f14a5a4(void); -void func0f14a678(void); -bool func0f14a8e8(void); -void func0f14a95c(void); -s32 func0f14a984(void); -s32 func0f14a9f8(s32 index); -void func0f14aa48(void); -s32 func0f14aa70(void); -void func0f14aac4(void); -void func0f14ab3c(void); -u16 func0f14ad14(s32 device); -s32 func0f14ad38(s32 device); -void func0f14ad58(s32 index); -bool func0f14aea0(s32 device); -void func0f14aed0(s32 device); -void func0f14b178(void); -void func0f14b228(struct var8007f8e0 *arg0); -void func0f14b394(struct var8007f8e0 *arg0); -bool func0f14b484(s32 index); -void func0f14bc04(void); -void func0f14bd34(s32 index); -void func0f14bdbc(s32 index); -void func0f14bec8(s32 index); -void func0f14c1cc(s32 index); -void func0f14c50c(struct var8007f8e0 *arg0, struct var8007f8e0 *arg1, u32 line, char *file); -void func0f14c75c(struct textureconfig *arg0, struct textureconfig *arg1); -void func0f14c7dc(struct textureconfig *tconfig); -u32 func0f14c814(struct textureconfig *tconfig); -Gfx *func0f14c870(Gfx *gdl, struct textureconfig *tconfig, f32 *arg2, f32 arg3, f32 arg4); -void func0f14cdb8(s32 index, u8 *arg1); -void func0f14cf6c(void); -void func0f14d064(s32 index, u8 *arg1); -void func0f14d2c8(u8 *arg0, u8 *arg1); -void func0f14d4f0(u8 *src, u8 *dst); -void func0f14d714(u8 *arg0, u8 *arg1); -void func0f14d84c(f32 *arg0, s32 arg1); -void func0f14d8d8(f32 *arg0, f32 *arg1, s32 arg2, f32 *arg3, s32 arg4); -void phead0f14dac0(u8 *arg0, struct textureconfig *arg1); -void func0f14dc30(s32 index, bool arg1); -void func0f14def0(s32 arg0, u32 line, char *file); -s32 func0f14dfc0(struct var8007f8e0 *arg0, s32 arg1, s32 arg2); -void func0f14e1c4(struct var8007f8e0 *arg0); -f32 func0f14e4ac(s32 arg0, s32 *arg1, s32 *arg2); -void func0f14e790(u8 *arg0); -void func0f14e7e0(u8 *arg0); -void func0f14e884(struct textureconfig *tconfig, s32 arg1, s32 arg2, u64 arg3); -void func0f14ec2c(u32 arg0, u32 arg1, u32 arg2, u32 arg3); -void func0f14ecd8(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3); -void func0f14eeb0(f32 *arg0); -void func0f14ef50(f32 *arg0); -s32 func0f14f008(s32 index); -Gfx *func0f14f07c(Gfx *gdl, s32 headorbodynum, s32 x1, s32 y1, s32 x2, s32 y2); -void func0f14f4b8(struct var8007f8e0 *arg0); -void func0f14f4e4(struct var8007f8e0 *arg0); -void func0f14f510(s32 arg0); -void func0f14f700(struct var8007f8e0 *arg0, u32 arg1, u32 arg2); -u32 func0f14f76c(struct var8007f8e0 *arg0, u32 arg1); -s32 phead0f14f7d4(struct var8007f8e0 *arg0); -void phead0f14f8cc(struct var8007f8e0 *arg0, s32 arg1[8][8]); -void func0f14f974(struct var8007f8e0 *arg0, s32 arg1); -void func0f14faf8(struct var8007f8e0 *arg0, s32 arg1[8][8]); -void func0f14fbfc(u8 *arg0[8], s32 arg1[8][8]); -void phead0f14fdb0(s32 arg0[8][8], u8 **arg1); -void func0f14ff94(struct var8007f8e0 *arg0); -void func0f150068(struct var8007f8e0 *arg0, s32 arg1); -bool func0f15015c(s8 device, s32 filenum, u8 *arg2); -void phGetGuid(s32 index, struct fileguid *guid); -void pheadInit2(void); - -extern const char var7f1b6050[]; -extern const char var7f1b6058[]; -extern const char var7f1b606c[]; -extern const char var7f1b6080[]; -extern const char var7f1b6088[]; -extern const char var7f1b6090[]; -extern const char var7f1b6098[]; - -#endif diff --git a/src/include/game/utils.h b/src/include/game/utils.h index 5e992a212..f7eeb1362 100644 --- a/src/include/game/utils.h +++ b/src/include/game/utils.h @@ -10,7 +10,7 @@ u32 align16(u32 arg0); u32 align32(u32 arg0); void utilsInit(void); void func0f1770ac(struct coord *a, struct coord *b, struct coord *out); -bool func0f177164(struct coord *arg0, struct coord *arg1, u32 line, char *file); +bool func0f177164(struct coord *arg0, struct coord *arg1); bool func0f1773c8(struct coord *a, struct coord *b); f32 coordsGetDistance(struct coord *a, struct coord *b); f32 func0f1776cc(struct coord *a, struct coord *b, struct coord *c); diff --git a/src/include/lib/collision.h b/src/include/lib/collision.h index e735294db..a96014efa 100644 --- a/src/include/lib/collision.h +++ b/src/include/lib/collision.h @@ -8,11 +8,11 @@ f32 func0f1577f0(f32 arg0[2], f32 arg1[2], f32 arg2[2], f32 arg3[2]); f32 func0f1579cc(struct widthxz *arg0, struct xz *arg1, struct xz *arg2, struct xz *arg3); f32 cd00024e40(void); -void cdGetEdge(struct coord *pos1, struct coord *pos2, u32 line, char *file); +void cdGetEdge(struct coord *pos1, struct coord *pos2); f32 cd00024e98(void); s32 cd00024ea4(void); struct prop *cdGetObstacleProp(void); -void cdGetPos(struct coord *pos, u32 line, char *file); +void cdGetPos(struct coord *pos); void cdGetObstacleNormal(struct coord *normal); u32 cdGetGeoFlags(void); void cdSetSavedPos(struct coord *pos1, struct coord *pos2); diff --git a/src/include/lib/joy.h b/src/include/lib/joy.h index 65b29f4f0..3b3a368ab 100644 --- a/src/include/lib/joy.h +++ b/src/include/lib/joy.h @@ -34,15 +34,8 @@ s8 joyGetStickX(s8 contpadnum); s8 joyGetStickY(s8 contpadnum); u16 joyGetButtons(s8 contpadnum, u16 mask); u16 joyGetButtonsPressedThisFrame(s8 contpadnum, u16 mask); - -#if VERSION >= VERSION_NTSC_1_0 void joyDisableCyclicPolling(void); void joyEnableCyclicPolling(void); -#else -void joyDisableCyclicPolling(s32 line, char *file); -void joyEnableCyclicPolling(s32 line, char *file); -#endif - void joyDestroy(void); void joyGetContpadNumsForPlayer(s8 playernum, s32 *pad1, s32 *pad2); void joyStopRumble(s8 device, bool disablepolling); diff --git a/src/lib/collision.c b/src/lib/collision.c index c8393b273..544a4d9ed 100644 --- a/src/lib/collision.c +++ b/src/lib/collision.c @@ -56,7 +56,7 @@ f32 cd00024e40(void) return var8009a8f0; } -void cdGetEdge(struct coord *vtx1, struct coord *vtx2, u32 line, char *file) +void cdGetEdge(struct coord *vtx1, struct coord *vtx2) { *vtx1 = g_CdEdgeVtx1; @@ -78,7 +78,7 @@ struct prop *cdGetObstacleProp(void) return g_CdObstacleProp; } -void cdGetPos(struct coord *pos, u32 line, char *file) +void cdGetPos(struct coord *pos) { *pos = g_CdObstaclePos; }