mirror of
https://github.com/zeldaret/ss
synced 2026-08-22 06:44:26 -04:00
Move TSystem::initialize implementation into d_sys.cpp
This commit is contained in:
@@ -2839,7 +2839,7 @@ setPosParam__Q23EGG14CoreControllerFff = .text:0x80064920; // type:function size
|
||||
initialize__Q23EGG129TSystem<Q23EGG5Video,Q23EGG12AsyncDisplay,Q23EGG10XfbManager,Q23EGG14SimpleAudioMgr,Q23EGG12SceneManager,Q23EGG15PerformanceView>Fv = .text:0x80064930; // type:function size:0x1F4
|
||||
execute__6dSys_cFv = .text:0x80064B30; // type:function size:0x268
|
||||
fixHeaps__7dSystemFv = .text:0x80064DA0; // type:function size:0xB8
|
||||
__sinit_\d_sys_cpp = .text:0x80064E60; // type:function size:0x34
|
||||
__sinit_\d_sys_cpp = .text:0x80064E60; // type:function size:0x34 scope:local
|
||||
initRenderMode__Q23EGG129TSystem<Q23EGG5Video,Q23EGG12AsyncDisplay,Q23EGG10XfbManager,Q23EGG14SimpleAudioMgr,Q23EGG12SceneManager,Q23EGG15PerformanceView>Fv = .text:0x80064EA0; // type:function size:0x4
|
||||
getVideo__Q23EGG129TSystem<Q23EGG5Video,Q23EGG12AsyncDisplay,Q23EGG10XfbManager,Q23EGG14SimpleAudioMgr,Q23EGG12SceneManager,Q23EGG15PerformanceView>Fv = .text:0x80064EB0; // type:function size:0x8
|
||||
getSystemHeap__Q23EGG129TSystem<Q23EGG5Video,Q23EGG12AsyncDisplay,Q23EGG10XfbManager,Q23EGG14SimpleAudioMgr,Q23EGG12SceneManager,Q23EGG15PerformanceView>Fv = .text:0x80064EC0; // type:function size:0x8
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define D_SYS_H
|
||||
|
||||
#include "common.h"
|
||||
#include "egg/core/eggAsyncDisplay.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "egg/core/eggSystem.h"
|
||||
#include "nw4r/ut/ut_Color.h"
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
#define EGG_SYSTEM_H
|
||||
|
||||
#include "common.h"
|
||||
#include "egg/core/eggController.h"
|
||||
#include "egg/core/eggDisplay.h"
|
||||
#include "egg/core/eggDvdFile.h"
|
||||
#include "egg/core/eggGraphicsFifo.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "egg/core/eggVideo.h"
|
||||
#include "egg/core/eggXfbManager.h"
|
||||
#include "rvl/WPAD.h"
|
||||
#include "toBeSorted/d_exception.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -324,8 +316,14 @@ public:
|
||||
/* 0x4c */ u32 _4c;
|
||||
};
|
||||
|
||||
class Display;
|
||||
class Heap;
|
||||
class PerformanceView;
|
||||
class SceneManager;
|
||||
class SimpleAudioMgr;
|
||||
class Thread;
|
||||
class Video;
|
||||
class XfbManager;
|
||||
|
||||
class ConfigurationData {
|
||||
public:
|
||||
@@ -385,13 +383,14 @@ public:
|
||||
void onEndFrame() override {}
|
||||
|
||||
void initRenderMode() override {}
|
||||
|
||||
void initialize() override {}
|
||||
|
||||
Video *getVideo() override {
|
||||
return static_cast<Video *>(mVideo);
|
||||
}
|
||||
|
||||
Heap *getSystemHeap() override {
|
||||
return mSystemHeap;
|
||||
return static_cast<Heap *>(mSystemHeap);
|
||||
}
|
||||
|
||||
Display *getDisplay() override {
|
||||
@@ -417,43 +416,6 @@ public:
|
||||
return static_cast<SimpleAudioMgr *>(mAudioMgr);
|
||||
}
|
||||
|
||||
void initialize() override {
|
||||
DVDInit();
|
||||
SCInit();
|
||||
|
||||
initMemory();
|
||||
|
||||
Heap *heap = Heap::sCurrentHeap;
|
||||
|
||||
GraphicsFifo::create(mGraphicsFifoSize, heap);
|
||||
mHeap::createAssertHeap(mRootHeapMem1);
|
||||
|
||||
mVideo = new (heap) TVideo(&gUnkRenderModeObjSet);
|
||||
|
||||
mXfbMgr = new (heap) TXfbManager();
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
mXfbMgr->attach(new (heap) Xfb(mRootHeapMem2));
|
||||
}
|
||||
|
||||
mDisplay = new (heap) TDisplay(1);
|
||||
mDisplay->setClearColor(nw4r::ut::Color::BLACK);
|
||||
mDisplay->clearEFB();
|
||||
|
||||
Thread::initialize();
|
||||
mSystemThread = new (heap) Thread(OSGetCurrentThread(), 4);
|
||||
|
||||
DvdFile::initialize();
|
||||
|
||||
CoreControllerMgr::setWPADWorkSize(WPADGetWorkMemorySize() + 228);
|
||||
CoreControllerMgr::createInstance();
|
||||
|
||||
exceptionCreate(heap);
|
||||
|
||||
BaseSystem::mConfigData->getSystemHeap()->mFlag.setBit(0);
|
||||
|
||||
mHeap::setCurrentHeap(mHeap::g_assertHeap);
|
||||
}
|
||||
|
||||
public:
|
||||
/* 0x38 */ u32 mGraphicsFifoSize;
|
||||
/* 0x3C */ GXRenderModeObj *mRenderMode;
|
||||
|
||||
@@ -18,10 +18,15 @@
|
||||
#include "d/lyt/d_lyt_system_window.h"
|
||||
#include "d/snd/d_snd_mgr.h"
|
||||
#include "egg/core/eggAssertHeap.h"
|
||||
#include "egg/core/eggAsyncDisplay.h"
|
||||
#include "egg/core/eggController.h"
|
||||
#include "egg/core/eggDisplay.h"
|
||||
#include "egg/core/eggDvdFile.h"
|
||||
#include "egg/core/eggExpHeap.h"
|
||||
#include "egg/core/eggGraphicsFifo.h"
|
||||
#include "egg/core/eggSystem.h"
|
||||
#include "egg/core/eggVideo.h"
|
||||
#include "egg/core/eggXfbManager.h"
|
||||
#include "egg/gfx/eggStateGX.h"
|
||||
#include "f/f_manager.h"
|
||||
#include "m/m_dvd.h"
|
||||
@@ -32,6 +37,7 @@
|
||||
#include "nw4r/ut/ut_Color.h"
|
||||
#include "toBeSorted/arc_callback_handler.h"
|
||||
#include "toBeSorted/d_d3d.h"
|
||||
#include "toBeSorted/d_exception.h"
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/nand_request_thread.h"
|
||||
#include "toBeSorted/save_manager.h"
|
||||
@@ -42,6 +48,7 @@
|
||||
|
||||
#include "rvl/GX.h"
|
||||
#include "rvl/OS.h"
|
||||
#include "rvl/WPAD.h"
|
||||
|
||||
namespace dSystem {
|
||||
|
||||
@@ -52,6 +59,44 @@ void *s_NewMEM1ArenaHi;
|
||||
|
||||
}
|
||||
|
||||
template <>
|
||||
void System::initialize() {
|
||||
DVDInit();
|
||||
SCInit();
|
||||
|
||||
initMemory();
|
||||
|
||||
Heap *heap = Heap::sCurrentHeap;
|
||||
|
||||
GraphicsFifo::create(mGraphicsFifoSize, heap);
|
||||
mHeap::createAssertHeap(mRootHeapMem1);
|
||||
|
||||
mVideo = new (heap) EGG::Video(&gUnkRenderModeObjSet);
|
||||
|
||||
mXfbMgr = new (heap) EGG::XfbManager();
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
mXfbMgr->attach(new (heap) Xfb(mRootHeapMem2));
|
||||
}
|
||||
|
||||
mDisplay = new (heap) EGG::AsyncDisplay(1);
|
||||
mDisplay->setClearColor(nw4r::ut::Color::BLACK);
|
||||
mDisplay->clearEFB();
|
||||
|
||||
Thread::initialize();
|
||||
mSystemThread = new (heap) Thread(OSGetCurrentThread(), 4);
|
||||
|
||||
DvdFile::initialize();
|
||||
|
||||
CoreControllerMgr::setWPADWorkSize(WPADGetWorkMemorySize() + 228);
|
||||
CoreControllerMgr::createInstance();
|
||||
|
||||
exceptionCreate(heap);
|
||||
|
||||
BaseSystem::mConfigData->getSystemHeap()->mFlag.setBit(0);
|
||||
|
||||
mHeap::setCurrentHeap(mHeap::g_assertHeap);
|
||||
}
|
||||
|
||||
System SysConfig;
|
||||
|
||||
System *dSys_c::ms_configuration_p;
|
||||
|
||||
Reference in New Issue
Block a user