diff --git a/renderd7.cpp b/renderd7.cpp index ad048dd..4b52fbd 100644 --- a/renderd7.cpp +++ b/renderd7.cpp @@ -607,6 +607,26 @@ void MetrikThread(RenderD7::Parameter param) { RenderD7::Thread::sleep(1000 * 1); // wait; also, this is needed to allow for concurrency (refer to the documentation for m3d::Thread::sleep()) } } + +void RenderD7::Init::Graphics() +{ + C3D_Init(C3D_DEFAULT_CMDBUF_SIZE); + C2D_Init(size_t(maxobj__)); + C2D_Prepare(); + Top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT); + TopRight = C2D_CreateScreenTarget(GFX_TOP, GFX_RIGHT); + Bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT); + TextBuf = C2D_TextBufNew(4096); + Font = C2D_FontLoadSystem(CFG_REGION_USA); +} + +void RenderD7::Exit::Graphics() +{ + C2D_TextBufDelete(TextBuf); + C2D_Fini(); + C3D_Fini(); +} + Result RenderD7::Init::Main(std::string app_name) { gfxInitDefault(); diff --git a/renderd7.hpp b/renderd7.hpp index 5289a8c..83f0c88 100644 --- a/renderd7.hpp +++ b/renderd7.hpp @@ -243,12 +243,14 @@ namespace RenderD7 { Result Main(std::string app_name = "RD7Game"); Result Reload(); + void Graphics(); void NdspFirm(bool useit = false); } namespace Exit { void Main(); void NdspFirm(); + void Graphics(); } namespace Msg {