mirror of
https://github.com/zeldaret/ss
synced 2026-06-20 16:01:13 -04:00
Fix some compiler warnings
This commit is contained in:
@@ -14,8 +14,8 @@ checkAlg3__10dTgSndAr_cFRC7mVec3_c = .text:0x00000540; // type:function size:0x1
|
||||
__dt__10dTgSndAr_cFv = .text:0x00000690; // type:function size:0x70
|
||||
_ctors = .ctors:0x00000000; // type:label scope:global
|
||||
_dtors = .dtors:0x00000000; // type:label scope:global
|
||||
lbl_497_rodata_0 = .rodata:0x00000000; // type:object size:0x18 data:float
|
||||
lbl_497_rodata_18 = .rodata:0x00000018; // type:object size:0x10 data:float
|
||||
lbl_497_rodata_28 = .rodata:0x00000028; // type:object size:0x4 data:float
|
||||
lbl_497_rodata_0 = .rodata:0x00000000; // type:object size:0x18 scope:local data:float
|
||||
lbl_497_rodata_18 = .rodata:0x00000018; // type:object size:0x10 scope:local data:float
|
||||
lbl_497_rodata_28 = .rodata:0x00000028; // type:object size:0x4 scope:local data:float
|
||||
g_profile_TAG_SOUND_AREA = .data:0x00000000; // type:object size:0x10
|
||||
__vt__10dTgSndAr_c = .data:0x00000010; // type:object size:0x74
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
u16 getCheckSceneflag();
|
||||
u16 getSetSceneflag();
|
||||
u16 getTimer();
|
||||
u16 setTimer(u16 val);
|
||||
void setTimer(u16 val);
|
||||
u16 getTargetTime();
|
||||
bool checkShouldTrigger();
|
||||
u16 getStoredTargetTime();
|
||||
|
||||
@@ -19,7 +19,7 @@ class CoreController;
|
||||
enum eCoreDevType {};
|
||||
|
||||
typedef void (*ConnectCallback)(int args[]);
|
||||
typedef class CoreController* (*ControllerFactory)();
|
||||
typedef class CoreController *(*ControllerFactory)();
|
||||
|
||||
class CoreStatus {
|
||||
public:
|
||||
@@ -52,16 +52,42 @@ public:
|
||||
// vtable 0x000 | 8056ec50
|
||||
// TODO all of these have inline implementations and are scattered
|
||||
// across the binary
|
||||
/* vt 0x08 | 80064920 */ virtual void setPosParam(f32, f32) {}
|
||||
/* vt 0x0C | 8049a940 */ virtual void setHoriParam(f32, f32) {}
|
||||
/* vt 0x10 | 8049a930 */ virtual void setDistParam(f32, f32) {}
|
||||
/* vt 0x14 | 8049a920 */ virtual void setAccParam(f32, f32) {}
|
||||
/* vt 0x18 | 80059820 */ virtual bool isPressed(u32 mask) {}
|
||||
/* vt 0x1C | 80059a60 */ virtual bool isAnyPressed(u32 mask) {}
|
||||
/* vt 0x20 | 80014e30 */ virtual bool isTriggered(u32 mask) {}
|
||||
/* vt 0x24 | 800599e0 */ virtual bool isReleased() {}
|
||||
/* vt 0x28 | 80059840 */ virtual bool isAllPressed() {}
|
||||
/* vt 0x2C | 80059a80 */ virtual bool isNotPressed() {}
|
||||
/* vt 0x08 | 80064920 */ virtual void setPosParam(f32, f32) {
|
||||
// TODO
|
||||
}
|
||||
/* vt 0x0C | 8049a940 */ virtual void setHoriParam(f32, f32) {
|
||||
// TODO
|
||||
}
|
||||
/* vt 0x10 | 8049a930 */ virtual void setDistParam(f32, f32) {
|
||||
// TODO
|
||||
}
|
||||
/* vt 0x14 | 8049a920 */ virtual void setAccParam(f32, f32) {
|
||||
// TODO
|
||||
}
|
||||
/* vt 0x18 | 80059820 */ virtual bool isPressed(u32 mask) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
/* vt 0x1C | 80059a60 */ virtual bool isAnyPressed(u32 mask) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
/* vt 0x20 | 80014e30 */ virtual bool isTriggered(u32 mask) {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
/* vt 0x24 | 800599e0 */ virtual bool isReleased() {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
/* vt 0x28 | 80059840 */ virtual bool isAllPressed() {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
/* vt 0x2C | 80059a80 */ virtual bool isNotPressed() {
|
||||
// TODO
|
||||
return false;
|
||||
}
|
||||
// We know the above are inline because if a class has any non-inline virtual functions,
|
||||
// then the TU that contains an implementation of said function gets the vtable,
|
||||
// and we know that eggController.cpp contains the vtable and the functions below
|
||||
@@ -163,14 +189,16 @@ public:
|
||||
class ControllerRumbleUnit {
|
||||
public:
|
||||
// 0x00 vtable | 8056ebb4
|
||||
inline ControllerRumbleUnit(): mFlag(0) { init(); }
|
||||
inline ControllerRumbleUnit() : mFlag(0) {
|
||||
init();
|
||||
}
|
||||
/* vt 0x08 | 8049a8e0 */ virtual ~ControllerRumbleUnit() {}
|
||||
|
||||
public:
|
||||
/* 0x04 */ const char *mPattern;
|
||||
/* 0x08 */ const char *mPatternPos;
|
||||
/* 0x0C */ s32 mTimer; // guess
|
||||
/* 0x10 */ f32 mRampUp; // guess
|
||||
/* 0x0C */ s32 mTimer; // guess
|
||||
/* 0x10 */ f32 mRampUp; // guess
|
||||
/* 0x14 */ f32 mIntensity; // guess
|
||||
/* 0x18 */ TBitFlag<u8> mFlag;
|
||||
/* 0x1C */ nw4r::ut::Node mNode;
|
||||
@@ -200,7 +228,6 @@ public:
|
||||
/* 8049a7f0 */ ControllerRumbleUnit *getUnitFromList(bool bGrabActive);
|
||||
};
|
||||
|
||||
|
||||
} // namespace EGG
|
||||
|
||||
#endif
|
||||
|
||||
+12
-12
@@ -14,17 +14,17 @@ bool increment(u16 *t) {
|
||||
|
||||
int dTgTimer_c::create() {
|
||||
switch (getSubtypeFromParams()) {
|
||||
case 0:
|
||||
mGetTargetTimeFunc = dTgTimer_c::getConstant0x50_Thunk;
|
||||
break;
|
||||
case 1:
|
||||
mTargetTime = getTimerFromParams() * 0x1e;
|
||||
mGetTargetTimeFunc = getStoredTargetTime;
|
||||
break;
|
||||
default:
|
||||
mTargetTime = getTimerFromParams();
|
||||
mGetTargetTimeFunc = getStoredTargetTime;
|
||||
break;
|
||||
case 0:
|
||||
mGetTargetTimeFunc = &dTgTimer_c::getConstant0x50_Thunk;
|
||||
break;
|
||||
case 1:
|
||||
mTargetTime = getTimerFromParams() * 0x1e;
|
||||
mGetTargetTimeFunc = &dTgTimer_c::getStoredTargetTime;
|
||||
break;
|
||||
default:
|
||||
mTargetTime = getTimerFromParams();
|
||||
mGetTargetTimeFunc = &dTgTimer_c::getStoredTargetTime;
|
||||
break;
|
||||
}
|
||||
resetTimer();
|
||||
return 1;
|
||||
@@ -68,7 +68,7 @@ u16 dTgTimer_c::getConstant0x50() {
|
||||
return 0x50;
|
||||
}
|
||||
|
||||
u16 dTgTimer_c::setTimer(u16 val) {
|
||||
void dTgTimer_c::setTimer(u16 val) {
|
||||
mTimer = val;
|
||||
}
|
||||
|
||||
|
||||
+7
-4
@@ -127,8 +127,8 @@ void create(int priority, EGG::Heap *commandHeap, EGG::Heap *archiveHeap, EGG::H
|
||||
}
|
||||
|
||||
/** 802eef30 */
|
||||
static void *loadToMainRAM(int entryNum, char *dst, EGG::Heap *heap, EGG::DvdRipper::EAllocDirection allocDir, s32 offset,
|
||||
u32 *outAmountRead, u32 *outFileSize, u32 decompressorType) {
|
||||
static void *loadToMainRAM(int entryNum, char *dst, EGG::Heap *heap, EGG::DvdRipper::EAllocDirection allocDir,
|
||||
s32 offset, u32 *outAmountRead, u32 *outFileSize, u32 decompressorType) {
|
||||
void *result;
|
||||
u32 amountRead = 0;
|
||||
u32 fileSize = 0;
|
||||
@@ -492,7 +492,9 @@ u32 mDvd_mountMemArchive_c::execute() {
|
||||
mDataPtr = archive;
|
||||
} else {
|
||||
if (data != nullptr) {
|
||||
delete data;
|
||||
// TODO so far data seems to have been passed around as void *
|
||||
// but this silences a compiler warning. Unsure about the actual type.
|
||||
delete (char *)data;
|
||||
}
|
||||
mAmountRead = 0;
|
||||
}
|
||||
@@ -568,7 +570,8 @@ mDvd_toMainRam_arc_c *mDvd_toMainRam_arc_c::create(EGG::Archive *arc, const char
|
||||
}
|
||||
|
||||
/** 802efe90 */
|
||||
mDvd_toMainRam_arc_c *mDvd_toMainRam_arc_c::createOrFail(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap) {
|
||||
mDvd_toMainRam_arc_c *mDvd_toMainRam_arc_c::createOrFail(EGG::Archive *arc, const char *path, int mountDirection,
|
||||
EGG::Heap *heap) {
|
||||
mDvd_toMainRam_arc_c *cmd = mDvd_toMainRam_arc_c::create(arc, path, mountDirection, heap);
|
||||
while (!cmd) {}
|
||||
return cmd;
|
||||
|
||||
@@ -591,13 +591,14 @@ void Material::SetColorElement(u32 colorType, s16 value) {
|
||||
// 28:[TevKCol->r] 29:[TevKCol->g] 30:[TevKCol->b] 31:[TevKCol->a]
|
||||
// clang-format off
|
||||
switch (colorType) {
|
||||
case 0: case 1: case 2: case 3:
|
||||
case 0: case 1: case 2: case 3: {
|
||||
if (mGXMemNum.matCol < 1 ) {
|
||||
break;
|
||||
}
|
||||
ut::Color *matCols = GetMatColAry();
|
||||
SetColorComponentValue(matCols, colorType , value);
|
||||
break;
|
||||
}
|
||||
case 4: case 5: case 6: case 7: case 8: case 9:
|
||||
case 10: case 11: case 12: case 13: case 14: case 15: {
|
||||
u32 regIdx = (colorType - 4) / 4;
|
||||
|
||||
@@ -94,18 +94,20 @@ FontInformation *ResFont::Rebuild(BinaryFileHeader *header) {
|
||||
case MAGIC_TEXGLYPH:
|
||||
ResolveOffset<u8>(reinterpret_cast<FontTextureGlyph *>(block + 1)->sheetImage, header);
|
||||
break;
|
||||
case MAGIC_CHARWIDTH:
|
||||
case MAGIC_CHARWIDTH: {
|
||||
FontWidth *width = reinterpret_cast<FontWidth *>(block + 1);
|
||||
if (width->next != 0) {
|
||||
ResolveOffset<FontWidth>(width->next, header);
|
||||
}
|
||||
break;
|
||||
case MAGIC_CHARMAP:
|
||||
}
|
||||
case MAGIC_CHARMAP: {
|
||||
FontCodeMap *map = reinterpret_cast<FontCodeMap *>(block + 1);
|
||||
if (map->next != 0) {
|
||||
ResolveOffset<FontCodeMap>(map->next, header);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MAGIC_GLGR:
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user