mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-30 18:01:53 -04:00
m_Do_main debug (#2965)
This commit is contained in:
@@ -9,7 +9,7 @@ public:
|
||||
void init(JHICommonMem*, u32, u32, u32);
|
||||
int load();
|
||||
|
||||
u32 getMsgBufSize();
|
||||
u32 getMsgBufSize() { return m_msgBufSize; }
|
||||
|
||||
/* 0x00 */ JHICommonMem* mp_memBuffer;
|
||||
/* 0x04 */ u32 field_0x4;
|
||||
@@ -47,7 +47,9 @@ public:
|
||||
int writeBegin();
|
||||
void writeEnd();
|
||||
int write(void*, int);
|
||||
|
||||
|
||||
void init() { m_header.init(); }
|
||||
|
||||
/* 0x00 */ Header m_header;
|
||||
/* 0x38 */ JHIMemBuf* mp_memBuffer;
|
||||
};
|
||||
@@ -55,7 +57,6 @@ public:
|
||||
class JHICommBufReader {
|
||||
public:
|
||||
struct Header : public JHICommBufHeader {
|
||||
int load();
|
||||
void updateGetAdrs();
|
||||
u32 getReadableSize() const;
|
||||
void addGetAdrs(int);
|
||||
@@ -63,6 +64,14 @@ public:
|
||||
void alignGetAdrs();
|
||||
int getContSize();
|
||||
|
||||
int load() {
|
||||
int result = JHICommBufHeader::load();
|
||||
if (!result) {
|
||||
field_0x30 = field_0xc;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 0x30 */ u32 field_0x30;
|
||||
};
|
||||
|
||||
@@ -71,8 +80,17 @@ public:
|
||||
void readEnd();
|
||||
int read(void*, int);
|
||||
|
||||
u32 available() { return m_header.load() ? 0xFFFFFFFF : m_header.getReadableSize(); }
|
||||
|
||||
u32 getMsgBufSize() { return m_header.getMsgBufSize(); }
|
||||
void init() { m_header.init(); }
|
||||
|
||||
u32 available() {
|
||||
if (m_header.load()) {
|
||||
return 0xFFFFFFFF;
|
||||
} else {
|
||||
return m_header.getReadableSize();
|
||||
}
|
||||
}
|
||||
|
||||
/* 0x00 */ Header m_header;
|
||||
/* 0x34 */ JHIMemBuf* mp_memBuffer;
|
||||
};
|
||||
@@ -81,12 +99,26 @@ struct JHICmnMem {
|
||||
u32 sendBegin() { return mp_writeBuf->writeBegin(); }
|
||||
int sendCont(const void* param_0, int param_1) { return mp_writeBuf->write((void*)param_0, param_1); }
|
||||
void sendEnd() { mp_writeBuf->writeEnd(); }
|
||||
u32 available() { return mp_readBuf->available(); }
|
||||
u32 getMaxReaderableSize() { return mp_readBuf->getMsgBufSize(); }
|
||||
|
||||
void setBuf(JHICommBufReader* pReader, JHICommBufWriter* pWriter) {
|
||||
mp_readBuf = pReader;
|
||||
mp_writeBuf = pWriter;
|
||||
}
|
||||
|
||||
void initBuffers() {
|
||||
mp_readBuf->init();
|
||||
mp_writeBuf->init();
|
||||
}
|
||||
|
||||
int receive(void* param_1, int param_2) {
|
||||
int result = 0;
|
||||
result = mp_readBuf->read(param_1, param_2);
|
||||
mp_readBuf->readEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 0x0 */ JHICommBufReader* mp_readBuf;
|
||||
/* 0x4 */ JHICommBufWriter* mp_writeBuf;
|
||||
/* 0x8 */ u8 field_0x8;
|
||||
|
||||
@@ -11,6 +11,12 @@ inline u32 JHIhtonl(u32 v) {
|
||||
#endif
|
||||
}
|
||||
|
||||
inline u32 JHIntohl(u32 v) {
|
||||
return v;
|
||||
}
|
||||
|
||||
template<typename T> class JHIComPortManager;
|
||||
|
||||
template <typename T>
|
||||
struct JHITag {
|
||||
JHITag(u32 tag) {
|
||||
@@ -23,20 +29,20 @@ struct JHITag {
|
||||
sp10[0] = JHIhtonl(m_tag);
|
||||
sp10[1] = JHIhtonl(param_1);
|
||||
|
||||
if (mp_data->sendBegin() >= param_1 + 8) {
|
||||
mp_data->sendCont(sp10, 8);
|
||||
mp_data->sendCont(param_0, param_1);
|
||||
mp_data->sendEnd();
|
||||
if (mp_data->port.sendBegin() >= param_1 + 8) {
|
||||
mp_data->port.sendCont(sp10, 8);
|
||||
mp_data->port.sendCont(param_0, param_1);
|
||||
mp_data->port.sendEnd();
|
||||
}
|
||||
|
||||
return param_1;
|
||||
}
|
||||
|
||||
|
||||
virtual ~JHITag() {}
|
||||
virtual void receive(const char*, s32);
|
||||
virtual void receive(const char*, s32) {}
|
||||
|
||||
/* 0x4 */ u32 m_tag;
|
||||
/* 0x8 */ T* mp_data;
|
||||
/* 0x8 */ JHIComPortManager<T>* mp_data;
|
||||
};
|
||||
|
||||
class JHIMemBuf;
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
JHIpvector() { m_size = 0; }
|
||||
|
||||
s32 size() const { return m_size; }
|
||||
T& get(u32 i) const { return m_vector[i]; }
|
||||
T get(u32 i) const { return m_vector[i]; }
|
||||
|
||||
s32 push_back(T p) {
|
||||
if (m_size >= I) {
|
||||
@@ -35,10 +35,57 @@ public:
|
||||
T& getRefPort() { return port; }
|
||||
|
||||
void addTag(JHITag<T>* pTag) {
|
||||
field_0x8 = this;
|
||||
pTag->mp_data = this;
|
||||
field_0xc.push_back(pTag);
|
||||
}
|
||||
|
||||
JHITag<T>* find(u32 param_1) {
|
||||
for (u32 i = 0; i < field_0xc.size(); i++) {
|
||||
JHITag<T>* tag = field_0xc.get(i);
|
||||
if (tag->m_tag == param_1) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void dispatchMessage() {
|
||||
u32 r29 = port.available();
|
||||
while (true) {
|
||||
if (!field_0x10040) {
|
||||
if (r29 < 8) {
|
||||
return;
|
||||
}
|
||||
port.receive(&field_0x10038, 8);
|
||||
r29 -= 8;
|
||||
field_0x10038 = JHIntohl(field_0x10038);
|
||||
field_0x1003c = JHIntohl(field_0x1003c);
|
||||
field_0x10040 = 1;
|
||||
JHITag<T>* r27 = find(field_0x10038);
|
||||
if (field_0x1003c > port.getMaxReaderableSize()) {
|
||||
port.initBuffers();
|
||||
OSReport("JHostIO::ERROR: JHIComportManager: invalid datasize ( port.initialized )\n");
|
||||
} else if (!r27) {
|
||||
OSReport("JHostIO::ERROR: JHIComportManager: invalid tag message\n");
|
||||
}
|
||||
}
|
||||
if (!field_0x10040) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (r29 < field_0x1003c) {
|
||||
return;
|
||||
}
|
||||
u32 r26 = port.receive(field_0x38, field_0x1003c);
|
||||
r29 -= r26;
|
||||
JHITag<T>* r28 = find(field_0x10038);
|
||||
field_0x10040 = 0;
|
||||
if (r28) {
|
||||
r28->receive(field_0x38, field_0x1003c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static JHIComPortManager<T>* create() {
|
||||
if (instance == NULL) {
|
||||
instance = new JHIComPortManager<T>();
|
||||
@@ -47,16 +94,19 @@ public:
|
||||
return instance;
|
||||
}
|
||||
|
||||
static JHIComPortManager<T>* getInstance() { return instance; }
|
||||
|
||||
static JHIComPortManager<T>* instance;
|
||||
|
||||
/* 0x00000 */ T port;
|
||||
/* 0x00008 */ JHIComPortManager<T>* field_0x8;
|
||||
/* 0x0000C */ JHIpvector<JHITag<T>*, 10> field_0xc;
|
||||
/* 0x00038 */ u8 field_0x38[0x10000];
|
||||
/* 0x00038 */ char field_0x38[0x10000];
|
||||
/* 0x10038 */ u32 field_0x10038;
|
||||
/* 0x1003C */ u32 field_0x1003c;
|
||||
/* 0x10040 */ u8 field_0x10040;
|
||||
/* 0x10041 */ u8 field_0x10041;
|
||||
};
|
||||
|
||||
void JORInit();
|
||||
|
||||
#endif /* JORENTRY_H */
|
||||
|
||||
@@ -182,7 +182,9 @@ public:
|
||||
void startUpdateNode(JORReflexible* obj) { putNode(obj); }
|
||||
|
||||
void genNodeSub(const char* label, JORReflexible* i_node, u32, u32);
|
||||
void putNode(JORReflexible* obj);
|
||||
void putNode(JORReflexible* obj) {
|
||||
mOutputStream << (uintptr_t)obj;
|
||||
}
|
||||
void invalidNode(JORReflexible* i_node, u32);
|
||||
|
||||
void genControl(u32 type, u32 kind, const char* label, u32 style, u32 id,
|
||||
@@ -305,7 +307,4 @@ public:
|
||||
/* 0x10000 */ JSUMemoryOutputStream mOutputStream;
|
||||
};
|
||||
|
||||
JORMContext* attachJORMContext(u32);
|
||||
void releaseJORMContext(JORMContext*);
|
||||
|
||||
#endif /* JORMCONTEXT_H */
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
#ifndef JORSERVER_H
|
||||
#define JORSERVER_H
|
||||
|
||||
#include "JSystem/JHostIO/JOREntry.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include "JSystem/JHostIO/JHIComm.h"
|
||||
#include "JSystem/JHostIO/JHIhioASync.h"
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
void JOR_MESSAGELOOP();
|
||||
void JOR_INIT();
|
||||
void JOR_SETROOTNODE(const char*, JORReflexible*, u32, u32);
|
||||
|
||||
u32 JORMessageBox(const char* message, const char* title, u32 style);
|
||||
|
||||
struct JOREventCallbackListNode {
|
||||
@@ -20,6 +18,14 @@ struct JOREventCallbackListNode {
|
||||
virtual int JORAct(u32, const char*);
|
||||
virtual ~JOREventCallbackListNode();
|
||||
|
||||
bool JORIsAcceptableID(u32 eventID) const {
|
||||
bool result = false;
|
||||
if (field_0xc <= eventID && eventID <= field_0x10) {
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 0x04 */ JGadget::TLinkListNode m_node;
|
||||
/* 0x0C */ u32 field_0xc;
|
||||
/* 0x10 */ u32 field_0x10;
|
||||
@@ -32,6 +38,9 @@ class JORHostInfo_CalendarTime;
|
||||
|
||||
class JORServer : public JHITag<JHICmnMem> {
|
||||
public:
|
||||
typedef void (*EventFunc)(u32,char *);
|
||||
typedef JGadget::TLinkList<JOREventCallbackListNode, -4> CallbackLinkList;
|
||||
|
||||
enum ECommand {
|
||||
ECommand_GetRootObj = 1,
|
||||
ECommand_GenObjInfo = 3,
|
||||
@@ -94,6 +103,17 @@ public:
|
||||
void setRootNode(const char*, JORReflexible*, u32, u32);
|
||||
void doneEvent();
|
||||
|
||||
bool getEvent() { return m_event; }
|
||||
void setEvent(bool event) { m_event = event; }
|
||||
void setEventDone(bool eventDone) { m_eventDone = eventDone; }
|
||||
u32 getEventNum() { return m_eventNum; }
|
||||
char* getEventName() { return m_eventName; }
|
||||
EventFunc getEventFunc() { return m_eventFunc; }
|
||||
void setEventFunc(EventFunc func) { m_eventFunc = func; }
|
||||
bool isEventCallbackListEnabled() const { return m_isEventCallbackListEnabled; }
|
||||
void enableEventCallbackList(bool enable) { m_isEventCallbackListEnabled = enable; }
|
||||
CallbackLinkList* referEventCallbackList() { return &m_eventCallbackList; }
|
||||
|
||||
static JORServer* getInstance() { return instance; }
|
||||
static JORServer* instance;
|
||||
|
||||
@@ -106,9 +126,56 @@ public:
|
||||
/* 0x1006D */ bool m_eventDone;
|
||||
/* 0x10070 */ u32 m_eventNum;
|
||||
/* 0x10074 */ char m_eventName[0x1000];
|
||||
/* 0x11074 */ void* m_eventFunc;
|
||||
/* 0x11074 */ EventFunc m_eventFunc;
|
||||
/* 0x11078 */ bool m_isEventCallbackListEnabled;
|
||||
/* 0x1107C */ JGadget::TLinkList<JOREventCallbackListNode, -4> m_eventCallbackList;
|
||||
/* 0x1107C */ CallbackLinkList m_eventCallbackList;
|
||||
};
|
||||
|
||||
inline void JOR_MESSAGELOOP() {
|
||||
JORServer* server = JORServer::getInstance();
|
||||
JHIComPortManager<JHICmnMem>::getInstance()->dispatchMessage();
|
||||
if (server->getEvent()) {
|
||||
server->setEvent(false);
|
||||
server->setEventDone(false);
|
||||
u32 eventNum = server->getEventNum();
|
||||
char* eventName = server->getEventName();
|
||||
if (server->isEventCallbackListEnabled() && eventNum >= 0x80000000) {
|
||||
JORServer::CallbackLinkList* list = server->referEventCallbackList();
|
||||
JORServer::CallbackLinkList::iterator end = list->end();
|
||||
for (JORServer::CallbackLinkList::iterator it = list->begin(); it != end;) {
|
||||
JOREventCallbackListNode& callback = *it;
|
||||
++it;
|
||||
if (!callback.JORIsAcceptableID(eventNum)) {
|
||||
continue;
|
||||
}
|
||||
if (callback.JORAct(eventNum, eventName)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
JORServer::EventFunc func = server->getEventFunc();
|
||||
if (func) {
|
||||
func(eventNum, eventName);
|
||||
}
|
||||
}
|
||||
server->doneEvent();
|
||||
}
|
||||
JHIEventLoop();
|
||||
}
|
||||
|
||||
inline void JOR_INIT() {
|
||||
JORInit();
|
||||
JORServer::getInstance()->setEventFunc(NULL);
|
||||
}
|
||||
inline void JOR_SETROOTNODE(const char* name, JORReflexible* node, u32 param_3, u32 param_4) {
|
||||
JORServer::getInstance()->setRootNode(name, node, param_3, param_4);
|
||||
}
|
||||
|
||||
inline JORMContext* attachJORMContext(u32 msgID) {
|
||||
return JORServer::getInstance()->attachMCTX(msgID);
|
||||
}
|
||||
inline void releaseJORMContext(JORMContext* mctx) {
|
||||
JORServer::getInstance()->releaseMCTX(mctx);
|
||||
}
|
||||
|
||||
#endif /* JORSERVER_H */
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
static void dump(void);
|
||||
|
||||
static JKRAram* getManager() { return sAramObject; }
|
||||
static JKRAramHeap* getAramHeap() { return getManager()->mAramHeap; }
|
||||
static JKRAramHeap* getAramHeap() { return sAramObject->mAramHeap; }
|
||||
static JSUList<JKRAMCommand>& getCommandList() { return sAramCommandList; }
|
||||
|
||||
static u8 decideAramGroupId(int groupId) {
|
||||
|
||||
@@ -62,11 +62,14 @@ namespace JUTAssertion {
|
||||
void setMessageCount(int);
|
||||
|
||||
u32 getSDevice();
|
||||
void showAssert(u32 device, const char * file, int line, const char * assertion);
|
||||
void showAssert_f(u32 device, const char* file, int line, const char* msg, ...);
|
||||
void setWarningMessage_f(u32 device, char * file, int line, const char * fmt, ...);
|
||||
void setLogMessage_f(u32 device, char* file, int line, const char* fmt, ...);
|
||||
void setConfirmMessage(u32 param_1, char* file, int line, bool param_4, const char* msg);
|
||||
|
||||
inline void showAssert(u32 device, const char* file, int line, const char* msg) {
|
||||
showAssert_f(device, file, line, "%s", msg);
|
||||
}
|
||||
};
|
||||
|
||||
extern bool sAssertVisible;
|
||||
|
||||
@@ -74,4 +74,8 @@ inline JUTVideo* JUTGetVideoManager() {
|
||||
return JUTVideo::getManager();
|
||||
}
|
||||
|
||||
inline void JUTDestroyVideoManager() {
|
||||
JUTVideo::destroyManager();
|
||||
}
|
||||
|
||||
#endif /* JUTVIDEO_H */
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define D_DEBUG_CAMERA_H
|
||||
|
||||
#include "d/d_camera.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
|
||||
enum dDbgCam_KeyAction {
|
||||
|
||||
@@ -8,13 +8,13 @@ class dDebugPad_c {
|
||||
public:
|
||||
dDebugPad_c();
|
||||
|
||||
bool Active();
|
||||
bool Active() { return mIsActive; }
|
||||
bool Update();
|
||||
bool Report(int, int, JUtility::TColor, const char*, ...);
|
||||
bool Enable(s32);
|
||||
bool Trigger();
|
||||
|
||||
/* 0x0 */ u8 mIsActive;
|
||||
/* 0x0 */ bool mIsActive;
|
||||
/* 0x1 */ u8 mTrigger;
|
||||
/* 0x4 */ s32 mMode;
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
void check();
|
||||
void diff();
|
||||
|
||||
static FixedMemoryCheck* easyCreate(void*, s32);
|
||||
static FixedMemoryCheck* easyCreate(void* param_1, s32 param_2) { return easyCreate(param_1, u32(param_2)); }
|
||||
static FixedMemoryCheck* easyCreate(void*, u32);
|
||||
static void checkAll();
|
||||
static void diffAll();
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define M_DO_M_DO_HOSTIO_H
|
||||
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include <string.h>
|
||||
|
||||
class mDoHIO_child_c {
|
||||
@@ -59,7 +58,9 @@ public:
|
||||
void update();
|
||||
void updateChild(s8);
|
||||
void deleteChild(s8);
|
||||
int createChild(const char*, JORReflexible*);
|
||||
s8 createChild(const char* i_name, JORReflexible* i_node) {
|
||||
return mSub.createChild(i_name, i_node);
|
||||
}
|
||||
|
||||
virtual void genMessage(JORMContext*);
|
||||
virtual ~mDoHIO_root_c();
|
||||
@@ -71,7 +72,9 @@ extern mDoHIO_root_c mDoHIO_root;
|
||||
|
||||
void mDoHIO_updateChild(s8 i_no);
|
||||
void mDoHIO_deleteChild(s8 i_no);
|
||||
s8 mDoHIO_createChild(const char*, JORReflexible*);
|
||||
inline s8 mDoHIO_createChild(const char* i_name, JORReflexible* i_node) {
|
||||
return mDoHIO_root.createChild(i_name, i_node);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#define mDoHIO_CREATE_CHILD(i_name, i_node) mDoHIO_createChild(i_name, i_node)
|
||||
|
||||
@@ -130,10 +130,6 @@ void showAssert_f(u32 device, const char* file, int line, const char* msg, ...)
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void showAssert(u32 device, const char* file, int line, const char* msg) {
|
||||
showAssert_f(device, file, line, "%s", msg);
|
||||
}
|
||||
|
||||
void setWarningMessage_f_va(u32 device, const char* file, int line, const char* msg, va_list args) {
|
||||
u32 messageLife = sMessageLife;
|
||||
bool r26 = false;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/d_item.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "f_ap/f_ap_game.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "JSystem/JUtility/JUTDbPrint.h"
|
||||
#include "JSystem/JUtility/JUTReport.h"
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "d/d_event_debug.h"
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "JSystem/JHostIO/JORMContext.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <dolphin/gf/GFPixel.h>
|
||||
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "c/c_damagereaction.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "d/d_meter_map.h"
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_map.h"
|
||||
#include "d/d_menu_window.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "SSystem/SComponent/c_malloc.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
static void my_OSCancelAlarmAll() {}
|
||||
|
||||
static void destroyVideo() {
|
||||
JUTVideo::destroyManager();
|
||||
JUTDestroyVideoManager();
|
||||
GXSetDrawDoneCallback(NULL);
|
||||
VISetBlack(1);
|
||||
VIFlush();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
#if DEBUG
|
||||
|
||||
@@ -460,7 +460,7 @@ void myExceptionCallback(u16, OSContext*, u32, u32) {
|
||||
}
|
||||
}
|
||||
DVDChangeDir("/map/Final/Release");
|
||||
JUTVideo::destroyManager();
|
||||
JUTDestroyVideoManager();
|
||||
GXSetDrawDoneCallback(NULL);
|
||||
VISetBlack(0);
|
||||
VIFlush();
|
||||
|
||||
+10
-10
@@ -89,10 +89,6 @@ static HeapCheck* HeapCheckTable[8] = {
|
||||
&ArchiveHeapCheck, &J2dHeapCheck, &HostioHeapCheck, &CommandHeapCheck,
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
mDoMain_HIO_c mDoMain_HIO;
|
||||
#endif
|
||||
|
||||
void printFrameLine() {
|
||||
OSCalendarTime calendar;
|
||||
OSTime time = OSGetTime();
|
||||
@@ -217,6 +213,10 @@ static u8 mPrintFrameLine;
|
||||
/* 80450B1A 0002+00 data_80450B1A None */
|
||||
static u8 mCheckHeap;
|
||||
|
||||
#if DEBUG
|
||||
mDoMain_HIO_c mDoMain_HIO;
|
||||
#endif
|
||||
|
||||
void debugDisplay() {
|
||||
static const char* desc1[5] = {
|
||||
"", "TotalFree", "MaxUsed ", "Used ", "RelUsed ",
|
||||
@@ -726,7 +726,7 @@ void main01(void) {
|
||||
#else
|
||||
const int audioHeapSize = 0x14D800;
|
||||
#endif
|
||||
g_mDoAud_audioHeap = JKRCreateSolidHeap(audioHeapSize, JKRHeap::getCurrentHeap(), false);
|
||||
g_mDoAud_audioHeap = JKRCreateSolidHeap(audioHeapSize, JKRGetCurrentHeap(), false);
|
||||
|
||||
do {
|
||||
static u32 frame;
|
||||
@@ -779,6 +779,8 @@ void main01(void) {
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
JHIComPortManager<JHICmnMem>* JHIComPortManager<JHICmnMem>:: instance;
|
||||
|
||||
// DEBUG NONMATCHING
|
||||
void parse_args(int argc, const char* argv[]) {
|
||||
int i;
|
||||
@@ -885,7 +887,7 @@ void main(int argc, const char* argv[]) {
|
||||
} while (true);
|
||||
}
|
||||
|
||||
if (!(OSGetResetCode() >> 0x1F)) {
|
||||
if (!((OSGetResetCode() & 0x80000000) ? 1 : 0)) {
|
||||
mDoRst::offReset();
|
||||
mDoRst::offResetPrepare();
|
||||
mDoRst::off3ButtonReset();
|
||||
@@ -922,16 +924,14 @@ void main(int argc, const char* argv[]) {
|
||||
if (disk_id->gameVersion > 0x90) {
|
||||
mDoMain::developmentMode = 1;
|
||||
} else if (disk_id->gameVersion > 0x80) {
|
||||
u32 consoleType = OSGetConsoleType();
|
||||
mDoMain::developmentMode = (consoleType >> 0x1C) & 1;
|
||||
mDoMain::developmentMode = (OSGetConsoleType() & OS_CONSOLE_DEVELOPMENT) != 0;
|
||||
} else {
|
||||
mDoMain::developmentMode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
OS_REPORT("メインスレッドを作成します\n");
|
||||
s32 priority = OSGetThreadPriority(current_thread);
|
||||
OSCreateThread(&mainThread, (void*(*)(void*))main01, 0, stack + sizeof(mainThreadStack), sizeof(mainThreadStack), priority, 0);
|
||||
OSCreateThread(&mainThread, (void*(*)(void*))main01, 0, stack + sizeof(mainThreadStack), sizeof(mainThreadStack), OSGetThreadPriority(current_thread), 0);
|
||||
OSResumeThread(&mainThread);
|
||||
OS_REPORT("メインスレッドを起動しました <%x>\n", &mainThread);
|
||||
OSSetThreadPriority(current_thread, 0x1F);
|
||||
|
||||
Reference in New Issue
Block a user