eggException with two minor problems (#53)

* eggException with two minor problems

* Fix

* One minor problem

---------

Co-authored-by: elijah-thomas774 <elijahthomas774@gmail.com>
This commit is contained in:
robojumper
2024-10-06 22:36:36 +02:00
committed by GitHub
parent f8e61c7de8
commit 558db54bf4
9 changed files with 299 additions and 36 deletions
+9
View File
@@ -7,6 +7,8 @@
#include <common.h>
extern "C" GXRenderModeObj lbl_8055FC64;
namespace EGG {
class Video {
@@ -28,6 +30,13 @@ public:
static u32 getTickPerVRetrace();
static const GXRenderModeObj *getStandardRenderModeObj(const RenderModeObjSet *);
GXRenderModeObj* getCurrentOrFallbackRenderModeObj() const {
if (pRenderMode == nullptr) {
return &lbl_8055FC64;
}
return pRenderMode;
}
public:
void setBlack(bool b) {
VISetBlack(!mFlag.onBit(0));
+40 -1
View File
@@ -1,6 +1,45 @@
#ifndef EGG_EXCEPTION_H
#define EGG_EXCEPTION_H
namespace EGG {} // namespace EGG
#include <common.h>
#include <nw4r/db/db_console.h>
namespace EGG {
class Heap;
class CoreStatus;
class Exception {
public:
Exception(u16, u16, u16, EGG::Heap *, int);
virtual ~Exception();
static void ExceptionWaitTime(u32 time);
static bool ExceptionCallback(nw4r::db::ConsoleHandle handle, void *);
static bool ExceptionCallback_(nw4r::db::ConsoleHandle handle, void *);
static Exception *create(u16, u16, u16, Heap *, int);
static Exception *sException;
volatile static nw4r::db::ConsoleHandle sConsoleHandle;
static void *sMapFileWorks;
static u32 sMapFileNumMax;
static u32 sCurrentMapFileNum;
static volatile bool sUserCallbackMode;
// inofficial
static void (*sPreException)();
static void (*sUserCallbackFunc)(CoreStatus *status);
static s16 sExceptionDisplayInfo;
static void SetUserCallback(void (*cb)(CoreStatus *status));
static void SetPreExceptionCallback(void (*cb)());
static void SetCallbackMode(bool);
static void SetCallbackArgs(void *);
nw4r::db::ConsoleHandle GetConsoleHandle();
};
} // namespace EGG
#endif