Files
wii-ipl/include/system/iplErrorHandler.h
coah 73795cb3fb cleanup(ErrorHandler): name set() arg storage fields (#875)
Rename unused debug-ish stash fields to match ErrorHandler::set params:
- unk_0x14 → mArg1 (char[4] from arg1)
- unk_0x0C → mArg2
- unk_0x10 → mArg3

Verified: ErrorHandler 100%/100%, build/43U/ok, DOL sha1
26116613f624061ba99c8d1a299aaa6efa85670d
2026-10-02 14:11:44 -05:00

75 lines
1.8 KiB
C++

#ifndef IPL_ERROR_HANDLER_H
#define IPL_ERROR_HANDLER_H
#include <revolution.h>
#include <egg/core.h>
#include "system/iplMessage.h"
#include "layout/iplLayout.h"
/*** Message IDs for the Error Message ***/
/* An error has occurred. */
#define MESG_ERR_DVD 0
/* The Wii System Memory is damaged. */
#define MESG_ERR_NAND 1
/* The system files are corrupted. */
#define MESG_ERR_FILE 2
/* This channel can't be used. */
#define MESG_ERR_CHANNEL 3
/* Error:003 unauthorized device has been detected. */
#define MESG_ERR_KEY2 4
namespace ipl {
class ErrorHandler {
public:
enum Type { NONE = 0, DEFAULT };
/** @param heap The work heap. */
ErrorHandler(EGG::Heap* heap);
void draw();
void check();
void calc();
BOOL isReady() { return mbReady == TRUE; }
/**
* @param type The error type.
* @param msgId The message ID that will be displayed.
* @param arg1 Unknown. Left as `NULL`.
* @param arg2 Unknown. Left as `0`.
* @param arg3 Unknown. Left as `-1`.
*/
void set(Type type, u32 msgId, const char* arg1 = NULL, int arg2 = 0, int arg3 = -1);
/**
* @param type The error type.
* @param result The result it thrown.
* @param file The source file name.
* @param line The source file line.
*/
void log(const char* type, int result, const char* file, int line);
private:
BOOL mbReady; // 0x00
Type mType; // 0x04
int mMessageID; // 0x08
int mArg2;
int mArg3;
char mArg1[4];
u8* mpArcData; // 0x18
u32 mArcSize; // 0x1C
layout::Object* mpLayout; // 0x20
};
} // namespace ipl
#endif // IPL_ERROR_HANDLER_H