├── tools └── __init__.py ├── orig └── RSPE01_01 │ └── .gitkeep ├── src ├── revolution │ ├── BTE │ │ ├── hci │ │ │ └── src │ │ │ │ └── hcisu_h2.c │ │ ├── MODULE_LICENSE_APACHE2 │ │ └── README │ ├── DSP │ │ └── dsp_debug.c │ ├── OS │ │ ├── OSLink.c │ │ └── OSIpc.c │ ├── WPAD │ │ └── debug_msg.c │ ├── WUD │ │ └── debug_msg.c │ ├── PAD │ │ └── Pad.c │ ├── AX │ │ ├── AXProf.c │ │ └── AX.c │ ├── AXFX │ │ └── AXFXHooks.c │ └── NWC24 │ │ └── NWC24Utils.c ├── MSL │ ├── math_ppc.c │ ├── float.c │ └── s_copysign.c ├── RVLFaceLib │ └── RFL_Icon.c ├── MetroTRK │ └── debugger │ │ └── Portable │ │ ├── msg.c │ │ └── mutex_TRK.c ├── nw4r │ ├── g3d │ │ ├── g3d_scnmdl1mat1shp.cpp │ │ ├── g3d_obj.cpp │ │ ├── res │ │ │ ├── g3d_resanmvis.cpp │ │ │ └── g3d_resanmamblight.cpp │ │ └── g3d_dcc.cpp │ ├── snd │ │ ├── snd_AnimSound.cpp │ │ ├── snd_Task.cpp │ │ ├── snd_Sound3DListener.cpp │ │ ├── snd_StrmSoundHandle.cpp │ │ ├── snd_WaveSoundHandle.cpp │ │ ├── snd_MmlSeqTrack.cpp │ │ ├── snd_MidiSeqPlayer.cpp │ │ └── snd_SoundActor.cpp │ ├── lyt │ │ ├── lyt_resourceAccessor.cpp │ │ ├── lyt_init.cpp │ │ ├── lyt_drawInfo.cpp │ │ └── lyt_bounding.cpp │ └── ut │ │ ├── ut_Font.cpp │ │ └── ut_binaryFileFormat.cpp ├── Pack │ ├── RPKernel │ │ ├── RP_DEBUG_STUB_1.cpp │ │ ├── RP_DEBUG_STUB_0.cpp │ │ ├── RPSysKokeshiOverloadInfo.cpp │ │ ├── RPSysWideTextWriter.cpp │ │ ├── RPSysKokeshiLocation.cpp │ │ ├── RPSysMiddleDBGenInfo.cpp │ │ ├── IRPSysHostIOSocket.cpp │ │ ├── RPSysAppMiiManager.cpp │ │ └── RPSysFile.cpp │ └── RPSystem │ │ └── RPPartySystemData.cpp ├── egg │ ├── audio │ │ ├── eggAudio3DActor.cpp │ │ └── eggAudioHeapMgr.cpp │ ├── gfxe │ │ ├── eggDrawPathBase.cpp │ │ └── eggPostEffectBlurGather.cpp │ ├── core │ │ ├── eggDisposer.cpp │ │ ├── eggAllocator.cpp │ │ └── eggScene.cpp │ ├── util │ │ ├── eggException.cpp │ │ └── eggEffect.cpp │ └── math │ │ ├── eggQuat.cpp │ │ ├── eggMath.cpp │ │ └── eggVector.cpp ├── main.cpp ├── homebuttonMiniLib │ └── HBMAnmController.cpp └── runtime │ └── GCN_mem_alloc.c ├── include ├── revolution │ ├── BTE │ │ ├── MODULE_LICENSE_APACHE2 │ │ ├── bta │ │ │ └── include │ │ │ │ ├── bta_ag_api.h │ │ │ │ └── bta_ag_co.h │ │ ├── stack │ │ │ └── include │ │ │ │ └── avrc_defs.h │ │ ├── rvl │ │ │ └── uusb_ppc.h │ │ ├── README │ │ └── include │ │ │ └── bte_common.h │ ├── VF.h │ ├── CNT.h │ ├── PAD.h │ ├── CARD.h │ ├── KPAD.h │ ├── WENC.h │ ├── BASE.h │ ├── EUART.h │ ├── OS │ │ ├── OSNet.h │ │ ├── OSLink.h │ │ ├── OSSync.h │ │ ├── OSAudioSystem.h │ │ ├── OSPlayRecord.h │ │ ├── OSIpc.h │ │ ├── OSFatal.h │ │ ├── OSUtf.h │ │ ├── OSAlloc.h │ │ ├── OSAddress.h │ │ ├── OSExec.h │ │ ├── OSStateTM.h │ │ ├── OSStateFlags.h │ │ ├── OSArena.h │ │ ├── OSMutex.h │ │ └── OSMemory.h │ ├── AX │ │ ├── AX.h │ │ ├── AXComp.h │ │ ├── DSPCode.h │ │ ├── AXProf.h │ │ └── AXOut.h │ ├── AXFX │ │ ├── AXFXSrcCoef.h │ │ ├── AXFXLfoTable.h │ │ ├── AXFXHooks.h │ │ ├── AXFXChorus.h │ │ ├── AXFXCommon.h │ │ └── AXFXDelay.h │ ├── NWC24 │ │ ├── NWC24Mime.h │ │ ├── NWC24StdApi.h │ │ ├── NWC24MBoxCtrl.h │ │ ├── NWC24DateParser.h │ │ ├── NWC24MsgCommit.h │ │ ├── NWC24System.h │ │ ├── NWC24Time.h │ │ ├── NWC24Parser.h │ │ ├── NWC24SecretFList.h │ │ ├── NWC24Schedule.h │ │ ├── NWC24FriendList.h │ │ └── NWC24Utils.h │ ├── DB.h │ ├── DSP │ │ ├── dsp_debug.h │ │ └── dsp.h │ ├── FS.h │ ├── ARC.h │ ├── ESP.h │ ├── USB.h │ ├── WPAD │ │ └── debug_msg.h │ ├── WUD │ │ ├── debug_msg.h │ │ └── WUDHidHost.h │ ├── TPL.h │ ├── GX │ │ ├── GXDraw.h │ │ ├── GXDisplayList.h │ │ ├── GXMisc.h │ │ ├── GXGeometry.h │ │ └── GXFifo.h │ ├── VI.h │ ├── VI │ │ └── vi3in1.h │ ├── AI.h │ ├── EXI │ │ └── EXIUart.h │ ├── MTX │ │ ├── mtxvec.h │ │ ├── mtx44.h │ │ ├── mtxtypes.h │ │ ├── quat.h │ │ └── vec.h │ ├── DVD │ │ ├── dvdidutils.h │ │ ├── dvdfatal.h │ │ ├── dvdqueue.h │ │ └── dvdfs.h │ ├── WUD.h │ ├── NdevExi2AD.h │ ├── SC.h │ ├── SI │ │ ├── SISamplingRate.h │ │ └── SIBios.h │ ├── IPC │ │ ├── memory.h │ │ ├── ipcProfile.h │ │ └── ipcMain.h │ ├── WPAD.h │ ├── DB │ │ └── db.h │ ├── SI.h │ ├── MEM.h │ ├── NAND.h │ ├── MTX.h │ ├── DSP.h │ ├── version.h │ ├── EXI.h │ ├── IPC.h │ ├── CARD │ │ └── CARD.h │ ├── EUART │ │ └── euart.h │ ├── DVD.h │ ├── NdevExi2AD │ │ ├── exi2.h │ │ └── ODEMU.h │ ├── NAND │ │ └── NANDCheck.h │ ├── AX.h │ ├── AXFX.h │ ├── SC │ │ └── scapi_prdinfo.h │ ├── WENC │ │ └── wenc.h │ ├── MEM │ │ └── mem_list.h │ ├── AI │ │ ├── ai.h │ │ └── ai_hardware.h │ └── ESP │ │ └── esp.h ├── MSL │ ├── cerrno │ ├── climits │ ├── iterator │ ├── stdlib.h │ ├── clocale │ ├── arith.h │ ├── cstdarg │ ├── internal │ │ ├── rand.h │ │ ├── strtold.h │ │ ├── math_ppc.h │ │ ├── math_sun.h │ │ ├── FILE_POS.h │ │ ├── wchar_io.h │ │ ├── scanf.h │ │ ├── wmem.h │ │ ├── math_api.h │ │ ├── file_io.h │ │ ├── float.h │ │ ├── wprintf.h │ │ ├── mbstring.h │ │ ├── printf.h │ │ ├── mem.h │ │ ├── wstring.h │ │ └── fdlibm_public.h │ ├── stdio.h │ ├── cctype │ ├── extras.h │ ├── errno.h │ ├── cstddef │ ├── cstdlib │ ├── new │ ├── wchar.h │ ├── cstdio │ ├── cwchar │ ├── limits │ ├── stddef.h │ ├── cstring │ ├── limits.h │ ├── string.h │ ├── stdarg.h │ └── ctype.h ├── egg │ ├── gfx.h │ ├── util.h │ ├── prim.h │ ├── math.h │ ├── util │ │ └── eggException.h │ ├── core │ │ ├── eggSceneCreator.h │ │ ├── eggAllocator.h │ │ ├── eggDisposer.h │ │ ├── eggFader.h │ │ ├── eggFile.h │ │ ├── eggWatch.h │ │ ├── eggDvdRipper.h │ │ ├── eggPerformanceView.h │ │ └── eggXfb.h │ ├── audio.h │ ├── gfxe │ │ ├── eggDrawPathDOF.h │ │ ├── eggPostEffectSimple.h │ │ ├── eggDrawPathShadowVolume.h │ │ ├── eggDrawPathHDR.h │ │ ├── eggGfxEngine.h │ │ ├── eggIScnProcModel.h │ │ ├── eggPostEffectHDR.h │ │ ├── eggGXUtility.h │ │ ├── eggDrawPathBase.h │ │ └── eggFogManager.h │ ├── math │ │ └── eggQuat.h │ └── audio │ │ └── eggAudio3DActor.h ├── Pack │ ├── RPUtility.h │ ├── RPKernel │ │ ├── RP_DEBUG_STUB_1.h │ │ ├── RP_DEBUG_STUB_0.h │ │ ├── RPSysKokeshiIcon.h │ │ ├── RPSysTagProcessor.h │ │ ├── RPSysLytBounding.h │ │ ├── RPSysLytPicture.h │ │ ├── RPSysWideTextWriter.h │ │ └── RPSysLytAllocator.h │ ├── types_pack.h │ ├── RPSystem │ │ ├── RPSysSceneMgr.h │ │ ├── RPSysPlayerMgr.h │ │ └── RPSysPlayer.h │ ├── RPGraphics │ │ ├── RPGrpTexture.h │ │ ├── RPGrpDrawPathManager.h │ │ ├── RPGrpModelManager.h │ │ ├── RPGrpDrawPathLightMap.h │ │ ├── RPGrpModelBoundingInfo.h │ │ ├── IRPGrpModelCallback.h │ │ └── RPGrpDrawPath.h │ ├── RPAssert.h │ └── RPSystem.h ├── lang.h ├── nw4r │ ├── lyt │ │ ├── lyt_init.h │ │ └── lyt_resourceAccessor.h │ ├── math.h │ ├── g3d │ │ ├── g3d_init.h │ │ ├── platform │ │ │ ├── g3d_tmem.h │ │ │ └── g3d_allocator.h │ │ ├── g3d_3dsmax.h │ │ ├── g3d_calcmaterial.h │ │ ├── g3d_calcvtx.h │ │ ├── g3d_basic.h │ │ ├── g3d_xsi.h │ │ ├── g3d_scnmdl1mat1shp.h │ │ └── g3d_maya.h │ ├── ut │ │ ├── ut_TextWriter.h │ │ ├── ut_TagProcessor.h │ │ ├── ut_WideTextWriter.h │ │ ├── ut_WideTagProcessor.h │ │ ├── ut_NonCopyable.h │ │ ├── ut_binaryFileFormat.h │ │ └── ut_LockedCache.h │ ├── snd │ │ ├── snd_adpcm.h │ │ ├── snd_SoundMemoryAllocatable.h │ │ ├── snd_StrmSoundHandle.h │ │ ├── snd_WaveSoundHandle.h │ │ ├── snd_SeqTrackAllocator.h │ │ ├── snd_Task.h │ │ ├── snd_TaskThread.h │ │ ├── snd_Bank.h │ │ ├── snd_DisposeCallback.h │ │ └── snd_DisposeCallbackManager.h │ ├── ef │ │ ├── ef_linkedobject.h │ │ ├── ef_drawstrategy.h │ │ ├── emform │ │ │ ├── ef_disc.h │ │ │ ├── ef_line.h │ │ │ ├── ef_point.h │ │ │ ├── ef_torus.h │ │ │ ├── ef_sphere.h │ │ │ ├── ef_emform.h │ │ │ └── ef_cube.h │ │ ├── drawstrategy │ │ │ ├── ef_drawfreestrategy.h │ │ │ ├── ef_drawlinestrategy.h │ │ │ ├── ef_drawstripestrategy.h │ │ │ ├── ef_drawpointstrategy.h │ │ │ ├── ef_drawdirectionalstrategy.h │ │ │ └── ef_drawstrategybuilder.h │ │ ├── ef_drawstrategybuilder.h │ │ └── ef_random.h │ ├── lyt.h │ └── types_nw4r.h ├── runtime │ ├── GCN_mem_alloc.h │ ├── global_destructor_chain.h │ └── Gecko_ExceptionPPC.h ├── MetroTRK │ └── debugger │ │ ├── Portable │ │ ├── nubinit.h │ │ ├── UART.h │ │ ├── msg.h │ │ ├── mem_TRK.h │ │ ├── dispatch.h │ │ ├── dserror.h │ │ └── mutex_TRK.h │ │ └── Os │ │ └── dolphin │ │ ├── usr_put.h │ │ ├── dolphin_trk.h │ │ └── dolphin_trk_glue.h ├── RVLFaceLib │ ├── RFL_Icon.h │ ├── RFL_NANDLoader.h │ ├── RFLi_DefaultDatabase.h │ ├── RFL_Controller.h │ ├── RFL_Database.h │ ├── RFL_Config.h │ ├── RFL_NWC24.h │ ├── RFLi_Format.h │ ├── RFL_System.h │ └── RFLi_DataUtility.h ├── homebuttonMiniLib.h ├── homebuttonMiniLib │ ├── HBMApi.h │ └── HBMAnmController.h ├── RVLFaceLib.h ├── MetroTRK.h └── types.h ├── assets └── objdiff.png ├── config └── RSPE01_01 │ ├── build.sha1 │ └── config.yml ├── .flake8 ├── .vscode ├── extensions.json ├── tasks.json └── settings.json ├── .gitattributes └── .gitignore /tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /orig/RSPE01_01/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/revolution/BTE/hci/src/hcisu_h2.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/revolution/BTE/MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/revolution/BTE/MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/objdiff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kiwi515/ogws/HEAD/assets/objdiff.png -------------------------------------------------------------------------------- /config/RSPE01_01/build.sha1: -------------------------------------------------------------------------------- 1 | 8bb422971b88b5551a37de98db69557df7b46637 build/RSPE01_01/main.dol 2 | -------------------------------------------------------------------------------- /include/MSL/cerrno: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CERRNO_H 2 | #define MSL_CPP_CERRNO_H 3 | #include 4 | #endif -------------------------------------------------------------------------------- /src/MSL/math_ppc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | double nan(const char* arg) { 4 | #pragma unused(arg) 5 | } -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | # E203: whitespace before ':' 3 | # E501: line too long 4 | extend-ignore = E203,E501 5 | -------------------------------------------------------------------------------- /include/MSL/climits: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CLIMITS_H 2 | #define MSL_CPP_CLIMITS_H 3 | #include 4 | #endif -------------------------------------------------------------------------------- /include/egg/gfx.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_PUBLIC_GFX_H 2 | #define EGG_PUBLIC_GFX_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /include/revolution/BTE/bta/include/bta_ag_api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kiwi515/ogws/HEAD/include/revolution/BTE/bta/include/bta_ag_api.h -------------------------------------------------------------------------------- /include/revolution/BTE/bta/include/bta_ag_co.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kiwi515/ogws/HEAD/include/revolution/BTE/bta/include/bta_ag_co.h -------------------------------------------------------------------------------- /include/revolution/BTE/stack/include/avrc_defs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kiwi515/ogws/HEAD/include/revolution/BTE/stack/include/avrc_defs.h -------------------------------------------------------------------------------- /include/Pack/RPUtility.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_PUBLIC_UTILITY_H 2 | #define RP_PUBLIC_UTILITY_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /include/egg/util.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_PUBLIC_UTIL_H 2 | #define EGG_PUBLIC_UTIL_H 3 | 4 | #include 5 | #include 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /src/revolution/DSP/dsp_debug.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Stubbed for release 4 | void __DSP_debug_printf(const char* fmt, ...) { 5 | #pragma unused(fmt) 6 | } 7 | -------------------------------------------------------------------------------- /src/revolution/OS/OSLink.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void __OSModuleInit(void) { 4 | OS_FIRST_REL = OS_LAST_REL = NULL; 5 | OS_REL_NAME_TABLE = NULL; 6 | } 7 | -------------------------------------------------------------------------------- /src/revolution/WPAD/debug_msg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void DEBUGPrint(const char* pFmt, ...) { 4 | #pragma unused(pFmt) 5 | 6 | // Stubbed for release 7 | } 8 | -------------------------------------------------------------------------------- /src/revolution/WUD/debug_msg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void WUD_DEBUGPrint(const char* pFmt, ...) { 4 | #pragma unused(pFmt) 5 | 6 | // Stubbed for release 7 | } 8 | -------------------------------------------------------------------------------- /src/RVLFaceLib/RFL_Icon.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void RFLSetIconDrawDoneCallback(RFLCallback callback) { 4 | RFLiGetManager()->iconDrawCb = callback; 5 | } -------------------------------------------------------------------------------- /src/MetroTRK/debugger/Portable/msg.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DSError TRKMessageSend(TRKMessageBuffer* buf) { 4 | TRKWriteUARTN(buf->data, buf->size); 5 | return kNoError; 6 | } 7 | -------------------------------------------------------------------------------- /include/MSL/iterator: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_ITERATOR_H 2 | #define MSL_CPP_ITERATOR_H 3 | 4 | namespace std { 5 | 6 | struct random_access_iterator_tag {}; 7 | 8 | } // namespace std 9 | 10 | #endif -------------------------------------------------------------------------------- /src/MSL/float.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | unsigned long __float_nan[] = {0x7FFFFFFF}; 4 | unsigned long __float_huge[] = {0x7F800000}; 5 | unsigned long __double_huge[] = {0x7FF00000, 0x00000000}; 6 | -------------------------------------------------------------------------------- /include/MSL/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_STDLIB_H 2 | #define MSL_STDLIB_H 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | #endif 9 | -------------------------------------------------------------------------------- /include/egg/prim.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_PUBLIC_PRIM_H 2 | #define EGG_PUBLIC_PRIM_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/nw4r/g3d/g3d_scnmdl1mat1shp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace g3d { 5 | 6 | NW4R_G3D_RTTI_DEF(ScnMdl1Mat1Shp); 7 | 8 | } // namespace g3d 9 | } // namespace nw4r 10 | -------------------------------------------------------------------------------- /include/MSL/clocale: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CLOCALE_H 2 | #define MSL_CPP_CLOCALE_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::lconv; 8 | } // namespace std 9 | 10 | #endif 11 | #endif 12 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_AnimSound.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | 6 | DECOMP_FORCEACTIVE_DTOR(snd_AnimSound_cpp, SoundHandle); 7 | 8 | } // namespace snd 9 | } // namespace nw4r 10 | -------------------------------------------------------------------------------- /include/MSL/arith.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_ARITH_H 2 | #define MSL_ARITH_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int abs(int); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/cstdarg: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CSTDARG_H 2 | #define MSL_CPP_CSTDARG_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::va_list; 8 | } // namespace std 9 | 10 | #endif 11 | #endif 12 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_Task.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | namespace detail { 6 | 7 | Task::~Task() {} 8 | 9 | } // namespace detail 10 | } // namespace snd 11 | } // namespace nw4r 12 | -------------------------------------------------------------------------------- /include/MSL/internal/rand.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_RAND_H 2 | #define MSL_RAND_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int rand(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_STDIO_H 2 | #define MSL_STDIO_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #endif 9 | -------------------------------------------------------------------------------- /include/revolution/VF.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_VF_H 2 | #define RVL_SDK_PUBLIC_VF_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RP_DEBUG_STUB_1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | RP_DEBUG_STUB_1::RP_DEBUG_STUB_1() { 4 | // Stubbed for release 5 | } 6 | 7 | RP_DEBUG_STUB_1::~RP_DEBUG_STUB_1() { 8 | // Stubbed for release 9 | } 10 | -------------------------------------------------------------------------------- /include/MSL/cctype: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CCTYPE_H 2 | #define MSL_CPP_CCTYPE_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::tolower; 8 | using ::toupper; 9 | } // namespace std 10 | 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/egg/math.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_PUBLIC_MATH_H 2 | #define EGG_PUBLIC_MATH_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /include/revolution/CNT.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_CNT_H 2 | #define RVL_SDK_PUBLIC_CNT_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/revolution/PAD.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_PAD_H 2 | #define RVL_SDK_PUBLIC_PAD_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/revolution/CARD.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_CARD_H 2 | #define RVL_SDK_PUBLIC_CARD_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/revolution/KPAD.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_KPAD_H 2 | #define RVL_SDK_PUBLIC_KPAD_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/revolution/WENC.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_WENC_H 2 | #define RVL_SDK_PUBLIC_WENC_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/MSL/extras.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_EXTRAS_H 2 | #define MSL_EXTRAS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int stricmp(const char*, const char*); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/internal/strtold.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_STRTOLD_H 2 | #define MSL_STRTOLD_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | double atof(const char*); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/lang.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Compatability macros for deprecated/future C++ features 3 | */ 4 | 5 | #ifndef LANG_H 6 | #define LANG_H 7 | 8 | #if __cplusplus < 201103L 9 | #define noexcept throw() 10 | #define override 11 | #endif 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/BASE.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_BASE_H 2 | #define RVL_SDK_PUBLIC_BASE_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/revolution/EUART.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_EUART_H 2 | #define RVL_SDK_PUBLIC_EUART_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif 12 | #endif 13 | -------------------------------------------------------------------------------- /include/MSL/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_ERRNO_H 2 | #define MSL_ERRNO_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern int errno; 9 | 10 | #define EDOM 33 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/MSL/internal/math_ppc.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_MATH_PPC_H 2 | #define MSL_MATH_PPC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | double nan(const char* arg); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/internal/math_sun.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_MATH_SUN_H 2 | #define MSL_MATH_SUN_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | double scalbn(double, int); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/OS/OSNet.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_NET_H 2 | #define RVL_SDK_OS_NET_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __OSInitNet(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/nw4r/lyt/lyt_init.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_LYT_INIT_H 2 | #define NW4R_LYT_INIT_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace lyt { 7 | 8 | void LytInit(); 9 | 10 | } // namespace lyt 11 | } // namespace nw4r 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/OS/OSLink.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_LINK_H 2 | #define RVL_SDK_OS_LINK_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __OSModuleInit(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/nw4r/math.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_PUBLIC_MATH_H 2 | #define NW4R_PUBLIC_MATH_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /include/revolution/AX/AX.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AX_H 2 | #define RVL_SDK_AX_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void AXInit(void); 9 | void AXInitEx(u32 mode); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/revolution/AX/AXComp.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AX_COMP_H 2 | #define RVL_SDK_AX_COMP_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern u16 __AXCompressorTable[]; 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/OS/OSSync.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_SYNC_H 2 | #define RVL_SDK_OS_SYNC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __OSInitSystemCall(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/runtime/GCN_mem_alloc.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNTIME_GCN_MEM_ALLOC_H 2 | #define RUNTIME_GCN_MEM_ALLOC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __sys_free(void* block); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/internal/FILE_POS.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_FILE_POS_H 2 | #define MSL_FILE_POS_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | long int ftell(FILE*); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/MSL/internal/wchar_io.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_WCHAR_IO_H 2 | #define MSL_WCHAR_IO_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | int fwide(FILE*, int); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/AXFX/AXFXSrcCoef.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AXFX_SRC_COEF_H 2 | #define RVL_SDK_AXFX_SRC_COEF_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | f32* __AXFXGetSrcCoef(u32 i); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24Mime.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_MIME_H 2 | #define RVL_SDK_NWC24_MIME_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void NWC24InitBase64Table(u8* table); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RP_DEBUG_STUB_0.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | RP_SINGLETON_IMPL(RP_DEBUG_STUB_0); 4 | 5 | void RP_DEBUG_STUB_0::Calculate() { 6 | // Stubbed for release 7 | } 8 | 9 | void RP_DEBUG_STUB_0::DebugDraw() { 10 | // Stubbed for release 11 | } 12 | -------------------------------------------------------------------------------- /include/MSL/internal/scanf.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_SCANF_H 2 | #define MSL_SCANF_H 3 | #include 4 | #include 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | int sscanf(const char*, const char*, ...); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/revolution/AXFX/AXFXLfoTable.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AXFX_LFO_TABLE_H 2 | #define RVL_SDK_AXFX_LFO_TABLE_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | s32* __AXFXGetLfoSinTable(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/DB.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: YAGCD 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_DB_H 6 | #define RVL_SDK_PUBLIC_DB_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/DSP/dsp_debug.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DSP_DEBUG_H 2 | #define RVL_SDK_DSP_DEBUG_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __DSP_debug_printf(const char* fmt, ...); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/FS.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_FS_H 6 | #define RVL_SDK_PUBLIC_FS_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_Sound3DListener.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | 6 | Sound3DListener::Sound3DListener() 7 | : mInteriorSize(1.0f), mMaxVolumeDistance(1.0f), mUnitDistance(1.0f) {} 8 | 9 | } // namespace snd 10 | } // namespace nw4r 11 | -------------------------------------------------------------------------------- /include/revolution/ARC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiCore 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_ARC_H 6 | #define RVL_SDK_PUBLIC_ARC_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/ESP.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_ESP_H 6 | #define RVL_SDK_PUBLIC_ESP_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/USB.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_USB_H 6 | #define RVL_SDK_PUBLIC_USB_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/WPAD/debug_msg.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_WPAD_DEBUG_MSG_H 2 | #define RVL_SDK_WPAD_DEBUG_MSG_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void DEBUGPrint(const char* pFmt, ...); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/WUD/debug_msg.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_WUD_DEBUG_MSG_H 2 | #define RVL_SDK_WUD_DEBUG_MSG_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void WUD_DEBUGPrint(const char* pFmt, ...); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/cstddef: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CSTDDEF_H 2 | #define MSL_CPP_CSTDDEF_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::intptr_t; 8 | using ::ptrdiff_t; 9 | using ::size_t; 10 | using ::uintptr_t; 11 | } // namespace std 12 | 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /src/Pack/RPSystem/RPPartySystemData.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * @brief Tests whether the specified minigame is available 5 | * 6 | * @param idx Minigame index 7 | */ 8 | bool RPPartySystemData::isGameOpen(s32 idx) const { 9 | return mGameFlags.onBit(idx); 10 | } 11 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24StdApi.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_STD_API_H 2 | #define RVL_SDK_NWC24_STD_API_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void* Mail_memset(void* dst, int ch, size_t n); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/TPL.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: YAGCD, BrawlBox 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_TPL_H 6 | #define RVL_SDK_PUBLIC_TPL_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/MSL/internal/wmem.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_WMEM_H 2 | #define MSL_WMEM_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void* wmemcpy(void*, const void*, size_t); 9 | void* wmemchr(const void*, int, size_t); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/revolution/BTE/rvl/uusb_ppc.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_BTE_RVL_UUSB_PPC_H 2 | #define RVL_SDK_BTE_RVL_UUSB_PPC_H 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | u32 __ntd_get_allocated_mem_size(void); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/nubinit.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_NUBINIT_H 2 | #define METROTRK_DEBUGGER_PORTABLE_NUBINIT_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern BOOL gTRKBigEndian; 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/GX/GXDraw.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_GX_DRAW_H 2 | #define RVL_SDK_GX_DRAW_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void GXDrawCylinder(u8 sides); 9 | void GXDrawSphere(u32 stacks, u32 sectors); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/runtime/global_destructor_chain.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNTIME_GLOBAL_DESTRUCTOR_CHAIN_H 2 | #define RUNTIME_GLOBAL_DESTRUCTOR_CHAIN_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __destroy_global_chain(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/VI.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_VI_H 2 | #define RVL_SDK_PUBLIC_VI_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/revolution/VI/vi3in1.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_VI_VI3IN1_H 2 | #define RVL_SDK_VI_VI3IN1_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __VISetRGBModeImm(void); 9 | 10 | void __VISetRevolutionModeSimple(void); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/MSL/internal/math_api.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_MATH_API_H 2 | #define MSL_MATH_API_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int __fpclassify(long double); 9 | int __fpclassifyd(double); 10 | int __fpclassifyf(float); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/OS/OSAudioSystem.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_AUDIOSYSTEM_H 2 | #define RVL_SDK_OS_AUDIOSYSTEM_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __OSInitAudioSystem(void); 9 | void __OSStopAudioSystem(void); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/revolution/OS/OSPlayRecord.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_PLAY_RECORD_H 2 | #define RVL_SDK_OS_PLAY_RECORD_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __OSStartPlayRecord(void); 9 | void __OSStopPlayRecord(void); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/MSL/cstdlib: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CSTDLIB_H 2 | #define MSL_CPP_CSTDLIB_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::abs; 8 | using ::atof; 9 | using ::mbstowcs; 10 | using ::mbtowc; 11 | using ::rand; 12 | using ::wcstombs; 13 | } // namespace std 14 | 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/MSL/internal/file_io.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_FILE_IO_H 2 | #define MSL_FILE_IO_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct FILE { 9 | u8 dummy; 10 | } FILE; 11 | 12 | int fclose(FILE*); 13 | int fflush(FILE*); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Os/dolphin/usr_put.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_OS_DOLPHIN_USR_PUT_H 2 | #define METROTRK_DEBUGGER_OS_DOLPHIN_USR_PUT_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void usr_puts_serial(const char* msg); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/AI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: YAGCD 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_AI_H 6 | #define RVL_SDK_PUBLIC_AI_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /include/revolution/EXI/EXIUart.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_EXI_UART_H 2 | #define RVL_SDK_EXI_UART_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void __OSEnableBarnacle(EXIChannel chan, u32 dev); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/OS/OSIpc.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_IPC_H 2 | #define RVL_SDK_OS_IPC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void* __OSGetIPCBufferHi(void); 9 | void* __OSGetIPCBufferLo(void); 10 | void __OSInitIPCBuffer(void); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "llvm-vs-code-extensions.vscode-clangd", 4 | "ms-python.black-formatter", 5 | "ms-python.flake8", 6 | ], 7 | "unwantedRecommendations": [ 8 | "ms-vscode.cmake-tools", 9 | "ms-vscode.cpptools-extension-pack", 10 | "ms-vscode.cpptools", 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /include/MSL/internal/float.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_FLOAT_H 2 | #define MSL_FLOAT_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern unsigned long __float_nan[]; 9 | extern unsigned long __float_huge[]; 10 | extern unsigned long __double_huge[]; 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/MSL/internal/wprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_WPRINTF_H 2 | #define MSL_WPRINTF_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int vswprintf(wchar_t*, size_t, const wchar_t*, va_list); 9 | int swprintf(wchar_t*, size_t, const wchar_t*, ...); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/UART.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_UART_H 2 | #define METROTRK_DEBUGGER_PORTABLE_UART_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum { 9 | kUARTNoError = 0x0000, 10 | } UARTError; 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_init.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_INIT_H 2 | #define NW4R_G3D_INIT_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace g3d { 9 | 10 | void G3dInit(bool enableLockedCache); 11 | void G3dReset(); 12 | 13 | } // namespace g3d 14 | } // namespace nw4r 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24MBoxCtrl.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_MBOX_CTRL_H 2 | #define RVL_SDK_NWC24_MBOX_CTRL_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | NWC24Err NWC24iOpenMBox(void); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Explicitly declare text files 5 | *.py text 6 | 7 | # Enforce platform-specific encodings 8 | *.bat text eol=crlf 9 | *.sh text eol=lf 10 | *.sha1 text eol=lf 11 | 12 | # decomp-toolkit writes files with LF 13 | config/**/*.txt text eol=lf 14 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_Icon.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_ICON_H 2 | #define RVL_FACE_LIBRARY_ICON_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void RFLSetIconDrawDoneCallback(RFLCallback callback); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_TextWriter.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_TEXT_WRITER_H 2 | #define NW4R_UT_TEXT_WRITER_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ut { 9 | 10 | typedef TextWriterBase TextWriter; 11 | 12 | } // namespace ut 13 | } // namespace nw4r 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/MTX/mtxvec.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_MTX_MTXVEC_H 2 | #define RVL_SDK_MTX_MTXVEC_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void PSMTXMultVec(const Mtx mtx, const Vec* vec, Vec* out); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/WUD/WUDHidHost.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_WUD_HID_HOST_H 2 | #define RVL_SDK_WUD_HID_HOST_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void WUDHidHostCallback(tBTA_HH_EVT event, tBTA_HH* pData); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/OS/OSFatal.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_FATAL_H 2 | #define RVL_SDK_OS_FATAL_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void OSFatal(GXColor textColor, GXColor bgColor, const char* msg); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RP_DEBUG_STUB_1.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_DEBUG_STUB_1_H 2 | #define RP_KERNEL_DEBUG_STUB_1_H 3 | #include 4 | 5 | //! @addtogroup rp_kernel 6 | //! @{ 7 | 8 | class RP_DEBUG_STUB_1 { 9 | public: 10 | RP_DEBUG_STUB_1(); 11 | virtual ~RP_DEBUG_STUB_1(); // at 0x8 12 | }; 13 | 14 | //! @} 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/DVD/dvdidutils.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DVD_ID_UTILS_H 2 | #define RVL_SDK_DVD_ID_UTILS_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | BOOL DVDCompareDiskID(const DVDDiskID* id1, const DVDDiskID* id2); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RPSysKokeshiOverloadInfo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * @brief Constructor 5 | */ 6 | RPSysKokeshiOverloadInfo::RPSysKokeshiOverloadInfo() 7 | : mClothesType(RPSysKokeshiManager::ClothesType_Random) {} 8 | 9 | /** 10 | * @brief Destructor 11 | */ 12 | RPSysKokeshiOverloadInfo::~RPSysKokeshiOverloadInfo() {} 13 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_TagProcessor.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_TAG_PROCESSOR_H 2 | #define NW4R_UT_TAG_PROCESSOR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ut { 9 | 10 | typedef TagProcessorBase TagProcessor; 11 | 12 | } // namespace ut 13 | } // namespace nw4r 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RPSysWideTextWriter.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * @brief Work buffer for string formatting 5 | */ 6 | wchar_t* RPSysWideTextWriter::spTextBuffer = NULL; 7 | 8 | /** 9 | * @brief Creates the text buffer 10 | */ 11 | void RPSysWideTextWriter::Initialize() { 12 | spTextBuffer = new wchar_t[TEXT_BUFFER_SIZE]; 13 | } 14 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_WideTextWriter.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_WIDE_TEXT_WRITER_H 2 | #define NW4R_UT_WIDE_TEXT_WRITER_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ut { 9 | 10 | typedef TextWriterBase WideTextWriter; 11 | 12 | } // namespace ut 13 | } // namespace nw4r 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24DateParser.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_DATE_PARSER_H 2 | #define RVL_SDK_NWC24_DATE_PARSER_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | NWC24Err NWC24iIsValidDate(u16 year, u8 month, u8 day); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/WUD.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_WUD_H 2 | #define RVL_SDK_PUBLIC_WUD_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /src/egg/audio/eggAudio3DActor.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace EGG { 9 | 10 | nw4r::snd::SoundArchivePlayer* AudioSound3DActor::smCommonPlayer = NULL; 11 | nw4r::snd::Sound3DManager* AudioSound3DActor::smCommon3DManager = NULL; 12 | 13 | } // namespace EGG 14 | -------------------------------------------------------------------------------- /src/revolution/BTE/README: -------------------------------------------------------------------------------- 1 | All modifications to BTE source code are documented at the top of their respective source files in accordance with Broadcom's use of the Apache 2.0 license. 2 | 3 | These changes are only enabled when compiling with 'REVOLUTION' defined. 4 | 5 | To find all listed changes, please search the repository for the following string: "NOTICE OF CHANGES". 6 | -------------------------------------------------------------------------------- /include/MSL/internal/mbstring.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_MBSTRING_H 2 | #define MSL_MBSTRING_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int mbtowc(wchar_t*, const char*, size_t); 9 | size_t mbstowcs(wchar_t*, const char*, size_t); 10 | size_t wcstombs(char*, const wchar_t*, size_t); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/MSL/new: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_NEW_H 2 | #define MSL_CPP_NEW_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | inline void* operator new(size_t size, void* ptr) { 7 | #pragma unused(size) 8 | return ptr; 9 | } 10 | 11 | inline void* operator new[](size_t size, void* ptr) { 12 | #pragma unused(size) 13 | return ptr; 14 | } 15 | 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /include/revolution/AX/DSPCode.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AX_DSP_CODE_H 2 | #define RVL_SDK_AX_DSP_CODE_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern u16 axDspInitVector; 9 | extern u16 axDspResumeVector; 10 | 11 | extern u8 axDspSlave[]; 12 | extern u16 axDspSlaveLength; 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /include/revolution/BTE/README: -------------------------------------------------------------------------------- 1 | All modifications to BTE source code are documented at the top of their respective source files in accordance with Broadcom's use of the Apache 2.0 license. 2 | 3 | These changes are only enabled when compiling with 'REVOLUTION' defined. 4 | 5 | To find all listed changes, please search the repository for the following string: "NOTICE OF CHANGES". 6 | -------------------------------------------------------------------------------- /include/revolution/NdevExi2AD.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_NDEV_EXI2_AD_H 2 | #define RVL_SDK_PUBLIC_NDEV_EXI2_AD_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /include/revolution/SC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_SC_H 6 | #define RVL_SDK_PUBLIC_SC_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/revolution/SI/SISamplingRate.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_SI_SISAMPLINGRATE_H 2 | #define RVL_SDK_SI_SISAMPLINGRATE_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define SI_MAX_SAMPLE_RATE 11 9 | 10 | void SISetSamplingRate(u32 msec); 11 | void SIRefreshSamplingRate(void); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_NANDLoader.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_NAND_LOADER_H 2 | #define RVL_FACE_LIBRARY_NAND_LOADER_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | BOOL RFLFreeCachedResource(void); 11 | BOOL RFLIsResourceCached(void); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/egg/util/eggException.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_UTIL_EXCEPTION_H 2 | #define EGG_UTIL_EXCEPTION_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | class Exception { 8 | public: 9 | static Exception* create(u16 width, u16 height, u16 attr, Heap* pHeap); 10 | static void setPadInfo(const u16* pPadInfo); 11 | }; 12 | 13 | } // namespace EGG 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_adpcm.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_ADPCM_H 2 | #define NW4R_SND_ADPCM_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace snd { 9 | namespace detail { 10 | 11 | s16 DecodeDspAdpcm(AXPBADPCM* pAdpcm, u8 bits); 12 | 13 | } // namespace detail 14 | } // namespace snd 15 | } // namespace nw4r 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_WideTagProcessor.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_WIDE_TAG_PROCESSOR_H 2 | #define NW4R_UT_WIDE_TAG_PROCESSOR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ut { 9 | 10 | typedef TagProcessorBase WideTagProcessor; 11 | 12 | } // namespace ut 13 | } // namespace nw4r 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use Ctrl+Shift+B to run build tasks. 3 | // Or "Run Build Task" in the Command Palette. 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "ninja", 8 | "type": "shell", 9 | "command": "ninja", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | } 14 | }, 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /include/revolution/IPC/memory.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_IPC_MEMORY_H 2 | #define RVL_SDK_IPC_MEMORY_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | s32 iosCreateHeap(void* base, u32 size); 9 | void* iosAllocAligned(s32 handle, u32 size, u32 align); 10 | s32 iosFree(s32 handle, void* block); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/revolution/WPAD.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_WPAD_H 6 | #define RVL_SDK_PUBLIC_WPAD_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RPSysKokeshiLocation.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | 6 | /** 7 | * @brief Constructor 8 | */ 9 | RPSysKokeshiLocation::RPSysKokeshiLocation() 10 | : mDataSource(RFLDataSource_Official), mIndex(0), mpMiddleDB(NULL) {} 11 | 12 | /** 13 | * @brief Destructor 14 | */ 15 | RPSysKokeshiLocation::~RPSysKokeshiLocation() {} 16 | -------------------------------------------------------------------------------- /src/nw4r/lyt/lyt_resourceAccessor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace lyt { 5 | 6 | ResourceAccessor::~ResourceAccessor() {} 7 | 8 | ResourceAccessor::ResourceAccessor() {} 9 | 10 | ut::Font* ResourceAccessor::GetFont(const char* pName) { 11 | #pragma unused(pName) 12 | 13 | return NULL; 14 | } 15 | 16 | } // namespace lyt 17 | } // namespace nw4r 18 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFLi_DefaultDatabase.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_INTERNAL_DEFAULT_DATABASE_H 2 | #define RVL_FACE_LIBRARY_INTERNAL_DEFAULT_DATABASE_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void RFLiGetDefaultData(RFLiCharInfo* info, u16 index); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /src/MetroTRK/debugger/Portable/mutex_TRK.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | DSError TRKInitializeMutex(TRKMutex* mutex) { 4 | #pragma unused(mutex) 5 | return kNoError; 6 | } 7 | 8 | DSError TRKAcquireMutex(TRKMutex* mutex) { 9 | #pragma unused(mutex) 10 | return kNoError; 11 | } 12 | 13 | DSError TRKReleaseMutex(TRKMutex* mutex) { 14 | #pragma unused(mutex) 15 | return kNoError; 16 | } -------------------------------------------------------------------------------- /include/revolution/DB/db.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DB_H 2 | #define RVL_SDK_DB_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void DBInit(void); 9 | void __DBExceptionDestinationAux(void); 10 | void __DBExceptionDestination(void); 11 | BOOL __DBIsExceptionMarked(u8 exc); 12 | void DBPrintf(const char* msg, ...); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /include/revolution/DVD/dvdfatal.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DVD_FATAL_H 2 | #define RVL_SDK_DVD_FATAL_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void __DVDShowFatalMessage(void); 9 | BOOL DVDSetAutoFatalMessaging(BOOL enable); 10 | BOOL __DVDGetAutoFatalMessaging(void); 11 | void __DVDPrintFatalMessage(void); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/SI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: YAGCD, publicly available patents 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_SI_H 6 | #define RVL_SDK_PUBLIC_SI_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/MSL/wchar.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_WCHAR_H 2 | #define MSL_WCHAR_H 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #define WCHAR_MIN SHRT_MIN 15 | #define WCHAR_MAX USHRT_MAX 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Os/dolphin/dolphin_trk.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_OS_DOLPHIN_DOLPHIN_TRK_H 2 | #define METROTRK_DEBUGGER_OS_DOLPHIN_DOLPHIN_TRK_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void InitMetroTRK(void); 9 | void InitMetroTRK_BBA(void); 10 | 11 | void EnableMetroTRKInterrupts(void); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_Controller.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_CONTROLLER_H 2 | #define RVL_FACE_LIBRARY_CONTROLLER_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | RFLErrcode RFLLoadControllerAsync(s32 chan); 11 | BOOL RFLIsAvailableControllerData(s32 chan, u8 index); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_Database.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_DATABASE_H 2 | #define RVL_FACE_LIBRARY_DATABASE_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | BOOL RFLIsAvailableOfficialData(u16 index); 11 | BOOL RFLSearchOfficialData(const RFLCreateID* id, u16* index); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_Config.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_CONFIG_H 2 | #define RVL_FACE_LIBRARY_CONFIG_H 3 | #include 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | /** 12 | * Char data constraints 13 | */ 14 | 15 | #define RFL_MAX_BODY_HEIGHT 128 16 | #define RFL_MAX_BODY_BUILD 128 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /include/egg/core/eggSceneCreator.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_SCENE_CREATOR_H 2 | #define EGG_CORE_SCENE_CREATOR_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | // Forward declarations 8 | class Scene; 9 | 10 | class SceneCreator { 11 | public: 12 | virtual Scene* create(s32 id) = 0; // at 0x8 13 | virtual void destroy(s32 id) = 0; // at 0xC 14 | }; 15 | 16 | } // namespace EGG 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/revolution/OS/OSUtf.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_UTF_H 2 | #define RVL_SDK_OS_UTF_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | const u8* OSUTF8to32(const u8* utf8, u32* utf32); 9 | const wchar_t* OSUTF16to32(const wchar_t* utf16, u32* utf32); 10 | u8 OSUTF32toANSI(u32 utf32); 11 | wchar_t OSUTF32toSJIS(u32 utf32); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/nw4r/lyt/lyt_init.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | namespace { 6 | 7 | NW4R_LIB_VERSION(LYT, "Jun 8 2007", "11:17:26", "0x4199_60831"); 8 | 9 | } // namespace 10 | 11 | namespace nw4r { 12 | namespace lyt { 13 | 14 | void LytInit() { 15 | OSRegisterVersion(NW4R_LYT_Version_); 16 | OSInitFastCast(); 17 | } 18 | 19 | } // namespace lyt 20 | } // namespace nw4r 21 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Os/dolphin/dolphin_trk_glue.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_OS_DOLPHIN_DOLPHIN_TRK_GLUE_H 2 | #define METROTRK_DEBUGGER_OS_DOLPHIN_DOLPHIN_TRK_GLUE_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | UARTError TRKWriteUARTN(const void* src, size_t n); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RP_DEBUG_STUB_0.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_DEBUG_STUB_0_H 2 | #define RP_KERNEL_DEBUG_STUB_0_H 3 | #include 4 | 5 | #include 6 | 7 | //! @addtogroup rp_kernel 8 | //! @{ 9 | 10 | class RP_DEBUG_STUB_0 { 11 | RP_SINGLETON_DECL(RP_DEBUG_STUB_0); 12 | 13 | public: 14 | void Calculate(); 15 | void DebugDraw(); 16 | }; 17 | 18 | //! @} 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_NWC24.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_NWC24_H 2 | #define RVL_FACE_LIBRARY_NWC24_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | // Forward declarations 11 | typedef struct NWC24MsgObj; 12 | 13 | RFLErrcode RFLCommitNWC24Msg(struct NWC24MsgObj* msg, u16 index); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /src/nw4r/lyt/lyt_drawInfo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | namespace nw4r { 7 | namespace lyt { 8 | 9 | DrawInfo::DrawInfo() : mLocationAdjustScale(1.0f, 1.0f), mGlobalAlpha(1.0f) { 10 | std::memset(&mFlag, 0, sizeof(mFlag)); 11 | math::MTX34Identity(&mViewMtx); 12 | } 13 | 14 | DrawInfo::~DrawInfo() {} 15 | 16 | } // namespace lyt 17 | } // namespace nw4r 18 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/msg.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_MSG_H 2 | #define METROTRK_DEBUGGER_PORTABLE_MSG_H 3 | #include 4 | 5 | #include 6 | #include 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | DSError TRKMessageSend(TRKMessageBuffer* buf); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/MEM.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_MEM_H 2 | #define RVL_SDK_PUBLIC_MEM_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /include/revolution/NAND.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_NAND_H 6 | #define RVL_SDK_PUBLIC_NAND_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24MsgCommit.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_MSG_COMMIT_H 2 | #define RVL_SDK_NWC24_MSG_COMMIT_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | // Forward declarations 11 | typedef struct NWC24MsgObj NWC24MsgObj; 12 | 13 | NWC24Err NWC24CommitMsg(NWC24MsgObj*); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/MSL/cstdio: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CSTDIO_H 2 | #define MSL_CPP_CSTDIO_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::fclose; 8 | using ::fflush; 9 | using ::FILE; 10 | using ::ftell; 11 | using ::fwide; 12 | using ::snprintf; 13 | using ::sprintf; 14 | using ::sscanf; 15 | using ::vprintf; 16 | using ::vsnprintf; 17 | using ::vsprintf; 18 | } // namespace std 19 | 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /include/revolution/MTX.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_MTX_H 2 | #define RVL_SDK_PUBLIC_MTX_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /include/MSL/cwchar: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CWCHAR_H 2 | #define MSL_CPP_CWCHAR_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::mbstowcs; 8 | using ::mbtowc; 9 | using ::swprintf; 10 | using ::vswprintf; 11 | using ::wcscat; 12 | using ::wcschr; 13 | using ::wcscmp; 14 | using ::wcscpy; 15 | using ::wcslen; 16 | using ::wcsncpy; 17 | using ::wcstombs; 18 | } // namespace std 19 | 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /include/revolution/DSP.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: YAGCD, Dolphin Emulator 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_DSP_H 6 | #define RVL_SDK_PUBLIC_DSP_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /include/egg/audio.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_PUBLIC_AUDIO_H 2 | #define EGG_PUBLIC_AUDIO_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/revolution/version.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_VERSION_H 2 | #define RVL_SDK_VERSION_H 3 | #include 4 | 5 | #define RVL_LIB_VERSION(NAME, ORIGINAL_DATE, ORIGINAL_TIME, ORIGINAL_CWCC) \ 6 | const char* __##NAME##Version = \ 7 | "<< RVL_SDK - " #NAME " \trelease build: " ORIGINAL_DATE \ 8 | " " ORIGINAL_TIME " (" ORIGINAL_CWCC ") >>" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /include/runtime/Gecko_ExceptionPPC.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNTIME_GECKO_EXCEPTION_PPC_H 2 | #define RUNTIME_GECKO_EXCEPTION_PPC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | // Forward declarations 9 | typedef struct ExtabIndexInfo; 10 | 11 | int __register_fragment(const struct ExtabIndexInfo* extab, void* toc); 12 | void __unregister_fragment(int i); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /src/egg/gfxe/eggDrawPathBase.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace EGG { 4 | 5 | DrawPathBase::DrawPathBase() {} 6 | 7 | void DrawPathBase::calc() { 8 | if (isEnable()) { 9 | copyFromAnother(IDrawGX::getScreen()); 10 | internalCalc(); 11 | } 12 | } 13 | 14 | void DrawPathBase::scnProcDraw(u16 step) { 15 | if (isEnable()) { 16 | internalDraw(step); 17 | } 18 | } 19 | 20 | } // namespace EGG 21 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_NonCopyable.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_NON_COPYABLE_H 2 | #define NW4R_UT_NON_COPYABLE_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ut { 7 | namespace { 8 | 9 | class NonCopyable { 10 | protected: 11 | NonCopyable() {} 12 | NonCopyable(const NonCopyable& /* rOther */) {} 13 | ~NonCopyable() {} 14 | }; 15 | 16 | } // namespace 17 | } // namespace ut 18 | } // namespace nw4r 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/revolution/EXI.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: YAGCD, publicly available patents 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_EXI_H 6 | #define RVL_SDK_PUBLIC_EXI_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /include/revolution/IPC.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew, Dolphin Emulator, fail0verflow 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_IPC_H 6 | #define RVL_SDK_PUBLIC_IPC_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /include/revolution/IPC/ipcProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_IPC_PROFILE_H 2 | #define RVL_SDK_IPC_PROFILE_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void IPCiProfInit(void); 11 | void IPCiProfQueueReq(IPCRequestEx* req, s32 fd); 12 | void IPCiProfAck(void); 13 | void IPCiProfReply(IPCRequestEx* req, s32 fd); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/Pack/types_pack.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_TYPES_H 2 | #define RP_TYPES_H 3 | #include 4 | 5 | /** 6 | * @brief Holds year, month, month day 7 | * @note Only years after (and including) 2000 can be represented. 8 | */ 9 | typedef u16 RPTime16; 10 | 11 | /** 12 | * @brief Holds year, month, month day, week day, hour 13 | * @note Only years after (and including) 2000 can be represented. 14 | */ 15 | typedef u32 RPTime32; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_StrmSoundHandle.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | 6 | void StrmSoundHandle::DetachSound() { 7 | if (IsAttachedSound()) { 8 | if (mSound->mTempSpecialHandle == this) { 9 | mSound->mTempSpecialHandle = NULL; 10 | } 11 | } 12 | 13 | if (mSound != NULL) { 14 | mSound = NULL; 15 | } 16 | } 17 | 18 | } // namespace snd 19 | } // namespace nw4r 20 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_WaveSoundHandle.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | 6 | void WaveSoundHandle::DetachSound() { 7 | if (IsAttachedSound()) { 8 | if (mSound->mTempSpecialHandle == this) { 9 | mSound->mTempSpecialHandle = NULL; 10 | } 11 | } 12 | 13 | if (mSound != NULL) { 14 | mSound = NULL; 15 | } 16 | } 17 | 18 | } // namespace snd 19 | } // namespace nw4r 20 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/mem_TRK.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_MEM_TRK_H 2 | #define METROTRK_DEBUGGER_PORTABLE_MEM_TRK_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void* TRK_memset(void* dest, int val, size_t count); 9 | void* TRK_memcpy(void* dest, const void* src, size_t count); 10 | void TRK_fill_mem(void* dst, int c, size_t count); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_SoundMemoryAllocatable.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_SOUND_MEMORY_ALLOCATABLE_H 2 | #define NW4R_SND_SOUND_MEMORY_ALLOCATABLE_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace snd { 7 | 8 | class SoundMemoryAllocatable { 9 | public: 10 | virtual ~SoundMemoryAllocatable() {} // at 0x8 11 | virtual void* Alloc(u32 size) = 0; // at 0xC 12 | }; 13 | 14 | } // namespace snd 15 | } // namespace nw4r 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /include/revolution/CARD/CARD.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_CARD_H 2 | #define RVL_SDK_CARD_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct CARDFileInfo { 9 | s32 chan; // at 0x0 10 | s32 fileNo; // at 0x4 11 | s32 offset; // at 0x8 12 | s32 length; // at 0xC 13 | u16 iBlock; // at 0x10 14 | u16 padding; // at 0x12 15 | } CARDFileInfo; 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /include/MSL/internal/printf.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_PRINTF_H 2 | #define MSL_PRINTF_H 3 | #include 4 | #include 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | int vprintf(const char*, va_list); 10 | int sprintf(char*, const char*, ...); 11 | int snprintf(char*, size_t, const char*, ...); 12 | int vsprintf(char*, const char*, va_list); 13 | int vsnprintf(char*, size_t, const char*, va_list); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/MSL/internal/mem.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_MEM_H 2 | #define MSL_MEM_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void* memcpy(void*, const void*, size_t); 9 | void* memset(void*, int, size_t); 10 | void* memmove(void*, const void*, size_t); 11 | void* memchr(const void*, int, size_t); 12 | void* __memrchr(const void*, int, size_t); 13 | int memcmp(const void*, const void*, size_t); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/dispatch.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_DISPATCH_H 2 | #define METROTRK_DEBUGGER_PORTABLE_DISPATCH_H 3 | #include 4 | 5 | #include 6 | #include 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | DSError TRKInitializeDispatcher(void); 12 | DSError TRKDispatchMessage(TRKMessageBuffer* buf); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /src/revolution/OS/OSIpc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void* IpcBufferLo = (void*)-1; 4 | static void* IpcBufferHi = NULL; 5 | 6 | void* __OSGetIPCBufferHi(void) { 7 | return IpcBufferHi; 8 | } 9 | 10 | void* __OSGetIPCBufferLo(void) { 11 | return IpcBufferLo; 12 | } 13 | 14 | void __OSInitIPCBuffer(void) { 15 | IpcBufferLo = *(void**)OSPhysicalToCached(OS_PHYS_IPC_BUFFER_START); 16 | IpcBufferHi = *(void**)OSPhysicalToCached(OS_PHYS_IPC_BUFFER_END); 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE folders 2 | .idea/ 3 | .vs/ 4 | 5 | # Caches 6 | __pycache__ 7 | .mypy_cache 8 | .cache/ 9 | 10 | # Original files 11 | orig/*/* 12 | !orig/*/.gitkeep 13 | *.dol 14 | *.rel 15 | *.elf 16 | *.o 17 | *.map 18 | *.MAP 19 | 20 | # Build files 21 | build/ 22 | .ninja_* 23 | build.ninja 24 | 25 | # decompctx output 26 | ctx.* 27 | *.ctx 28 | 29 | # Generated configs 30 | objdiff.json 31 | compile_commands.json 32 | 33 | # Miscellaneous 34 | /*.txt 35 | *.exe 36 | *.DS_Store 37 | -------------------------------------------------------------------------------- /include/homebuttonMiniLib.h: -------------------------------------------------------------------------------- 1 | #ifndef HOME_BUTTON_MINI_LIB_H 2 | #define HOME_BUTTON_MINI_LIB_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/MSL/internal/wstring.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_WSTRING_H 2 | #define MSL_WSTRING_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | size_t wcslen(const wchar_t*); 9 | wchar_t* wcscpy(wchar_t*, const wchar_t*); 10 | wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t); 11 | wchar_t* wcscat(wchar_t*, const wchar_t*); 12 | int wcscmp(const wchar_t*, const wchar_t*); 13 | wchar_t* wcschr(const wchar_t*, wchar_t); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/revolution/MTX/mtx44.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_MTX_MTX44_H 2 | #define RVL_SDK_MTX_MTX44_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void C_MTXFrustum(Mtx44 mtx, f32 t, f32 b, f32 l, f32 r, f32 n, f32 f); 11 | void C_MTXPerspective(Mtx44 mtx, f32 fovy, f32 aspect, f32 n, f32 f); 12 | void C_MTXOrtho(Mtx44 mtx, f32 t, f32 b, f32 l, f32 r, f32 n, f32 f); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /include/revolution/MTX/mtxtypes.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_MTX_TYPES_H 2 | #define RVL_SDK_MTX_TYPES_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef f32 Mtx[3][4]; 9 | typedef f32 Mtx44[4][4]; 10 | 11 | typedef struct Vec { 12 | f32 x, y, z; 13 | } Vec; 14 | 15 | typedef struct Vec2 { 16 | f32 x, y; 17 | } Vec2; 18 | 19 | typedef struct Quaternion { 20 | f32 x, y, z, w; 21 | } Quaternion; 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RPSysMiddleDBGenInfo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | /** 6 | * @brief Constructor 7 | */ 8 | RPSysMiddleDBGenInfo::RPSysMiddleDBGenInfo() 9 | : mType(RFLMiddleDBType_Random), 10 | mSize(0), 11 | mGenderMask(RFLSex_All), 12 | mAgeMask(RFLAge_All), 13 | mRaceMask(RFLRace_All), 14 | mpMiiManager(NULL) {} 15 | 16 | /** 17 | * @brief Destructor 18 | */ 19 | RPSysMiddleDBGenInfo::~RPSysMiddleDBGenInfo() {} 20 | -------------------------------------------------------------------------------- /src/egg/core/eggDisposer.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | namespace EGG { 7 | 8 | Disposer::Disposer() { 9 | mContainHeap = Heap::findContainHeap(this); 10 | 11 | if (mContainHeap != NULL) { 12 | mContainHeap->appendDisposer(this); 13 | } 14 | } 15 | 16 | Disposer::~Disposer() { 17 | if (mContainHeap != NULL) { 18 | mContainHeap->removeDisposer(this); 19 | } 20 | } 21 | 22 | } // namespace EGG 23 | -------------------------------------------------------------------------------- /include/Pack/RPSystem/RPSysSceneMgr.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_SYSTEM_SCENE_MGR_H 2 | #define RP_SYSTEM_SCENE_MGR_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_system 10 | //! @{ 11 | 12 | /** 13 | * @brief Scene manager 14 | */ 15 | class RPSysSceneMgr : public EGG::SceneManager { 16 | RP_SINGLETON_DECL(RPSysSceneMgr); 17 | 18 | public: 19 | bool isShutDownReserved() const; 20 | }; 21 | 22 | //! @} 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24System.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_SYSTEM_H 2 | #define RVL_SDK_NWC24_SYSTEM_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | NWC24Err NWC24EnableLedNotification(BOOL enable); 11 | NWC24Err NWC24iPrepareShutdown(void); 12 | NWC24Err NWC24iRequestShutdown(u32 event, NWC24Err* resultOut); 13 | BOOL NWC24Shutdown(BOOL final, u32 event); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24Time.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_TIME_H 2 | #define RVL_SDK_NWC24_TIME_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | NWC24Err NWC24iGetUniversalTime(s64* timeOut); 11 | NWC24Err NWC24iGetTimeDifference(s64* diffOut); 12 | NWC24Err NWC24iSetRtcCounter(u32 rtc, u32 flags); 13 | NWC24Err NWC24iSynchronizeRtcCounter(BOOL forceSave); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | // Stubbed for release 6 | void OSReport(const char* /* msg */, ...) { 7 | ; 8 | } 9 | 10 | #if defined(__MWERKS__) 11 | void main(int /* argc */, char** /* argv */) { 12 | #else 13 | int main(int /* argc */, char** /* argv */) { 14 | #endif 15 | RPSysSystem::initialize(); 16 | RPSysSystem::create(); 17 | RP_GET_INSTANCE(RPSysSystem)->setup(); 18 | RP_GET_INSTANCE(RPSysSystem)->mainLoop(); 19 | } 20 | -------------------------------------------------------------------------------- /include/nw4r/g3d/platform/g3d_tmem.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_PLATFORM_TMEM_H 2 | #define NW4R_G3D_PLATFORM_TMEM_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace g3d { 7 | namespace tmem { 8 | 9 | // TODO(kiwi) Naming 10 | enum TMemLayout { 11 | TMEM_LAYOUT_NONE, 12 | TMEM_LAYOUT_1, 13 | TMEM_LAYOUT_2, 14 | TMEM_LAYOUT_3 15 | }; 16 | 17 | void SetTMemLayout(TMemLayout layout); 18 | 19 | } // namespace tmem 20 | } // namespace g3d 21 | } // namespace nw4r 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/revolution/PAD/Pad.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | u32 __PADSpec = 0; 5 | 6 | BOOL __PADDisableRecalibration(BOOL disable) { 7 | BOOL enabled = OSDisableInterrupts(); 8 | BOOL old = (OS_PAD_FLAGS & PAD_FLAG_NO_RECALIBRATE) ? TRUE : FALSE; 9 | 10 | OS_PAD_FLAGS &= ~PAD_FLAG_NO_RECALIBRATE; 11 | 12 | if (disable) { 13 | OS_PAD_FLAGS |= PAD_FLAG_NO_RECALIBRATE; 14 | } 15 | 16 | OSRestoreInterrupts(enabled); 17 | return old; 18 | } 19 | -------------------------------------------------------------------------------- /include/revolution/OS/OSAlloc.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_ALLOC_H 2 | #define RVL_SDK_OS_ALLOC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern volatile s32 __OSCurrHeap; 9 | 10 | void* OSAllocFromHeap(s32 handle, s32 size); 11 | void OSFreeToHeap(s32 handle, void* p); 12 | s32 OSSetCurrentHeap(s32 handle); 13 | void* OSInitAlloc(void* start, void* end, s32 numHeaps); 14 | s32 OSCreateHeap(void* start, void* end); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /src/egg/core/eggAllocator.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | namespace EGG { 7 | 8 | Allocator::Allocator(Heap* pHeap, s32 align) { 9 | pHeap->initAllocator(this, align); 10 | } 11 | 12 | Allocator::~Allocator() {} 13 | 14 | void* Allocator::alloc(u32 size) { 15 | return MEMAllocFromAllocator(this, size); 16 | } 17 | 18 | void Allocator::free(void* pBlock) { 19 | MEMFreeToAllocator(this, pBlock); 20 | } 21 | 22 | } // namespace EGG 23 | -------------------------------------------------------------------------------- /include/egg/core/eggAllocator.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_ALLOCATOR_H 2 | #define EGG_CORE_ALLOCATOR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | // Forward declarations 10 | class Heap; 11 | 12 | class Allocator : public MEMAllocator { 13 | public: 14 | Allocator(Heap* pHeap, s32 align = 32); 15 | virtual ~Allocator(); 16 | 17 | virtual void* alloc(u32 size); 18 | virtual void free(void* pBlock); 19 | }; 20 | 21 | } // namespace EGG 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/nw4r/lyt/lyt_bounding.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace lyt { 5 | 6 | NW4R_UT_RTTI_DEF_DERIVED(Bounding, Pane); 7 | 8 | Bounding::Bounding(const res::Bounding* pRes, const ResBlockSet& rBlockSet) 9 | : Pane(pRes) { 10 | 11 | #pragma unused(rBlockSet) 12 | } 13 | 14 | Bounding::~Bounding() {} 15 | 16 | void Bounding::DrawSelf(const DrawInfo& rInfo) { 17 | #pragma unused(rInfo) 18 | // Debug draw stripped out 19 | } 20 | 21 | } // namespace lyt 22 | } // namespace nw4r 23 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RPSysKokeshiIcon.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_KOKESHI_ICON_H 2 | #define RP_KERNEL_KOKESHI_ICON_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | //! @addtogroup rp_kernel 13 | //! @{ 14 | 15 | /** 16 | * @brief Mii icon texture 17 | */ 18 | class RPSysKokeshiIcon : public RPSysAvatar { 19 | public: 20 | EGG::ResTIMG* GetResTIMG(); 21 | }; 22 | 23 | //! @} 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24Parser.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_PARSER_H 2 | #define RVL_SDK_NWC24_PARSER_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | const char* NWC24GetMIMETypeStr(NWC24MIMEType type); 11 | const char* NWC24iGetMIMETypeSuffix(NWC24MIMEType type); 12 | const char* NWC24GetCharsetStr(NWC24Charset set); 13 | const char* NWC24GetEncodingStr(NWC24Encoding enc); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/MSL/limits: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_LIMITS_H 2 | #define MSL_CPP_LIMITS_H 3 | #include 4 | #include 5 | #ifdef __cplusplus 6 | 7 | namespace std { 8 | 9 | template class numeric_limits { 10 | public: 11 | static const T epsilon() { 12 | return T(); 13 | } 14 | }; 15 | 16 | template <> class numeric_limits { 17 | public: 18 | static const float epsilon() { 19 | return FLT_EPSILON; 20 | } 21 | }; 22 | 23 | } // namespace std 24 | 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /src/revolution/AX/AXProf.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static BOOL __AXProfileInitialized = FALSE; 4 | static AXPROFILE* __AXProfile; 5 | static u32 __AXMaxProfiles; 6 | static u32 __AXCurrentProfile; 7 | 8 | AXPROFILE* __AXGetCurrentProfile(void) { 9 | if (__AXProfileInitialized) { 10 | AXPROFILE* prof = &__AXProfile[__AXCurrentProfile]; 11 | 12 | __AXCurrentProfile++; 13 | __AXCurrentProfile %= __AXMaxProfiles; 14 | 15 | return prof; 16 | } 17 | 18 | return NULL; 19 | } 20 | -------------------------------------------------------------------------------- /include/MSL/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_STDDEF_H 2 | #define MSL_STDDEF_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #ifndef NULL 8 | #define NULL 0 9 | #endif // NULL 10 | 11 | #define offsetof(ST, M) ((size_t) & (((ST*)0)->M)) 12 | 13 | typedef signed long intptr_t; 14 | typedef unsigned long uintptr_t; 15 | typedef intptr_t ptrdiff_t; 16 | 17 | typedef unsigned long size_t; 18 | 19 | #if !defined(__cplusplus) 20 | typedef unsigned short wchar_t; 21 | #endif 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_MmlSeqTrack.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | namespace detail { 6 | 7 | MmlSeqTrack::MmlSeqTrack() { 8 | mMmlParserParam.noteWaitFlag = true; 9 | mMmlParserParam.tieFlag = false; 10 | mMmlParserParam.cmpFlag = true; 11 | mMmlParserParam.callStackDepth = 0; 12 | } 13 | 14 | ParseResult MmlSeqTrack::Parse(bool doNoteOn) { 15 | return mParser->Parse(this, doNoteOn); 16 | } 17 | 18 | } // namespace detail 19 | } // namespace snd 20 | } // namespace nw4r 21 | -------------------------------------------------------------------------------- /include/MSL/cstring: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CPP_CSTRING_H 2 | #define MSL_CPP_CSTRING_H 3 | #include 4 | #ifdef __cplusplus 5 | 6 | namespace std { 7 | using ::__memrchr; 8 | using ::memchr; 9 | using ::memcmp; 10 | using ::memcpy; 11 | using ::memmove; 12 | using ::memset; 13 | using ::strcat; 14 | using ::strchr; 15 | using ::strcmp; 16 | using ::strcpy; 17 | using ::stricmp; 18 | using ::strlen; 19 | using ::strncat; 20 | using ::strncmp; 21 | using ::strncpy; 22 | using ::strstr; 23 | } // namespace std 24 | 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /include/egg/core/eggDisposer.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_DISPOSER_H 2 | #define EGG_CORE_DISPOSER_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | // Forward declarations 10 | class Heap; 11 | 12 | class Disposer { 13 | friend class Heap; 14 | 15 | public: 16 | Disposer(); 17 | virtual ~Disposer(); // at 0x8 18 | 19 | private: 20 | Heap* mContainHeap; // at 0x4 21 | 22 | public: 23 | NW4R_UT_LIST_LINK_DECL(); // at 0x8 24 | }; 25 | 26 | } // namespace EGG 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/nw4r/ef/ef_linkedobject.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_LINKED_OBJECT_H 2 | #define NW4R_EF_LINKED_OBJECT_H 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | namespace nw4r { 9 | namespace ef { 10 | 11 | class LinkedObject { 12 | public: 13 | ut::Link mMemoryLink; // at 0x0 14 | u32 mObjectID; // at 0x8 15 | 16 | public: 17 | u16 GetObjectIdx() const { 18 | return mObjectID; 19 | } 20 | }; 21 | 22 | } // namespace ef 23 | } // namespace nw4r 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/dserror.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_DSERROR_H 2 | #define METROTRK_DEBUGGER_PORTABLE_DSERROR_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum { 9 | kNoError = 0x0000, 10 | kMsgQueueFull = 0x0100, 11 | kMsgBufUnavailable = 0x0300, 12 | kMsgWriteOverflow = 0x0301, 13 | kMsgReadOverflow = 0x0302, 14 | kMsgInvalid = 0x500, 15 | kInvalidMemory = 0x0700, 16 | } DSError; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_3dsmax.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_3DSMAX_H 2 | #define NW4R_G3D_3DSMAX_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | namespace nw4r { 10 | namespace g3d { 11 | namespace detail { 12 | namespace dcc { 13 | 14 | bool CalcTexMtx_3dsmax(math::MTX34* pMtx, bool set, const TexSrt& rSrt, 15 | TexSrt::Flag flag); 16 | 17 | } // namespace dcc 18 | } // namespace detail 19 | } // namespace g3d 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24SecretFList.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_SECRET_FRIEND_LIST_H 2 | #define RVL_SDK_NWC24_SECRET_FRIEND_LIST_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct NWC24SecretFLHeader { 11 | u32 magic; // at 0x0 12 | u32 version; // at 0x4 13 | u8 UNK_0x8[0x800 - 0x8]; 14 | } NWC24SecretFLHeader; 15 | 16 | NWC24Err NWC24iOpenSecretFriendList(void); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /config/RSPE01_01/config.yml: -------------------------------------------------------------------------------- 1 | object_base: orig/RSPE01_01 2 | object: sys/main.dol 3 | hash: 8bb422971b88b5551a37de98db69557df7b46637 4 | symbols: config/RSPE01_01/symbols.txt 5 | splits: config/RSPE01_01/splits.txt 6 | mw_comment_version: 14 # GC 3.0a5 linker 7 | quick_analysis: true 8 | 9 | block_relocations: 10 | # OSInit 11 | - source: 0x800EC914 12 | - source: 0x800EC98C 13 | 14 | extract: 15 | - symbol: sStaticSoundArchive__14RPSndStaticMgr 16 | binary: rp_Static_sound.brsar 17 | header: Pack/RPAudio/rp_Static_sound.brsar.inc 18 | -------------------------------------------------------------------------------- /include/revolution/AXFX/AXFXHooks.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AXFX_HOOKS_H 2 | #define RVL_SDK_AXFX_HOOKS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef void* (*AXFXAllocHook)(size_t size); 9 | typedef void (*AXFXFreeHook)(void* block); 10 | 11 | extern AXFXAllocHook __AXFXAlloc; 12 | extern AXFXFreeHook __AXFXFree; 13 | 14 | void AXFXSetHooks(AXFXAllocHook alloc, AXFXFreeHook free); 15 | void AXFXGetHooks(AXFXAllocHook* alloc, AXFXFreeHook* free); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /include/revolution/EUART/euart.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_EUART_EUART_H 2 | #define RVL_SDK_EUART_EUART_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum { 9 | EUART_ERROR_OK, 10 | EUART_ERROR_FATAL, 11 | EUART_ERROR_INVALID, 12 | EUART_ERROR_BUSY, 13 | EUART_ERROR_4, 14 | EUART_ERROR_EXI, 15 | } EUARTError; 16 | 17 | BOOL EUARTInit(void); 18 | EUARTError InitializeUART(void); 19 | EUARTError WriteUARTN(const char* msg, u32 n); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /include/homebuttonMiniLib/HBMApi.h: -------------------------------------------------------------------------------- 1 | #ifndef HOME_BUTTON_MINI_LIB_API_H 2 | #define HOME_BUTTON_MINI_LIB_API_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | 9 | void HBMCreate(const HBMDataInfo* pHBInfo); 10 | void HBMInit(); 11 | 12 | HBMSelectBtnNum HBMCalc(const HBMControllerData* pController); 13 | void HBMDraw(); 14 | 15 | void HBMSetAdjustFlag(BOOL flag); 16 | void HBMStartBlackOut(); 17 | void HBMSetBlackOutColor(u8 r, u8 g, u8 b); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/revolution/DVD.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: WiiBrew, YAGCD, WiiCore 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_DVD_H 6 | #define RVL_SDK_PUBLIC_DVD_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/revolution/NdevExi2AD/exi2.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NDEV_EXI2_AD_EXI2_H 2 | #define RVL_SDK_NDEV_EXI2_AD_EXI2_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | BOOL __EXI2Imm(void* mem, s32 size, u32 type); 9 | void __DBEXIInit(void); 10 | BOOL __DBEXIReadReg(u32 cmd, void* mem, s32 size); 11 | BOOL __DBEXIWriteReg(u32 cmd, const void* mem, s32 size); 12 | BOOL __DBEXIReadRam(u32 cmd, void* mem, s32 size); 13 | BOOL __DBEXIWriteRam(u32 cmd, const void* mem, s32 size); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /include/revolution/OS/OSAddress.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_ADDRESS_H 2 | #define RVL_SDK_OS_ADDRESS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | static inline void* OSPhysicalToCached(u32 ofs) { 9 | return (void*)(ofs + 0x80000000); 10 | } 11 | 12 | static inline void* OSPhysicalToUncached(u32 ofs) { 13 | return (void*)(ofs + 0xC0000000); 14 | } 15 | 16 | static inline void* OSCachedToPhysical(const void* ofs) { 17 | return (u8*)ofs - 0x80000000; 18 | } 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /src/egg/util/eggException.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | namespace EGG { 7 | 8 | Exception* Exception::create(u16 width, u16 height, u16 attr, Heap* pHeap) { 9 | #pragma unused(width) 10 | #pragma unused(height) 11 | #pragma unused(attr) 12 | #pragma unused(pHeap) 13 | 14 | // Stubbed for release 15 | return NULL; 16 | } 17 | 18 | void Exception::setPadInfo(const u16* pPadInfo) { 19 | #pragma unused(pPadInfo) 20 | 21 | // Stubbed for release 22 | } 23 | 24 | } // namespace EGG 25 | -------------------------------------------------------------------------------- /src/nw4r/g3d/g3d_obj.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace g3d { 5 | 6 | NW4R_G3D_RTTI_DEF(G3dObj); 7 | 8 | G3dObj::~G3dObj() { 9 | Dealloc(mpHeap, this); 10 | } 11 | 12 | void G3dObj::Destroy() { 13 | G3dObj* pParent = GetParent(); 14 | 15 | if (pParent != NULL) { 16 | pParent->G3dProc(G3DPROC_CHILD_DETACHED, 0, this); 17 | } 18 | 19 | delete this; 20 | } 21 | 22 | DECOMP_FORCEACTIVE(g3d_obj_cpp, 23 | G3dObj::IsDerivedFrom); 24 | 25 | } // namespace g3d 26 | } // namespace nw4r 27 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_calcmaterial.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_CALC_MATERIAL_H 2 | #define NW4R_G3D_CALC_MATERIAL_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace g3d { 9 | 10 | // Forward declarations 11 | class AnmObjTexPat; 12 | class AnmObjTexSrt; 13 | class AnmObjMatClr; 14 | 15 | void CalcMaterialDirectly(ResMdl mdl, AnmObjTexPat* pAnmTexPat, 16 | AnmObjTexSrt* pAnmTexSrt, AnmObjMatClr* pAnmMatClr); 17 | 18 | } // namespace g3d 19 | } // namespace nw4r 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/egg/math/eggQuat.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | namespace EGG { 7 | 8 | void Quatf::set(f32 fw, f32 fx, f32 fy, f32 fz) { 9 | w = fw; 10 | v.x = fx; 11 | v.y = fy; 12 | v.z = fz; 13 | } 14 | 15 | void Quatf::setAxisRotation(const Vector3f& rAxis, f32 angle) { 16 | f32 half = angle * 0.5f; 17 | f32 cosa = Math::cos(half); 18 | f32 sina = Math::sin(half); 19 | set(cosa, sina * rAxis.x, sina * rAxis.y, sina * rAxis.z); 20 | } 21 | 22 | } // namespace EGG 23 | -------------------------------------------------------------------------------- /include/MetroTRK/debugger/Portable/mutex_TRK.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_DEBUGGER_PORTABLE_MUTEX_TRK_H 2 | #define METROTRK_DEBUGGER_PORTABLE_MUTEX_TRK_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | // Unused? 11 | typedef struct TRKMutex { 12 | char dummy[4]; 13 | } TRKMutex; 14 | 15 | DSError TRKReleaseMutex(TRKMutex* mutex); 16 | DSError TRKAcquireMutex(TRKMutex* mutex); 17 | DSError TRKInitializeMutex(TRKMutex* mutex); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/nw4r/ef/ef_drawstrategy.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRATEGY_H 2 | #define NW4R_EF_DRAW_STRATEGY_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ef { 7 | 8 | // Forward declarations 9 | class DrawInfo; 10 | class ParticleManager; 11 | 12 | class DrawStrategy { 13 | public: 14 | DrawStrategy() {} 15 | virtual ~DrawStrategy() {} // at 0x8 16 | 17 | virtual void Draw(const DrawInfo& rInfo, 18 | ParticleManager* pManager) = 0; // at 0xC 19 | }; 20 | 21 | } // namespace ef 22 | } // namespace nw4r 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24Schedule.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_SCHEDULE_H 2 | #define RVL_SDK_NWC24_SCHEDULE_H 3 | #include 4 | 5 | #include 6 | #include 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | s32 NWC24SuspendScheduler(void); 12 | s32 NWC24ResumeScheduler(void); 13 | NWC24Err NWC24iRequestGenerateUserId(u64* idOut, u32* arg1); 14 | NWC24Err NWC24iTrySuspendForOpenLib(void); 15 | NWC24Err NWC24iResumeForCloseLib(void); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | #endif 21 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/IRPSysHostIOSocket.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** 4 | * @brief Constructor 5 | * 6 | * @param pName Socket name 7 | * @param ... Format string arguments 8 | */ 9 | IRPSysHostIOSocket::IRPSysHostIOSocket(const char* /* pName */, ...) { 10 | // Stubbed for release 11 | } 12 | 13 | /** 14 | * @brief Constructor 15 | */ 16 | IRPSysHostIOSocket::IRPSysHostIOSocket() { 17 | // Stubbed for release 18 | } 19 | 20 | /** 21 | * @brief Destructor 22 | */ 23 | IRPSysHostIOSocket::~IRPSysHostIOSocket() { 24 | // Stubbed for release 25 | } 26 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_calcvtx.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_CALC_VTX_H 2 | #define NW4R_G3D_CALC_VTX_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace g3d { 9 | 10 | // Forward declarations 11 | class AnmObjShp; 12 | struct ResVtxPosData; 13 | struct ResVtxNrmData; 14 | struct ResVtxClrData; 15 | 16 | void CalcVtx(ResMdl mdl, AnmObjShp* pAnmShp, ResVtxPosData** ppVtxPosTable, 17 | ResVtxNrmData** ppVtxNrmTable, ResVtxClrData** ppVtxClrTable); 18 | 19 | } // namespace g3d 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/revolution/MTX/quat.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_MTX_QUAT_H 2 | #define RVL_SDK_MTX_QUAT_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void PSQUATMultiply(const Quaternion* a, const Quaternion* b, Quaternion* prod); 11 | void PSQUATNormalize(const Quaternion* in, Quaternion* out); 12 | void C_QUATMtx(Quaternion* quat, const Mtx mtx); 13 | void C_QUATSlerp(const Quaternion* a, const Quaternion* b, Quaternion* out, 14 | f32 t); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /include/revolution/OS/OSExec.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_EXEC_H 2 | #define RVL_SDK_OS_EXEC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct OSExecParams { 9 | UNKWORD WORD_0x0; 10 | UNKWORD WORD_0x4; 11 | char UNK_0x8[0x4]; 12 | void* regionStart; // at 0xC 13 | void* regionEnd; // at 0x10 14 | char UNK_0x14[0x1C - 0x14]; 15 | } OSExecParams; 16 | 17 | extern BOOL __OSInReboot; 18 | 19 | void __OSGetExecParams(OSExecParams* out); 20 | void __OSLaunchMenu(void); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /include/revolution/GX/GXDisplayList.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_GX_DISPLAY_LIST_H 2 | #define RVL_SDK_GX_DISPLAY_LIST_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void GXBeginDisplayList(void* list, u32 size); 11 | u32 GXEndDisplayList(void); 12 | void GXCallDisplayList(void* list, u32 size); 13 | 14 | static void GXFastCallDisplayList(void* list, u32 size) { 15 | WGPIPE.c = GX_FIFO_CMD_CALL_DL; 16 | WGPIPE.p = list; 17 | WGPIPE.ui = size; 18 | } 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_StrmSoundHandle.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_STRM_SOUND_HANDLE_H 2 | #define NW4R_SND_STRM_SOUND_HANDLE_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | namespace nw4r { 10 | namespace snd { 11 | 12 | class StrmSoundHandle : private ut::NonCopyable { 13 | public: 14 | void DetachSound(); 15 | 16 | bool IsAttachedSound() { 17 | return mSound != NULL; 18 | } 19 | 20 | private: 21 | detail::StrmSound* mSound; // at 0x0 22 | }; 23 | 24 | } // namespace snd 25 | } // namespace nw4r 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /include/revolution/NAND/NANDCheck.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NAND_CHECK_H 2 | #define RVL_SDK_NAND_CHECK_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef enum { 11 | NAND_CHECK_TOO_MANY_APP_BLOCKS = (1 << 0), 12 | NAND_CHECK_TOO_MANY_APP_FILES = (1 << 1), 13 | NAND_CHECK_TOO_MANY_USER_BLOCKS = (1 << 2), 14 | NAND_CHECK_TOO_MANY_USER_FILES = (1 << 3), 15 | } NANDCheckFlags; 16 | 17 | s32 NANDCheck(u32 neededBlocks, u32 neededFiles, u32* answer); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggDrawPathDOF.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_DRAW_PATH_DOF_H 2 | #define EGG_GFXE_DRAW_PATH_DOF_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class DrawPathDOF : public DrawPathBase { 10 | public: 11 | DrawPathDOF(); 12 | virtual ~DrawPathDOF(); // at 0x8 13 | virtual int getNumStep() const; // at 0x1C 14 | virtual void internalCalc(); // at 0x24 15 | virtual void internalDraw(u16); // at 0x28 16 | 17 | private: 18 | char UNK_0x7C[0xB4 - 0x7C]; 19 | }; 20 | 21 | } // namespace EGG 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/revolution/AX/AX.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | const char* __AXVersion = 5 | "<< RVL_SDK - AX \trelease build: Dec 18 2006 15:43:48 (0x4199_60831) >>"; 6 | 7 | static BOOL __init = FALSE; 8 | 9 | void AXInit(void) { 10 | AXInitEx(0); 11 | } 12 | 13 | void AXInitEx(u32 mode) { 14 | if (!__init) { 15 | OSRegisterVersion(__AXVersion); 16 | 17 | __AXAllocInit(); 18 | __AXVPBInit(); 19 | __AXSPBInit(); 20 | __AXAuxInit(); 21 | __AXClInit(); 22 | __AXOutInit(mode); 23 | 24 | __init = TRUE; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_disc.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_DISC_H 2 | #define NW4R_EF_EMFORM_DISC_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class EmitterFormDisc : public EmitterForm { 11 | public: 12 | EmitterFormDisc() {} 13 | 14 | virtual void Emission(Emitter* pEmitter, ParticleManager* pManager, 15 | int count, u32 flags, f32* pParams, u16 life, 16 | f32 lifeRnd, const math::MTX34* pSpace); // at 0x8 17 | }; 18 | 19 | } // namespace ef 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_line.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_LINE_H 2 | #define NW4R_EF_EMFORM_LINE_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class EmitterFormLine : public EmitterForm { 11 | public: 12 | EmitterFormLine() {} 13 | 14 | virtual void Emission(Emitter* pEmitter, ParticleManager* pManager, 15 | int count, u32 flags, f32* pParams, u16 life, 16 | f32 lifeRnd, const math::MTX34* pSpace); // at 0x8 17 | }; 18 | 19 | } // namespace ef 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_basic.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_BASIC_H 2 | #define NW4R_G3D_BASIC_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace g3d { 9 | 10 | // Forward declarations 11 | struct ChrAnmResult; 12 | 13 | namespace detail { 14 | namespace dcc { 15 | 16 | u32 CalcWorldMtx_Basic(math::MTX34* pW, math::VEC3* pS, const math::MTX34* pW1, 17 | const math::VEC3* pS1, u32 attr, 18 | const ChrAnmResult* pResult); 19 | 20 | } // namespace dcc 21 | } // namespace detail 22 | } // namespace g3d 23 | } // namespace nw4r 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/nw4r/lyt/lyt_resourceAccessor.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_LYT_RESOURCE_ACCESSOR_H 2 | #define NW4R_LYT_RESOURCE_ACCESSOR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace lyt { 9 | 10 | class ResourceAccessor { 11 | public: 12 | ResourceAccessor(); 13 | virtual ~ResourceAccessor(); // at 0x8 14 | 15 | virtual void* GetResource(u32 type, const char* pName, 16 | u32* pSize) = 0; // at 0xC 17 | 18 | virtual ut::Font* GetFont(const char* pName); // at 0x10 19 | }; 20 | 21 | } // namespace lyt 22 | } // namespace nw4r 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/MSL/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_LIMITS_H 2 | #define MSL_LIMITS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define CHAR_BIT 8 9 | 10 | #define SCHAR_MIN -127 11 | #define SCHAR_MAX 127 12 | #define UCHAR_MAX 255 13 | 14 | #define CHAR_MIN 0 15 | #define CHAR_MAX SCHAR_MAX 16 | 17 | #define SHRT_MIN -32767 18 | #define SHRT_MAX 32767 19 | #define USHRT_MAX 65535 20 | 21 | #define INT_MIN -2147483647 22 | #define INT_MAX 2147483647 23 | 24 | #define LONG_MIN INT_MIN 25 | #define LONG_MAX INT_MAX 26 | #define ULONG_MAX 4294967295U 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_point.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_POINT_H 2 | #define NW4R_EF_EMFORM_POINT_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class EmitterFormPoint : public EmitterForm { 11 | public: 12 | EmitterFormPoint() {} 13 | 14 | virtual void Emission(Emitter* pEmitter, ParticleManager* pManager, 15 | int count, u32 flags, f32* pParams, u16 life, 16 | f32 lifeRnd, const math::MTX34* pSpace); // at 0x8 17 | }; 18 | 19 | } // namespace ef 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_torus.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_TORUS_H 2 | #define NW4R_EF_EMFORM_TORUS_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class EmitterFormTorus : public EmitterForm { 11 | public: 12 | EmitterFormTorus() {} 13 | 14 | virtual void Emission(Emitter* pEmitter, ParticleManager* pManager, 15 | int count, u32 flags, f32* pParams, u16 life, 16 | f32 lifeRnd, const math::MTX34* pSpace); // at 0x8 17 | }; 18 | 19 | } // namespace ef 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/nw4r/g3d/platform/g3d_allocator.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_PLATFORM_ALLOCATOR_H 2 | #define NW4R_G3D_PLATFORM_ALLOCATOR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace g3d { 9 | namespace detail { 10 | 11 | inline void* AllocFromAllocator(MEMAllocator* pAllocator, u32 size) { 12 | return MEMAllocFromAllocator(pAllocator, size); 13 | } 14 | inline void FreeToAllocator(MEMAllocator* pAllocator, void* pBlock) { 15 | return MEMFreeToAllocator(pAllocator, pBlock); 16 | } 17 | 18 | } // namespace detail 19 | } // namespace g3d 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_sphere.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_SPHERE_H 2 | #define NW4R_EF_EMFORM_SPHERE_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class EmitterFormSphere : public EmitterForm { 11 | public: 12 | EmitterFormSphere() {} 13 | 14 | virtual void Emission(Emitter* pEmitter, ParticleManager* pManager, 15 | int count, u32 flags, f32* pParams, u16 life, 16 | f32 lifeRnd, const math::MTX34* pSpace); // at 0x8 17 | }; 18 | 19 | } // namespace ef 20 | } // namespace nw4r 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_MidiSeqPlayer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace nw4r { 5 | namespace snd { 6 | namespace detail { 7 | 8 | /** 9 | * Dummy class to instantiate necessary weak functions 10 | */ 11 | #if !defined(NONMATCHING) 12 | class MidiSeqPlayer : public SeqPlayer { 13 | private: 14 | MidiSeqPlayer(); 15 | 16 | // Dummy implementation, must prevent instantiating SeqPlayer version 17 | virtual void ChannelCallback(Channel* /* pChannel */) {} 18 | }; 19 | 20 | MidiSeqPlayer::MidiSeqPlayer() {} 21 | #endif 22 | 23 | } // namespace detail 24 | } // namespace snd 25 | } // namespace nw4r 26 | -------------------------------------------------------------------------------- /include/RVLFaceLib.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_H 2 | #define RVL_FACE_LIBRARY_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggPostEffectSimple.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_POST_EFFECT_SIMPLE_H 2 | #define EGG_GFXE_POST_EFFECT_SIMPLE_H 3 | #include "eggPostEffectBase.h" 4 | #include "types_egg.h" 5 | 6 | namespace EGG { 7 | class PostEffectSimple : public PostEffectBase { 8 | public: 9 | PostEffectSimple(); 10 | virtual ~PostEffectSimple() {} // at 0x8 11 | virtual void reset(); // at 0x14 12 | virtual void setMaterialInternal(); // at 0x18 13 | 14 | private: 15 | GXColor mColor; // at 0x20 16 | f32 FLOAT_0x24; 17 | char UNK_0x28[0x4]; 18 | UNKWORD WORD_0x2C; 19 | }; 20 | } // namespace EGG 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/egg/util/eggEffect.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace EGG { 9 | 10 | static const nw4r::ef::Handle cInvalidHandle; 11 | 12 | DECOMP_FORCEACTIVE(eggEffect_cpp, 13 | nw4r::ef::ParticleManager::ModifierTravFunc_SetSimpleLightType, 14 | nw4r::ef::ParticleManager::ModifierTravFunc_SetSimpleLightAmbient, 15 | nw4r::ef::ParticleManager::ModifierTravFunc_SetScale, 16 | nw4r::ef::ParticleManager::ModifierTravFunc_SetRotate); 17 | 18 | } // namespace EGG 19 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RPSysTagProcessor.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_TAG_PROCESSOR_H 2 | #define RP_KERNEL_TAG_PROCESSOR_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_kernel 10 | //! @{ 11 | 12 | /** 13 | * @brief Wide-char text tag processor 14 | */ 15 | class RPSysTagProcessor : public nw4r::ut::WideTagProcessor { 16 | RP_SINGLETON_DECL(RPSysTagProcessor); 17 | 18 | public: 19 | void PreProcessEx(wchar_t const*, wchar_t*, u32, int*, int, va_list); 20 | 21 | void PreProcessEx(wchar_t const*, wchar_t*, u32, int*, int, ...); 22 | }; 23 | 24 | //! @} 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggDrawPathShadowVolume.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_DRAW_PATH_SHADOW_VOLUME_H 2 | #define EGG_GFXE_DRAW_PATH_SHADOW_VOLUME_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class DrawPathShadowVolume : public DrawPathBase { 10 | public: 11 | DrawPathShadowVolume(); 12 | virtual ~DrawPathShadowVolume(); // at 0x8 13 | virtual int getNumStep() const; // at 0x1C 14 | virtual void internalCalc(); // at 0x24 15 | virtual void internalDraw(u16); // at 0x28 16 | 17 | private: 18 | char UNK_0x7C[0x98 - 0x7C]; 19 | }; 20 | 21 | } // namespace EGG 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/revolution/AX/AXProf.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AX_PROF_H 2 | #define RVL_SDK_AX_PROF_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct _AXPROFILE { 9 | s64 timeBegin; // at 0x0 10 | s64 timeProcessAuxBegin; // at 0x8 11 | s64 timeProcessAuxEnd; // at 0x10 12 | s64 timeUserFrameBegin; // at 0x18 13 | s64 timeUserFrameEnd; // at 0x20 14 | s64 timeEnd; // at 0x28 15 | s32 numVoices; // at 0x30 16 | UNKWORD WORD_0x34; 17 | } AXPROFILE; 18 | 19 | AXPROFILE* __AXGetCurrentProfile(void); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /include/egg/math/eggQuat.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_MATH_QUAT_H 2 | #define EGG_MATH_QUAT_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class Quatf { 10 | public: 11 | Quatf() {} 12 | Quatf(f32 fw, Vector3f vxyz) : v(vxyz), w(fw) {} 13 | ~Quatf() {} 14 | 15 | void multScalar(f32 scale) { 16 | v *= scale; 17 | w *= scale; 18 | } 19 | 20 | void set(f32 fw, f32 fx, f32 fy, f32 fz); 21 | void setAxisRotation(const Vector3f& rAxis, f32 angle); 22 | 23 | public: 24 | Vector3f v; // at 0x0 25 | f32 w; // at 0xC 26 | }; 27 | 28 | } // namespace EGG 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/revolution/DSP/dsp.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DSP_H 2 | #define RVL_SDK_DSP_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | // Forward declarations 9 | typedef struct DSPTask DSPTask; 10 | 11 | // General-purpose typedef 12 | typedef void* DSPMail; 13 | 14 | BOOL DSPCheckMailToDSP(void); 15 | BOOL DSPCheckMailFromDSP(void); 16 | DSPMail DSPReadMailFromDSP(void); 17 | void DSPSendMailToDSP(DSPMail mail); 18 | void DSPAssertInt(void); 19 | void DSPInit(void); 20 | BOOL DSPCheckInit(void); 21 | DSPTask* DSPAddTask(DSPTask* task); 22 | DSPTask* DSPAssertTask(DSPTask* task); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /include/revolution/IPC/ipcMain.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_IPC_MAIN_H 2 | #define RVL_SDK_IPC_MAIN_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | inline u32 ACRReadReg(u32 reg) { 11 | return IPC_PPC_HW_REGS[reg / 4]; 12 | } 13 | 14 | inline void ACRWriteReg(u32 reg, u32 val) { 15 | IPC_PPC_HW_REGS[reg / 4] = val; 16 | } 17 | 18 | void IPCInit(void); 19 | u32 IPCReadReg(s32 index); 20 | void IPCWriteReg(s32 index, u32 value); 21 | void* IPCGetBufferHi(void); 22 | void* IPCGetBufferLo(void); 23 | void IPCSetBufferLo(void* lo); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /src/egg/core/eggScene.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | #include 6 | 7 | namespace EGG { 8 | 9 | Scene::Scene() { 10 | mHeap = Heap::getCurrentHeap(); 11 | #line 32 12 | EGG_ASSERT(mHeap != NULL); 13 | 14 | mHeap_Mem1 = SceneManager::getHeapForCreateScene_Mem1(); 15 | mHeap_Mem2 = SceneManager::getHeapForCreateScene_Mem2(); 16 | mHeap_Debug = SceneManager::getHeapForCreateScene_Debug(); 17 | 18 | mParentScene = NULL; 19 | mChildScene = NULL; 20 | 21 | mSceneID = -1; 22 | mSceneMgr = NULL; 23 | } 24 | 25 | Scene::~Scene() {} 26 | 27 | } // namespace EGG 28 | -------------------------------------------------------------------------------- /include/MSL/string.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_STRING_H 2 | #define MSL_STRING_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | char* strcpy(char*, const char*); 13 | char* strncpy(char*, const char*, size_t); 14 | 15 | char* strcat(char*, const char*); 16 | char* strncat(char*, const char*, size_t); 17 | 18 | int strcmp(const char*, const char*); 19 | int strncmp(const char*, const char*, size_t); 20 | 21 | char* strchr(const char*, int); 22 | char* strstr(const char*, const char*); 23 | 24 | size_t strlen(const char*); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_emform.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_EMFORM_H 2 | #define NW4R_EF_EMFORM_EMFORM_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ef { 7 | 8 | // Forward declarations 9 | class EmitterForm; 10 | 11 | enum EmitFormType { 12 | EMITFORMTYPE_DISC, 13 | EMITFORMTYPE_LINE, 14 | EMITFORMTYPE_CUBE = 5, 15 | EMITFORMTYPE_CYLINDER = 7, 16 | EMITFORMTYPE_SPHERE, 17 | EMITFORMTYPE_POINT, 18 | EMITFORMTYPE_TORUS, 19 | }; 20 | 21 | class EmitFormBuilder { 22 | public: 23 | virtual EmitterForm* Create(EmitFormType type); // at 0x8 24 | }; 25 | 26 | } // namespace ef 27 | } // namespace nw4r 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/homebuttonMiniLib/HBMAnmController.h: -------------------------------------------------------------------------------- 1 | #ifndef HOME_BUTTON_MINI_LIB_ANM_CONTROLLER_H 2 | #define HOME_BUTTON_MINI_LIB_ANM_CONTROLLER_H 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace homebutton { 9 | 10 | class GroupAnmController : public FrameController { 11 | public: 12 | GroupAnmController(); 13 | virtual ~GroupAnmController(); // at 0x8 14 | 15 | void do_calc(); 16 | 17 | public: 18 | nw4r::lyt::Group* mpGroup; // at 0x20 19 | nw4r::lyt::AnimTransform* mpAnimGroup; // at 0x24 20 | }; 21 | 22 | } // namespace homebutton 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/nw4r/ef/drawstrategy/ef_drawfreestrategy.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRATEGY_DRAW_FREE_STRATEGY_H 2 | #define NW4R_EF_DRAW_STRATEGY_DRAW_FREE_STRATEGY_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class DrawFreeStrategy : public DrawStrategyImpl { 11 | public: 12 | DrawFreeStrategy(); 13 | 14 | virtual void Draw(const DrawInfo& rInfo, 15 | ParticleManager* pManager); // at 0xC 16 | 17 | void InitGraphics(const DrawInfo& rInfo, ParticleManager* pManager); 18 | }; 19 | 20 | } // namespace ef 21 | } // namespace nw4r 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/nw4r/ef/drawstrategy/ef_drawlinestrategy.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRATEGY_DRAW_LINE_STRATEGY_H 2 | #define NW4R_EF_DRAW_STRATEGY_DRAW_LINE_STRATEGY_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class DrawLineStrategy : public DrawStrategyImpl { 11 | public: 12 | DrawLineStrategy(); 13 | 14 | virtual void Draw(const DrawInfo& rInfo, 15 | ParticleManager* pManager); // at 0xC 16 | 17 | void InitGraphics(const DrawInfo& rInfo, ParticleManager* pManager); 18 | }; 19 | 20 | } // namespace ef 21 | } // namespace nw4r 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/nw4r/ef/drawstrategy/ef_drawstripestrategy.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRIPE_STRATEGY_H 2 | #define NW4R_EF_DRAW_STRIPE_STRATEGY_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class DrawStripeStrategy : public DrawStrategyImpl { 11 | public: 12 | DrawStripeStrategy(); 13 | 14 | virtual void Draw(const DrawInfo& rInfo, 15 | ParticleManager* pManager); // at 0xC 16 | 17 | virtual CalcAheadFunc 18 | GetCalcAheadFunc(ParticleManager* pManager); // at 0x18 19 | }; 20 | 21 | } // namespace ef 22 | } // namespace nw4r 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_WaveSoundHandle.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_WAVE_SOUND_HANDLE_H 2 | #define NW4R_SND_WAVE_SOUND_HANDLE_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | namespace nw4r { 10 | namespace snd { 11 | 12 | class WaveSoundHandle : private ut::NonCopyable { 13 | public: 14 | ~WaveSoundHandle() { 15 | DetachSound(); 16 | } 17 | 18 | void DetachSound(); 19 | 20 | bool IsAttachedSound() const { 21 | return mSound != NULL; 22 | } 23 | 24 | private: 25 | detail::WaveSound* mSound; // at 0x0 26 | }; 27 | 28 | } // namespace snd 29 | } // namespace nw4r 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFLi_Format.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_INTERNAL_FORMAT_H 2 | #define RVL_FACE_LIBRARY_INTERNAL_FORMAT_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct RFLiTableData { 11 | RFLCreateID createID; // at 0x0 12 | 13 | // at 0x8 14 | u16 sex : 1; 15 | s16 next : 15; 16 | 17 | // at 0xA 18 | s16 padding2 : 1; 19 | s16 prev : 15; 20 | } RFLiTableData; 21 | 22 | void RFLiClearTableData(RFLiTableData* data); 23 | void RFLiClearDBBuffer(void); 24 | RFLErrcode RFLiFormatAsync(RFLiCallback cb); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /include/egg/audio/eggAudio3DActor.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_AUDIO_3D_ACTOR_H 2 | #define EGG_AUDIO_3D_ACTOR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class AudioSound3DActor { 10 | public: 11 | static void setCommonPlayer(nw4r::snd::SoundArchivePlayer* pPlayer) { 12 | smCommonPlayer = pPlayer; 13 | } 14 | static void setCommonManager(nw4r::snd::Sound3DManager* pManager) { 15 | smCommon3DManager = pManager; 16 | } 17 | 18 | private: 19 | static nw4r::snd::SoundArchivePlayer* smCommonPlayer; 20 | static nw4r::snd::Sound3DManager* smCommon3DManager; 21 | }; 22 | 23 | } // namespace EGG 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/nw4r/ef/drawstrategy/ef_drawpointstrategy.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRATEGY_DRAW_POINT_STRATEGY_H 2 | #define NW4R_EF_DRAW_STRATEGY_DRAW_POINT_STRATEGY_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class DrawPointStrategy : public DrawStrategyImpl { 11 | public: 12 | DrawPointStrategy(); 13 | 14 | virtual void Draw(const DrawInfo& rInfo, 15 | ParticleManager* pManager); // at 0xC 16 | 17 | void InitGraphics(const DrawInfo& rInfo, ParticleManager* pManager); 18 | }; 19 | 20 | } // namespace ef 21 | } // namespace nw4r 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24FriendList.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_FRIEND_LIST_H 2 | #define RVL_SDK_NWC24_FRIEND_LIST_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #define NWC24_FRIEND_LIST_CAPACITY 100 11 | 12 | typedef struct NWC24FLHeader { 13 | u32 magic; // at 0x0 14 | u32 version; // at 0x4 15 | u32 capacity; // at 0x8 16 | u32 size; // at 0xC 17 | char UNK_0x10[0x40 - 0x10]; 18 | u64 friendCodes[NWC24_FRIEND_LIST_CAPACITY]; // at 0x40 19 | } NWC24FLHeader; 20 | 21 | NWC24Err NWC24iOpenFriendList(void); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /include/revolution/OS/OSStateTM.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_STATETM_H 2 | #define RVL_SDK_OS_STATETM_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef void (*OSStateCallback)(void); 9 | 10 | OSStateCallback OSSetResetCallback(OSStateCallback callback); 11 | OSStateCallback OSSetPowerCallback(OSStateCallback callback); 12 | BOOL __OSInitSTM(void); 13 | void __OSShutdownToSBY(void); 14 | void __OSHotReset(void); 15 | BOOL __OSGetResetButtonStateRaw(void); 16 | s32 __OSSetVIForceDimming(u32 arg0, u32 arg1, u32 arg2); 17 | s32 __OSSetIdleLEDMode(u32 mode); 18 | s32 __OSUnRegisterStateEvent(void); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/Pack/RPGraphics/RPGrpTexture.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_MODEL_TEXTURE_H 2 | #define RP_GRAPHICS_MODEL_TEXTURE_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_graphics 10 | //! @{ 11 | 12 | /** 13 | * @brief Texture utility 14 | */ 15 | class RPGrpTexture { 16 | private: 17 | GXTexObj mGXTexObj; // at 0x0 18 | 19 | public: 20 | RPGrpTexture(); 21 | RPGrpTexture(RPGrpHandle handle, const char* pName); 22 | virtual ~RPGrpTexture(); 23 | 24 | const GXTexObj& GetTexObj() const { 25 | return mGXTexObj; 26 | } 27 | }; 28 | 29 | //! @} 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/revolution/OS/OSStateFlags.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_STATE_FLAGS_H 2 | #define RVL_SDK_OS_STATE_FLAGS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct OSStateFlags { 9 | u32 checksum; // at 0x0 10 | u8 BYTE_0x4; 11 | u8 BYTE_0x5; // at 0x5 12 | u8 discState; // at 0x6 13 | u8 BYTE_0x7; 14 | u32 WORD_0x8; 15 | u32 WORD_0xC; 16 | u32 WORD_0x10; 17 | u32 WORD_0x14; 18 | u32 WORD_0x18; 19 | u32 WORD_0x1C; 20 | } OSStateFlags; 21 | 22 | BOOL __OSWriteStateFlags(const OSStateFlags* state); 23 | BOOL __OSReadStateFlags(OSStateFlags* state); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /include/Pack/RPGraphics/RPGrpDrawPathManager.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_DRAW_PATH_MANAGER_H 2 | #define RP_GRAPHICS_DRAW_PATH_MANAGER_H 3 | #include 4 | 5 | #include 6 | 7 | //! @addtogroup rp_graphics 8 | //! @{ 9 | 10 | // Forward declarations 11 | class RPGrpDrawPathLightMap; 12 | 13 | /** 14 | * @brief Draw path manager 15 | */ 16 | class RPGrpDrawPathManager : public EGG::IScnProc { 17 | public: 18 | RPGrpDrawPathLightMap* GetDrawPathLightMap() const { 19 | return mpDrawPathLightMap; 20 | } 21 | 22 | private: 23 | char unkC[0x18 - 0xC]; 24 | RPGrpDrawPathLightMap* mpDrawPathLightMap; // at 0x18 25 | }; 26 | 27 | //! @} 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_xsi.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_XSI_H 2 | #define NW4R_G3D_XSI_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace g3d { 9 | namespace detail { 10 | namespace dcc { 11 | 12 | bool CalcTexMtx_Xsi(math::MTX34* pMtx, bool set, const TexSrt& rSrt, 13 | TexSrt::Flag flag); 14 | 15 | u32 CalcWorldMtx_Xsi(math::MTX34* pW, math::VEC3* pS, const math::MTX34* pW1, 16 | const math::VEC3* pS1, u32 attr, 17 | const g3d::ChrAnmResult* pResult); 18 | 19 | } // namespace dcc 20 | } // namespace detail 21 | } // namespace g3d 22 | } // namespace nw4r 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/revolution/AX.h: -------------------------------------------------------------------------------- 1 | /** 2 | * References: Dolphin Emulator, Retro Modding Wiki, vgmstream 3 | */ 4 | 5 | #ifndef RVL_SDK_PUBLIC_AX_H 6 | #define RVL_SDK_PUBLIC_AX_H 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /include/revolution/AX/AXOut.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AX_OUT_H 2 | #define RVL_SDK_AX_OUT_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define AX_STREAM_SIZE_RMT 40 9 | #define AX_RMT_MAX 4 10 | 11 | typedef void (*AXOutCallback)(void); 12 | typedef void (*AXExceedCallback)(u32 cycles); 13 | 14 | u32 __AXOutNewFrame(void); 15 | void __AXOutAiCallback(void); 16 | void __AXOutInitDSP(void); 17 | void __AXOutInit(u32 mode); 18 | AXOutCallback AXRegisterCallback(AXOutCallback callback); 19 | s32 AXRmtGetSamplesLeft(void); 20 | s32 AXRmtGetSamples(s32 chan, s16* out, s32 num); 21 | s32 AXRmtAdvancePtr(s32 num); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /include/nw4r/ef/drawstrategy/ef_drawdirectionalstrategy.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_DIRECTIONAL_STRATEGY_H 2 | #define NW4R_EF_DRAW_DIRECTIONAL_STRATEGY_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class DrawDirectionalStrategy : public DrawStrategyImpl { 11 | public: 12 | DrawDirectionalStrategy(); 13 | 14 | virtual void Draw(const DrawInfo& rInfo, 15 | ParticleManager* pManager); // at 0xC 16 | 17 | virtual CalcAheadFunc 18 | GetCalcAheadFunc(ParticleManager* pManager); // at 0x18 19 | }; 20 | 21 | } // namespace ef 22 | } // namespace nw4r 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/nw4r/ef/ef_drawstrategybuilder.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRATEGY_BUILDER_H 2 | #define NW4R_EF_DRAW_STRATEGY_BUILDER_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ef { 7 | 8 | // Forward declarations 9 | class DrawStrategy; 10 | 11 | enum DrawStrategyType { 12 | DRAWSTRATEGY_POINT, 13 | DRAWSTRATEGY_LINE, 14 | DRAWSTRATEGY_FREE, 15 | DRAWSTRATEGY_BILLBOARD, 16 | DRAWSTRATEGY_DIRECTIONAL, 17 | DRAWSTRATEGY_STRIPE, 18 | DRAWSTRATEGY_SMOOTHSTRIPE 19 | }; 20 | 21 | class DrawStrategyBuilder { 22 | public: 23 | virtual DrawStrategy* Create(u32 type); // at 0x8 24 | }; 25 | 26 | } // namespace ef 27 | } // namespace nw4r 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/Pack/RPSystem/RPSysPlayerMgr.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_SYSTEM_PLAYER_MGR_H 2 | #define RP_SYSTEM_PLAYER_MGR_H 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | //! @addtogroup rp_system 11 | //! @{ 12 | 13 | /** 14 | * @brief Player manager 15 | */ 16 | class RPSysPlayerMgr { 17 | RP_SINGLETON_DECL_EX(RPSysPlayerMgr); 18 | 19 | public: 20 | s32 getPlayerNum() const { 21 | return mPlayerNum; 22 | } 23 | 24 | const RPSysPlayer& getPlayer(s32 idx) const; 25 | 26 | private: 27 | s32 mPlayerNum; // at 0x0 28 | s32 mRemoteNum; // at 0x4 29 | }; 30 | 31 | //! @} 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /include/revolution/MTX/vec.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_MTX_VEC_H 2 | #define RVL_SDK_MTX_VEC_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void PSVECAdd(const Vec* a, const Vec* b, Vec* sum); 11 | void PSVECScale(const Vec* in, Vec* out, f32 scale); 12 | void PSVECNormalize(const Vec* in, Vec* out); 13 | f32 PSVECMag(const Vec* v); 14 | f32 PSVECDotProduct(const Vec* a, const Vec* b); 15 | void PSVECCrossProduct(const Vec* a, const Vec* b, Vec* prod); 16 | f32 PSVECSquareDistance(const Vec* a, const Vec* b); 17 | void C_VECHalfAngle(const Vec* a, const Vec* b, Vec* half); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/revolution/AXFX.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_PUBLIC_AXFX_H 2 | #define RVL_SDK_PUBLIC_AXFX_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/revolution/SC/scapi_prdinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_SC_SCAPI_PRDINFO_H 2 | #define RVL_SDK_SC_SCAPI_PRDINFO_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define SC_PRDINFO_SIZE 0x100 9 | 10 | typedef enum { 11 | SC_AREA_JPN, 12 | SC_AREA_USA, 13 | SC_AREA_EUR, 14 | SC_AREA_AUS, 15 | SC_AREA_BRA, 16 | SC_AREA_TWN, 17 | SC_AREA_KOR, 18 | SC_AREA_HKG, 19 | SC_AREA_ASI, 20 | SC_AREA_LTN, 21 | SC_AREA_SAF, 22 | } SCProductArea; 23 | 24 | BOOL __SCF1(const char* type, char* buf, u32 sz); 25 | BOOL SCGetProductAreaString(char* buf, u32 sz); 26 | s8 SCGetProductArea(void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /include/egg/core/eggFader.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_FADER_H 2 | #define EGG_CORE_FADER_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | class Fader { 8 | public: 9 | enum EStatus { 10 | STATUS_PREPARE_IN, 11 | STATUS_PREPARE_OUT, 12 | STATUS_FADE_IN, 13 | STATUS_FADE_OUT 14 | }; 15 | 16 | public: 17 | virtual void setStatus(EStatus status) = 0; // at 0x8 18 | virtual EStatus getStatus() const = 0; // at 0xC 19 | 20 | virtual bool fadeIn() = 0; // at 0x10 21 | virtual bool fadeOut() = 0; // at 0x14 22 | 23 | virtual bool calc() = 0; // at 0x18 24 | virtual void draw() = 0; // at 0x1C 25 | }; 26 | 27 | } // namespace EGG 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/revolution/GX/GXMisc.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_GX_MISC_H 2 | #define RVL_SDK_GX_MISC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef void (*GXDrawDoneCallback)(void); 9 | typedef void (*GXDrawSyncCallback)(u16 token); 10 | 11 | void GXSetMisc(UNKWORD token, UNKWORD val); 12 | void GXFlush(void); 13 | void GXResetWriteGatherPipe(void); 14 | 15 | void GXAbortFrame(void); 16 | 17 | void GXSetDrawSync(u16 token); 18 | 19 | void GXDrawDone(void); 20 | void GXPixModeSync(void); 21 | 22 | GXDrawSyncCallback GXSetDrawSyncCallback(GXDrawSyncCallback); 23 | GXDrawDoneCallback GXSetDrawDoneCallback(GXDrawDoneCallback); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /include/revolution/WENC/wenc.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_WENC_H 2 | #define RVL_SDK_WENC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum { 9 | WENC_FLAG_USER_INFO = (1 << 0), 10 | } WENCFlag; 11 | 12 | typedef struct WENCInfo { 13 | s32 xn; // at 0x0 14 | s32 dl; // at 0x4 15 | s32 qn; // at 0x8 16 | s32 dn; // at 0xC 17 | s32 dlh; // at 0x10 18 | s32 dlq; // at 0x14 19 | u8 padding[8]; // at 0x18 20 | } WENCInfo; 21 | 22 | s32 WENCGetEncodeData(WENCInfo* info, u32 flag, const s16* pcmData, s32 samples, 23 | u8* adpcmData); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /include/revolution/OS/OSArena.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_ARENA_H 2 | #define RVL_SDK_OS_ARENA_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void* OSGetMEM1ArenaHi(void); 9 | void* OSGetMEM2ArenaHi(void); 10 | void* OSGetArenaHi(void); 11 | 12 | void* OSGetMEM1ArenaLo(void); 13 | void* OSGetMEM2ArenaLo(void); 14 | void* OSGetArenaLo(void); 15 | 16 | void OSSetMEM1ArenaHi(void* hi); 17 | void OSSetMEM2ArenaHi(void* hi); 18 | void OSSetArenaHi(void* hi); 19 | 20 | void OSSetMEM1ArenaLo(void* lo); 21 | void OSSetMEM2ArenaLo(void* lo); 22 | void OSSetArenaLo(void* lo); 23 | 24 | void* OSAllocFromMEM1ArenaLo(size_t size, u32 align); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_SeqTrackAllocator.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_SEQ_TRACK_ALLOCATOR_H 2 | #define NW4R_SND_SEQ_TRACK_ALLOCATOR_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace snd { 7 | namespace detail { 8 | 9 | // Forward declarations 10 | class SeqPlayer; 11 | class SeqTrack; 12 | 13 | class SeqTrackAllocator { 14 | public: 15 | virtual ~SeqTrackAllocator() {} // at 0x8 16 | 17 | virtual SeqTrack* AllocTrack(SeqPlayer* pPlayer) = 0; // at 0xC 18 | virtual void FreeTrack(SeqTrack* pTrack) = 0; // at 0x10 19 | virtual int GetAllocatableTrackCount() const = 0; // at 0x14 20 | }; 21 | 22 | } // namespace detail 23 | } // namespace snd 24 | } // namespace nw4r 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/nw4r/snd/snd_SoundActor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace snd { 5 | namespace detail { 6 | 7 | SoundStartable::StartResult 8 | SoundActor::detail_SetupSound(SoundHandle* pHandle, u32 id, 9 | detail::BasicSound::AmbientArgInfo* pArgInfo, 10 | detail::ExternalSoundPlayer* pPlayer, bool hold, 11 | const StartInfo* pStartInfo) { 12 | #pragma unused(pArgInfo) 13 | #pragma unused(pPlayer) 14 | 15 | return mStartable.detail_SetupSound( 16 | pHandle, id, NULL, detail_GetActorSoundPlayer(0), hold, pStartInfo); 17 | } 18 | 19 | } // namespace detail 20 | } // namespace snd 21 | } // namespace nw4r 22 | -------------------------------------------------------------------------------- /include/Pack/RPSystem/RPSysPlayer.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_SYSTEM_PLAYER_H 2 | #define RP_SYSTEM_PLAYER_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_system 10 | //! @{ 11 | 12 | /** 13 | * @brief Player object 14 | */ 15 | class RPSysPlayer { 16 | public: 17 | s8 getDataSource() const { 18 | return mDataSource; 19 | } 20 | 21 | u16 getIndex() const { 22 | return mIndex; 23 | } 24 | 25 | private: 26 | u8 mChannel; // at 0x0 27 | s8 mDataSource; // at 0x1 28 | u16 mIndex; // at 0x2 29 | RFLCreateID mCreateID; // at 0x4 30 | // . . . 31 | }; 32 | 33 | //! @} 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFL_System.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_SYSTEM_H 2 | #define RVL_FACE_LIBRARY_SYSTEM_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | u32 RFLGetWorkSize(BOOL deluxeTex); 11 | RFLErrcode RFLInitResAsync(void* workBuffer, void* resBuffer, u32 resSize, 12 | BOOL deluxeTex); 13 | RFLErrcode RFLInitRes(void* workBuffer, void* resBuffer, u32 resSize, 14 | BOOL deluxeTex); 15 | void RFLExit(void); 16 | BOOL RFLAvailable(void); 17 | RFLErrcode RFLGetAsyncStatus(void); 18 | s32 RFLGetLastReason(void); 19 | RFLErrcode RFLWaitAsync(void); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /include/revolution/OS/OSMutex.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_MUTEX_H 2 | #define RVL_SDK_OS_MUTEX_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct OSMutex { 11 | OSThreadQueue queue; // at 0x0 12 | OSThread* thread; // at 0x8 13 | s32 lock; // at 0xC 14 | struct OSMutex* next; // at 0x10 15 | struct OSMutex* prev; // at 0x14 16 | } OSMutex; 17 | 18 | void OSInitMutex(OSMutex* mutex); 19 | void OSLockMutex(OSMutex* mutex); 20 | void OSUnlockMutex(OSMutex* mutex); 21 | void __OSUnlockAllMutex(OSThread* thread); 22 | BOOL OSTryLockMutex(OSMutex* mutex); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /src/egg/gfxe/eggPostEffectBlurGather.cpp: -------------------------------------------------------------------------------- 1 | #include "eggPostEffectBlurGather.h" 2 | #include "eggDrawGX.h" 3 | #include "eggCapTexture.h" 4 | #include 5 | 6 | namespace EGG 7 | { 8 | PostEffectBlurGather::PostEffectBlurGather() 9 | { 10 | } 11 | 12 | void PostEffectBlurGather::reset() 13 | { 14 | BlurGatherData* it = mBlurGatherData; 15 | for (int i = 0; i < eCnstBlurGather_Max; i++, it++){ 16 | it->reset(); 17 | } 18 | 19 | mNumBlurGatherData = 1; 20 | mFlags = 0x1; 21 | FLOAT_0x24 = 0.0f; 22 | } 23 | 24 | // https://decomp.me/scratch/7ue6S 25 | void PostEffectBlurGather::setMaterialInternal() 26 | { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /include/egg/core/eggFile.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_FILE_H 2 | #define EGG_CORE_FILE_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | class File { 8 | public: 9 | File() : mIsOpen(false) {} 10 | virtual ~File() {} // at 0x8 11 | 12 | virtual bool open(const char* pPath) = 0; // at 0xC 13 | virtual void close() = 0; // at 0x10 14 | 15 | virtual s32 readData(void* pDst, s32 size, s32 offset) = 0; // at 0x14 16 | virtual s32 writeData(const void* pSrc, s32 size, 17 | s32 offset) = 0; // at 0x18 18 | 19 | virtual u32 getFileSize() const = 0; // at 0x1C 20 | 21 | protected: 22 | bool mIsOpen; // at 0x4 23 | }; 24 | 25 | } // namespace EGG 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /include/nw4r/ef/drawstrategy/ef_drawstrategybuilder.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_DRAW_STRATEGY_DRAW_STRATEGY_BUILDER_H 2 | #define NW4R_EF_DRAW_STRATEGY_DRAW_STRATEGY_BUILDER_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ef { 7 | 8 | // Forward declarations 9 | class DrawStrategy; 10 | 11 | enum DrawStrategyType { 12 | DRAWSTRATEGY_POINT, 13 | DRAWSTRATEGY_LINE, 14 | DRAWSTRATEGY_FREE, 15 | DRAWSTRATEGY_BILLBOARD, 16 | DRAWSTRATEGY_DIRECTIONAL, 17 | DRAWSTRATEGY_STRIPE, 18 | DRAWSTRATEGY_SMOOTHSTRIPE 19 | }; 20 | 21 | class DrawStrategyBuilder { 22 | public: 23 | virtual DrawStrategy* Create(u32 type); // at 0x8 24 | }; 25 | 26 | } // namespace ef 27 | } // namespace nw4r 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/revolution/MEM/mem_list.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_MEM_LIST_H 2 | #define RVL_SDK_MEM_LIST_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct MEMList { 9 | void* head; // at 0x0 10 | void* tail; // at 0x4 11 | u16 length; // at 0x8 12 | u16 offset; // at 0xA 13 | } MEMList; 14 | 15 | typedef struct MEMLink { 16 | void* prev; // at 0x0 17 | void* next; // at 0x4 18 | } MEMLink; 19 | 20 | void MEMInitList(MEMList* list, u16 offset); 21 | void MEMAppendListObject(MEMList* list, void* object); 22 | void MEMRemoveListObject(MEMList* list, void* object); 23 | void* MEMGetNextListObject(MEMList* list, void* object); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RPSysLytBounding.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_LYT_BOUNDING_H 2 | #define RP_KERNEL_LYT_BOUNDING_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_kernel 10 | //! @{ 11 | 12 | /** 13 | * @brief NW4R layout bounding extension 14 | */ 15 | class RPSysLytBounding : public nw4r::lyt::Bounding { 16 | public: 17 | /** 18 | * @brief Tests whether a point falls within this bounding pane 19 | * 20 | * @param rInfo Pane draw info 21 | * @param rPoint Point to test 22 | */ 23 | bool isInsideBounding(const nw4r::lyt::DrawInfo& rInfo, 24 | const EGG::Vector2f& rPoint); 25 | }; 26 | 27 | //! @} 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/egg/core/eggWatch.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_WATCH_H 2 | #define EGG_CORE_WATCH_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class Watch { 10 | public: 11 | Watch() { 12 | reset(); 13 | } 14 | 15 | void reset() { 16 | mStartTick = 0; 17 | } 18 | void start() { 19 | mStartTick = OSGetTick(); 20 | } 21 | 22 | bool isStarted() { 23 | return mStartTick != 0; 24 | } 25 | 26 | u32 getStartTick() { 27 | return mStartTick; 28 | } 29 | void setStartTick(u32 tick) { 30 | mStartTick = tick; 31 | } 32 | 33 | private: 34 | u32 mStartTick; // at 0x0 35 | }; 36 | 37 | } // namespace EGG 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/Pack/RPAssert.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_ASSERT_H 2 | #define RP_ASSERT_H 3 | #include 4 | 5 | #include 6 | 7 | /** 8 | * @brief Logs a formatted message to the console 9 | */ 10 | #define RP_PRINT(...) EGG_PRINT(__VA_ARGS__) 11 | 12 | /** 13 | * @brief Asserts that a condition holds true 14 | * @details If the assertion fails, program execution is halted and the 15 | * expression is displayed. 16 | */ 17 | #define RP_ASSERT(EXP) EGG_ASSERT(EXP) 18 | 19 | /** 20 | * @brief Asserts that a condition holds true 21 | * @details If the assertion fails, program execution is halted and the provided 22 | * message is displayed. 23 | */ 24 | #define RP_ASSERT_MSG(EXP, ...) EGG_ASSERT_MSG(EXP, __VA_ARGS__) 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/nw4r/ef/ef_random.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_RANDOM_H 2 | #define NW4R_EF_RANDOM_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ef { 7 | 8 | class Random { 9 | private: 10 | u32 mSeed; // at 0x0 11 | 12 | public: 13 | void Srand(u32 seed) { 14 | mSeed = seed; 15 | } 16 | 17 | int Rand() { 18 | MixRandomSeed(); 19 | return static_cast(mSeed >> 16); 20 | } 21 | 22 | f32 RandFloat() { 23 | MixRandomSeed(); 24 | return static_cast(mSeed >> 16) / 0x10000; 25 | } 26 | 27 | private: 28 | void MixRandomSeed() { 29 | mSeed = mSeed * 0x343FD + 0x269EC3; 30 | } 31 | }; 32 | 33 | } // namespace ef 34 | } // namespace nw4r 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_scnmdl1mat1shp.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_SCN_MDL_1MAT_1SHP_H 2 | #define NW4R_G3D_SCN_MDL_1MAT_1SHP_H 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | namespace nw4r { 10 | namespace g3d { 11 | 12 | class ScnMdl1Mat1Shp : public ScnLeaf { 13 | public: 14 | ResMat GetResMat() { 15 | return mResMat; 16 | } 17 | ResShp GetResShp() { 18 | return mResShp; 19 | } 20 | 21 | private: 22 | ResMat mResMat; // at 0xE8 23 | ResShp mResShp; // at 0xEC 24 | 25 | NW4R_G3D_RTTI_DECL_DERIVED(ScnMdl1Mat1Shp, ScnLeaf); 26 | }; 27 | 28 | } // namespace g3d 29 | } // namespace nw4r 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_binaryFileFormat.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_BINARY_FILE_FORMAT_H 2 | #define NW4R_UT_BINARY_FILE_FORMAT_H 3 | #include 4 | 5 | namespace nw4r { 6 | namespace ut { 7 | 8 | struct BinaryBlockHeader { 9 | u32 kind; // at 0x0 10 | u32 size; // at 0x4 11 | }; 12 | 13 | struct BinaryFileHeader { 14 | u32 signature; // at 0x0 15 | u16 byteOrder; // at 0x4 16 | u16 version; // at 0x6 17 | u32 fileSize; // at 0x8 18 | u16 headerSize; // at 0xC 19 | u16 dataBlocks; // at 0xE 20 | }; 21 | 22 | bool IsValidBinaryFile(const BinaryFileHeader* pHeader, u32 signature, 23 | u16 version, u16 minBlocks); 24 | 25 | } // namespace ut 26 | } // namespace nw4r 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/revolution/AI/ai.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AI_H 2 | #define RVL_SDK_AI_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | // Forward declarations 9 | typedef struct OSContext OSContext; 10 | 11 | typedef void (*AIDMACallback)(void); 12 | 13 | typedef enum { 14 | AI_DSP_32KHZ, 15 | AI_DSP_48KHZ, 16 | } AIDSPSampleRate; 17 | 18 | AIDMACallback AIRegisterDMACallback(AIDMACallback callback); 19 | void AIInitDMA(void* buffer, u32 length); 20 | void AIStartDMA(void); 21 | u32 AIGetDMABytesLeft(void); 22 | void AISetDSPSampleRate(u32 rate); 23 | u32 AIGetDSPSampleRate(void); 24 | void AIInit(void* stack); 25 | void __AIDHandler(s16 intr, OSContext* ctx); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /include/revolution/AXFX/AXFXChorus.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AXFX_CHORUS_H 2 | #define RVL_SDK_AXFX_CHORUS_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct AXFX_CHORUS { 11 | AXFX_CHORUS_EXP exp; // at 0x0 12 | u32 baseDelay; // at 0xA0 13 | u32 variation; // at 0xA4 14 | u32 period; // at 0xA8 15 | } AXFX_CHORUS; 16 | 17 | u32 AXFXChorusGetMemSize(const AXFX_CHORUS* fx); 18 | BOOL AXFXChorusInit(AXFX_CHORUS* fx); 19 | BOOL AXFXChorusShutdown(AXFX_CHORUS* fx); 20 | BOOL AXFXChorusSettings(AXFX_CHORUS* fx); 21 | void AXFXChorusCallback(void* chans, void* context); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /include/nw4r/lyt.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_PUBLIC_LYT_H 2 | #define NW4R_PUBLIC_LYT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggDrawPathHDR.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_DRAW_PATH_HDR_H 2 | #define EGG_GFXE_DRAW_PATH_HDR_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class DrawPathHDR : public DrawPathBase { 10 | public: 11 | DrawPathHDR(); 12 | virtual ~DrawPathHDR(); // at 0x8 13 | virtual int getNumStep() const; // at 0x1C 14 | virtual void internalCalc(); // at 0x24 15 | virtual void internalDraw(u16 step); // at 0x28 16 | 17 | private: 18 | enum EStep { 19 | EStep_0, 20 | EStep_1, 21 | 22 | EStep_Max 23 | }; 24 | 25 | private: 26 | PostEffectHDR* mPostEffect; // at 0x7C 27 | }; 28 | 29 | } // namespace EGG 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/nw4r/types_nw4r.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_TYPES_H 2 | #define NW4R_TYPES_H 3 | #include 4 | 5 | #define NW4R_BYTEORDER_BIG 0xFEFF 6 | #define NW4R_BYTEORDER_LITTLE 0xFFFE 7 | 8 | #if defined(NW4R_LITTLE_ENDIAN) 9 | #define NW4R_BYTEORDER_NATIVE NW4R_BYTEORDER_LITTLE 10 | #else 11 | #define NW4R_BYTEORDER_NATIVE NW4R_BYTEORDER_BIG 12 | #endif 13 | 14 | #define NW4R_VERSION(major, minor) ((major & 0xFF) << 8 | minor & 0xFF) 15 | 16 | #define NW4R_LIB_VERSION(NAME, ORIGINAL_DATE, ORIGINAL_TIME, ORIGINAL_CWCC) \ 17 | const char* NW4R_##NAME##_Version_ = \ 18 | "<< NW4R - " #NAME " \tfinal build: " ORIGINAL_DATE \ 19 | " " ORIGINAL_TIME " (" ORIGINAL_CWCC ") >>" 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /include/revolution/BTE/include/bte_common.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * NOTICE OF CHANGES 4 | * 2025/11/23: 5 | * - Create header for common BTE/BTA prototypes 6 | * 7 | * Compile with REVOLUTION defined to include these changes. 8 | * 9 | ******************************************************************************/ 10 | 11 | #ifndef BTE_COMMON_H 12 | #define BTE_COMMON_H 13 | 14 | #include 15 | 16 | void BTE_InitSys(void); 17 | void BTE_BringUpStack(void); 18 | tBTA_STATUS BTA_Init(void); 19 | 20 | typedef void (*BTA_CleanUpCallback)(tBTA_STATUS status); 21 | void BTA_CleanUp(BTA_CleanUpCallback p_cb); 22 | 23 | #endif /* BTE_COMMON_H */ 24 | -------------------------------------------------------------------------------- /include/revolution/DVD/dvdqueue.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DVD_QUEUE_H 2 | #define RVL_SDK_DVD_QUEUE_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef enum { 11 | DVD_PRIO_HIGHEST, 12 | DVD_PRIO_HIGH, 13 | DVD_PRIO_MEDIUM, 14 | DVD_PRIO_LOW, 15 | 16 | DVD_PRIO_MAX, 17 | } DVDQueuePriority; 18 | 19 | void __DVDClearWaitingQueue(void); 20 | BOOL __DVDPushWaitingQueue(s32 prio, DVDCommandBlock* block); 21 | DVDCommandBlock* __DVDPopWaitingQueue(void); 22 | BOOL __DVDCheckWaitingQueue(void); 23 | DVDCommandBlock* __DVDGetNextWaitingQueue(void); 24 | BOOL __DVDDequeueWaitingQueue(const DVDCommandBlock* block); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /include/RVLFaceLib/RFLi_DataUtility.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_FACE_LIBRARY_INTENRAL_DATA_UTILITY_H 2 | #define RVL_FACE_LIBRARY_INTERNAL_DATA_UTILITY_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | // Forward declarations 11 | typedef struct RFLMiddleDB; 12 | 13 | BOOL RFLiCheckValidInfo(const RFLiCharInfo* info); 14 | BOOL RFLiIsValidOnNAND(const RFLiCharInfo* info); 15 | BOOL RFLiIsSameFaceCore(const RFLiCharInfo* lhs, const RFLiCharInfo* rhs); 16 | RFLErrcode RFLiPickupCharInfo(RFLiCharInfo* info, RFLDataSource source, 17 | struct RFLMiddleDB* db, u16 index); 18 | BOOL RFLiCheckBirthday(u8 month, u8 day); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggGfxEngine.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_GFX_ENGINE_H 2 | #define EGG_GFXE_GFX_ENGINE_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | // Forward declarations 8 | class Heap; 9 | 10 | class GfxEngine { 11 | private: 12 | struct UnkStruct {}; 13 | 14 | private: 15 | UnkStruct* unk4; 16 | char unk8[0xC - 0x8]; 17 | 18 | public: 19 | static void initialize(u16 width, u16 height, Heap* pHeap); 20 | static void beginDraw(); 21 | 22 | GfxEngine(); 23 | virtual ~GfxEngine(); // at 0x8 24 | 25 | private: 26 | static const u32 G3D_HEAP_SIZE = 0x6000; 27 | static const u32 LIGHT_TEXTURE_MAX = 32; 28 | 29 | private: 30 | static GfxEngine* spInstance; 31 | }; 32 | 33 | } // namespace EGG 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/nw4r/g3d/g3d_maya.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_G3D_MAYA_H 2 | #define NW4R_G3D_MAYA_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | namespace nw4r { 10 | namespace g3d { 11 | namespace detail { 12 | namespace dcc { 13 | 14 | bool CalcTexMtx_Maya(math::MTX34* pMtx, bool set, const TexSrt& rSrt, 15 | TexSrt::Flag flag); 16 | 17 | u32 CalcWorldMtx_Maya_SSC_Apply(math::MTX34* pW, math::VEC3* pS, 18 | const math::MTX34* pW1, const math::VEC3* pS1, 19 | u32 attr, const ChrAnmResult* pResult); 20 | 21 | } // namespace dcc 22 | } // namespace detail 23 | } // namespace g3d 24 | } // namespace nw4r 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/MetroTRK.h: -------------------------------------------------------------------------------- 1 | #ifndef METROTRK_H 2 | #define METROTRK_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /include/Pack/RPGraphics/RPGrpModelManager.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_MODEL_MANAGER_H 2 | #define RP_GRAPHICS_MODEL_MANAGER_H 3 | #include 4 | 5 | //! @addtogroup rp_graphics 6 | //! @{ 7 | 8 | // Forward declarations 9 | class RPGrpDrawPathManager; 10 | 11 | /** 12 | * @brief Model manager 13 | */ 14 | class RPGrpModelManager { 15 | public: 16 | /** 17 | * @brief Gets the currently active manager instance 18 | */ 19 | static RPGrpModelManager* GetCurrent() { 20 | return spCurrent; 21 | } 22 | 23 | RPGrpDrawPathManager* GetDrawPathManager(u8 drawScene) const; 24 | 25 | private: 26 | //! Allocator used for model-related allocations 27 | static RPGrpModelManager* spCurrent; 28 | }; 29 | 30 | //! @} 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RPSysAppMiiManager.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | #include 7 | 8 | /** 9 | * @brief Constructor 10 | * 11 | * @param num Mii buffer capacity 12 | * @param pHeap Heap to use for allocations 13 | */ 14 | RPSysAppMiiManager::RPSysAppMiiManager(u16 num, EGG::Heap* pHeap) 15 | : mNumData(num), mppStoreData(NULL), mppCharData(NULL) { 16 | 17 | // Only Wii Sports uses character data (no checksum) 18 | if (RP_GET_INSTANCE(RPSysProjectLocal)->getPack() == 19 | RPSysSceneCreator::EPackID_SportsPack) { 20 | 21 | mppCharData = new (pHeap) RFLCharData*[num]; 22 | } else { 23 | mppStoreData = new (pHeap) RFLStoreData*[num]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/nw4r/g3d/res/g3d_resanmvis.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace g3d { 5 | 6 | bool ResAnmVis::GetAnmResult(u32 idx, f32 frame) const { 7 | const ResAnmVisAnmData* pAnmData = GetNodeAnm(idx); 8 | const ResAnmVisInfoData& rInfoData = ref().info; 9 | 10 | if (pAnmData->flags & ResAnmVisAnmData::FLAG_CONST) { 11 | return pAnmData->flags & ResAnmVisAnmData::FLAG_ENABLE; 12 | } 13 | 14 | f32 fClippedFrame = detail::ClipFrame(rInfoData, frame); 15 | int iClippedFrame = static_cast(math::FFloor(fClippedFrame)); 16 | 17 | return detail::GetResBoolAnmFramesResult(&pAnmData->visibility, 18 | iClippedFrame); 19 | } 20 | 21 | } // namespace g3d 22 | } // namespace nw4r 23 | -------------------------------------------------------------------------------- /src/nw4r/ut/ut_Font.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace ut { 5 | 6 | void Font::InitReaderFunc(FontEncoding encode) { 7 | switch (encode) { 8 | case FONT_ENCODING_UTF8: { 9 | mReadFunc = &CharStrmReader::ReadNextCharUTF8; 10 | break; 11 | } 12 | 13 | case FONT_ENCODING_UTF16: { 14 | mReadFunc = &CharStrmReader::ReadNextCharUTF16; 15 | break; 16 | } 17 | 18 | case FONT_ENCODING_SJIS: { 19 | mReadFunc = &CharStrmReader::ReadNextCharSJIS; 20 | break; 21 | } 22 | 23 | case FONT_ENCODING_CP1252: 24 | default: { 25 | mReadFunc = &CharStrmReader::ReadNextCharCP1252; 26 | break; 27 | } 28 | } 29 | } 30 | 31 | } // namespace ut 32 | } // namespace nw4r 33 | -------------------------------------------------------------------------------- /include/revolution/GX/GXGeometry.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_GX_GEOMETRY_H 2 | #define RVL_SDK_GX_GEOMETRY_H 3 | #include 4 | 5 | #include 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void GXBegin(GXPrimitive prim, GXVtxFmt fmt, u16 verts); 11 | static void GXEnd(void) {} 12 | 13 | void GXSetLineWidth(u8 width, u32 offset); 14 | void GXSetPointSize(u8 size, u32 offset); 15 | void GXEnableTexOffsets(GXTexCoordID coordId, GXBool lineOfs, GXBool pointOfs); 16 | void GXSetCullMode(GXCullMode mode); 17 | void GXGetCullMode(GXCullMode* out); 18 | void GXSetCoPlanar(GXBool coplanar); 19 | 20 | void __GXSetDirtyState(void); 21 | void __GXSendFlushPrim(void); 22 | void __GXSetGenMode(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /include/Pack/RPGraphics/RPGrpDrawPathLightMap.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_DRAW_PATH_LIGHT_MAP_H 2 | #define RP_GRAPHICS_DRAW_PATH_LIGHT_MAP_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_graphics 10 | //! @{ 11 | 12 | // Forward declarations 13 | class RPGrpModel; 14 | 15 | /** 16 | * @brief Light map draw path 17 | */ 18 | class RPGrpDrawPathLightMap : public RPGrpDrawPath { 19 | public: 20 | void ReplaceModelTexture(u16 index, RPGrpModel* pModel); 21 | 22 | EGG::LightTextureManager* GetLightTextureManager() const { 23 | return mpLightTextureManager; 24 | } 25 | 26 | private: 27 | EGG::LightTextureManager* mpLightTextureManager; 28 | }; 29 | 30 | //! @} 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/revolution/AXFX/AXFXCommon.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AXFX_COMMON_H 2 | #define RVL_SDK_AXFX_COMMON_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct AXFX_BUS { 9 | s32* left; // at 0x0 10 | s32* right; // at 0x4 11 | s32* surround; // at 0x8 12 | } AXFX_BUS; 13 | 14 | typedef struct AXFX_BUFFERUPDATE { 15 | s32* left; // at 0x0 16 | s32* right; // at 0x4 17 | s32* surround; // at 0x8 18 | } AXFX_BUFFERUPDATE; 19 | 20 | typedef struct AXFX_BUFFERUPDATE_DPL2 { 21 | s32* left; // at 0x0 22 | s32* right; // at 0x4 23 | s32* left_surround; // at 0x8 24 | s32* right_surround; // at 0xC 25 | } AXFX_BUFFERUPDATE_DPL2; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /include/egg/core/eggDvdRipper.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_DVD_RIPPER_H 2 | #define EGG_CORE_DVD_RIPPER_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | class DvdRipper { 8 | public: 9 | enum EAllocDirection { ALLOC_DIR_TAIL, ALLOC_DIR_HEAD }; 10 | 11 | public: 12 | static u8* loadToMainRAM(const char* pPath, u8* pBuffer, Heap* pHeap, 13 | EAllocDirection allocDir, u32 offset, u32* pRead, 14 | u32* pSize); 15 | 16 | static u8* loadToMainRAM(DvdFile* pFile, u8* pBuffer, Heap* pHeap, 17 | EAllocDirection allocDir, u32 offset, u32* pRead, 18 | u32* pSize); 19 | 20 | private: 21 | static bool sErrorRetry; 22 | }; 23 | 24 | } // namespace EGG 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/egg/audio/eggAudioHeapMgr.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | namespace EGG { 11 | 12 | void SoundHeapMgr::createSoundHeap(Heap* pHeap, u32 size) { 13 | Allocator allocator(pHeap); 14 | createSoundHeap(&allocator, size); 15 | } 16 | 17 | void SoundHeapMgr::createSoundHeap(Allocator* pAllocator, u32 size) { 18 | if (mHeap.IsValid()) { 19 | return; 20 | } 21 | 22 | void* pBuffer = pAllocator->alloc(size); 23 | mHeap.Create(pBuffer, size); 24 | 25 | #line 59 26 | EGG_ASSERT(mHeap.IsValid()); 27 | } 28 | 29 | void SoundHeapMgr::destroySoundHeap() { 30 | mHeap.Destroy(); 31 | } 32 | 33 | } // namespace EGG 34 | -------------------------------------------------------------------------------- /src/revolution/AXFX/AXFXHooks.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void* __AXFXAllocFunction(size_t size); 5 | static void __AXFXFreeFunction(void* block); 6 | 7 | AXFXAllocHook __AXFXAlloc = __AXFXAllocFunction; 8 | AXFXFreeHook __AXFXFree = __AXFXFreeFunction; 9 | 10 | static void* __AXFXAllocFunction(size_t size) { 11 | return OSAllocFromHeap(__OSCurrHeap, size); 12 | } 13 | 14 | static void __AXFXFreeFunction(void* block) { 15 | OSFreeToHeap(__OSCurrHeap, block); 16 | } 17 | 18 | void AXFXSetHooks(AXFXAllocHook alloc, AXFXFreeHook free) { 19 | __AXFXAlloc = alloc; 20 | __AXFXFree = free; 21 | } 22 | 23 | void AXFXGetHooks(AXFXAllocHook* alloc, AXFXFreeHook* free) { 24 | *alloc = __AXFXAlloc; 25 | *free = __AXFXFree; 26 | } 27 | -------------------------------------------------------------------------------- /src/egg/math/eggMath.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | namespace EGG { 10 | 11 | template T Math::sqrt(T t) { 12 | #line 14 13 | EGG_ASSERT(t >= 0); 14 | return std::sqrt(t); 15 | } 16 | 17 | template T Math::sin(T t) { 18 | return std::sin(t); 19 | } 20 | 21 | template T Math::cos(T t) { 22 | return std::cos(t); 23 | } 24 | 25 | template T Math::atan2(T ty, T tx) { 26 | return std::atan2(ty, tx); 27 | } 28 | 29 | template class Math; 30 | 31 | DECOMP_FORCEACTIVE(eggMath_cpp, 32 | "-1 <= t && t <= 1", 33 | "gcd(%d,%d)\n"); 34 | 35 | } // namespace EGG 36 | -------------------------------------------------------------------------------- /include/MSL/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_STDARG_H 2 | #define MSL_STDARG_H 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | typedef enum _va_arg_type { 8 | arg_ARGPOINTER, 9 | arg_WORD, 10 | arg_DOUBLEWORD, 11 | arg_ARGREAL 12 | } _va_arg_type; 13 | 14 | typedef struct __va_list_struct { 15 | char gpr; 16 | char fpr; 17 | char* input_arg_area; 18 | char* reg_save_area; 19 | } va_list[1]; 20 | 21 | void* __va_arg(va_list argp, int type); 22 | 23 | #define va_start(VA_LIST, ARG) ((void)ARG, __builtin_va_info(&VA_LIST)) 24 | #define va_end(VA_LIST) ((void)VA_LIST) 25 | #define va_arg(VA_LIST, ARG_TYPE) \ 26 | (*(ARG_TYPE*)__va_arg(VA_LIST, _var_arg_typeof(ARG_TYPE))) 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /include/Pack/RPSystem.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_PUBLIC_SYSTEM_H 2 | #define RP_PUBLIC_SYSTEM_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_Task.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_TASK_H 2 | #define NW4R_SND_TASK_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace snd { 9 | namespace detail { 10 | 11 | class Task : private ut::NonCopyable { 12 | friend class TaskManager; 13 | 14 | public: 15 | Task() : mBusyFlag(false) {} 16 | virtual ~Task(); // at 0x8 17 | 18 | virtual void Execute() = 0; // at 0xC 19 | virtual void Cancel() = 0; // at 0x10 20 | virtual void OnCancel() = 0; // at 0x14 21 | 22 | public: 23 | NW4R_UT_LINKLIST_NODE_DECL(); // at 0x4 24 | 25 | private: 26 | bool mBusyFlag; // at 0xC 27 | }; 28 | 29 | NW4R_UT_LINKLIST_TYPEDEF_DECL(Task); 30 | 31 | } // namespace detail 32 | } // namespace snd 33 | } // namespace nw4r 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_TaskThread.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_TASK_THREAD_H 2 | #define NW4R_SND_TASK_THREAD_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace snd { 9 | namespace detail { 10 | 11 | class TaskThread { 12 | public: 13 | TaskThread(); 14 | ~TaskThread(); 15 | 16 | bool Create(s32 priority, void* pStack, u32 stackSize); 17 | void Destroy(); 18 | 19 | private: 20 | static void* ThreadFunc(void* pArg); 21 | void ThreadProc(); 22 | 23 | private: 24 | OSThread mThread; // at 0x0 25 | u32* mStackEnd; // at 0x318 26 | 27 | volatile bool mFinishFlag; // at 0x31C 28 | bool mCreateFlag; // at 0x31D 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace snd 33 | } // namespace nw4r 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RPSysLytPicture.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_LYT_PICTURE_H 2 | #define RP_KERNEL_LYT_PICTURE_H 3 | #include 4 | 5 | #include 6 | 7 | //! @addtogroup rp_kernel 8 | //! @{ 9 | 10 | /** 11 | * @brief NW4R layout picture extension 12 | */ 13 | class RPSysLytPicture : public nw4r::lyt::Picture { 14 | public: 15 | /** 16 | * @brief Applies the specified player material color 17 | * @details The color is applied to TEV color register 1 18 | * 19 | * @param idx Player index 20 | */ 21 | void applyPlayerColor(u32 idx); 22 | 23 | /** 24 | * @brief Applies the CPU player material color 25 | * @details The color is applied to TEV color register 1 26 | */ 27 | void applyCpuColor(); 28 | }; 29 | 30 | //! @} 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RPSysWideTextWriter.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_WIDE_TEXT_WRITER_H 2 | #define RP_KERNEL_WIDE_TEXT_WRITER_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_kernel 10 | //! @{ 11 | 12 | /** 13 | * @brief Wide-char screen text writer 14 | */ 15 | class RPSysWideTextWriter : public nw4r::ut::WideTextWriter { 16 | RP_SINGLETON_DECL(RPSysWideTextWriter); 17 | 18 | public: 19 | /** 20 | * @brief Creates the text buffer 21 | */ 22 | static void Initialize(); 23 | 24 | private: 25 | //! Size of the text work buffer 26 | static const int TEXT_BUFFER_SIZE = 256; 27 | 28 | //! Work buffer for string formatting 29 | static wchar_t* spTextBuffer; 30 | }; 31 | 32 | //! @} 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_Bank.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_BANK_H 2 | #define NW4R_SND_BANK_H 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | namespace nw4r { 9 | namespace snd { 10 | namespace detail { 11 | 12 | // Forward declarations 13 | class Channel; 14 | 15 | class Bank { 16 | public: 17 | explicit Bank(const void* pBankBin); 18 | ~Bank(); 19 | 20 | Channel* NoteOn(const NoteOnInfo& rInfo) const; 21 | 22 | void SetWaveDataAddress(const void* pData) { 23 | mWaveDataAddress = pData; 24 | } 25 | 26 | private: 27 | BankFileReader mBankReader; // at 0x0 28 | const void* mWaveDataAddress; // at 0xC 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace snd 33 | } // namespace nw4r 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/revolution/NWC24/NWC24Utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NWC24_UTILS_H 2 | #define RVL_SDK_NWC24_UTILS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct NWC24Data { 9 | const void* ptr; // at 0x0 10 | u32 size; // at 0x4 11 | } NWC24Data; 12 | 13 | typedef struct NWC24Date { 14 | u16 year; // at 0x0 15 | u8 month; // at 0x2 16 | u8 day; // at 0x3 17 | u8 hour; // at 0x4 18 | u8 sec; // at 0x5 19 | u8 min; // at 0x6 20 | u8 BYTE_0x7; 21 | } NWC24Date; 22 | 23 | void NWC24Data_Init(NWC24Data* data); 24 | void NWC24Data_SetDataP(NWC24Data* data, const void* ptr, u32 size); 25 | void NWC24Date_Init(NWC24Date* date); 26 | void NWC24iConvIdToStr(u64 addr, char* out); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /include/Pack/RPGraphics/RPGrpModelBoundingInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_MODEL_BOUNDING_INFO_H 2 | #define RP_GRAPHICS_MODEL_BOUNDING_INFO_H 3 | #include 4 | 5 | #include 6 | 7 | //! @addtogroup rp_graphics 8 | //! @{ 9 | 10 | // Forward declarations 11 | class RPGrpModel; 12 | 13 | /** 14 | * @brief AABB and spherical model bounds 15 | */ 16 | class RPGrpModelBoundingInfo : public EGG::ModelBoundingInfo { 17 | public: 18 | /** 19 | * @brief Constructor 20 | * 21 | * @param flags Bound type flags 22 | * @param pModel Owner model 23 | */ 24 | RPGrpModelBoundingInfo(u32 flags, RPGrpModel* pModel); 25 | 26 | /** 27 | * @brief Destructor 28 | */ 29 | virtual ~RPGrpModelBoundingInfo() {} // at 0x8 30 | }; 31 | 32 | //! @} 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggIScnProcModel.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_I_SCN_PROC_MODEL_H 2 | #define EGG_GFXE_I_SCN_PROC_MODEL_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | class IScnProcModel { 10 | public: 11 | enum EDrawFlag { 12 | cDrawFlag_IgnoreMaterial = 1 << 0, 13 | cDrawFlag_ForceLightOff = 1 << 1, 14 | }; 15 | 16 | public: 17 | IScnProcModel() {} 18 | virtual ~IScnProcModel() {} // at 0x8 19 | 20 | virtual void scnProcDraw(bool opa, u32 flags) = 0; // at 0xC 21 | virtual UNKTYPE VF_0x10(UNKTYPE) = 0; // at 0x10 22 | 23 | virtual void 24 | getMinMaxScnProcModel(nw4r::math::VEC3* pMin, 25 | nw4r::math::VEC3* pMax) const = 0; // at 0x14 26 | }; 27 | 28 | } // namespace EGG 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/types.h: -------------------------------------------------------------------------------- 1 | #ifndef TYPES_H 2 | #define TYPES_H 3 | 4 | #ifdef __cplusplus 5 | #include 6 | #include 7 | #include 8 | #else 9 | #include 10 | #include 11 | #endif 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | typedef unsigned long long u64; 19 | typedef signed long long s64; 20 | 21 | typedef unsigned long u32; 22 | typedef signed long s32; 23 | 24 | typedef unsigned short u16; 25 | typedef signed short s16; 26 | 27 | typedef unsigned char u8; 28 | typedef signed char s8; 29 | 30 | typedef float f32; 31 | typedef double f64; 32 | 33 | typedef int UNKWORD; 34 | typedef void UNKTYPE; 35 | 36 | enum { FALSE, TRUE }; 37 | typedef int BOOL; 38 | 39 | typedef void (*funcptr_t)(void); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/egg/math/eggVector.cpp: -------------------------------------------------------------------------------- 1 | // TODO(kiwi) REMOVE AFTER REFACTOR 2 | #pragma ipa file 3 | 4 | #include 5 | 6 | namespace EGG { 7 | 8 | const Vector2f Vector2f::zero(0.0f, 0.0f); 9 | const Vector2f Vector2f::ex(1.0f, 0.0f); 10 | const Vector2f Vector2f::ey(0.0f, 1.0f); 11 | 12 | const Vector3f Vector3f::zero(0.0f, 0.0f, 0.0f); 13 | const Vector3f Vector3f::ex(1.0f, 0.0f, 0.0f); 14 | const Vector3f Vector3f::ey(0.0f, 1.0f, 0.0f); 15 | const Vector3f Vector3f::ez(0.0f, 0.0f, 1.0f); 16 | 17 | DECOMP_FORCELITERAL(eggVector_cpp, 1.0f); 18 | 19 | f32 Vector3f::normalise() { 20 | f32 mag = length(); 21 | if (mag > 0.0f) { 22 | f32 invMag = 1.0f / mag; 23 | x *= invMag; 24 | y *= invMag; 25 | z *= invMag; 26 | } 27 | 28 | return mag; 29 | } 30 | 31 | } // namespace EGG 32 | -------------------------------------------------------------------------------- /include/egg/core/eggPerformanceView.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_PERFORMANCE_VIEW_H 2 | #define EGG_CORE_PERFORMANCE_VIEW_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | class PerformanceView { 8 | public: 9 | virtual void measureBeginFrame() = 0; // at 0x8 10 | virtual void measureEndFrame() = 0; // at 0xC 11 | 12 | virtual void measureBeginRender() = 0; // at 0x10 13 | virtual void measureEndRender() = 0; // at 0x14 14 | 15 | virtual void callbackDrawSync(u16 token) = 0; // at 0x18 16 | virtual void VF_0x1C() {} // at 0x1C 17 | virtual void draw() = 0; // at 0x20 18 | 19 | virtual void setVisible(bool visible) = 0; // at 0x24 20 | virtual bool isVisible() = 0; // at 0x28 21 | }; 22 | 23 | } // namespace EGG 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggPostEffectHDR.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_POST_EFFECT_HDR_H 2 | #define EGG_GFXE_POST_EFFECT_HDR_H 3 | #include "eggPostEffectBase.h" 4 | #include "types_egg.h" 5 | 6 | namespace EGG { 7 | class PostEffectHDR : public PostEffectBase { 8 | public: 9 | PostEffectHDR(); 10 | virtual ~PostEffectHDR() {} // at 0x8 11 | virtual void reset(); // at 0x14 12 | virtual void setMaterialInternal(); // at 0x18 13 | 14 | void setupRange(); 15 | 16 | private: 17 | GXColor COLOR_0x20; 18 | GXColor COLOR_0x24; 19 | f32 FLOAT_0x28; 20 | f32 FLOAT_0x2C; 21 | GXColor COLOR_0x30; 22 | GXColor COLOR_0x34; 23 | GXColor COLOR_0x38; 24 | u32 WORD_0x3C; 25 | u32 WORD_0x40; 26 | u8 BYTE_0x44; 27 | u8 BYTE_0x45; 28 | }; 29 | } // namespace EGG 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/revolution/NdevExi2AD/ODEMU.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_NDEV_EXI2_AD_ODEMU_H 2 | #define RVL_SDK_NDEV_EXI2_AD_ODEMU_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | static u32 ODEMUGenMailData(u32 ofs, u32 size) { 9 | return (ofs & 0xff) << 0x10 | 0x1f000000 | size & 0x1fff; 10 | } 11 | 12 | static u32 ODEMUGetPage(u32 mail) { 13 | return (mail & 0xFF0000) >> 16; 14 | } 15 | 16 | static u32 ODEMUGetPc2NngcOffset(u32 mail) { 17 | if (!(ODEMUGetPage(mail) & 0x1)) { 18 | return 0; 19 | } 20 | 21 | return 0x800; 22 | } 23 | 24 | static BOOL ODEMUIsValidMail(u32 mail) { 25 | return (mail & 0x1F000000) == 0x1F000000; 26 | } 27 | 28 | static u32 ODEMUGetSize(u32 mail) { 29 | return mail & 0x1FFF; 30 | } 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggGXUtility.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_GX_UTILITY_H 2 | #define EGG_GFXE_GX_UTILITY_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | #include 10 | 11 | namespace EGG { 12 | 13 | class GXUtility { 14 | public: 15 | static u8 getTexMtxID(int no); 16 | 17 | static void setScaleOffsetPerspective(f32* p, f32 sx, f32 sy, f32 ox, 18 | f32 oy); 19 | 20 | static void getTexObj(GXTexObj* pObj, const ResTIMG& rRes); 21 | 22 | static void getTexObj(GXTexObj* pObj, const nw4r::g3d::ResTex tex, 23 | GXTexWrapMode wrapS, GXTexWrapMode wrapT, 24 | GXTexFilter minFilter, GXTexFilter magFilter); 25 | }; 26 | 27 | } // namespace EGG 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_DisposeCallback.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_DISPOSE_CALLBACK_H 2 | #define NW4R_SND_DISPOSE_CALLBACK_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace snd { 9 | namespace detail { 10 | 11 | class DisposeCallback { 12 | public: 13 | NW4R_UT_LINKLIST_NODE_DECL(); // at 0x0 14 | 15 | public: 16 | virtual ~DisposeCallback() {} // at 0x8 17 | 18 | virtual void InvalidateData(const void* pStart, 19 | const void* pEnd) = 0; // at 0xC 20 | virtual void InvalidateWaveData(const void* pStart, 21 | const void* pEnd) = 0; // at 0x10 22 | }; 23 | 24 | NW4R_UT_LINKLIST_TYPEDEF_DECL(DisposeCallback); 25 | 26 | } // namespace detail 27 | } // namespace snd 28 | } // namespace nw4r 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/revolution/SI/SIBios.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_SI_SIBIOS_H 2 | #define RVL_SDK_SI_SIBIOS_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef enum { 9 | SI_CHAN_0, 10 | SI_CHAN_1, 11 | SI_CHAN_2, 12 | SI_CHAN_3, 13 | 14 | SI_MAX_CHAN, 15 | SI_CHAN_NONE = -1, 16 | } SIChannel; 17 | 18 | typedef enum { 19 | SI_TYPE_0, 20 | SI_TYPE_1, 21 | SI_TYPE_2, 22 | SI_TYPE_3, 23 | 24 | SI_MAX_TYPE 25 | } SIType; 26 | 27 | typedef void (*SICallback)(s32 chan, u32 status); 28 | 29 | void SIInit(void); 30 | u32 SISetXY(u32 lines, u32 times); 31 | BOOL SITransfer(s32 chan, void* outAddr, u32 outSize, void* inAddr, u32 inSize, 32 | SICallback callback, s64 wait); 33 | u32 SIGetType(s32 chan); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif 39 | -------------------------------------------------------------------------------- /src/homebuttonMiniLib/HBMAnmController.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | namespace homebutton { 7 | 8 | GroupAnmController::GroupAnmController() : mpGroup(), mpAnimGroup() {} 9 | 10 | GroupAnmController::~GroupAnmController() {} 11 | 12 | void GroupAnmController::do_calc() { 13 | bool enable; 14 | 15 | if (mState == eState_Playing) { 16 | calc(); 17 | enable = true; 18 | 19 | mpAnimGroup->SetFrame(mCurFrame); 20 | } else { 21 | enable = false; 22 | } 23 | 24 | nw4r::lyt::detail::PaneLinkList& rPaneList = mpGroup->GetPaneList(); 25 | 26 | NW4R_UT_LINKLIST_FOREACH(it, rPaneList, { 27 | it->mTarget->SetAnimationEnable(mpAnimGroup, enable, false); // 28 | }) 29 | } 30 | 31 | } // namespace homebutton 32 | -------------------------------------------------------------------------------- /src/nw4r/g3d/g3d_dcc.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace nw4r { 5 | namespace g3d { 6 | 7 | void CalcTexMtx(math::MTX34* pMtx, bool set, const TexSrt& rSrt, 8 | TexSrt::Flag flag, TexSrtTypedef::TexMatrixMode mode) { 9 | bool ident = true; 10 | 11 | if (mode == TexSrtTypedef::TEXMATRIXMODE_MAYA) { 12 | ident = !detail::dcc::CalcTexMtx_Maya(pMtx, set, rSrt, flag); 13 | } else if (mode == TexSrtTypedef::TEXMATRIXMODE_XSI) { 14 | ident = !detail::dcc::CalcTexMtx_Xsi(pMtx, set, rSrt, flag); 15 | } else /* TEXMATRIXMODE_3DSMAX */ { 16 | ident = !detail::dcc::CalcTexMtx_3dsmax(pMtx, set, rSrt, flag); 17 | } 18 | 19 | if (ident && set) { 20 | math::MTX34Identity(pMtx); 21 | } 22 | } 23 | 24 | } // namespace g3d 25 | } // namespace nw4r 26 | -------------------------------------------------------------------------------- /src/nw4r/ut/ut_binaryFileFormat.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace ut { 5 | 6 | bool IsValidBinaryFile(const BinaryFileHeader* pHeader, u32 signature, 7 | u16 version, u16 minBlocks) { 8 | if (pHeader->signature != signature) { 9 | return false; 10 | } 11 | 12 | if (pHeader->byteOrder != NW4R_BYTEORDER_NATIVE) { 13 | return false; 14 | } 15 | 16 | if (pHeader->version != version) { 17 | return false; 18 | } 19 | 20 | if (pHeader->fileSize < 21 | sizeof(BinaryFileHeader) + (minBlocks * sizeof(BinaryBlockHeader))) { 22 | return false; 23 | } 24 | 25 | if (pHeader->dataBlocks < minBlocks) { 26 | return false; 27 | } 28 | 29 | return true; 30 | } 31 | 32 | } // namespace ut 33 | } // namespace nw4r 34 | -------------------------------------------------------------------------------- /src/nw4r/g3d/res/g3d_resanmamblight.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace nw4r { 4 | namespace g3d { 5 | 6 | void ResAnmAmbLight::GetAnmResult(AmbLightAnmResult* pResult, f32 frame) const { 7 | const ResAnmAmbLightData& r = ref(); 8 | 9 | u32 flags = r.flags; 10 | bool constant = (flags & ResAnmAmbLightData::FLAG_CONST) != 0; 11 | 12 | const ResAnmScnInfoData& rInfoData = 13 | ofs_to_ptr(r.toResAnmScnData)->info; 14 | 15 | f32 clippedFrame = detail::ClipFrame(rInfoData, frame); 16 | 17 | pResult->flags = flags & (AmbLightAnmResult::FLAG_COLOR_ENABLE | 18 | AmbLightAnmResult::FLAG_ALPHA_ENABLE); 19 | 20 | pResult->color = 21 | detail::GetResColorAnmResult(&r.color, clippedFrame, constant); 22 | } 23 | 24 | } // namespace g3d 25 | } // namespace nw4r 26 | -------------------------------------------------------------------------------- /include/MSL/internal/fdlibm_public.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_FDLIBM_PUBLIC_H 2 | #define MSL_FDLIBM_PUBLIC_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /** 9 | * For including FDLIBM declarations without also including its many macros. 10 | */ 11 | 12 | double atan(double x); 13 | double ceil(double x); 14 | double copysign(double x, double y); 15 | double cos(double x); 16 | double floor(double x); 17 | double frexp(double x, int* eptr); 18 | double ldexp(double value, int exp); 19 | double modf(double x, double* iptr); 20 | double sin(double x); 21 | double tan(double x); 22 | double acos(double x); 23 | double asin(double x); 24 | double atan2(double y, double x); 25 | double fmod(double x, double y); 26 | double pow(double x, double y); 27 | double sqrt(double x); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /include/nw4r/ef/emform/ef_cube.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_EF_EMFORM_CUBE_H 2 | #define NW4R_EF_EMFORM_CUBE_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ef { 9 | 10 | class EmitterFormCube : public EmitterForm { 11 | public: 12 | EmitterFormCube() {} 13 | 14 | virtual void Emission(Emitter* pEmitter, ParticleManager* pManager, 15 | int count, u32 flags, f32* pParams, u16 life, 16 | f32 lifeRnd, const math::MTX34* pSpace); // at 0x8 17 | 18 | private: 19 | void EmissionSub(math::VEC3& rPos, math::VEC3& rNormal, Emitter* pEmitter, 20 | ParticleManager* pManager, u16 life, f32 lifeRnd, 21 | const math::MTX34* pSpace); 22 | }; 23 | 24 | } // namespace ef 25 | } // namespace nw4r 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/revolution/NWC24/NWC24Utils.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void NWC24Data_Init(NWC24Data* data) { 4 | data->ptr = NULL; 5 | data->size = 0; 6 | } 7 | 8 | void NWC24Data_SetDataP(NWC24Data* data, const void* ptr, u32 size) { 9 | data->ptr = ptr; 10 | data->size = size; 11 | } 12 | 13 | void NWC24Date_Init(NWC24Date* date) { 14 | date->year = 2000; 15 | date->month = 1; 16 | date->day = 1; 17 | date->hour = 12; 18 | date->min = 0; 19 | date->sec = 0; 20 | date->BYTE_0x7 = 0; 21 | } 22 | 23 | void NWC24iConvIdToStr(u64 addr, char* out) { 24 | u64 a = addr; 25 | int i; 26 | 27 | // Count nibbles in u64 28 | const int n = sizeof(u64) * 2; 29 | 30 | for (i = n - 1; i >= 0; i--) { 31 | out[i] = '0' + a % 10; 32 | a /= 10; 33 | } 34 | 35 | out[n] = '\0'; 36 | } 37 | -------------------------------------------------------------------------------- /include/egg/gfxe/eggDrawPathBase.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_DRAW_PATH_BASE_H 2 | #define EGG_GFXE_DRAW_PATH_BASE_H 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | namespace EGG { 12 | 13 | class DrawPathBase : public ScreenEffectBase, public IScnProc { 14 | public: 15 | DrawPathBase(); 16 | virtual ~DrawPathBase() {} // at 0x8 17 | virtual int getNumStep() const = 0; // at 0x1C 18 | virtual void internalResetForDraw() {} // at 0x20 19 | virtual void internalCalc() {} // at 0x24 20 | virtual void internalDraw(u16 step) = 0; // at 0x28 21 | virtual void scnProcDraw(u16 step); // at 0x2C 22 | 23 | void calc(); 24 | }; 25 | 26 | } // namespace EGG 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/revolution/AI/ai_hardware.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AI_HARDWARE_H 2 | #define RVL_SDK_AI_HARDWARE_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /** 9 | * AI hardware registers 10 | */ 11 | volatile u32 DECL_HW_REGS(AI) DECL_ADDRESS(0xCD006C00); 12 | 13 | /** 14 | * Hardware register indexes 15 | */ 16 | typedef enum { 17 | AI_AICR, //!< 0xCD006C00 18 | AI_AIVR, //!< 0xCD006C04 19 | AI_AISCNT, //!< 0xCD006C08 20 | AI_AIIT, //!< 0xCD006C0C 21 | } AiHwReg; 22 | 23 | // AICR - AI Control Register 24 | #define AI_AICR_SAMPLERATE (1 << 6) 25 | #define AI_AICR_SCRESET (1 << 5) 26 | #define AI_AICR_AIINTVLD (1 << 4) 27 | #define AI_AICR_AIINT (1 << 3) 28 | #define AI_AICR_AIINTMSK (1 << 2) 29 | #define AI_AICR_AFR (1 << 1) 30 | #define AI_AICR_PSTAT (1 << 0) 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /include/revolution/ESP/esp.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_ESP_H 2 | #define RVL_SDK_ESP_H 3 | #include 4 | 5 | #include 6 | #include 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef enum { 12 | ES_IOCTLV_LAUNCH_TITLE = 8, 13 | ES_IOCTLV_READ_CONTENT_FILE = 10, 14 | ES_IOCTLV_GET_NUM_TICKET_VIEWS = 18, 15 | ES_IOCTLV_GET_TICKET_VIEWS = 19, 16 | ES_IOCTLV_GET_DATA_DIR = 29, 17 | ES_IOCTLV_GET_TITLE_ID = 32, 18 | ES_IOCTLV_SEEK_CONTENT_FILE = 35, 19 | } ESIoctl; 20 | 21 | typedef struct ESPTicket { 22 | u8 dummy[0x2A4]; 23 | } ESPTicket; 24 | 25 | typedef struct ESPTmd { 26 | u8 dummy[0x49E4]; 27 | } ESPTmd; 28 | 29 | s32 ESP_ReadContentFile(s32 fd, void* dst, u32 len); 30 | s32 ESP_SeekContentFile(s32 fd, s32 offset, s32 origin); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /src/Pack/RPKernel/RPSysFile.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | /** 7 | * @brief Constructor 8 | * 9 | * @param pPath File path (absolute) 10 | * @param size File data size 11 | * @param pData File data pointer 12 | */ 13 | RPSysFile::RPSysFile(const char* pPath, s32 size, const void* pData) 14 | : mSize(size) { 15 | 16 | // @bug Can easily overflow the fixed-size buffer 17 | #if defined(BUG_FIX) 18 | std::strncpy(mPath, pPath, ARRAY_SIZE(mPath)); 19 | #else 20 | std::strcpy(mPath, pPath); 21 | #endif 22 | 23 | mpData = static_cast(pData); 24 | } 25 | 26 | /** 27 | * @brief Destructor 28 | * @details The file is automatically removed from the resource cache. 29 | */ 30 | RPSysFile::~RPSysFile() { 31 | RP_GET_INSTANCE(RPSysResourceManager)->RemoveFromFileList(this); 32 | } 33 | -------------------------------------------------------------------------------- /include/egg/core/eggXfb.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_CORE_XFB_H 2 | #define EGG_CORE_XFB_H 3 | #include 4 | 5 | namespace EGG { 6 | 7 | // Forward declarations 8 | class XfbManager; 9 | 10 | class Xfb { 11 | friend class XfbManager; 12 | 13 | public: 14 | explicit Xfb(Heap* pHeap = NULL); 15 | 16 | u16 getWidth() { 17 | return mWidth; 18 | } 19 | u16 getHeight() { 20 | return mHeight; 21 | } 22 | 23 | u8* getBuffer() { 24 | return mBuffer; 25 | } 26 | 27 | private: 28 | void init(u16 width, u16 height, Heap* pHeap); 29 | 30 | static u32 calcBufferSize(u16 width, u16 height); 31 | 32 | private: 33 | u16 mWidth; // at 0x0 34 | u16 mHeight; // at 0x2 35 | u8* mBuffer; // at 0x4 36 | 37 | Xfb* mPrev; // at 0x8 38 | Xfb* mNext; // at 0xC 39 | }; 40 | 41 | } // namespace EGG 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /include/revolution/GX/GXFifo.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_GX_FIFO_H 2 | #define RVL_SDK_GX_FIFO_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | GX_PUBLIC_STRUCT_DECL(GXFifoObj, 128); 13 | 14 | void GXGetGPStatus(GXBool* overhi, GXBool* underlow, GXBool* readIdle, 15 | GXBool* cmdIdle, GXBool* brkpt); 16 | 17 | void GXSetCPUFifo(GXFifoObj*); 18 | BOOL GXGetCPUFifo(GXFifoObj*); 19 | BOOL GXGetGPFifo(GXFifoObj*); 20 | 21 | void GXGetFifoPtrs(const GXFifoObj*, void** readPtr, void** writePtr); 22 | 23 | u32 GXGetFifoCount(GXFifoObj*); 24 | u8 GXGetFifoWrap(GXFifoObj*); 25 | 26 | void GXEnableBreakPt(void* writePtr); 27 | void GXDisableBreakPt(void); 28 | 29 | OSThread* GXGetCurrentGXThread(void); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif 35 | -------------------------------------------------------------------------------- /src/runtime/GCN_mem_alloc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void InitDefaultHeap(void) { 5 | void* start; 6 | void* end; 7 | s32 heap; 8 | 9 | OSReport("GCN_Mem_Alloc.c : InitDefaultHeap. No Heap Available\n"); 10 | OSReport("Metrowerks CW runtime library initializing default heap\n"); 11 | 12 | start = OSGetArenaLo(); 13 | end = OSGetArenaHi(); 14 | 15 | start = OSInitAlloc(start, end, 1); 16 | OSSetArenaLo(start); 17 | 18 | start = ROUND_UP_PTR(start, 32); 19 | end = ROUND_DOWN_PTR(end, 32); 20 | 21 | heap = OSCreateHeap(start, end); 22 | OSSetCurrentHeap(heap); 23 | 24 | OSSetArenaLo(end); 25 | } 26 | 27 | DECL_WEAK void __sys_free(void* block) { 28 | if (__OSCurrHeap == -1) { 29 | InitDefaultHeap(); 30 | } 31 | 32 | OSFreeToHeap(__OSCurrHeap, block); 33 | } -------------------------------------------------------------------------------- /include/Pack/RPGraphics/IRPGrpModelCallback.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_I_MODEL_CALLBACK_H 2 | #define RP_GRAPHICS_I_MODEL_CALLBACK_H 3 | #include 4 | 5 | #include 6 | 7 | //! @addtogroup rp_graphics 8 | //! @{ 9 | 10 | // Forward declarations 11 | class RPGrpModel; 12 | 13 | /** 14 | * @brief Model callback interface 15 | */ 16 | class IRPGrpModelCallback { 17 | public: 18 | virtual ~IRPGrpModelCallback() = 0; // at 0x8 19 | 20 | virtual void EditJointLocalMtx(RPGrpModel*, u16, nw4r::math::MTX34*, 21 | nw4r::math::VEC3*) {} // at 0xC 22 | 23 | virtual void EditJointWorldMtx(RPGrpModel*, u16, nw4r::math::MTX34*) // 24 | {} // at 0x10 25 | 26 | virtual void EditWorldMtx(RPGrpModel*) {} // at 0x14 27 | virtual void ReferViewMtx(RPGrpModel*) {} // at 0x18 28 | }; 29 | 30 | //! @} 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/revolution/AXFX/AXFXDelay.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_AXFX_DELAY_H 2 | #define RVL_SDK_AXFX_DELAY_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct AXFX_DELAY { 9 | s32* line[3]; // at 0x0 10 | u32 curPos[3]; // at 0xC 11 | u32 length[3]; // at 0x18 12 | s32 feedbackGain[3]; // at 0x24 13 | s32 outGain[3]; // at 0x30 14 | u32 active; // at 0x3C 15 | u32 delay[3]; // at 0x40 16 | u32 feedback[3]; // at 0x4C 17 | u32 output[3]; // at 0x58 18 | } AXFX_DELAY; 19 | 20 | u32 AXFXDelayGetMemSize(const AXFX_DELAY* fx); 21 | BOOL AXFXDelayInit(AXFX_DELAY* fx); 22 | BOOL AXFXDelaySettings(AXFX_DELAY* fx); 23 | void AXFXDelayShutdown(AXFX_DELAY* fx); 24 | void AXFXDelayCallback(void* chans, void* context); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[c]": { 3 | "files.encoding": "utf8", 4 | "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" 5 | }, 6 | "[cpp]": { 7 | "files.encoding": "utf8", 8 | "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" 9 | }, 10 | "[python]": { 11 | "editor.defaultFormatter": "ms-python.black-formatter" 12 | }, 13 | "C_Cpp.default.defines": [ 14 | "IEEE_LIBM", 15 | "REVOLUTION", 16 | "PACK_SPORTS", 17 | ], 18 | // "editor.tabSize": 4, 19 | "files.autoSave": "onFocusChange", 20 | "files.insertFinalNewline": true, 21 | "files.trimFinalNewlines": true, 22 | "files.associations": { 23 | "*.inc": "c", 24 | "*.pch": "c", 25 | "*.pch++": "cpp", 26 | ".clangd": "yaml", 27 | }, 28 | // Disable C/C++ IntelliSense, use clangd instead 29 | "C_Cpp.intelliSenseEngine": "disabled", 30 | } 31 | -------------------------------------------------------------------------------- /include/nw4r/snd/snd_DisposeCallbackManager.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_SND_DISPOSE_CALLBACK_MANAGER_H 2 | #define NW4R_SND_DISPOSE_CALLBACK_MANAGER_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace snd { 9 | namespace detail { 10 | 11 | class DisposeCallbackManager { 12 | public: 13 | static DisposeCallbackManager& GetInstance(); 14 | 15 | void RegisterDisposeCallback(DisposeCallback* pCallback); 16 | void UnregisterDisposeCallback(DisposeCallback* pCallback); 17 | 18 | void Dispose(void* pData, u32 size, void* pArg); 19 | void DisposeWave(void* pData, u32 size, void* pArg); 20 | 21 | private: 22 | DisposeCallbackManager(); 23 | 24 | private: 25 | DisposeCallbackList mCallbackList; // at 0x0 26 | }; 27 | 28 | } // namespace detail 29 | } // namespace snd 30 | } // namespace nw4r 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/nw4r/ut/ut_LockedCache.h: -------------------------------------------------------------------------------- 1 | #ifndef NW4R_UT_LOCKED_CACHE_H 2 | #define NW4R_UT_LOCKED_CACHE_H 3 | #include 4 | 5 | #include 6 | 7 | namespace nw4r { 8 | namespace ut { 9 | namespace LC { 10 | 11 | void Enable(); 12 | void Disable(); 13 | 14 | bool Lock(); 15 | void Unlock(); 16 | 17 | void LoadBlocks(void* pDst, void* pSrc, u32 blocks); 18 | void StoreBlocks(void* pDst, void* pSrc, u32 blocks); 19 | void StoreData(void* pDst, void* pSrc, u32 size); 20 | 21 | inline void* GetBase() { 22 | return reinterpret_cast(OS_CACHE_BASE); 23 | } 24 | 25 | inline void QueueWait(u32 len) { 26 | LCQueueWait(len); 27 | } 28 | 29 | inline void QueueWaitEx(u32 len) { 30 | while (LCQueueLength() != len) { 31 | OSYieldThread(); 32 | } 33 | } 34 | 35 | } // namespace LC 36 | } // namespace ut 37 | } // namespace nw4r 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/revolution/DVD/dvdfs.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_DVD_FS_H 2 | #define RVL_SDK_DVD_FS_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | extern OSThreadQueue __DVDThreadQueue; 13 | extern BOOL __DVDLongFileNameFlag; 14 | 15 | void __DVDFSInit(void); 16 | s32 DVDConvertPathToEntrynum(const char* path); 17 | BOOL DVDFastOpen(s32 entrynum, DVDFileInfo* info); 18 | BOOL DVDOpen(const char* path, DVDFileInfo* info); 19 | BOOL DVDClose(DVDFileInfo* info); 20 | BOOL DVDGetCurrentDir(char* buffer, u32 maxlen); 21 | BOOL DVDReadAsyncPrio(DVDFileInfo* info, void* dst, s32 size, s32 offset, 22 | DVDAsyncCallback callback, s32 prio); 23 | s32 DVDReadPrio(DVDFileInfo* info, void* dst, s32 size, s32 offset, s32 prio); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /include/Pack/RPKernel/RPSysLytAllocator.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_KERNEL_LYT_ALLOCATOR_H 2 | #define RP_KERNEL_LYT_ALLOCATOR_H 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | 9 | //! @addtogroup rp_kernel 10 | //! @{ 11 | 12 | /** 13 | * @brief Layout memory allocator 14 | */ 15 | class RPSysLytAllocator : public EGG::Allocator { 16 | public: 17 | /** 18 | * @brief Constructor 19 | * 20 | * @param pHeap Heap to use for allocations 21 | * @param align Required byte alignment for allocations 22 | */ 23 | RPSysLytAllocator(EGG::Heap* pHeap, s32 align = 4); 24 | 25 | /** 26 | * @brief Destructor 27 | */ 28 | virtual ~RPSysLytAllocator() override; // at 0x8 29 | 30 | private: 31 | //! Custom allocator functions 32 | MEMAllocatorFuncs mExFuncs; // at 0x14 33 | }; 34 | 35 | //! @} 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/MSL/s_copysign.c: -------------------------------------------------------------------------------- 1 | 2 | /* @(#)s_copysign.c 1.3 95/01/18 */ 3 | /* 4 | * ==================================================== 5 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 6 | * 7 | * Developed at SunSoft, a Sun Microsystems, Inc. business. 8 | * Permission to use, copy, modify, and distribute this 9 | * software is freely granted, provided that this notice 10 | * is preserved. 11 | * ==================================================== 12 | */ 13 | 14 | /* 15 | * copysign(double x, double y) 16 | * copysign(x,y) returns a value with the magnitude of x and 17 | * with the sign bit of y. 18 | */ 19 | 20 | #include 21 | 22 | #ifdef __STDC__ 23 | double copysign(double x, double y) 24 | #else 25 | double copysign(x,y) 26 | double x,y; 27 | #endif 28 | { 29 | __HI(x) = (__HI(x)&0x7fffffff)|(__HI(y)&0x80000000); 30 | return x; 31 | } -------------------------------------------------------------------------------- /include/egg/gfxe/eggFogManager.h: -------------------------------------------------------------------------------- 1 | #ifndef EGG_GFXE_FOG_MANAGER_H 2 | #define EGG_GFXE_FOG_MANAGER_H 3 | #include 4 | 5 | #include 6 | 7 | namespace EGG { 8 | 9 | // Forward declarations 10 | class Fog; 11 | class Screen; 12 | 13 | class FogManager { 14 | private: 15 | static const int FOG_MAX = 32; 16 | 17 | private: 18 | u8 mFlags; // at 0x0 19 | Fog* mFog[FOG_MAX]; // at 0x4 20 | 21 | public: 22 | FogManager(); 23 | virtual ~FogManager() {} // at 0x8 24 | 25 | void Reset(); 26 | void Calc(); 27 | void LoadScreenClip(const Screen& rScreen); 28 | void CopyToG3D(nw4r::g3d::ScnRoot* pScnRoot) const; 29 | void LoadScnFog(const nw4r::g3d::ResAnmScn scn, f32 frame); 30 | void DoneDraw(); 31 | 32 | private: 33 | enum { 34 | EFlag_AwaitDraw = 1 << 2, 35 | }; 36 | }; 37 | 38 | } // namespace EGG 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/revolution/OS/OSMemory.h: -------------------------------------------------------------------------------- 1 | #ifndef RVL_SDK_OS_MEMORY_H 2 | #define RVL_SDK_OS_MEMORY_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define OS_MEM_KB_TO_B(mb) ((mb) * 1024) 9 | #define OS_MEM_B_TO_KB(mb) ((mb) / 1024) 10 | 11 | #define OS_MEM_MB_TO_B(mb) ((mb) * 1024 * 1024) 12 | #define OS_MEM_B_TO_MB(mb) ((mb) / 1024 / 1024) 13 | 14 | #define OSIsMEM1Region(addr) (((u32)(addr) & 0x30000000) == 0) 15 | #define OSIsMEM2Region(addr) (((u32)(addr) & 0x30000000) == 0x10000000) 16 | 17 | #define OS_IS_MEM1_REGION(addr) OSIsMEM1Region(addr) 18 | #define OS_IS_MEM2_REGION(addr) OSIsMEM2Region(addr) 19 | 20 | u32 OSGetPhysicalMem1Size(void); 21 | u32 OSGetPhysicalMem2Size(void); 22 | u32 OSGetConsoleSimulatedMem1Size(void); 23 | u32 OSGetConsoleSimulatedMem2Size(void); 24 | void __OSInitMemoryProtection(void); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /include/MSL/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef MSL_CTYPE_H 2 | #define MSL_CTYPE_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | typedef struct __CMap { 9 | char UNK_0x0[0x10]; 10 | const u8* to_lower_table; // at 0x10 11 | const u8* to_upper_table; // at 0x14 12 | } __CMap; 13 | 14 | typedef struct __Locale { 15 | char UNK_0x0[0x38]; 16 | struct __CMap* cmap; // at 0x38 17 | char UNK_0x3C[0x44 - 0x3C]; 18 | } __Locale; 19 | 20 | extern __Locale _current_locale; 21 | 22 | inline int tolower(int x) { 23 | return (x < 0 || x >= 256) 24 | ? x 25 | : (int)(&_current_locale)->cmap->to_lower_table[x]; 26 | } 27 | 28 | inline int toupper(int x) { 29 | return (x < 0 || x >= 256) 30 | ? x 31 | : (int)(&_current_locale)->cmap->to_upper_table[x]; 32 | } 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /include/Pack/RPGraphics/RPGrpDrawPath.h: -------------------------------------------------------------------------------- 1 | #ifndef RP_GRAPHICS_DRAW_PATH_H 2 | #define RP_GRAPHICS_DRAW_PATH_H 3 | #include 4 | 5 | #include 6 | 7 | //! @addtogroup rp_graphics 8 | //! @{ 9 | 10 | /** 11 | * @brief Base class for draw paths 12 | */ 13 | class RPGrpDrawPath { 14 | protected: 15 | EGG::ScnRenderer* mpRenderer; // at 0x0 16 | EGG::DrawPathBase* mpPathImpl; // at 0x4 17 | 18 | public: 19 | template T* Construct(EGG::ScnRenderer* pRenderer); 20 | 21 | virtual ~RPGrpDrawPath() {} // at 0x8 22 | 23 | virtual void On() { // at 0xC 24 | mpPathImpl->setEnable(true); 25 | } 26 | 27 | virtual void Off() { // at 0x10 28 | mpPathImpl->setEnable(false); 29 | } 30 | 31 | virtual bool IsEnable() const { // at 0x10 32 | return mpPathImpl->isEnable(); 33 | } 34 | }; 35 | 36 | //! @} 37 | 38 | #endif 39 | --------------------------------------------------------------------------------