diff --git a/.gitmodules b/.gitmodules index 701ba3ee2f..b386c1754a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "extern/aurora"] path = extern/aurora - url = git@github.com:encounter/aurora.git + url = https://github.com/encounter/aurora.git diff --git a/.vscode/launch.json b/.vscode/launch.json index 7f4d7c1931..3fa84f5d21 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,8 @@ "program": "${command:cmake.launchTargetPath}", "MIMode": "gdb", "miDebuggerPath": "gdb", - "symbolSearchPath": "${command:cmake.launchTargetPath}" + "symbolSearchPath": "${command:cmake.launchTargetPath}", + "console": "integratedTerminal" } ] } diff --git a/CMakeLists.txt b/CMakeLists.txt index 66dc2b8095..6bcf65d88a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,8 +59,15 @@ add_library(game_debug STATIC ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}) target_compile_definitions(game_debug PRIVATE TARGET_PC VERSION=0 $<$:DEBUG=1>) # Make these properties PUBLIC so that the regular game target also sees them. -target_include_directories(game_debug PUBLIC include src assets/${DUSK_TP_VERSION} ${CMAKE_SOURCE_DIR}/build/${DUSK_TP_VERSION}/include) -target_link_libraries(game_debug PUBLIC aurora::core aurora::gx aurora::si aurora::vi aurora::pad aurora::mtx) +target_include_directories(game_debug PUBLIC + include + src + assets/${DUSK_TP_VERSION} + libs/JSystem/include + extern/aurora/include/dolphin + ${CMAKE_SOURCE_DIR}/build/${DUSK_TP_VERSION}/include + build/${DUSK_TP_VERSION}/include) +target_link_libraries(game_debug PUBLIC aurora::core aurora::gx aurora::si aurora::vi aurora::pad aurora::mtx aurora::os) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_library(game SHARED ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${SSYSTEM_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES}) diff --git a/configure.py b/configure.py index 914bafa047..210dc3f14d 100755 --- a/configure.py +++ b/configure.py @@ -272,21 +272,29 @@ cflags_base = [ f"-i build/{config.version}/include", f"-i assets/{config.version}", "-i src", - "-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include", - "-i src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include", - "-i src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include", - "-i src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include", - "-i src/PowerPC_EABI_Support/Runtime/Inc", - "-i src/PowerPC_EABI_Support/MetroTRK", - "-i include/dolphin", + "-i libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include", + "-i libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include", + "-i libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include", + "-i libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include", + "-i libs/PowerPC_EABI_Support/Runtime/Inc", + "-i libs/PowerPC_EABI_Support/MetroTRK", + "-i libs/JSystem/include", f"-DVERSION={version_num}", "-D__GEKKO__", ] if config.version in WII_VERSIONS or config.version in SHIELD_VERSIONS: - cflags_base.extend(["-enc SJIS"]) + cflags_base.extend([ + "-i libs/revolution/include", + "-i libs/revolution/include/revolution", # for types.h includes + "-enc SJIS", + ]) else: - cflags_base.extend(["-multibyte"]) + cflags_base.extend([ + "-i libs/dolphin/include", + "-i libs/dolphin/include/dolphin", # for types.h includes + "-multibyte", + ]) USE_REVOLUTION_SDK_VERSIONS = [ "RZDE01_00", # Wii USA Rev 0 @@ -351,7 +359,7 @@ cflags_trk = [ # Dolphin library flags cflags_dolphin = [ *cflags_base, - "-ir src/dolphin", + "-ir libs/dolphin/src", "-fp_contract off", "-char unsigned", "-sym on", @@ -361,12 +369,11 @@ cflags_dolphin = [ # Revolution library flags cflags_revolution_base = [ *cflags_base, - "-ir src/revolution", + "-ir libs/revolution/src", "-fp_contract off", "-sym on", "-inline auto", "-ipa file", - "-i include/revolution", "-D__REVOLUTION_SDK__", ] @@ -466,6 +473,8 @@ else: def DolphinLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]: return { "lib": lib_name, + "src_dir": "libs/dolphin/src", + "strip_prefix": "dolphin/", "mw_version": "GC/1.2.5n", "cflags": cflags_dolphin, "progress_category": "sdk", @@ -476,6 +485,8 @@ def RevolutionLib(lib_name: str, objects: List[Object], extra_cflags=[]) -> Dict if config.version == "ShieldD": return { "lib": lib_name, + "src_dir": "libs/revolution/src", + "strip_prefix": "revolution/", "mw_version": "Wii/1.0", "cflags": [*cflags_revolution_debug, "-DSDK_AUG2010", *extra_cflags], "progress_category": "sdk", @@ -484,6 +495,8 @@ def RevolutionLib(lib_name: str, objects: List[Object], extra_cflags=[]) -> Dict elif config.version == "Shield": return { "lib": lib_name, + "src_dir": "libs/revolution/src", + "strip_prefix": "revolution/", "mw_version": "Wii/1.0", "cflags": [*cflags_revolution_retail, "-DSDK_AUG2010", *extra_cflags], "progress_category": "sdk", @@ -492,6 +505,8 @@ def RevolutionLib(lib_name: str, objects: List[Object], extra_cflags=[]) -> Dict elif config.version == "RZDE01_00": return { "lib": lib_name, + "src_dir": "libs/revolution/src", + "strip_prefix": "revolution/", "mw_version": "GC/3.0a3", "cflags": [*cflags_revolution_retail, "-DSDK_SEP2006", "-DNW4HBM_DEBUG", *extra_cflags], "progress_category": "sdk", @@ -500,6 +515,8 @@ def RevolutionLib(lib_name: str, objects: List[Object], extra_cflags=[]) -> Dict else: return { "lib": lib_name, + "src_dir": "libs/revolution/src", + "strip_prefix": "revolution/", "mw_version": "GC/3.0a3", "cflags": [*cflags_revolution_retail, "-DSDK_SEP2006", *extra_cflags], "progress_category": "sdk", @@ -525,6 +542,8 @@ def ActorRel(status: bool, rel_name: str, extra_cflags: List[str]=[]) -> Dict[st def JSystemLib(lib_name: str, objects: List[Object], progress_category: str="third_party") -> Dict[str, Any]: return { "lib": lib_name, + "src_dir": "libs/JSystem/src", + "strip_prefix": "JSystem/", "mw_version": MWVersion(config.version), "cflags": [*cflags_jsystem], "progress_category": progress_category, @@ -560,17 +579,20 @@ config.warn_missing_config = True config.warn_missing_source = False config.precompiled_headers = [ { - "source": "d/dolzel.pch", + "source": "include/d/dolzel.pch", + "output": "d/dolzel.mch", "mw_version": MWVersion(config.version), "cflags": ["-lang=c++", *cflags_dolzel_framework], }, { - "source": "d/dolzel_rel.pch", + "source": "include/d/dolzel_rel.pch", + "output": "d/dolzel_rel.mch", "mw_version": MWVersion(config.version), "cflags": ["-lang=c++", *cflags_dolzel_rel], }, { - "source": "JSystem/JSystem.pch", + "source": "libs/JSystem/include/JSystem/JSystem.pch", + "output": "JSystem/JSystem.mch", "mw_version": MWVersion(config.version), "cflags": ["-lang=c++", *cflags_framework], }, @@ -581,7 +603,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "core", - "host": True, "objects": [ Object(MatchingFor(ALL_GCN), "m_Do/m_Do_main.cpp"), Object(MatchingFor(ALL_GCN), "m_Do/m_Do_printf.cpp"), @@ -608,7 +629,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "game", - "host": True, "objects": [ Object(MatchingFor(ALL_GCN), "c/c_damagereaction.cpp"), Object(MatchingFor(ALL_GCN), "c/c_dylink.cpp"), @@ -619,7 +639,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "core", - "host": True, "objects": [ # f_ap Object(MatchingFor(ALL_GCN), "f_ap/f_ap_game.cpp"), @@ -688,7 +707,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "game", - "host": True, "objects": [ Object(NonMatching, "d/d_home_button.cpp"), Object(NonMatching, "d/d_cursor_mng.cpp"), @@ -876,7 +894,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "core", - "host": True, "objects": [ Object(MatchingFor(ALL_GCN), "DynamicLink.cpp"), ], @@ -886,7 +903,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "core", - "host": True, "objects": [ Object(NonMatching, "CaptureScreen.cpp"), ], @@ -896,7 +912,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "third_party", - "host": True, "objects": [ Object(MatchingFor(ALL_GCN, ALL_SHIELD), "SSystem/SComponent/c_malloc.cpp"), Object(MatchingFor(ALL_GCN, ALL_SHIELD), "SSystem/SComponent/c_API.cpp"), @@ -1221,7 +1236,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "core", - "host": True, "objects": [ Object(MatchingFor(ALL_GCN), "Z2AudioLib/Z2Calc.cpp"), Object(MatchingFor(ALL_GCN), "Z2AudioLib/Z2AudioArcLoader.cpp"), @@ -1257,7 +1271,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "core", - "host": True, "objects": [ Object(Matching, "Z2AudioCS/SpkSpeakerCtrl.cpp"), Object(Equivalent, "Z2AudioCS/SpkSystem.cpp"), @@ -1271,6 +1284,8 @@ config.libs = [ }, { "lib": "gf", + "src_dir": "libs/dolphin/src", + "strip_prefix": "dolphin/", "mw_version": MWVersion(config.version), "cflags": [*cflags_noopt, "-O3"], "progress_category": "sdk", @@ -1503,8 +1518,10 @@ config.libs = [ ), { "lib": "exi", + "src_dir": "libs/dolphin/src", + "strip_prefix": "dolphin/", "mw_version": "GC/1.2.5n", - "cflags": [*cflags_noopt, "-ir src/dolphin"], + "cflags": [*cflags_noopt, "-ir libs/dolphin/src"], "progress_category": "sdk", "objects": [ Object(Matching, "dolphin/exi/EXIBios.c", extra_cflags=["-O3,p"]), @@ -1976,10 +1993,10 @@ config.libs = [ ), { "lib": "Runtime.PPCEABI.H", + "src_dir": "libs", "mw_version": MWVersion(config.version), "cflags": cflags_runtime, "progress_category": "sdk", - "host": False, "objects": [ Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/Runtime/Src/__mem.c"), Object(MatchingFor(ALL_GCN, "Shield"), "PowerPC_EABI_Support/Runtime/Src/__va_arg.c"), @@ -1995,10 +2012,10 @@ config.libs = [ }, { "lib": "MSL_C", + "src_dir": "libs", "mw_version": MWVersion(config.version), "cflags": cflags_runtime, "progress_category": "sdk", - "host": False, "objects": [ Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c"), Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c"), @@ -2076,10 +2093,10 @@ config.libs = [ }, { "lib": "TRK_MINNOW_DOLPHIN", + "src_dir": "libs", "mw_version": MWVersion(config.version), "cflags": cflags_trk, "progress_category": "sdk", - "host": False, "objects": [ # debugger Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mainloop.c"), @@ -2123,7 +2140,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_dolphin, "progress_category": "sdk", - "host": False, "objects": [ Object(MatchingFor(ALL_GCN), "amcstubs/AmcExi2Stubs.c"), ], @@ -2133,7 +2149,6 @@ config.libs = [ "mw_version": "GC/1.2.5n", "cflags": cflags_runtime, "progress_category": "sdk", - "host": False, "objects": [ Object(MatchingFor(ALL_GCN), "odemuexi2/DebuggerDriver.c"), ], @@ -2143,7 +2158,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_dolphin, "progress_category": "sdk", - "host": False, "objects": [ Object(MatchingFor(ALL_GCN), "odenotstub/odenotstub.c"), ], @@ -2154,7 +2168,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "sdk", - "host": False, "objects": [ Object(NonMatching, "NdevExi2A/DebuggerDriver.c"), Object(NonMatching, "NdevExi2A/exi2.c"), @@ -2165,7 +2178,6 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_framework, "progress_category": "third_party", - "host": False, "objects": [ Object(MatchingFor("Shield"), "lingcod/LingcodPatch.c"), ], @@ -2177,13 +2189,13 @@ config.libs = [ "mw_version": MWVersion(config.version), "cflags": cflags_rel, "progress_category": "sdk", - "host": False, "objects": [ Object(MatchingFor(ALL_GCN), "REL/executor.c"), Object( MatchingFor(ALL_GCN), "REL/global_destructor_chain.c", - source="PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c", + src_dir="libs/PowerPC_EABI_Support/Runtime/Src", + source="global_destructor_chain.c", ), ], }, diff --git a/extern/aurora b/extern/aurora index 08e965bbe8..e4afaeeeb7 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit 08e965bbe8aa3dc502a026efa14d749e6f6d2794 +Subproject commit e4afaeeeb75315fe86554da40b95372cc40f4a4a diff --git a/files.cmake b/files.cmake index 451a07429d..7534864a45 100644 --- a/files.cmake +++ b/files.cmake @@ -315,243 +315,243 @@ set(SSYSTEM_FILES ) set(JSYSTEM_DEBUG_FILES - src/JSystem/JParticle/JPAResourceManager.cpp - src/JSystem/JParticle/JPAResource.cpp - src/JSystem/JParticle/JPABaseShape.cpp - src/JSystem/JParticle/JPAExtraShape.cpp - src/JSystem/JParticle/JPAChildShape.cpp - src/JSystem/JParticle/JPAExTexShape.cpp - src/JSystem/JParticle/JPADynamicsBlock.cpp - src/JSystem/JParticle/JPAFieldBlock.cpp - src/JSystem/JParticle/JPAKeyBlock.cpp - src/JSystem/JParticle/JPATexture.cpp - src/JSystem/JParticle/JPAResourceLoader.cpp - src/JSystem/JParticle/JPAEmitterManager.cpp - src/JSystem/JParticle/JPAEmitter.cpp - src/JSystem/JParticle/JPAParticle.cpp - src/JSystem/JParticle/JPAMath.cpp - src/JSystem/JFramework/JFWSystem.cpp - src/JSystem/JFramework/JFWDisplay.cpp - src/JSystem/J3DU/J3DUClipper.cpp - src/JSystem/J3DU/J3DUDL.cpp - src/JSystem/JKernel/JKRHeap.cpp - src/JSystem/JKernel/JKRExpHeap.cpp - src/JSystem/JKernel/JKRSolidHeap.cpp - src/JSystem/JKernel/JKRAssertHeap.cpp - src/JSystem/JKernel/JKRDisposer.cpp - src/JSystem/JKernel/JKRThread.cpp - src/JSystem/JKernel/JKRAram.cpp - src/JSystem/JKernel/JKRAramHeap.cpp - src/JSystem/JKernel/JKRAramBlock.cpp - src/JSystem/JKernel/JKRAramPiece.cpp - src/JSystem/JKernel/JKRAramStream.cpp - src/JSystem/JKernel/JKRFileLoader.cpp - src/JSystem/JKernel/JKRFileFinder.cpp - src/JSystem/JKernel/JKRFileCache.cpp - src/JSystem/JKernel/JKRArchivePub.cpp - src/JSystem/JKernel/JKRArchivePri.cpp - src/JSystem/JKernel/JKRMemArchive.cpp - src/JSystem/JKernel/JKRAramArchive.cpp - src/JSystem/JKernel/JKRDvdArchive.cpp - src/JSystem/JKernel/JKRCompArchive.cpp - src/JSystem/JKernel/JKRFile.cpp - src/JSystem/JKernel/JKRDvdFile.cpp - src/JSystem/JKernel/JKRDvdRipper.cpp - src/JSystem/JKernel/JKRDvdAramRipper.cpp - src/JSystem/JKernel/JKRDecomp.cpp - src/JSystem/JMath/JMath.cpp - src/JSystem/JMath/random.cpp - src/JSystem/JMath/JMATrigonometric.cpp - src/JSystem/JSupport/JSUList.cpp - src/JSystem/JSupport/JSUInputStream.cpp - src/JSystem/JSupport/JSUOutputStream.cpp - src/JSystem/JSupport/JSUMemoryStream.cpp - src/JSystem/JSupport/JSUFileStream.cpp - src/JSystem/JUtility/JUTCacheFont.cpp - src/JSystem/JUtility/JUTResource.cpp - src/JSystem/JUtility/JUTTexture.cpp - src/JSystem/JUtility/JUTPalette.cpp - src/JSystem/JUtility/JUTNameTab.cpp - src/JSystem/JUtility/JUTGraphFifo.cpp - src/JSystem/JUtility/JUTFont.cpp - src/JSystem/JUtility/JUTResFont.cpp - src/JSystem/JUtility/JUTDbPrint.cpp - src/JSystem/JUtility/JUTGamePad.cpp - src/JSystem/JUtility/JUTException.cpp - src/JSystem/JUtility/JUTDirectPrint.cpp - src/JSystem/JUtility/JUTAssert.cpp - src/JSystem/JUtility/JUTVideo.cpp - src/JSystem/JUtility/JUTXfb.cpp - src/JSystem/JUtility/JUTFader.cpp - src/JSystem/JUtility/JUTProcBar.cpp - src/JSystem/JUtility/JUTConsole.cpp - src/JSystem/JUtility/JUTDirectFile.cpp - src/JSystem/JUtility/JUTFontData_Ascfont_fix12.cpp - src/JSystem/JStage/JSGActor.cpp - src/JSystem/JStage/JSGAmbientLight.cpp - src/JSystem/JStage/JSGCamera.cpp - src/JSystem/JStage/JSGFog.cpp - src/JSystem/JStage/JSGLight.cpp - src/JSystem/JStage/JSGObject.cpp - src/JSystem/JStage/JSGSystem.cpp - src/JSystem/J2DGraph/J2DGrafContext.cpp - src/JSystem/J2DGraph/J2DOrthoGraph.cpp - src/JSystem/J2DGraph/J2DTevs.cpp - src/JSystem/J2DGraph/J2DMaterial.cpp - src/JSystem/J2DGraph/J2DMatBlock.cpp - src/JSystem/J2DGraph/J2DMaterialFactory.cpp - src/JSystem/J2DGraph/J2DPrint.cpp - src/JSystem/J2DGraph/J2DPane.cpp - src/JSystem/J2DGraph/J2DScreen.cpp - src/JSystem/J2DGraph/J2DWindow.cpp - src/JSystem/J2DGraph/J2DPicture.cpp - src/JSystem/J2DGraph/J2DTextBox.cpp - src/JSystem/J2DGraph/J2DWindowEx.cpp - src/JSystem/J2DGraph/J2DPictureEx.cpp - src/JSystem/J2DGraph/J2DTextBoxEx.cpp - src/JSystem/J2DGraph/J2DAnmLoader.cpp - src/JSystem/J2DGraph/J2DAnimation.cpp - src/JSystem/J2DGraph/J2DManage.cpp - src/JSystem/J3DGraphBase/J3DGD.cpp - src/JSystem/J3DGraphBase/J3DSys.cpp - src/JSystem/J3DGraphBase/J3DVertex.cpp - src/JSystem/J3DGraphBase/J3DTransform.cpp - src/JSystem/J3DGraphBase/J3DTexture.cpp - src/JSystem/J3DGraphBase/J3DPacket.cpp - src/JSystem/J3DGraphBase/J3DShapeMtx.cpp - src/JSystem/J3DGraphBase/J3DShapeDraw.cpp - src/JSystem/J3DGraphBase/J3DShape.cpp - src/JSystem/J3DGraphBase/J3DMaterial.cpp - src/JSystem/J3DGraphBase/J3DMatBlock.cpp - src/JSystem/J3DGraphBase/J3DTevs.cpp - src/JSystem/J3DGraphBase/J3DDrawBuffer.cpp - src/JSystem/J3DGraphBase/J3DStruct.cpp - src/JSystem/J3DGraphAnimator/J3DShapeTable.cpp - src/JSystem/J3DGraphAnimator/J3DJointTree.cpp - src/JSystem/J3DGraphAnimator/J3DModelData.cpp - src/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp - src/JSystem/J3DGraphAnimator/J3DModel.cpp - src/JSystem/J3DGraphAnimator/J3DAnimation.cpp - src/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp - src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp - src/JSystem/J3DGraphAnimator/J3DCluster.cpp - src/JSystem/J3DGraphAnimator/J3DJoint.cpp - src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp - src/JSystem/J3DGraphLoader/J3DMaterialFactory.cpp - src/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp - src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp - src/JSystem/J3DGraphLoader/J3DModelLoader.cpp - src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp - src/JSystem/J3DGraphLoader/J3DJointFactory.cpp - src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp - src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp - src/JSystem/JStudio/JStudio/ctb.cpp - src/JSystem/JStudio/JStudio/ctb-data.cpp - src/JSystem/JStudio/JStudio/functionvalue.cpp - src/JSystem/JStudio/JStudio/fvb.cpp - src/JSystem/JStudio/JStudio/fvb-data.cpp - src/JSystem/JStudio/JStudio/fvb-data-parse.cpp - src/JSystem/JStudio/JStudio/jstudio-control.cpp - src/JSystem/JStudio/JStudio/jstudio-data.cpp - src/JSystem/JStudio/JStudio/jstudio-math.cpp - src/JSystem/JStudio/JStudio/jstudio-object.cpp - src/JSystem/JStudio/JStudio/object-id.cpp - src/JSystem/JStudio/JStudio/stb.cpp - src/JSystem/JStudio/JStudio/stb-data-parse.cpp - src/JSystem/JStudio/JStudio/stb-data.cpp - src/JSystem/JStudio/JStudio_JStage/control.cpp - src/JSystem/JStudio/JStudio_JStage/object.cpp - src/JSystem/JStudio/JStudio_JStage/object-actor.cpp - src/JSystem/JStudio/JStudio_JStage/object-ambientlight.cpp - src/JSystem/JStudio/JStudio_JStage/object-camera.cpp - src/JSystem/JStudio/JStudio_JStage/object-fog.cpp - src/JSystem/JStudio/JStudio_JStage/object-light.cpp - src/JSystem/JStudio/JStudio_JAudio2/control.cpp - src/JSystem/JStudio/JStudio_JAudio2/object-sound.cpp - src/JSystem/JStudio/JStudio_JParticle/control.cpp - src/JSystem/JStudio/JStudio_JParticle/object-particle.cpp - src/JSystem/JAudio2/JASCalc.cpp - src/JSystem/JAudio2/JASTaskThread.cpp - src/JSystem/JAudio2/JASDvdThread.cpp - src/JSystem/JAudio2/JASCallback.cpp - src/JSystem/JAudio2/JASHeapCtrl.cpp - src/JSystem/JAudio2/JASResArcLoader.cpp - src/JSystem/JAudio2/JASProbe.cpp - src/JSystem/JAudio2/JASReport.cpp - src/JSystem/JAudio2/JASCmdStack.cpp - src/JSystem/JAudio2/JASTrack.cpp - src/JSystem/JAudio2/JASTrackPort.cpp - src/JSystem/JAudio2/JASRegisterParam.cpp - src/JSystem/JAudio2/JASSeqCtrl.cpp - src/JSystem/JAudio2/JASSeqParser.cpp - src/JSystem/JAudio2/JASSeqReader.cpp - src/JSystem/JAudio2/JASAramStream.cpp - src/JSystem/JAudio2/JASBank.cpp - src/JSystem/JAudio2/JASBasicBank.cpp - src/JSystem/JAudio2/JASVoiceBank.cpp - src/JSystem/JAudio2/JASBasicInst.cpp - src/JSystem/JAudio2/JASDrumSet.cpp - src/JSystem/JAudio2/JASBasicWaveBank.cpp - src/JSystem/JAudio2/JASSimpleWaveBank.cpp - src/JSystem/JAudio2/JASWSParser.cpp - src/JSystem/JAudio2/JASBNKParser.cpp - src/JSystem/JAudio2/JASWaveArcLoader.cpp - src/JSystem/JAudio2/JASChannel.cpp - src/JSystem/JAudio2/JASLfo.cpp - src/JSystem/JAudio2/JASOscillator.cpp - src/JSystem/JAudio2/JASAiCtrl.cpp - src/JSystem/JAudio2/JASAudioThread.cpp - src/JSystem/JAudio2/JASAudioReseter.cpp - src/JSystem/JAudio2/JASDSPChannel.cpp - src/JSystem/JAudio2/JASDSPInterface.cpp - src/JSystem/JAudio2/JASDriverIF.cpp - src/JSystem/JAudio2/JASSoundParams.cpp - src/JSystem/JAudio2/dspproc.cpp - src/JSystem/JAudio2/dsptask.cpp - src/JSystem/JAudio2/osdsp.cpp - src/JSystem/JAudio2/osdsp_task.cpp - src/JSystem/JAudio2/JAIAudible.cpp - src/JSystem/JAudio2/JAIAudience.cpp - src/JSystem/JAudio2/JAISe.cpp - src/JSystem/JAudio2/JAISeMgr.cpp - src/JSystem/JAudio2/JAISeq.cpp - src/JSystem/JAudio2/JAISeqDataMgr.cpp - src/JSystem/JAudio2/JAISeqMgr.cpp - src/JSystem/JAudio2/JAISound.cpp - src/JSystem/JAudio2/JAISoundChild.cpp - src/JSystem/JAudio2/JAISoundHandles.cpp - src/JSystem/JAudio2/JAISoundInfo.cpp - src/JSystem/JAudio2/JAISoundParams.cpp - src/JSystem/JAudio2/JAISoundStarter.cpp - src/JSystem/JAudio2/JAIStream.cpp - src/JSystem/JAudio2/JAIStreamDataMgr.cpp - src/JSystem/JAudio2/JAIStreamMgr.cpp - src/JSystem/JAudio2/JAUAudioArcInterpreter.cpp - src/JSystem/JAudio2/JAUAudioArcLoader.cpp - src/JSystem/JAudio2/JAUAudioMgr.cpp - src/JSystem/JAudio2/JAUBankTable.cpp - src/JSystem/JAudio2/JAUClusterSound.cpp - src/JSystem/JAudio2/JAUInitializer.cpp - src/JSystem/JAudio2/JAUSectionHeap.cpp - src/JSystem/JAudio2/JAUSeqCollection.cpp - src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp - src/JSystem/JAudio2/JAUSoundAnimator.cpp - src/JSystem/JAudio2/JAUSoundTable.cpp - src/JSystem/JAudio2/JAUStreamFileTable.cpp - src/JSystem/JMessage/control.cpp - src/JSystem/JMessage/data.cpp - src/JSystem/JMessage/processor.cpp - src/JSystem/JMessage/resource.cpp - src/JSystem/JMessage/locale.cpp - src/JSystem/JGadget/binary.cpp - src/JSystem/JGadget/define.cpp - src/JSystem/JGadget/linklist.cpp - src/JSystem/JGadget/std-vector.cpp - src/JSystem/JHostIO/JORHostInfo.cpp - src/JSystem/JHostIO/JORServer.cpp - src/JSystem/JHostIO/JHIhioASync.cpp - src/JSystem/JHostIO/JHIRMcc.cpp - src/JSystem/JHostIO/JHIMccBuf.cpp + libs/JSystem/src/JParticle/JPAResourceManager.cpp + libs/JSystem/src/JParticle/JPAResource.cpp + libs/JSystem/src/JParticle/JPABaseShape.cpp + libs/JSystem/src/JParticle/JPAExtraShape.cpp + libs/JSystem/src/JParticle/JPAChildShape.cpp + libs/JSystem/src/JParticle/JPAExTexShape.cpp + libs/JSystem/src/JParticle/JPADynamicsBlock.cpp + libs/JSystem/src/JParticle/JPAFieldBlock.cpp + libs/JSystem/src/JParticle/JPAKeyBlock.cpp + libs/JSystem/src/JParticle/JPATexture.cpp + libs/JSystem/src/JParticle/JPAResourceLoader.cpp + libs/JSystem/src/JParticle/JPAEmitterManager.cpp + libs/JSystem/src/JParticle/JPAEmitter.cpp + libs/JSystem/src/JParticle/JPAParticle.cpp + libs/JSystem/src/JParticle/JPAMath.cpp + libs/JSystem/src/JFramework/JFWSystem.cpp + libs/JSystem/src/JFramework/JFWDisplay.cpp + libs/JSystem/src/J3DU/J3DUClipper.cpp + libs/JSystem/src/J3DU/J3DUDL.cpp + libs/JSystem/src/JKernel/JKRHeap.cpp + libs/JSystem/src/JKernel/JKRExpHeap.cpp + libs/JSystem/src/JKernel/JKRSolidHeap.cpp + libs/JSystem/src/JKernel/JKRAssertHeap.cpp + libs/JSystem/src/JKernel/JKRDisposer.cpp + libs/JSystem/src/JKernel/JKRThread.cpp + libs/JSystem/src/JKernel/JKRAram.cpp + libs/JSystem/src/JKernel/JKRAramHeap.cpp + libs/JSystem/src/JKernel/JKRAramBlock.cpp + libs/JSystem/src/JKernel/JKRAramPiece.cpp + libs/JSystem/src/JKernel/JKRAramStream.cpp + libs/JSystem/src/JKernel/JKRFileLoader.cpp + libs/JSystem/src/JKernel/JKRFileFinder.cpp + libs/JSystem/src/JKernel/JKRFileCache.cpp + libs/JSystem/src/JKernel/JKRArchivePub.cpp + libs/JSystem/src/JKernel/JKRArchivePri.cpp + libs/JSystem/src/JKernel/JKRMemArchive.cpp + libs/JSystem/src/JKernel/JKRAramArchive.cpp + libs/JSystem/src/JKernel/JKRDvdArchive.cpp + libs/JSystem/src/JKernel/JKRCompArchive.cpp + libs/JSystem/src/JKernel/JKRFile.cpp + libs/JSystem/src/JKernel/JKRDvdFile.cpp + libs/JSystem/src/JKernel/JKRDvdRipper.cpp + libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp + libs/JSystem/src/JKernel/JKRDecomp.cpp + libs/JSystem/src/JMath/JMath.cpp + libs/JSystem/src/JMath/random.cpp + libs/JSystem/src/JMath/JMATrigonometric.cpp + libs/JSystem/src/JSupport/JSUList.cpp + libs/JSystem/src/JSupport/JSUInputStream.cpp + libs/JSystem/src/JSupport/JSUOutputStream.cpp + libs/JSystem/src/JSupport/JSUMemoryStream.cpp + libs/JSystem/src/JSupport/JSUFileStream.cpp + libs/JSystem/src/JUtility/JUTCacheFont.cpp + libs/JSystem/src/JUtility/JUTResource.cpp + libs/JSystem/src/JUtility/JUTTexture.cpp + libs/JSystem/src/JUtility/JUTPalette.cpp + libs/JSystem/src/JUtility/JUTNameTab.cpp + libs/JSystem/src/JUtility/JUTGraphFifo.cpp + libs/JSystem/src/JUtility/JUTFont.cpp + libs/JSystem/src/JUtility/JUTResFont.cpp + libs/JSystem/src/JUtility/JUTDbPrint.cpp + libs/JSystem/src/JUtility/JUTGamePad.cpp + libs/JSystem/src/JUtility/JUTException.cpp + libs/JSystem/src/JUtility/JUTDirectPrint.cpp + libs/JSystem/src/JUtility/JUTAssert.cpp + libs/JSystem/src/JUtility/JUTVideo.cpp + libs/JSystem/src/JUtility/JUTXfb.cpp + libs/JSystem/src/JUtility/JUTFader.cpp + libs/JSystem/src/JUtility/JUTProcBar.cpp + libs/JSystem/src/JUtility/JUTConsole.cpp + libs/JSystem/src/JUtility/JUTDirectFile.cpp + libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp + libs/JSystem/src/JStage/JSGActor.cpp + libs/JSystem/src/JStage/JSGAmbientLight.cpp + libs/JSystem/src/JStage/JSGCamera.cpp + libs/JSystem/src/JStage/JSGFog.cpp + libs/JSystem/src/JStage/JSGLight.cpp + libs/JSystem/src/JStage/JSGObject.cpp + libs/JSystem/src/JStage/JSGSystem.cpp + libs/JSystem/src/J2DGraph/J2DGrafContext.cpp + libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp + libs/JSystem/src/J2DGraph/J2DTevs.cpp + libs/JSystem/src/J2DGraph/J2DMaterial.cpp + libs/JSystem/src/J2DGraph/J2DMatBlock.cpp + libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp + libs/JSystem/src/J2DGraph/J2DPrint.cpp + libs/JSystem/src/J2DGraph/J2DPane.cpp + libs/JSystem/src/J2DGraph/J2DScreen.cpp + libs/JSystem/src/J2DGraph/J2DWindow.cpp + libs/JSystem/src/J2DGraph/J2DPicture.cpp + libs/JSystem/src/J2DGraph/J2DTextBox.cpp + libs/JSystem/src/J2DGraph/J2DWindowEx.cpp + libs/JSystem/src/J2DGraph/J2DPictureEx.cpp + libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp + libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp + libs/JSystem/src/J2DGraph/J2DAnimation.cpp + libs/JSystem/src/J2DGraph/J2DManage.cpp + libs/JSystem/src/J3DGraphBase/J3DGD.cpp + libs/JSystem/src/J3DGraphBase/J3DSys.cpp + libs/JSystem/src/J3DGraphBase/J3DVertex.cpp + libs/JSystem/src/J3DGraphBase/J3DTransform.cpp + libs/JSystem/src/J3DGraphBase/J3DTexture.cpp + libs/JSystem/src/J3DGraphBase/J3DPacket.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp + libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp + libs/JSystem/src/J3DGraphBase/J3DShape.cpp + libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp + libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp + libs/JSystem/src/J3DGraphBase/J3DTevs.cpp + libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp + libs/JSystem/src/J3DGraphBase/J3DStruct.cpp + libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp + libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp + libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp + libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp + libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp + libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp + libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp + libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp + libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp + libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp + libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp + libs/JSystem/src/JStudio/JStudio/ctb.cpp + libs/JSystem/src/JStudio/JStudio/ctb-data.cpp + libs/JSystem/src/JStudio/JStudio/functionvalue.cpp + libs/JSystem/src/JStudio/JStudio/fvb.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data.cpp + libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp + libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp + libs/JSystem/src/JStudio/JStudio/object-id.cpp + libs/JSystem/src/JStudio/JStudio/stb.cpp + libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp + libs/JSystem/src/JStudio/JStudio/stb-data.cpp + libs/JSystem/src/JStudio/JStudio_JStage/control.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp + libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp + libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp + libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp + libs/JSystem/src/JAudio2/JASCalc.cpp + libs/JSystem/src/JAudio2/JASTaskThread.cpp + libs/JSystem/src/JAudio2/JASDvdThread.cpp + libs/JSystem/src/JAudio2/JASCallback.cpp + libs/JSystem/src/JAudio2/JASHeapCtrl.cpp + libs/JSystem/src/JAudio2/JASResArcLoader.cpp + libs/JSystem/src/JAudio2/JASProbe.cpp + libs/JSystem/src/JAudio2/JASReport.cpp + libs/JSystem/src/JAudio2/JASCmdStack.cpp + libs/JSystem/src/JAudio2/JASTrack.cpp + libs/JSystem/src/JAudio2/JASTrackPort.cpp + libs/JSystem/src/JAudio2/JASRegisterParam.cpp + libs/JSystem/src/JAudio2/JASSeqCtrl.cpp + libs/JSystem/src/JAudio2/JASSeqParser.cpp + libs/JSystem/src/JAudio2/JASSeqReader.cpp + libs/JSystem/src/JAudio2/JASAramStream.cpp + libs/JSystem/src/JAudio2/JASBank.cpp + libs/JSystem/src/JAudio2/JASBasicBank.cpp + libs/JSystem/src/JAudio2/JASVoiceBank.cpp + libs/JSystem/src/JAudio2/JASBasicInst.cpp + libs/JSystem/src/JAudio2/JASDrumSet.cpp + libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp + libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp + libs/JSystem/src/JAudio2/JASWSParser.cpp + libs/JSystem/src/JAudio2/JASBNKParser.cpp + libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp + libs/JSystem/src/JAudio2/JASChannel.cpp + libs/JSystem/src/JAudio2/JASLfo.cpp + libs/JSystem/src/JAudio2/JASOscillator.cpp + libs/JSystem/src/JAudio2/JASAiCtrl.cpp + libs/JSystem/src/JAudio2/JASAudioThread.cpp + libs/JSystem/src/JAudio2/JASAudioReseter.cpp + libs/JSystem/src/JAudio2/JASDSPChannel.cpp + libs/JSystem/src/JAudio2/JASDSPInterface.cpp + libs/JSystem/src/JAudio2/JASDriverIF.cpp + libs/JSystem/src/JAudio2/JASSoundParams.cpp + libs/JSystem/src/JAudio2/dspproc.cpp + libs/JSystem/src/JAudio2/dsptask.cpp + libs/JSystem/src/JAudio2/osdsp.cpp + libs/JSystem/src/JAudio2/osdsp_task.cpp + libs/JSystem/src/JAudio2/JAIAudible.cpp + libs/JSystem/src/JAudio2/JAIAudience.cpp + libs/JSystem/src/JAudio2/JAISe.cpp + libs/JSystem/src/JAudio2/JAISeMgr.cpp + libs/JSystem/src/JAudio2/JAISeq.cpp + libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp + libs/JSystem/src/JAudio2/JAISeqMgr.cpp + libs/JSystem/src/JAudio2/JAISound.cpp + libs/JSystem/src/JAudio2/JAISoundChild.cpp + libs/JSystem/src/JAudio2/JAISoundHandles.cpp + libs/JSystem/src/JAudio2/JAISoundInfo.cpp + libs/JSystem/src/JAudio2/JAISoundParams.cpp + libs/JSystem/src/JAudio2/JAISoundStarter.cpp + libs/JSystem/src/JAudio2/JAIStream.cpp + libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp + libs/JSystem/src/JAudio2/JAIStreamMgr.cpp + libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp + libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp + libs/JSystem/src/JAudio2/JAUAudioMgr.cpp + libs/JSystem/src/JAudio2/JAUBankTable.cpp + libs/JSystem/src/JAudio2/JAUClusterSound.cpp + libs/JSystem/src/JAudio2/JAUInitializer.cpp + libs/JSystem/src/JAudio2/JAUSectionHeap.cpp + libs/JSystem/src/JAudio2/JAUSeqCollection.cpp + libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp + libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp + libs/JSystem/src/JAudio2/JAUSoundTable.cpp + libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp + libs/JSystem/src/JMessage/control.cpp + libs/JSystem/src/JMessage/data.cpp + libs/JSystem/src/JMessage/processor.cpp + libs/JSystem/src/JMessage/resource.cpp + libs/JSystem/src/JMessage/locale.cpp + libs/JSystem/src/JGadget/binary.cpp + libs/JSystem/src/JGadget/define.cpp + libs/JSystem/src/JGadget/linklist.cpp + libs/JSystem/src/JGadget/std-vector.cpp + libs/JSystem/src/JHostIO/JORHostInfo.cpp + libs/JSystem/src/JHostIO/JORServer.cpp + libs/JSystem/src/JHostIO/JHIhioASync.cpp + libs/JSystem/src/JHostIO/JHIRMcc.cpp + libs/JSystem/src/JHostIO/JHIMccBuf.cpp ) set(JSYSTEM_FILES @@ -1328,7 +1328,12 @@ set(DUSK_FILES src/dusk/globals.cpp #src/dusk/m_Do_ext_dusk.cpp src/dusk/dvd_emu.cpp - src/dolphin/os/OSContext.cpp - src/dolphin/os/OSThread.cpp - src/dolphin/os/OSMutex.cpp + src/dusk/imgui/imgui.hpp + src/dusk/imgui/processes.cpp + src/dusk/imgui/debug_overlay.cpp + src/dusk/imgui/heaps.cpp + src/dusk/offset_ptr.cpp + src/dusk/OSContext.cpp + src/dusk/OSThread.cpp + src/dusk/OSMutex.cpp ) diff --git a/include/DynamicLink.h b/include/DynamicLink.h index f59cab5b3e..7f6d8568eb 100644 --- a/include/DynamicLink.h +++ b/include/DynamicLink.h @@ -1,7 +1,7 @@ #ifndef DYNAMICLINK_H #define DYNAMICLINK_H -#include +#include #include "JSystem/JKernel/JKRHeap.h" #include "global.h" diff --git a/include/NdevExi2A/DebuggerDriver.h b/include/NdevExi2A/DebuggerDriver.h index 44cf7daad7..53f3c8ff83 100644 --- a/include/NdevExi2A/DebuggerDriver.h +++ b/include/NdevExi2A/DebuggerDriver.h @@ -1,7 +1,7 @@ #ifndef NDEVEXI2A_DEBUGGERDRIVER_H #define NDEVEXI2A_DEBUGGERDRIVER_H -#include +#include #include "types.h" typedef void (*MtrCallback)(s32, OSContext*); diff --git a/include/SSystem/SComponent/c_API_controller_pad.h b/include/SSystem/SComponent/c_API_controller_pad.h index 36d8fa5a1f..d45b483daa 100644 --- a/include/SSystem/SComponent/c_API_controller_pad.h +++ b/include/SSystem/SComponent/c_API_controller_pad.h @@ -1,7 +1,7 @@ #ifndef C_API_CONTROLLER_PAD_ #define C_API_CONTROLLER_PAD_ -#include +#include struct interface_of_controller_pad { /* 0x00 */ f32 mMainStickPosX; @@ -35,4 +35,42 @@ struct interface_of_controller_pad { void cAPICPad_recalibrate(void); u32 cAPICPad_ANY_BUTTON(u32 param_0); +#if PLATFORM_WII +u32 cAPICPad_BUTTON(u32 i_padNo); +u32 cAPICPad_Z_BUTTON(u32 i_padNo); +u32 cAPICPad_R_BUTTON(u32 i_padNo); +u32 cAPICPad_L_BUTTON(u32 i_padNo); +u32 cAPICPad_A_BUTTON(u32 i_padNo); +u32 cAPICPad_B_BUTTON(u32 i_padNo); +u32 cAPICPad_X_BUTTON(u32 i_padNo); +u32 cAPICPad_Y_BUTTON(u32 i_padNo); + +u32 cAPICPad_TRIGGER(u32 i_padNo); +u32 cAPICPad_Z_TRIGGER(u32 i_padNo); +u32 cAPICPad_R_TRIGGER(u32 i_padNo); +u32 cAPICPad_UP_TRIGGER(u32 i_padNo); +u32 cAPICPad_DOWN_TRIGGER(u32 i_padNo); +u32 cAPICPad_LEFT_TRIGGER(u32 i_padNo); +u32 cAPICPad_RIGHT_TRIGGER(u32 i_padNo); +u32 cAPICPad_L_TRIGGER(u32 i_padNo); +u32 cAPICPad_A_TRIGGER(u32 i_padNo); +u32 cAPICPad_B_TRIGGER(u32 i_padNo); +u32 cAPICPad_X_TRIGGER(u32 i_padNo); +u32 cAPICPad_Y_TRIGGER(u32 i_padNo); +u32 cAPICPad_START_TRIGGER(u32 i_padNo); + +f32 cAPICPad_X_STICK(u32 i_padNo); +f32 cAPICPad_X_STICK_3D(u32 i_padNo); +f32 cAPICPad_Y_STICK(u32 i_padNo); +f32 cAPICPad_VALUE_STICK(u32 i_padNo); +s16 cAPICPad_ANGLE_STICK(u32 i_padNo); +s16 cAPICPad_ANGLE_STICK_3D(u32 i_padNo); +f32 cAPICPad_X_SUBSTICK(u32 i_padNo); +f32 cAPICPad_Y_SUBSTICK(u32 i_padNo); +f32 cAPICPad_VALUE_SUBSTICK(u32 i_padNo); +s16 cAPICPad_ANGLE_SUBSTICK(u32 i_padNo); +f32 cAPICPad_L_ANALOG(u32 i_padNo); +f32 cAPICPad_R_ANALOG(u32 i_padNo); +#endif + #endif diff --git a/include/SSystem/SComponent/c_bg_s_chk.h b/include/SSystem/SComponent/c_bg_s_chk.h index 390a203e16..51c7eb6015 100644 --- a/include/SSystem/SComponent/c_bg_s_chk.h +++ b/include/SSystem/SComponent/c_bg_s_chk.h @@ -1,12 +1,17 @@ #ifndef C_BG_S_CHK_H #define C_BG_S_CHK_H -#include +#include #include "f_pc/f_pc_base.h" #include "SSystem/SComponent/c_bg_s_grp_pass_chk.h" #include "SSystem/SComponent/c_bg_s_poly_pass_chk.h" +#include "dusk/endian.h" +#if TARGET_LITTLE_ENDIAN +struct cBgD_Vtx_t : public BE(Vec) {}; +#else struct cBgD_Vtx_t : public Vec {}; +#endif class cBgS_Chk { public: diff --git a/include/SSystem/SComponent/c_bg_s_poly_info.h b/include/SSystem/SComponent/c_bg_s_poly_info.h index 214118476c..179a0565ec 100644 --- a/include/SSystem/SComponent/c_bg_s_poly_info.h +++ b/include/SSystem/SComponent/c_bg_s_poly_info.h @@ -1,7 +1,7 @@ #ifndef C_BG_S_POLY_INFO_H #define C_BG_S_POLY_INFO_H -#include +#include #include "f_pc/f_pc_manager.h" class cBgS_PolyInfo { diff --git a/include/SSystem/SComponent/c_bg_w.h b/include/SSystem/SComponent/c_bg_w.h index 85233888a6..f1d5e291b4 100644 --- a/include/SSystem/SComponent/c_bg_w.h +++ b/include/SSystem/SComponent/c_bg_w.h @@ -1,7 +1,7 @@ #ifndef C_BG_W_H #define C_BG_W_H -#include +#include class cBgW_BgId { private: diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index f80c33b823..141dd33bad 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -8,8 +8,8 @@ #include "SSystem/SComponent/c_m3d_g_tri.h" #include "SSystem/SComponent/c_m3d_g_vtx.h" #include "f_pc/f_pc_manager.h" +#include -typedef struct _GXColor GXColor; class fopAc_ac_c; enum CcG_Tg_HitMark { @@ -447,7 +447,7 @@ public: virtual cCcD_GObjInf* GetGObjInf() { return NULL; } virtual cCcD_ShapeAttr const* GetShapeAttr() const { return NULL; } virtual cCcD_ShapeAttr* GetShapeAttr() { return NULL; } - virtual void Draw(_GXColor const&) {} + virtual void Draw(GXColor const&) {} void ct(); void Set(cCcD_SrcObj const&); fopAc_ac_c* GetAc(); diff --git a/include/SSystem/SComponent/c_counter.h b/include/SSystem/SComponent/c_counter.h index 124d623fd0..864554b1a7 100644 --- a/include/SSystem/SComponent/c_counter.h +++ b/include/SSystem/SComponent/c_counter.h @@ -1,7 +1,7 @@ #ifndef C_COUNTER_H #define C_COUNTER_H -#include +#include struct counter_class { u32 mCounter0; diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h index 16488c5a12..e3654846e0 100644 --- a/include/SSystem/SComponent/c_lib.h +++ b/include/SSystem/SComponent/c_lib.h @@ -2,7 +2,7 @@ #define C_LIB_H_ #include "SSystem/SComponent/c_xyz.h" -#include +#include #include "SSystem/SComponent/c_math.h" inline bool cLib_IsZero(f32 value) { diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 58f0e28753..94762d5a29 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -2,7 +2,7 @@ #define C_M3D_H_ #include -#include +#include class cM3dGAab; class cM3dGCps; diff --git a/include/SSystem/SComponent/c_m3d_g_cir.h b/include/SSystem/SComponent/c_m3d_g_cir.h index 8ad96fa2a6..eccd553c86 100644 --- a/include/SSystem/SComponent/c_m3d_g_cir.h +++ b/include/SSystem/SComponent/c_m3d_g_cir.h @@ -1,7 +1,7 @@ #ifndef C_M3D_G_CIR_H #define C_M3D_G_CIR_H -#include +#include class cM2dGCir { public: diff --git a/include/SSystem/SComponent/c_m3d_g_tri.h b/include/SSystem/SComponent/c_m3d_g_tri.h index 214c1d0285..3b8d847f48 100644 --- a/include/SSystem/SComponent/c_m3d_g_tri.h +++ b/include/SSystem/SComponent/c_m3d_g_tri.h @@ -2,6 +2,7 @@ #define C_M3D_G_TRI_H_ #include "SSystem/SComponent/c_m3d_g_pla.h" +#include "dusk/endian.h" class cM3dGCyl; @@ -23,7 +24,7 @@ public: virtual ~cM3dGTri() {} bool cross(const cM3dGCyl*, Vec*) const; void setPos(const Vec*, const Vec*, const Vec*); - void setBg(const Vec*, const Vec*, const Vec*, const cM3dGPla*); + void setBg(const BE(Vec)*, const BE(Vec)*, const BE(Vec)*, const cM3dGPla*); void set(const Vec*, const Vec*, const Vec*, const Vec*); bool Cross(cM3dGCps const& cps, cXyz* xyz) const { return cM3d_Cross_CpsTri(cps, *this, xyz); } bool Cross(cM3dGCyl const& cyl, cXyz* xyz) const { return this->cross(&cyl, xyz); } diff --git a/include/SSystem/SComponent/c_malloc.h b/include/SSystem/SComponent/c_malloc.h index bbcff9ae68..95b2d8f298 100644 --- a/include/SSystem/SComponent/c_malloc.h +++ b/include/SSystem/SComponent/c_malloc.h @@ -1,7 +1,7 @@ #ifndef C_MALLOC_H #define C_MALLOC_H -#include +#include class JKRHeap; diff --git a/include/SSystem/SComponent/c_phase.h b/include/SSystem/SComponent/c_phase.h index 8b88d2f835..81386b613f 100644 --- a/include/SSystem/SComponent/c_phase.h +++ b/include/SSystem/SComponent/c_phase.h @@ -1,7 +1,7 @@ #ifndef C_PHASE_H #define C_PHASE_H -#include +#include typedef int (*cPhs__Handler)(void*); diff --git a/include/SSystem/SComponent/c_request.h b/include/SSystem/SComponent/c_request.h index 22bca520e8..b31c0e34aa 100644 --- a/include/SSystem/SComponent/c_request.h +++ b/include/SSystem/SComponent/c_request.h @@ -1,7 +1,7 @@ #ifndef C_REQUEST_H #define C_REQUEST_H -#include +#include struct request_base_class { u8 flag0 : 1; diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h index 0a2a9df11d..bfaa035de9 100644 --- a/include/SSystem/SComponent/c_sxyz.h +++ b/include/SSystem/SComponent/c_sxyz.h @@ -1,7 +1,7 @@ #ifndef C_SXYZ_H #define C_SXYZ_H -#include +#include struct SVec { s16 x, y, z; diff --git a/include/SSystem/SComponent/c_tag.h b/include/SSystem/SComponent/c_tag.h index 9e9b4a894e..08aec1b867 100644 --- a/include/SSystem/SComponent/c_tag.h +++ b/include/SSystem/SComponent/c_tag.h @@ -2,7 +2,7 @@ #define C_TAG_H #include "SSystem/SComponent/c_node.h" -#include +#include typedef struct node_list_class node_list_class; typedef struct node_lists_tree_class node_lists_tree_class; diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h index fb4f980dcb..0bea35efe3 100644 --- a/include/SSystem/SComponent/c_xyz.h +++ b/include/SSystem/SComponent/c_xyz.h @@ -1,13 +1,18 @@ #ifndef C_XYZ_H #define C_XYZ_H -#include +#include #include #ifdef _MSVC_LANG #define M_PI 3.14159265358979323846f #endif +struct cXy { + f32 x; + f32 y; +}; + struct cXyz : Vec { static const cXyz Zero; static const cXyz BaseX; diff --git a/include/SSystem/SStandard/s_basic.h b/include/SSystem/SStandard/s_basic.h index d173a0bc77..c689c7b2aa 100644 --- a/include/SSystem/SStandard/s_basic.h +++ b/include/SSystem/SStandard/s_basic.h @@ -1,7 +1,7 @@ #ifndef S_BASIC_H #define S_BASIC_H -#include +#include void sBs_FillArea_s(void* pPtr, u32 pNumBytes, s16 pValue); void sBs_ClearArea(void* pPtr, u32 pNumBytes); diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h index 64312808a0..91158c4152 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_DISPATCH_H #define METROTRK_PORTABLE_DISPATCH_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h index 924fb5ee29..1463655447 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_MEM_TRK_H #define METROTRK_PORTABLE_MEM_TRK_H -#include +#include void* TRK_memset(void* dest, int val, size_t count); void* TRK_memcpy(void* dest, const void* src, size_t count); diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h index debc035386..76d839ff17 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_MSG_H #define METROTRK_PORTABLE_MSG_H -#include +#include typedef struct _TRK_Msg { u8 _00[8]; diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h index fe34214e6e..3597aa6d88 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_MUTEX_TRK_H #define METROTRK_PORTABLE_MUTEX_TRK_H -#include +#include u8 TRKReleaseMutex(); u8 TRKAcquireMutex(); diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/DDH_Stubs.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/DDH_Stubs.h index 93035ade09..7865b7ac11 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/DDH_Stubs.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/DDH_Stubs.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_DDH_STUBS_H #define OS_DOLPHIN_DDH_STUBS_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/GDEV_Stubs.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/GDEV_Stubs.h index 4179c1754d..f5d1416531 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/GDEV_Stubs.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/GDEV_Stubs.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_GDEV_STUBS_H #define OS_DOLPHIN_GDEV_STUBS_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h index 1c64630181..20e8c85831 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_UDP_STUBS_H #define OS_DOLPHIN_UDP_STUBS_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h index f205a32590..ca0310a953 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_DOLPHIN_TRK_GLUE_H #define OS_DOLPHIN_DOLPHIN_TRK_GLUE_H -#include +#include #include "trk.h" #ifdef __cplusplus diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h index 473eca26f5..6c105b82d6 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_TARGET_OPTIONS_H #define OS_DOLPHIN_TARGET_OPTIONS_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h index 7bccc876ee..181c262796 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h @@ -1,6 +1,6 @@ #ifndef OS_DOLPHIN_USR_PUT_H #define OS_DOLPHIN_USR_PUT_H -#include +#include #endif /* OS_DOLPHIN_USR_PUT_H */ diff --git a/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h b/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h index 3fc0ee3cb8..916a86f200 100644 --- a/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h +++ b/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h @@ -1,7 +1,7 @@ #ifndef PPC_EXPORT_TARGSUPP_H #define PPC_EXPORT_TARGSUPP_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h b/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h index 5bb30fbde1..0e4e4c0909 100644 --- a/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h +++ b/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h @@ -1,7 +1,7 @@ #ifndef UTILS_COMMON_CIRCLEBUFFER_H #define UTILS_COMMON_CIRCLEBUFFER_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h b/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h index 7c38df3192..47d7475537 100644 --- a/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h +++ b/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h @@ -1,7 +1,7 @@ #ifndef UTILS_COMMON_MWTRACE_H #define UTILS_COMMON_MWTRACE_H -#include +#include void MWTRACE(u8, char*, ...); diff --git a/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h b/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h index bf2586b403..bcfe09eddf 100644 --- a/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h +++ b/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h @@ -1,7 +1,7 @@ #ifndef UTILS_GC_MWCRITICALSECTION_GC_H #define UTILS_GC_MWCRITICALSECTION_GC_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/Z2AudioCS/Z2AudioCS.h b/include/Z2AudioCS/Z2AudioCS.h index b0788de786..7d13accabc 100644 --- a/include/Z2AudioCS/Z2AudioCS.h +++ b/include/Z2AudioCS/Z2AudioCS.h @@ -3,7 +3,7 @@ #include "Z2AudioCS/SpkTable.h" #include "Z2AudioCS/SpkSound.h" -#include +#include class JKRHeap; class JKRArchive; diff --git a/include/Z2AudioLib/Z2Calc.h b/include/Z2AudioLib/Z2Calc.h index db6e0561c8..e8eee29571 100644 --- a/include/Z2AudioLib/Z2Calc.h +++ b/include/Z2AudioLib/Z2Calc.h @@ -1,7 +1,7 @@ #ifndef Z2CALC_H #define Z2CALC_H -#include +#include #include "m_Do/m_Do_lib.h" namespace Z2Calc { diff --git a/include/Z2AudioLib/Z2Param.h b/include/Z2AudioLib/Z2Param.h index c0d2bf53c7..e6c8aac993 100644 --- a/include/Z2AudioLib/Z2Param.h +++ b/include/Z2AudioLib/Z2Param.h @@ -1,7 +1,7 @@ #ifndef Z2PARAM_H #define Z2PARAM_H -#include +#include struct Z2Param { static f32 DISTANCE_MAX; diff --git a/include/Z2AudioLib/Z2StatusMgr.h b/include/Z2AudioLib/Z2StatusMgr.h index 762772c746..88bd393361 100644 --- a/include/Z2AudioLib/Z2StatusMgr.h +++ b/include/Z2AudioLib/Z2StatusMgr.h @@ -3,7 +3,7 @@ #include #include "JSystem/JAudio2/JASGadget.h" -#include +#include struct Z2StatusMgr : public JASGlobalInstance { Z2StatusMgr(); diff --git a/include/d/actor/d_a_balloon_2D.h b/include/d/actor/d_a_balloon_2D.h index cf8a24116b..f2dfa5e99f 100644 --- a/include/d/actor/d_a_balloon_2D.h +++ b/include/d/actor/d_a_balloon_2D.h @@ -1,7 +1,7 @@ #ifndef D_A_BALLOON_2D_H #define D_A_BALLOON_2D_H -#include +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_drawlist.h" diff --git a/include/d/actor/d_a_door_bossL1.h b/include/d/actor/d_a_door_bossL1.h index 81d9f5b844..397b7d90ce 100644 --- a/include/d/actor/d_a_door_bossL1.h +++ b/include/d/actor/d_a_door_bossL1.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_BOSSL1_H #define D_A_DOOR_BOSSL1_H -#include +#include #include "f_op/f_op_actor.h" #include "d/d_bg_w.h" #include "d/d_bg_s_acch.h" diff --git a/include/d/actor/d_a_door_bossL5.h b/include/d/actor/d_a_door_bossL5.h index 11e7bf7843..832f575ac1 100644 --- a/include/d/actor/d_a_door_bossL5.h +++ b/include/d/actor/d_a_door_bossL5.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_BOSSL5_H #define D_A_DOOR_BOSSL5_H -#include +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_w.h" diff --git a/include/d/actor/d_a_door_mbossL1.h b/include/d/actor/d_a_door_mbossL1.h index ce2be23aa0..fc49529018 100644 --- a/include/d/actor/d_a_door_mbossL1.h +++ b/include/d/actor/d_a_door_mbossL1.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_MBOSSL1_H #define D_A_DOOR_MBOSSL1_H -#include +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_w.h" diff --git a/include/d/actor/d_a_door_shutter.h b/include/d/actor/d_a_door_shutter.h index 5df7c2f4af..1b32c7d357 100644 --- a/include/d/actor/d_a_door_shutter.h +++ b/include/d/actor/d_a_door_shutter.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_SHUTTER_H #define D_A_DOOR_SHUTTER_H -#include +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_w.h" diff --git a/include/d/actor/d_a_e_db_leaf.h b/include/d/actor/d_a_e_db_leaf.h index 2a19d4b01b..f783ea3596 100644 --- a/include/d/actor/d_a_e_db_leaf.h +++ b/include/d/actor/d_a_e_db_leaf.h @@ -2,7 +2,7 @@ #define D_A_E_DB_LEAF_H #include "d/d_com_inf_game.h" -#include +#include /** * @ingroup actors-enemies diff --git a/include/d/actor/d_a_e_oct_bg.h b/include/d/actor/d_a_e_oct_bg.h index 7c54d6e84b..cd5b6b27cd 100644 --- a/include/d/actor/d_a_e_oct_bg.h +++ b/include/d/actor/d_a_e_oct_bg.h @@ -1,7 +1,7 @@ #ifndef D_A_E_OCT_BG_H #define D_A_E_OCT_BG_H -#include +#include #include "f_op/f_op_actor.h" #include "d/d_bg_s_acch.h" #include "Z2AudioLib/Z2Creature.h" diff --git a/include/d/actor/d_a_fr.h b/include/d/actor/d_a_fr.h index cf44361b89..bb8da171a6 100644 --- a/include/d/actor/d_a_fr.h +++ b/include/d/actor/d_a_fr.h @@ -4,7 +4,7 @@ #include "d/d_bg_s_acch.h" #include "d/d_cc_d.h" #include "d/d_msg_flow.h" -#include +#include #include "SSystem/SComponent/c_phase.h" #include "f_op/f_op_actor_mng.h" diff --git a/include/d/actor/d_a_grass.h b/include/d/actor/d_a_grass.h index 549a067eba..4b07bea1d5 100644 --- a/include/d/actor/d_a_grass.h +++ b/include/d/actor/d_a_grass.h @@ -44,6 +44,8 @@ public: static daGrass_c* m_myObj; static dGrass_packet_c* m_grass; static dFlower_packet_c* m_flower; + + /* 0x568 */ u8 unk_0x568[0x570 - 0x568]; }; namespace daGrass_prm { diff --git a/include/d/actor/d_a_kago.h b/include/d/actor/d_a_kago.h index a84d049ad2..90de3b74bf 100644 --- a/include/d/actor/d_a_kago.h +++ b/include/d/actor/d_a_kago.h @@ -18,6 +18,20 @@ */ class daKago_c : public fopAc_ac_c { public: + enum daKago_Action_e { + ACTION_FLY_e, + ACTION_STAGGER_e, + ACTION_EVENT_e, + ACTION_PERCH_e, + ACTION_WAIT_e, + ACTION_ATTACK_e, + ACTION_EVENT2_e, + ACTION_PERCH2_e, + ACTION_LANDING_e, + ACTION_DEMO_FLY_e, + ACTION_DEMO_FLY2_e, + }; + int getBckName(int); void setBck(int, u8, f32, f32); bool checkBck(int); @@ -93,14 +107,14 @@ public: void setEvent() { mIsFlying = false; - mCurrentAction = 2; - field_0x744 = 0; + mAction = ACTION_EVENT_e; + mMode = 0; } void setEvent2() { mIsFlying = false; - mCurrentAction = 6; - field_0x744 = 0; + mAction = ACTION_EVENT2_e; + mMode = 0; } void setKagoPath(u8 i_pathNo) { @@ -110,36 +124,36 @@ public: } void onWaterFall() { - field_0x6ea = 1; + mIsWaterfall = TRUE; } bool isAttack() { - return field_0x6dd != 0; + return mIsAttack != 0; } MtxP getLegR3Mtx() { return mLegR3Mtx; } - MtxP getMidnaLocaterMtx() { return mpMorf->getModel()->getAnmMtx(4); } + MtxP getMidnaLocaterMtx() { return mAnm_p->getModel()->getAnmMtx(4); } s8 getPathDir() { return mPathDir; } u8 isFlying() { return mIsFlying; } fopAc_ac_c* getLockActor() { return mpLockActor; } void setLockActor(fopAc_ac_c* actor) { mpLockActor = actor; } void setEatYm() { field_0x6d8 |= (u8) 4; } - MtxP getMouthMtx() { return mpMorf->getModel()->getAnmMtx(7); } + MtxP getMouthMtx() { return mAnm_p->getModel()->getAnmMtx(7); } private: /* 0x568 */ request_of_phase_process_class mPhase; - /* 0x570 */ mDoExt_McaMorfSO* mpMorf; + /* 0x570 */ mDoExt_McaMorfSO* mAnm_p; /* 0x574 */ Z2CreatureEnemy mSound; /* 0x618 */ fopAc_ac_c* mpLockActor; /* 0x61C */ fpc_ProcID mBalloon2DId; /* 0x620 */ Mtx mLegR3Mtx; - /* 0x650 */ cXyz field_0x650[3]; + /* 0x650 */ cXyz mWallHitEffPos[3]; /* 0x674 */ cXyz field_0x674; /* 0x680 */ cXyz field_0x680; - /* 0x68C */ cXyz field_0x68c; - /* 0x698 */ cXyz field_0x698; + /* 0x68C */ cXyz mDemoCamCenter; + /* 0x698 */ cXyz mDemoCamEye; /* 0x6A4 */ cXyz field_0x6a4; - /* 0x6B0 */ cXyz field_0x6b0; + /* 0x6B0 */ cXyz mPrevCamEye; /* 0x6BC */ s16 field_0x6bc; /* 0x6BE */ csXyz field_0x6be; /* 0x6C4 */ f32 field_0x6c4; @@ -147,12 +161,12 @@ private: /* 0x6CA */ s16 field_0x6ca; /* 0x6CC */ f32 field_0x6cc; /* 0x6D0 */ f32 field_0x6d0; - /* 0x6D4 */ f32 field_0x6d4; + /* 0x6D4 */ f32 mDemoCamFovy; /* 0x6D8 */ u8 field_0x6d8; /* 0x6D9 */ u8 field_0x6d9; /* 0x6DA */ s16 field_0x6da; /* 0x6DC */ u8 field_0x6dc; - /* 0x6DD */ u8 field_0x6dd; + /* 0x6DD */ u8 mIsAttack; /* 0x6DE */ u8 field_0x6de; /* 0x6DF */ u8 field_0x6df; /* 0x6E0 */ u8 field_0x6e0; @@ -162,18 +176,18 @@ private: /* 0x6E4 */ u8 field_0x6e4; /* 0x6E5 */ u8 field_0x6e5; /* 0x6E6 */ u8 field_0x6e6; - /* 0x6E7 */ u8 field_0x6e7; + /* 0x6E7 */ u8 mType; /* 0x6E8 */ u8 field_0x6e8; /* 0x6E8 */ u8 field_0x6e9; - /* 0x6EA */ u8 field_0x6ea; - /* 0x6EB */ u8 field_0x6eb; + /* 0x6EA */ u8 mIsWaterfall; + /* 0x6EB */ u8 mBalloonMenuMode; /* 0x6EC */ u8 field_0x6ec[0x6ed - 0x6ec]; - /* 0x6ED */ u8 field_0x6ed; - /* 0x6F0 */ f32 field_0x6f0; - /* 0x6F4 */ f32 field_0x6f4; - /* 0x6F8 */ f32 field_0x6f8; + /* 0x6ED */ u8 unk_0x6ed; + /* 0x6F0 */ f32 mStickX; + /* 0x6F4 */ f32 mStickY; + /* 0x6F8 */ f32 mFlySpeed; /* 0x6FC */ f32 field_0x6fc; - /* 0x700 */ f32 field_0x700; + /* 0x700 */ f32 mGroundFlyHeight; /* 0x704 */ f32 mGroundHeight; /* 0x708 */ f32 mRoofHeight; /* 0x70C */ f32 field_0x70c; @@ -181,32 +195,32 @@ private: /* 0x712 */ s16 field_0x712; /* 0x714 */ s16 field_0x714; /* 0x716 */ s16 field_0x716; - /* 0x718 */ s16 field_0x718; - /* 0x71A */ s16 field_0x71a; - /* 0x71C */ s32 field_0x71c; - /* 0x720 */ s32 field_0x720; + /* 0x718 */ s16 mHeadRotZ; + /* 0x71A */ s16 mHeadRotY; + /* 0x71C */ int mWaterSplashTimer; + /* 0x720 */ int mWallHitInvulnTimer; /* 0x724 */ u8 field_0x724[0x728 - 0x724]; - /* 0x728 */ s32 field_0x728; - /* 0x72C */ s32 field_0x72c; - /* 0x730 */ s32 mDashCooldownTime; - /* 0x734 */ s32 mDashTime; - /* 0x738 */ s32 field_0x738; - /* 0x73C */ s32 field_0x73c; - /* 0x740 */ s32 mCurrentAction; - /* 0x744 */ s32 field_0x744; - /* 0x748 */ s32 field_0x748; - /* 0x74C */ s32 field_0x74c; - /* 0x750 */ s32 field_0x750; - /* 0x754 */ s32 field_0x754; - /* 0x758 */ s32 field_0x758; - /* 0x75C */ char* field_0x75c; - /* 0x760 */ char* field_0x760; - /* 0x764 */ s32 field_0x764; + /* 0x728 */ int field_0x728; + /* 0x72C */ int field_0x72c; + /* 0x730 */ int mDashCooldownTime; + /* 0x734 */ int mDashTime; + /* 0x738 */ int mGndSpecialCode; + /* 0x73C */ int mSceneType; + /* 0x740 */ int mAction; + /* 0x744 */ int mMode; + /* 0x748 */ int mDemoMode; + /* 0x74C */ int field_0x74c; + /* 0x750 */ int field_0x750; + /* 0x754 */ int field_0x754; + /* 0x758 */ int field_0x758; + /* 0x75C */ char* mArcName; + /* 0x760 */ char* mDemoName; + /* 0x764 */ u32 mShadowId; /* 0x768 */ dPath* mpPath1; /* 0x76C */ dPath* mpPath2; - /* 0x770 */ s8 mPathIdx; + /* 0x770 */ s8 mPathCurrentPointNo; /* 0x771 */ s8 field_0x771; - /* 0x772 */ s8 mPathIdxOffset; + /* 0x772 */ s8 mPathStep; /* 0x773 */ s8 mPathDir; /* 0x774 */ u8 field_0x774[0x778 - 0x774]; /* 0x778 */ dBgS_AcchCir mAcchCir; @@ -220,9 +234,9 @@ private: /* 0xB38 */ u32 field_0xb38; /* 0xB3C */ u32 field_0xb3c; /* 0xB40 */ u32 field_0xb40; - /* 0xB44 */ u32 field_0xb44[3]; - /* 0xB50 */ u32 field_0xb50; - /* 0xB54 */ u8 field_0xb54; + /* 0xB44 */ u32 mSibukiEmitterIDs[3]; + /* 0xB50 */ u32 mDashSibukiEmitterID; + /* 0xB54 */ u8 mIsHioSet; /* 0xB58 */ dMsgFlow_c mMsgFlow; }; diff --git a/include/d/actor/d_a_kytag12.h b/include/d/actor/d_a_kytag12.h index a043aafaad..73b46a0efe 100644 --- a/include/d/actor/d_a_kytag12.h +++ b/include/d/actor/d_a_kytag12.h @@ -1,7 +1,7 @@ #ifndef D_A_KYTAG12_H #define D_A_KYTAG12_H -#include +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_kytag13.h b/include/d/actor/d_a_kytag13.h index e03d9c579c..03d835e9c7 100644 --- a/include/d/actor/d_a_kytag13.h +++ b/include/d/actor/d_a_kytag13.h @@ -1,7 +1,7 @@ #ifndef D_A_KYTAG13_H #define D_A_KYTAG13_H -#include +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_movie_player.h b/include/d/actor/d_a_movie_player.h index 22f3b2b43c..e064d558dd 100644 --- a/include/d/actor/d_a_movie_player.h +++ b/include/d/actor/d_a_movie_player.h @@ -1,7 +1,7 @@ #ifndef D_A_MOVIE_PLAYER_H #define D_A_MOVIE_PLAYER_H -#include +#include #include "f_op/f_op_actor.h" #include "d/d_drawlist.h" diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index 9fc71f12e5..b453b41527 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -657,7 +657,7 @@ public: int loadRes(s8 const*, char const**); void deleteRes(s8 const*, char const**); int execute(); - int draw(BOOL, BOOL, f32, _GXColorS10*, f32, BOOL, BOOL, BOOL); + int draw(BOOL, BOOL, f32, GXColorS10*, f32, BOOL, BOOL, BOOL); void setEnvTevColor(); void setRoomNo(); int checkEndAnm(f32); diff --git a/include/d/actor/d_a_npc4.h b/include/d/actor/d_a_npc4.h index 8b82886e62..952c023889 100644 --- a/include/d/actor/d_a_npc4.h +++ b/include/d/actor/d_a_npc4.h @@ -304,7 +304,7 @@ public: initialize(); } BOOL execute(); - int draw(BOOL, BOOL, f32, _GXColorS10*, BOOL); + int draw(BOOL, BOOL, f32, GXColorS10*, BOOL); static void tgHitCallBack(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*); static void* srchAttnActor1(void*, void*); diff --git a/include/d/actor/d_a_npc_cd2.h b/include/d/actor/d_a_npc_cd2.h index 85ec30b4e2..3d2eaa87c5 100644 --- a/include/d/actor/d_a_npc_cd2.h +++ b/include/d/actor/d_a_npc_cd2.h @@ -5,7 +5,7 @@ #include "d/actor/d_a_tag_escape.h" #include "d/d_npc_lib.h" #include "d/d_path.h" -#include +#include enum { MdlMANa_e = 0, diff --git a/include/d/actor/d_a_npc_chat.h b/include/d/actor/d_a_npc_chat.h index 67814c27cc..4ec81ee4c0 100644 --- a/include/d/actor/d_a_npc_chat.h +++ b/include/d/actor/d_a_npc_chat.h @@ -60,7 +60,7 @@ public: int Delete(); int Execute(); int Draw(); - int draw(int, int, f32, _GXColorS10*, int); + int draw(int, int, f32, GXColorS10*, int); int ctrlJoint(J3DJoint*, J3DModel*); static int createHeapCallBack(fopAc_ac_c*); static int ctrlJointCallBack(J3DJoint*, int); diff --git a/include/d/actor/d_a_npc_toby.h b/include/d/actor/d_a_npc_toby.h index 2168d28947..0c3de69c6f 100644 --- a/include/d/actor/d_a_npc_toby.h +++ b/include/d/actor/d_a_npc_toby.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_TOBY_H #define D_A_NPC_TOBY_H -#include +#include #include "d/actor/d_a_npc.h" struct daNpc_Toby_HIOParam { diff --git a/include/d/actor/d_a_npc_zrz.h b/include/d/actor/d_a_npc_zrz.h index 55a9159945..4201047ed7 100644 --- a/include/d/actor/d_a_npc_zrz.h +++ b/include/d/actor/d_a_npc_zrz.h @@ -62,7 +62,7 @@ public: int Delete(); int Execute(); int Draw(); - int draw(BOOL, BOOL, f32, _GXColorS10*, BOOL); + int draw(BOOL, BOOL, f32, GXColorS10*, BOOL); int ctrlJoint(J3DJoint*, J3DModel*); static int createHeapCallBack(fopAc_ac_c*); static int ctrlJointCallBack(J3DJoint*, int); diff --git a/include/d/actor/d_a_obj_avalanche.h b/include/d/actor/d_a_obj_avalanche.h index 18912da8f7..89de60d2e8 100644 --- a/include/d/actor/d_a_obj_avalanche.h +++ b/include/d/actor/d_a_obj_avalanche.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_AVALANCHE_H #define D_A_OBJ_AVALANCHE_H -#include +#include #include "d/d_bg_s_movebg_actor.h" #include "f_op/f_op_actor_mng.h" diff --git a/include/d/actor/d_a_obj_bed.h b/include/d/actor/d_a_obj_bed.h index 0997e25353..68919a8461 100644 --- a/include/d/actor/d_a_obj_bed.h +++ b/include/d/actor/d_a_obj_bed.h @@ -4,7 +4,7 @@ #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_s_acch.h" #include "f_op/f_op_actor.h" -#include +#include class dBgW; diff --git a/include/d/actor/d_a_obj_bmWindow.h b/include/d/actor/d_a_obj_bmWindow.h index fd04b16ccb..85b5ab8f86 100644 --- a/include/d/actor/d_a_obj_bmWindow.h +++ b/include/d/actor/d_a_obj_bmWindow.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BMWINDOW_H #define D_A_OBJ_BMWINDOW_H -#include +#include #include "d/d_bg_s_movebg_actor.h" #include "d/d_cc_d.h" #include "f_op/f_op_actor_mng.h" diff --git a/include/d/actor/d_a_obj_hata.h b/include/d/actor/d_a_obj_hata.h index e0763a9c75..db42f9d42d 100644 --- a/include/d/actor/d_a_obj_hata.h +++ b/include/d/actor/d_a_obj_hata.h @@ -2,7 +2,7 @@ #define D_A_OBJ_HATA_H #include "SSystem/SComponent/c_phase.h" -#include +#include #include "f_op/f_op_actor.h" /** diff --git a/include/d/actor/d_a_obj_kamakiri.h b/include/d/actor/d_a_obj_kamakiri.h index 9f2a2ff790..15e3db5d9e 100644 --- a/include/d/actor/d_a_obj_kamakiri.h +++ b/include/d/actor/d_a_obj_kamakiri.h @@ -47,7 +47,7 @@ public: mpBrkAnm->entry(model->getModelData()); mpMorfSO->entryDL(); if (field_0x9c0 == 0) { - _GXTexObj* texObj = dDlst_shadowControl_c::getSimpleTex(); + GXTexObj* texObj = dDlst_shadowControl_c::getSimpleTex(); dComIfGd_setSimpleShadow(¤t.pos, mObjAcch.GetGroundH(), 15.0f, mObjAcch.m_gnd, 0, -0.6f, texObj); } } diff --git a/include/d/actor/d_a_obj_stopper.h b/include/d/actor/d_a_obj_stopper.h index 562d5a87ca..9a100c754b 100644 --- a/include/d/actor/d_a_obj_stopper.h +++ b/include/d/actor/d_a_obj_stopper.h @@ -5,7 +5,7 @@ #include "d/d_bg_s_movebg_actor.h" #include "d/d_cc_d.h" #include "d/d_particle.h" -#include +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_path_line.h b/include/d/actor/d_a_path_line.h index a03c5445e7..9cf086adaf 100644 --- a/include/d/actor/d_a_path_line.h +++ b/include/d/actor/d_a_path_line.h @@ -1,6 +1,6 @@ #ifndef D_A_PATH_LINE_H #define D_A_PATH_LINE_H -#include +#include #endif /* D_A_PATH_LINE_H */ diff --git a/include/d/actor/d_a_peru.h b/include/d/actor/d_a_peru.h index 583f7c62d0..df9f494936 100644 --- a/include/d/actor/d_a_peru.h +++ b/include/d/actor/d_a_peru.h @@ -2,7 +2,7 @@ #define D_A_PERU_H #include "d/actor/d_a_tag_evtarea.h" -#include +#include #include "d/actor/d_a_npc.h" #include "SSystem/SComponent/c_counter.h" diff --git a/include/d/actor/d_a_ppolamp.h b/include/d/actor/d_a_ppolamp.h index f6a6da2e66..f1e1a9f26d 100644 --- a/include/d/actor/d_a_ppolamp.h +++ b/include/d/actor/d_a_ppolamp.h @@ -1,7 +1,7 @@ #ifndef D_A_PPOLAMP_H #define D_A_PPOLAMP_H -#include +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_spinner.h b/include/d/actor/d_a_spinner.h index dd5b098e57..1dac4594a3 100644 --- a/include/d/actor/d_a_spinner.h +++ b/include/d/actor/d_a_spinner.h @@ -35,7 +35,7 @@ public: void setWallHit(s16, u32); void setAnm(); int setNextPathNum(); - Vec* getPathNextPos(); + BE(Vec)* getPathNextPos(); int checkLineWallHit(cXyz*, cXyz*); int checkPathMove(); void setSpreadEffect(); diff --git a/include/d/actor/d_a_tag_kmsg.h b/include/d/actor/d_a_tag_kmsg.h index 2875ca3210..92cd33f35b 100644 --- a/include/d/actor/d_a_tag_kmsg.h +++ b/include/d/actor/d_a_tag_kmsg.h @@ -1,7 +1,7 @@ #ifndef D_A_TAG_KMSG_H #define D_A_TAG_KMSG_H -#include +#include #include "f_op/f_op_actor.h" #include "f_op/f_op_actor_mng.h" #include "d/d_msg_flow.h" diff --git a/include/d/d_bg_pc.h b/include/d/d_bg_pc.h index 949c38e609..f82eb92ee7 100644 --- a/include/d/d_bg_pc.h +++ b/include/d/d_bg_pc.h @@ -1,14 +1,14 @@ #ifndef D_BG_D_BG_PC_H #define D_BG_D_BG_PC_H -#include +#include struct sBgPc { - /* 0x00 */ u32 code0; - /* 0x04 */ u32 code1; - /* 0x08 */ u32 code2; - /* 0x0C */ u32 code3; - /* 0x10 */ u32 code4; + /* 0x00 */ BE(u32) code0; + /* 0x04 */ BE(u32) code1; + /* 0x08 */ BE(u32) code2; + /* 0x0C */ BE(u32) code3; + /* 0x10 */ BE(u32) code4; }; // Size: 0x14 #define BGPC_GET_BITS(code, shift, bits) \ diff --git a/include/d/d_bg_plc.h b/include/d/d_bg_plc.h index d2fa3271ae..da360fd0e4 100644 --- a/include/d/d_bg_plc.h +++ b/include/d/d_bg_plc.h @@ -4,9 +4,9 @@ #include "d/d_bg_pc.h" struct sBgPlc { - /* 0x0 */ u32 magic; // "SPLC" - /* 0x4 */ u16 m_code_size; // Should normally always be 0x14 - /* 0x6 */ u16 m_num; // Number of sBgPc entries to follow + /* 0x0 */ BE(u32) magic; // "SPLC" + /* 0x4 */ BE(u16) m_code_size; // Should normally always be 0x14 + /* 0x6 */ BE(u16) m_num; // Number of sBgPc entries to follow /* 0x8 */ sBgPc m_code[0]; // m_num size array }; diff --git a/include/d/d_bg_s.h b/include/d/d_bg_s.h index c0804bd07c..315a7be614 100644 --- a/include/d/d_bg_s.h +++ b/include/d/d_bg_s.h @@ -3,7 +3,7 @@ #include "d/d_bg_w_base.h" #include "JSystem/JHostIO/JORReflexible.h" -#include +#include #include "global.h" class dBgW; @@ -195,6 +195,8 @@ public: void ChkDeleteActorRegist(fopAc_ac_c*); + void Draw(); + #if DEBUG /* 0x1404 */ u8 field_0x1404[0x1408 - 0x1404]; /* 0x1408 */ dBgS_HIO m_hio; diff --git a/include/d/d_bg_s_cap_poly.h b/include/d/d_bg_s_cap_poly.h index ca4a38542c..0cda04c739 100644 --- a/include/d/d_bg_s_cap_poly.h +++ b/include/d/d_bg_s_cap_poly.h @@ -4,7 +4,7 @@ #include "d/d_bg_s_chk.h" #include "SSystem/SComponent/c_m3d_g_aab.h" -class dBgS_CaptPoly; +struct dBgS_CaptPoly; typedef void (*CaptPolyCallback)(dBgS_CaptPoly&, cBgD_Vtx_t*, u16, u16, u16, cM3dGPla*); diff --git a/include/d/d_bg_w.h b/include/d/d_bg_w.h index bf65baccdf..2b24bf12c8 100644 --- a/include/d/d_bg_w.h +++ b/include/d/d_bg_w.h @@ -4,14 +4,17 @@ #include "SSystem/SComponent/c_m3d_g_aab.h" #include "SSystem/SComponent/c_sxyz.h" #include "d/d_bg_w_base.h" -#include -#include +#include +#include +#include "dusk/offset_ptr.h" +#include "dusk/endian.h" +#include "dusk/endian_ssystem.h" class cBgS_GrpPassChk; class cBgS_PolyPassChk; class fopAc_ac_c; struct cBgD_Vtx_t; -class dBgS_CaptPoly; +struct dBgS_CaptPoly; class cBgW_TriElm { public: @@ -54,58 +57,58 @@ struct cBgW_BlkElm { }; // Size: 0x6 struct cBgD_Tri_t { - /* 0x0 */ u16 m_vtx_idx0; - /* 0x2 */ u16 m_vtx_idx1; - /* 0x4 */ u16 m_vtx_idx2; - /* 0x6 */ u16 m_id; - /* 0x8 */ u16 m_grp; + /* 0x0 */ BE(u16) m_vtx_idx0; + /* 0x2 */ BE(u16) m_vtx_idx1; + /* 0x4 */ BE(u16) m_vtx_idx2; + /* 0x6 */ BE(u16) m_id; + /* 0x8 */ BE(u16) m_grp; }; // Size: 0xA struct cBgD_Ti_t { - /* 0x0 */ u32 m_info0; - /* 0x4 */ u32 m_info1; - /* 0x8 */ u32 m_info2; - /* 0xC */ u32 m_passFlag; + /* 0x0 */ BE(u32) m_info0; + /* 0x4 */ BE(u32) m_info1; + /* 0x8 */ BE(u32) m_info2; + /* 0xC */ BE(u32) m_passFlag; }; struct cBgD_Blk_t { - /* 0x0 */ u16 field_0x0; + /* 0x0 */ BE(u16) field_0x0; }; struct cBgD_Tree_t { - /* 0x0 */ u16 m_flag; - /* 0x2 */ u16 m_parent_id; - /* 0x4 */ u16 m_id[8]; + /* 0x0 */ BE(u16) m_flag; + /* 0x2 */ BE(u16) m_parent_id; + /* 0x4 */ BE(u16) m_id[8]; }; // Size: 0x14 struct cBgD_Grp_t { - /* 0x00 */ char* m_name; - /* 0x04 */ cXyz m_scale; - /* 0x10 */ csXyz m_rotation; - /* 0x18 */ cXyz m_translation; - /* 0x24 */ u16 m_parent; - /* 0x26 */ u16 m_next_sibling; - /* 0x28 */ u16 m_first_child; - /* 0x2A */ u16 m_room_id; - /* 0x2C */ u16 m_first_vtx_idx; - /* 0x2E */ u16 m_tree_idx; - /* 0x30 */ u32 m_info; + /* 0x00 */ OFFSET_PTR(char) m_name; + /* 0x04 */ BE(cXyz) m_scale; + /* 0x10 */ BE(csXyz) m_rotation; + /* 0x18 */ BE(cXyz) m_translation; + /* 0x24 */ BE(u16) m_parent; + /* 0x26 */ BE(u16) m_next_sibling; + /* 0x28 */ BE(u16) m_first_child; + /* 0x2A */ BE(u16) m_room_id; + /* 0x2C */ BE(u16) m_first_vtx_idx; + /* 0x2E */ BE(u16) m_tree_idx; + /* 0x30 */ BE(u32) m_info; }; // Size: 0x34 struct cBgD_t { - /* 0x00 */ int m_v_num; // vertex num - /* 0x04 */ cBgD_Vtx_t* m_v_tbl; // vertex table - /* 0x08 */ int m_t_num; // triangle num - /* 0x0C */ cBgD_Tri_t* m_t_tbl; // triangle table - /* 0x10 */ int m_b_num; - /* 0x14 */ cBgD_Blk_t* m_b_tbl; - /* 0x18 */ int m_tree_num; - /* 0x1C */ cBgD_Tree_t* m_tree_tbl; - /* 0x20 */ int m_g_num; - /* 0x24 */ cBgD_Grp_t* m_g_tbl; - /* 0x28 */ int m_ti_num; - /* 0x2C */ cBgD_Ti_t* m_ti_tbl; - /* 0x30 */ int mFlags; + /* 0x00 */ BE(int) m_v_num; // vertex num + /* 0x04 */ OFFSET_PTR(cBgD_Vtx_t) m_v_tbl; // vertex table + /* 0x08 */ BE(int) m_t_num; // triangle num + /* 0x0C */ OFFSET_PTR(cBgD_Tri_t) m_t_tbl; // triangle table + /* 0x10 */ BE(int) m_b_num; + /* 0x14 */ OFFSET_PTR(cBgD_Blk_t) m_b_tbl; + /* 0x18 */ BE(int) m_tree_num; + /* 0x1C */ OFFSET_PTR(cBgD_Tree_t) m_tree_tbl; + /* 0x20 */ BE(int) m_g_num; + /* 0x24 */ OFFSET_PTR(cBgD_Grp_t) m_g_tbl; + /* 0x28 */ BE(int) m_ti_num; + /* 0x2C */ OFFSET_PTR(cBgD_Ti_t) m_ti_tbl; + /* 0x30 */ BE(int) mFlags; }; class cBgW : public dBgW_Base { diff --git a/include/d/d_bg_w_base.h b/include/d/d_bg_w_base.h index 089af244b8..762d3bb707 100644 --- a/include/d/d_bg_w_base.h +++ b/include/d/d_bg_w_base.h @@ -4,14 +4,14 @@ #include "SSystem/SComponent/c_bg_s_poly_info.h" #include "SSystem/SComponent/c_bg_w.h" #include "SSystem/SComponent/c_m3d_g_pla.h" -#include +#include #include "f_pc/f_pc_base.h" class cBgS_GndChk; class cBgS_LinChk; class cBgS_ShdwDraw; class dBgS_Acch; -class dBgS_CaptPoly; +struct dBgS_CaptPoly; class dBgS_RoofChk; class dBgS_SphChk; class dBgS_SplGrpChk; diff --git a/include/d/d_bg_w_kcol.h b/include/d/d_bg_w_kcol.h index 7bb96ccbd4..1fc812dd98 100644 --- a/include/d/d_bg_w_kcol.h +++ b/include/d/d_bg_w_kcol.h @@ -6,27 +6,28 @@ #include "d/d_bg_plc.h" #include "d/d_bg_s_sph_chk.h" #include "d/d_bg_w_base.h" +#include "dusk/offset_ptr.h" class cBgS_GrpPassChk; class cBgS_PolyPassChk; class dBgPc; -class dBgS_CaptPoly; +struct dBgS_CaptPoly; struct KC_PrismData { - /* 0x0 */ f32 height; - /* 0x4 */ u16 pos_i; - /* 0x6 */ u16 fnrm_i; - /* 0x8 */ u16 enrm1_i; - /* 0xA */ u16 enrm2_i; - /* 0xC */ u16 enrm3_i; - /* 0xE */ u16 attribute; + /* 0x0 */ BE(f32) height; + /* 0x4 */ BE(u16) pos_i; + /* 0x6 */ BE(u16) fnrm_i; + /* 0x8 */ BE(u16) enrm1_i; + /* 0xA */ BE(u16) enrm2_i; + /* 0xC */ BE(u16) enrm3_i; + /* 0xE */ BE(u16) attribute; }; // Size: 0x10 struct KC_Header { - /* 0x00 */ Vec* m_pos_data; - /* 0x04 */ Vec* m_nrm_data; - /* 0x08 */ KC_PrismData* m_prism_data; - /* 0x0C */ KC_PrismData* m_block_data; + /* 0x00 */ OFFSET_PTR(Vec) m_pos_data; + /* 0x04 */ OFFSET_PTR(Vec) m_nrm_data; + /* 0x08 */ OFFSET_PTR(KC_PrismData) m_prism_data; + /* 0x0C */ OFFSET_PTR(BE(u32)) m_block_data; /* 0x10 */ f32 m_prism_thickness; /* 0x14 */ Vec m_area_min_pos; /* 0x20 */ u32 m_area_x_width_mask; diff --git a/include/d/d_camera.h b/include/d/d_camera.h index c49cce155e..f7a7132538 100644 --- a/include/d/d_camera.h +++ b/include/d/d_camera.h @@ -1367,8 +1367,7 @@ public: /* 0x970 */ dCamSetup_c mCamSetup; /* 0xAEC */ dCamParam_c mCamParam; /* 0xB0C */ u8 field_0xb0c; - /* 0xB0D */ u8 field_0xb0d[0xd58 - 0xb0d]; -}; // Size: 0xD58 +}; // Size: 0xB10 dCamera_c* dCam_getBody(); camera_class* dCam_getCamera(); diff --git a/include/d/d_cc_uty.h b/include/d/d_cc_uty.h index bc58f99dc8..d070512cc1 100644 --- a/include/d/d_cc_uty.h +++ b/include/d/d_cc_uty.h @@ -2,7 +2,7 @@ #define D_CC_D_CC_UTY_H #include "SSystem/SComponent/c_sxyz.h" -#include +#include class cCcD_Obj; class fopAc_ac_c; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index 098749397d..8b2ef8c007 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -952,7 +952,7 @@ public: dComIfG_inf_c() { this->ct(); } ~dComIfG_inf_c() {} void ct(); - void createBaseCsr(); + static void createBaseCsr(); #if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG class baseCsr_c : public mDoGph_gInf_c::csr_c { @@ -1022,7 +1022,9 @@ public: /* 0x1DE09 */ u8 field_0x1de09; /* 0x1DE0A */ u8 field_0x1de0a; /* 0x1DE0B */ u8 mIsDebugMode; - /* 0x1DE0C */ u8 field_0x1de0c; + #if DEBUG + /* 0x1DE0C */ OSStopwatch mStopwatch; + #endif static __d_timer_info_c dComIfG_mTimerInfo; #if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG @@ -1235,12 +1237,13 @@ int dComIfG_TimerEnd(int i_mode, int param_1); int dComIfG_TimerDeleteCheck(int); int dComIfG_TimerDeleteRequest(int i_mode); int dComLbG_PhaseHandler(request_of_phase_process_class*, request_of_phase_process_fn*, void*); +BOOL dComIfG_isSceneResetButton(); int dComIfGd_setSimpleShadow(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyInfo& param_3, s16 i_angle, - f32 param_5, _GXTexObj* i_tex); + f32 param_5, GXTexObj* i_tex); int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3, f32 param_4, f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8, - dKy_tevstr_c* param_9, s16 param_10, f32 param_11, _GXTexObj* param_12); + dKy_tevstr_c* param_9, s16 param_10, f32 param_11, GXTexObj* param_12); inline dSv_info_c* dComIfGs_getSaveInfo() { return &g_dComIfG_gameInfo.info; @@ -3192,8 +3195,8 @@ inline JPABaseEmitter* dComIfGp_particle_setPolyColor(u16 param_1, cBgS_PolyInfo param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8, param_9, param_10); } -inline void dComIfGp_particle_setSimple(u16 param_0, cXyz* i_pos, u8 param_2, _GXColor& param_3, - _GXColor& param_4, int param_5, float param_6) { +inline void dComIfGp_particle_setSimple(u16 param_0, cXyz* i_pos, u8 param_2, GXColor& param_3, + GXColor& param_4, int param_5, float param_6) { g_dComIfG_gameInfo.play.getParticle()->setSimple(param_0, i_pos, 0, param_2, param_3, param_4, param_5, param_6); } @@ -3323,6 +3326,22 @@ inline JPABaseEmitter* dComIfGp_particle_setColor(u16 param_0, const cXyz* i_pos NULL, NULL, NULL, -1, NULL); } +inline u32 dComIfGp_particle_getHeapSize() { + return g_dComIfG_gameInfo.play.getParticle()->getHeapSize(); +} + +inline u32 dComIfGp_particle_getSceneHeapSize() { + return g_dComIfG_gameInfo.play.getParticle()->getSceneHeapSize(); +} + +inline int dComIfGp_particle_getEmitterNum() { + return g_dComIfG_gameInfo.play.getParticle()->getEmitterNum(); +} + +inline int dComIfGp_particle_getParticleNum() { + return g_dComIfG_gameInfo.play.getParticle()->getParticleNum(); +} + inline dSmplMdl_draw_c* dComIfGp_getSimpleModel() { return g_dComIfG_gameInfo.play.getSimpleModel(); } @@ -4430,6 +4449,28 @@ inline u32 dComIfG_getTrigB(u32 i_padNo) { return mDoCPd_c::getTrig(i_padNo) & PAD_BUTTON_B; } +inline u32 dComIfG_getObjectAllSize() { + return g_dComIfG_gameInfo.mResControl.getObjectAllSize(); +} + +inline u32 dComIfG_getStageAllSize() { + return g_dComIfG_gameInfo.mResControl.getStageAllSize(); +} + +inline u32 dComIfG_getObjectSize(const char* i_arcName) { + return g_dComIfG_gameInfo.mResControl.getObjectSize(i_arcName); +} + +inline u32 dComIfG_getStageSize(const char* i_arcName) { + return g_dComIfG_gameInfo.mResControl.getStageSize(i_arcName); +} + +#if DEBUG +inline void dComIfG_initStopwatch() { + OSInitStopwatch(&g_dComIfG_gameInfo.mStopwatch, "dComIfG"); +} +#endif + inline int dComIfGd_setRealShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3, f32 param_4, f32 param_5, dKy_tevstr_c* param_6) { return g_dComIfG_gameInfo.drawlist.setRealShadow(param_0, param_1, param_2, param_3, param_4, @@ -4437,7 +4478,7 @@ inline int dComIfGd_setRealShadow(u32 param_0, s8 param_1, J3DModel* param_2, cX } inline int dComIfGd_setSimpleShadow(cXyz* pos, f32 param_1, f32 param_2, cXyz* param_3, s16 angle, - f32 param_5, _GXTexObj* tex) { + f32 param_5, GXTexObj* tex) { return g_dComIfG_gameInfo.drawlist.setSimpleShadow(pos, param_1, param_2, param_3, angle, param_5, tex); } diff --git a/include/d/d_debug_viewer.h b/include/d/d_debug_viewer.h index f535207a3a..dc72f972d8 100644 --- a/include/d/d_debug_viewer.h +++ b/include/d/d_debug_viewer.h @@ -1,7 +1,7 @@ #ifndef D_DEBUG_VIEWER_H #define D_DEBUG_VIEWER_H -#include +#include #include "SSystem/SComponent/c_xyz.h" #include "SSystem/SComponent/c_sxyz.h" diff --git a/include/d/d_demo.h b/include/d/d_demo.h index 73c6f24e42..9b9d2325ac 100644 --- a/include/d/d_demo.h +++ b/include/d/d_demo.h @@ -28,13 +28,17 @@ public: JStage::TObject* appendActor(fopAc_ac_c*); dDemo_actor_c* getActor(u8); dDemo_camera_c* createCamera(); +#if DEBUG dDemo_camera_c* createEditorCamera(); +#endif dDemo_camera_c* getActiveCamera(); JStage::TObject* createAmbient(); JStage::TObject* appendLight(); JStage::TObject* createFog(); void remove(); +#if DEBUG void removeEditorCamera(); +#endif dDemo_camera_c* getCamera() { return mpCamera; } @@ -387,6 +391,7 @@ public: static s16 getBranchId() { return m_branchId; } static u16 getBranchNum() { return m_branchNum; } static jmessage_tControl* getMesgControl() { return m_mesgControl; } + static dDemo_system_c* getSystem() { return m_system; } static void setBranchNum(u16 num) { m_branchNum = num; diff --git a/include/d/d_door_param2.h b/include/d/d_door_param2.h index ffb6f9a9c2..2b98243b56 100644 --- a/include/d/d_door_param2.h +++ b/include/d/d_door_param2.h @@ -1,7 +1,7 @@ #ifndef D_D_DOOR_PARAM2_H #define D_D_DOOR_PARAM2_H -#include +#include class fopAc_ac_c; diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index c287b16ce9..e5d1da07a8 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -95,7 +95,7 @@ public: class dDlst_effectLine_c : public dDlst_base_c { public: virtual void draw(); - void update(cXyz&, _GXColor&, u16, u16, u16, u16, f32, f32, f32, f32); + void update(cXyz&, GXColor&, u16, u16, u16, u16, f32, f32, f32, f32); f32 getRndValue(f32 param_0, f32 param_1) { return mRnd.getValue(param_0, param_1); } f32 getRndFX(f32 param_0) { return mRnd.getFX(param_0); } @@ -199,11 +199,11 @@ public: class dDlst_shadowSimple_c { public: void draw(); - void set(cXyz*, f32, f32, cXyz*, s16, f32, _GXTexObj*); + void set(cXyz*, f32, f32, cXyz*, s16, f32, GXTexObj*); dDlst_shadowSimple_c(); /* 0x00 */ u8 mAlpha; - /* 0x04 */ _GXTexObj* mpTexObj; + /* 0x04 */ GXTexObj* mpTexObj; /* 0x08 */ Mtx mVolumeMtx; /* 0x38 */ Mtx mMtx; }; // Size: 0x68 @@ -289,7 +289,7 @@ public: void draw(f32 (*)[4]); int setReal(u32, s8, J3DModel*, cXyz*, f32, f32, dKy_tevstr_c*); bool addReal(u32, J3DModel*); - int setSimple(cXyz*, f32, f32, cXyz*, s16, f32, _GXTexObj*); + int setSimple(cXyz*, f32, f32, cXyz*, s16, f32, GXTexObj*); static void setSimpleTex(ResTIMG const*); static GXTexObj* getSimpleTex() { return &mSimpleTexObj; } @@ -305,7 +305,7 @@ private: /* 0x0000C */ dDlst_shadowSimple_c mSimple[128]; /* 0x0340C */ int mNextID; /* 0x03410 */ dDlst_shadowReal_c mReal[8]; - /* 0x15EB0 */ _GXTexObj field_0x15eb0[2]; + /* 0x15EB0 */ GXTexObj field_0x15eb0[2]; /* 0x15EF0 */ void* field_0x15ef0[2]; }; @@ -442,7 +442,7 @@ public: } int setSimpleShadow(cXyz* param_0, f32 param_1, f32 param_2, cXyz* param_3, s16 param_4, - f32 param_5, _GXTexObj* param_6) { + f32 param_5, GXTexObj* param_6) { return mShadowControl.setSimple(param_0, param_1, param_2, param_3, param_4, param_5, param_6); } diff --git a/include/d/d_event_data.h b/include/d/d_event_data.h index 22a835ec24..f42e16b7a7 100644 --- a/include/d/d_event_data.h +++ b/include/d/d_event_data.h @@ -3,24 +3,25 @@ #include "global.h" #include "f_pc/f_pc_base.h" +#include "dusk/endian.h" struct msg_class; struct event_binary_data_header { - /* 0x00 */ u32 eventTop; // offset to Event chunk - /* 0x04 */ s32 eventNum; - /* 0x08 */ u32 staffTop; // offset to Staff chunk - /* 0x0C */ s32 staffNum; - /* 0x10 */ u32 cutTop; // offset to Cut chunk - /* 0x14 */ s32 cutNum; - /* 0x18 */ u32 dataTop; // offset to Data chunk - /* 0x1C */ s32 dataNum; - /* 0x20 */ u32 fDataTop; // offset to FData chunk - /* 0x24 */ s32 fDataNum; - /* 0x28 */ u32 iDataTop; // offset to IData chunk - /* 0x2C */ s32 iDataNum; - /* 0x30 */ u32 sDataTop; // offset to SData chunk - /* 0x34 */ s32 sDataNum; + /* 0x00 */ BE(u32) eventTop; // offset to Event chunk + /* 0x04 */ BE(s32) eventNum; + /* 0x08 */ BE(u32) staffTop; // offset to Staff chunk + /* 0x0C */ BE(s32) staffNum; + /* 0x10 */ BE(u32) cutTop; // offset to Cut chunk + /* 0x14 */ BE(s32) cutNum; + /* 0x18 */ BE(u32) dataTop; // offset to Data chunk + /* 0x1C */ BE(s32) dataNum; + /* 0x20 */ BE(u32) fDataTop; // offset to FData chunk + /* 0x24 */ BE(s32) fDataNum; + /* 0x28 */ BE(u32) iDataTop; // offset to IData chunk + /* 0x2C */ BE(s32) iDataNum; + /* 0x30 */ BE(u32) sDataTop; // offset to SData chunk + /* 0x34 */ BE(s32) sDataNum; /* 0x38 */ u8 unk[8]; }; // Size: 0x40 @@ -45,11 +46,11 @@ public: char* getName() { return mName; } /* 0x00 */ char mName[32]; - /* 0x20 */ u32 mIndex; - /* 0x24 */ int mType; - /* 0x28 */ int mDataIndex; - /* 0x2C */ int mNumber; - /* 0x30 */ int mNext; + /* 0x20 */ BE(u32) mIndex; + /* 0x24 */ BE(int) mType; + /* 0x28 */ BE(int) mDataIndex; + /* 0x2C */ BE(int) mNumber; + /* 0x30 */ BE(int) mNext; /* 0x34 */ u8 field_0x34[12]; }; // Size: 0x40 @@ -79,12 +80,12 @@ public: u32 getTagId() { return mTagID; } /* 0x00 */ char mName[32]; - /* 0x20 */ u32 mTagID; - /* 0x24 */ u32 mIndex; - /* 0x28 */ int mFlags[3]; - /* 0x34 */ u32 mFlagId; - /* 0x38 */ int mDataTop; - /* 0x3C */ int mNext; + /* 0x20 */ BE(u32) mTagID; + /* 0x24 */ BE(u32) mIndex; + /* 0x28 */ BE(int) mFlags[3]; + /* 0x34 */ BE(u32) mFlagId; + /* 0x38 */ BE(int) mDataTop; + /* 0x3C */ BE(int) mNext; /* 0x40 */ u8 field_0x40[0x10]; }; // Size: 0x50 @@ -136,26 +137,26 @@ public: }; struct MessageData { - s16 unk; + BE(s16) unk; }; struct SoundData { - s16 unk; - s16 timer; + BE(s16) unk; + BE(s16) timer; }; struct TimerKeeperData { - s32 timer; + BE(s32) timer; }; struct DirectorData { - s16 unk; - s16 unk2; + BE(s16) unk; + BE(s16) unk2; }; struct EffectData { u8 pad[8]; - s32 unk; + BE(s32) unk; }; void specialProc_WaitStart(int index); @@ -180,16 +181,16 @@ public: // private: /* 0x00 */ char mName[8]; - /* 0x08 */ u8 mWork[0x18]; - /* 0x20 */ s32 mTagID; - /* 0x24 */ u32 mIndex; - /* 0x28 */ u32 mFlagID; - /* 0x2C */ int mType; - /* 0x30 */ int mStartCut; - /* 0x34 */ s16 field_0x34; - /* 0x36 */ s16 mWaitTimer; - /* 0x38 */ int mCurrentCut; - /* 0x3C */ s32 field_0x3c; + /* 0x08 */ u8 mWork[0x18]; // PROBLEM: this buffer is now too small for StaffWork to fit in + /* 0x20 */ BE(s32) mTagID; + /* 0x24 */ BE(u32) mIndex; + /* 0x28 */ BE(u32) mFlagID; + /* 0x2C */ BE(int) mType; + /* 0x30 */ BE(int) mStartCut; + /* 0x34 */ BE(s16) field_0x34; + /* 0x36 */ BE(s16) mWaitTimer; + /* 0x38 */ BE(int) mCurrentCut; + /* 0x3C */ BE(s32) field_0x3c; /* 0x40 */ bool field_0x40; /* 0x41 */ bool field_0x41; /* 0x42 */ u8 mData[0x50 - 0x42]; @@ -223,21 +224,21 @@ public: int getPriority() { return mPriority; } /* 0x00 */ char mName[32]; - /* 0x20 */ u32 mIndex; - /* 0x24 */ int field_0x24; - /* 0x28 */ int mPriority; - /* 0x2C */ int mStaff[20]; - /* 0x7C */ int mNStaff; - /* 0x80 */ int field_0x80; - /* 0x84 */ int field_0x84; - /* 0x88 */ int mFlags[3]; + /* 0x20 */ BE(u32) mIndex; + /* 0x24 */ BE(int) field_0x24; + /* 0x28 */ BE(int) mPriority; + /* 0x2C */ BE(int) mStaff[20]; + /* 0x7C */ BE(int) mNStaff; + /* 0x80 */ BE(int) field_0x80; + /* 0x84 */ BE(int) field_0x84; + /* 0x88 */ BE(int) mFlags[3]; /* 0x94 */ bool mPlaySound; - /* 0x96 */ s16 field_0x96; - /* 0x98 */ f32 field_0x98; - /* 0x9C */ f32 field_0x9c; - /* 0xA0 */ f32 field_0xa0; - /* 0xA4 */ int mEventState; - /* 0xA8 */ int field_0xa8; + /* 0x96 */ BE(s16) field_0x96; + /* 0x98 */ BE(f32) field_0x98; + /* 0x9C */ BE(f32) field_0x9c; + /* 0xA0 */ BE(f32) field_0xa0; + /* 0xA4 */ BE(int) mEventState; + /* 0xA8 */ BE(int) field_0xa8; /* 0xAC */ u8 field_0xac[4]; }; // Size: 0xB0 diff --git a/include/d/d_event_lib.h b/include/d/d_event_lib.h index 7220534f5c..b0ee88a6f3 100644 --- a/include/d/d_event_lib.h +++ b/include/d/d_event_lib.h @@ -1,7 +1,7 @@ #ifndef D_EVENT_D_EVENT_LIB_H #define D_EVENT_D_EVENT_LIB_H -#include +#include class fopAc_ac_c; diff --git a/include/d/d_eye_hl.h b/include/d/d_eye_hl.h index d174387806..e7a4d82d3c 100644 --- a/include/d/d_eye_hl.h +++ b/include/d/d_eye_hl.h @@ -1,7 +1,7 @@ #ifndef D_D_EYE_HL_H #define D_D_EYE_HL_H -#include +#include class J3DModelData; struct ResTIMG; @@ -13,6 +13,10 @@ public: static void entry(dEyeHL_c*); static void remove(dEyeHL_c*); + static void create() { + JUT_ASSERT(51, m_obj == NULL); + } + static dEyeHL_c* m_obj; }; diff --git a/include/d/d_item.h b/include/d/d_item.h index 8b988ce10c..0d379c0578 100644 --- a/include/d/d_item.h +++ b/include/d/d_item.h @@ -1,7 +1,7 @@ #ifndef D_D_ITEM_H #define D_D_ITEM_H -#include +#include class dEnemyItem_c { public: diff --git a/include/d/d_item_data.h b/include/d/d_item_data.h index 00fb9e5b9b..a7e658c1a3 100644 --- a/include/d/d_item_data.h +++ b/include/d/d_item_data.h @@ -1,7 +1,7 @@ #ifndef D_D_ITEM_DATA_H #define D_D_ITEM_DATA_H -#include +#include struct dItem_itemInfo { /* 0x0 */ u8 mShadowSize; diff --git a/include/d/d_jpreviewer.h b/include/d/d_jpreviewer.h index 9971fa6674..6f00adbb93 100644 --- a/include/d/d_jpreviewer.h +++ b/include/d/d_jpreviewer.h @@ -1,7 +1,7 @@ #ifndef D_JPREVIEWER_H #define D_JPREVIEWER_H -#include +#include #include "JSystem/JStudio/JStudio_JPreviewer/control.h" namespace JStudio { @@ -26,8 +26,8 @@ public: void show3D(Mtx); void show2D(); - void create(JStudio::TControl* pControl, const JUTGamePad& pad); - void remove(); + static void create(JStudio::TControl* pControl, const JUTGamePad& pad); + static void remove(); void update(); static dJprev_c* get() { return m_myObj; } diff --git a/include/d/d_kankyo_data.h b/include/d/d_kankyo_data.h index 93b0cecfcb..e8d38992ab 100644 --- a/include/d/d_kankyo_data.h +++ b/include/d/d_kankyo_data.h @@ -1,7 +1,7 @@ #ifndef D_KANKYO_D_KANKYO_DATA_H #define D_KANKYO_D_KANKYO_DATA_H -#include +#include struct color_RGB_class { /* 0x0 */ u8 r; diff --git a/include/d/d_kankyo_rain.h b/include/d/d_kankyo_rain.h index 0feb428cd2..47b068d52b 100644 --- a/include/d/d_kankyo_rain.h +++ b/include/d/d_kankyo_rain.h @@ -1,20 +1,19 @@ #ifndef D_KANKYO_D_KANKYO_RAIN_H #define D_KANKYO_D_KANKYO_RAIN_H -#include +#include struct cXyz; -struct _GXColor; -void dKyr_drawSun(Mtx param_0, cXyz* param_1, _GXColor& param_2, u8** param_3); -void dKyr_drawLenzflare(Mtx param_0, cXyz* param_1, _GXColor& param_2, u8** param_3); +void dKyr_drawSun(Mtx param_0, cXyz* param_1, GXColor& param_2, u8** param_3); +void dKyr_drawLenzflare(Mtx param_0, cXyz* param_1, GXColor& param_2, u8** param_3); void dKyr_drawSibuki(Mtx param_0, u8** param_1); void dKyr_drawRain(Mtx param_0, u8** param_1); void dKyr_drawSnow(Mtx param_0, u8** param_1); void dKyr_drawStar(Mtx param_0, u8** param_1); void drawCloudShadow(Mtx param_0, u8** param_1); void dKyr_drawHousi(Mtx param_0, u8** param_1); -void drawVrkumo(Mtx param_0, _GXColor& param_1, u8** param_2); +void drawVrkumo(Mtx param_0, GXColor& param_1, u8** param_2); void dKyr_odour_draw(Mtx param_0, u8** param_1); void dKyr_mud_draw(Mtx param_0, u8** param_1); void dKyr_evil_draw(Mtx param_0, u8** param_1); diff --git a/include/d/d_kankyo_tev_str.h b/include/d/d_kankyo_tev_str.h index 177dc80d65..d5403876c5 100644 --- a/include/d/d_kankyo_tev_str.h +++ b/include/d/d_kankyo_tev_str.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphBase/J3DTevs.h" #include "SSystem/SComponent/c_xyz.h" -#include +#include class dKy_tevstr_c { public: diff --git a/include/d/d_lib.h b/include/d/d_lib.h index 212bf517f5..1d3103ce96 100644 --- a/include/d/d_lib.h +++ b/include/d/d_lib.h @@ -2,8 +2,8 @@ #define D_D_LIB_H #include "SSystem/SComponent/c_xyz.h" -#include -#include +#include +#include class fopAc_ac_c; diff --git a/include/d/d_map.h b/include/d/d_map.h index 5718e331b2..66a51aae75 100644 --- a/include/d/d_map.h +++ b/include/d/d_map.h @@ -170,7 +170,7 @@ public: virtual int getRoomNoSingle(); virtual bool isDrawRoom(int, int) const; virtual bool isDrawRoomIcon(int, int) const; - virtual const Vec* getIconPosition(dTres_c::typeGroupData_c*) const; + virtual const BE(Vec)* getIconPosition(dTres_c::typeGroupData_c*) const; virtual dTres_c::typeGroupData_c* getFirstData(u8); virtual dTres_c::typeGroupData_c* getNextData(dTres_c::typeGroupData_c*); virtual void setAmapPaletteColor(int, u8, u8, u8, u8); diff --git a/include/d/d_map_path.h b/include/d/d_map_path.h index a082a3c2e7..d665b586c5 100644 --- a/include/d/d_map_path.h +++ b/include/d/d_map_path.h @@ -9,7 +9,7 @@ struct dMpath_RGB5A3_s { }; namespace dMpath_ColorCnv_n { - void convertRGB5A3_To_GXColor(_GXColor&, const dMpath_RGB5A3_s&); + void convertRGB5A3_To_GXColor(GXColor&, const dMpath_RGB5A3_s&); } struct dMpath_RGB5A3_palDt_s { @@ -115,13 +115,13 @@ public: /* 0x01 */ u8 field_0x1; /* 0x02 */ u8 mDataNum; /* 0x03 */ u8 field_0x3; - /* 0x04 */ u16* mpData; + /* 0x04 */ OFFSET_PTR(BE(u16)) mpData; }; // Size: 0x8 struct poly_class { /* 0x00 */ u8 field_0x0; /* 0x01 */ u8 mDataNum; - /* 0x04 */ u16* mpData; + /* 0x04 */ OFFSET_PTR(BE(u16)) mpData; }; // Size: 0x8 struct group_class { @@ -130,21 +130,21 @@ public: /* 0x02 */ u8 mLineNum; /* 0x03 */ u8 field_0x3; /* 0x04 */ u8 mPolyNum; - /* 0x08 */ dDrawPath_c::line_class* mpLine; + /* 0x08 */ OFFSET_PTR(dDrawPath_c::line_class) mpLine; /* 0x0C */ u8 field_0xc[4]; - /* 0x10 */ dDrawPath_c::poly_class* mpPoly; + /* 0x10 */ OFFSET_PTR(dDrawPath_c::poly_class) mpPoly; }; // Size: 0x14 struct floor_class { /* 0x0 */ s8 mFloorNo; /* 0x1 */ u8 mGroupNum; - /* 0x4 */ dDrawPath_c::group_class* mpGroup; + /* 0x4 */ OFFSET_PTR(dDrawPath_c::group_class) mpGroup; }; // Size: 0x8 struct room_class { /* 0x0 */ u8 mFloorNum; - /* 0x4 */ dDrawPath_c::floor_class* mpFloor; - /* 0x8 */ f32* mpFloatData; // might be Vec or cXyz instead + /* 0x4 */ OFFSET_PTR(dDrawPath_c::floor_class) mpFloor; + /* 0x8 */ OFFSET_PTR(BE(f32)) mpFloatData; // might be Vec or cXyz instead }; struct layer_data { diff --git a/include/d/d_map_path_dmap.h b/include/d/d_map_path_dmap.h index c66d4861f8..bbffcd7809 100644 --- a/include/d/d_map_path_dmap.h +++ b/include/d/d_map_path_dmap.h @@ -50,9 +50,9 @@ struct dMapInfo_n { static bool chkGetCompass(); static bool chkGetMap(); static bool isVisitedRoom(int); - static void correctionOriginPos(s8, Vec*); - static void offsetPlus(dStage_FileList2_dt_c const*, Vec*); - static void rotAngle(dStage_FileList2_dt_c const*, Vec*); + static void correctionOriginPos(s8, BE(Vec)*); + static void offsetPlus(dStage_FileList2_dt_c const*, BE(Vec)*); + static void rotAngle(dStage_FileList2_dt_c const*, BE(Vec)*); static Vec getMapPlayerPos(); static s16 getMapPlayerAngleY(); static const dTres_c::typeGroupData_c* getConstRestartIconPointer(); @@ -127,7 +127,7 @@ public: virtual int getNextDrawLayerNo(int); virtual bool isDrawIconSingle(dTres_c::data_s const*, int, int, bool, bool, - Vec const*) const; + BE(Vec) const*) const; virtual int getIconGroupNumber(u8) const; virtual bool hasMap() const = 0; virtual bool isRendAllRoom() const = 0; @@ -177,7 +177,7 @@ public: virtual ~renderingPlusDoorAndCursor_c() {} virtual void afterDrawPath(); virtual f32 getIconSize(u8) const = 0; - virtual const Vec* getIconPosition(dTres_c::typeGroupData_c*) const; + virtual const BE(Vec)* getIconPosition(dTres_c::typeGroupData_c*) const; virtual dTres_c::typeGroupData_c* getFirstData(u8); virtual dTres_c::typeGroupData_c* getNextData(dTres_c::typeGroupData_c*); virtual f32 getPlayerCursorSize() = 0; diff --git a/include/d/d_menu_dmap.h b/include/d/d_menu_dmap.h index fafa30e0c0..78c659e2cf 100644 --- a/include/d/d_menu_dmap.h +++ b/include/d/d_menu_dmap.h @@ -5,7 +5,7 @@ #include "d/d_msg_flow.h" #include "d/d_menu_map_common.h" #include "d/d_map_path_dmap.h" -#include +#include class CPaneMgr; struct CSTControl; diff --git a/include/d/d_menu_fmap.h b/include/d/d_menu_fmap.h index a8c528ac9d..a0648698bc 100644 --- a/include/d/d_menu_fmap.h +++ b/include/d/d_menu_fmap.h @@ -25,11 +25,11 @@ class mDoDvdThd_mountArchive_c; // Unknown name class dMenu_Fmap_field_data_c { public: - /* 0x00 */ u32 field_0x0; - /* 0x04 */ u32 mStageDataOffset; - /* 0x08 */ u32 mRegionDataOffset; - /* 0x0C */ u32 mVirtualStageOffset; - /* 0x10 */ u32 mRoomDataOffset; + /* 0x00 */ BE(u32) field_0x0; + /* 0x04 */ BE(u32) mStageDataOffset; + /* 0x08 */ BE(u32) mRegionDataOffset; + /* 0x0C */ BE(u32) mVirtualStageOffset; + /* 0x10 */ BE(u32) mRoomDataOffset; }; // Unknown name @@ -38,16 +38,16 @@ public: struct data { /* 0x00 */ u8 mTextureReadNum; /* 0x01 */ u8 field_0x1; - /* 0x02 */ u16 mTitleName; - /* 0x04 */ f32 mOriginX; - /* 0x08 */ f32 mOriginZ; - /* 0x0C */ f32 field_0xc; - /* 0x10 */ f32 field_0x10; - /* 0x14 */ f32 field_0x14; - /* 0x18 */ f32 field_0x18; - /* 0x1C */ f32 field_0x1c; - /* 0x20 */ f32 field_0x20; - /* 0x24 */ f32 field_0x24; + /* 0x02 */ BE(u16) mTitleName; + /* 0x04 */ BE(f32) mOriginX; + /* 0x08 */ BE(f32) mOriginZ; + /* 0x0C */ BE(f32) field_0xc; + /* 0x10 */ BE(f32) field_0x10; + /* 0x14 */ BE(f32) field_0x14; + /* 0x18 */ BE(f32) field_0x18; + /* 0x1C */ BE(f32) field_0x1c; + /* 0x20 */ BE(f32) field_0x20; + /* 0x24 */ BE(f32) field_0x24; }; /* 0x0 */ u8 mCount; @@ -72,7 +72,7 @@ class dMenu_Fmap_field_room_data_c { public: struct data { /* 0x0 */ char mStageName[8]; - /* 0x8 */ u16 mAreaName; + /* 0x8 */ BE(u16) mAreaName; /* 0xA */ u8 mCount; #ifdef _MSVC_LANG u8* __get_mRoomNos() const { return (u8*)(this + 1); } diff --git a/include/d/d_menu_fmap2D.h b/include/d/d_menu_fmap2D.h index ba8fd8659f..c0344c7903 100644 --- a/include/d/d_menu_fmap2D.h +++ b/include/d/d_menu_fmap2D.h @@ -7,7 +7,7 @@ #include "d/d_menu_map_common.h" #include "d/d_meter_haihai.h" #include "d/d_pane_class.h" -#include +#include class dMsgScrnExplain_c; diff --git a/include/d/d_menu_fmap_map.h b/include/d/d_menu_fmap_map.h index b77e43ba70..95294ffb35 100644 --- a/include/d/d_menu_fmap_map.h +++ b/include/d/d_menu_fmap_map.h @@ -2,7 +2,7 @@ #define D_MENU_D_MENU_FMAP_MAP_H #include "SSystem/SComponent/c_counter.h" -#include +#include #include #include "d/d_menu_fmap.h" #include "d/d_map.h" diff --git a/include/d/d_menu_map_common.h b/include/d/d_menu_map_common.h index 7d81ba620d..84da15328c 100644 --- a/include/d/d_menu_map_common.h +++ b/include/d/d_menu_map_common.h @@ -1,7 +1,7 @@ #ifndef D_MENU_D_MENU_MAP_COMMON_H #define D_MENU_D_MENU_MAP_COMMON_H -#include +#include class J2DPicture; class JKRArchive; diff --git a/include/d/d_menu_window_HIO.h b/include/d/d_menu_window_HIO.h index 9a6e82fa06..1df1b5cb72 100644 --- a/include/d/d_menu_window_HIO.h +++ b/include/d/d_menu_window_HIO.h @@ -1,7 +1,7 @@ #ifndef D_MENU_D_MENU_WINDOW_HIO_H #define D_MENU_D_MENU_WINDOW_HIO_H -#include +#include class dMw_DHIO_c { public: diff --git a/include/d/d_msg_class.h b/include/d/d_msg_class.h index 4d4b6700b6..d1478f6b43 100644 --- a/include/d/d_msg_class.h +++ b/include/d/d_msg_class.h @@ -4,6 +4,7 @@ #include "JSystem/JMessage/control.h" #include "JSystem/JMessage/JMessage.h" #include "SSystem/SComponent/c_xyz.h" +#include "dusk/endian.h" #if REGION_JPN #define D_MSG_CLASS_PAGE_CNT_MAX 30 @@ -38,8 +39,8 @@ public: class JMSMesgInfo_c { public: /* 0x00 */ bmg_section_t header; // section header - /* 0x08 */ u16 entry_num; // number of entries in this section - /* 0x0A */ u16 entry_size; // size of an entry + /* 0x08 */ BE(u16) entry_num; // number of entries in this section + /* 0x0A */ BE(u16) entry_size; // size of an entry /* 0x0C */ u8 padding[4]; // padding /* 0x10 */ JMSMesgEntry_c entries[0]; }; diff --git a/include/d/d_msg_flow.h b/include/d/d_msg_flow.h index 8f242f3eec..98a5308385 100644 --- a/include/d/d_msg_flow.h +++ b/include/d/d_msg_flow.h @@ -1,7 +1,7 @@ #ifndef D_MSG_D_MSG_FLOW_H #define D_MSG_D_MSG_FLOW_H -#include +#include enum { NODETYPE_MESSAGE_e = 1, diff --git a/include/d/d_msg_out_font.h b/include/d/d_msg_out_font.h index f1cb15a5c4..2b2d0fa33d 100644 --- a/include/d/d_msg_out_font.h +++ b/include/d/d_msg_out_font.h @@ -1,7 +1,7 @@ #ifndef D_MSG_D_MSG_OUT_FONT_H #define D_MSG_D_MSG_OUT_FONT_H -#include +#include class J2DPicture; class J2DTextBox; diff --git a/include/d/d_msg_scrn_arrow.h b/include/d/d_msg_scrn_arrow.h index 0f65181033..725fbf8658 100644 --- a/include/d/d_msg_scrn_arrow.h +++ b/include/d/d_msg_scrn_arrow.h @@ -1,7 +1,7 @@ #ifndef MSG_SCRN_D_MSG_SCRN_ARROW_H #define MSG_SCRN_D_MSG_SCRN_ARROW_H -#include +#include class J2DScreen; class J2DAnmTransform; diff --git a/include/d/d_msg_scrn_item.h b/include/d/d_msg_scrn_item.h index 2d82bb2138..4b0e55cbd9 100644 --- a/include/d/d_msg_scrn_item.h +++ b/include/d/d_msg_scrn_item.h @@ -1,7 +1,7 @@ #ifndef MSG_SCRN_D_MSG_SCRN_ITEM_H #define MSG_SCRN_D_MSG_SCRN_ITEM_H -#include +#include #include "d/d_msg_scrn_base.h" class dMsgScrnArrow_c; diff --git a/include/d/d_msg_scrn_talk.h b/include/d/d_msg_scrn_talk.h index cac9efc97b..05b187e709 100644 --- a/include/d/d_msg_scrn_talk.h +++ b/include/d/d_msg_scrn_talk.h @@ -1,7 +1,7 @@ #ifndef MSG_SCRN_D_MSG_SCRN_TALK_H #define MSG_SCRN_D_MSG_SCRN_TALK_H -#include +#include #include "d/d_msg_scrn_base.h" class dMsgScrnArrow_c; diff --git a/include/d/d_particle.h b/include/d/d_particle.h index ab8a3be574..c9db174fcd 100644 --- a/include/d/d_particle.h +++ b/include/d/d_particle.h @@ -7,6 +7,7 @@ #include "JSystem/JParticle/JPAParticle.h" #include "d/d_particle_name.h" #include "d/d_kankyo_tev_str.h" +#include "JSystem/JKernel/JKRSolidHeap.h" void dPa_cleanupGX(); @@ -37,7 +38,7 @@ public: dPa_simpleEcallBack(); JPABaseEmitter* create(JPAEmitterManager*, u16, u8); JPABaseEmitter* createEmitter(JPAEmitterManager*); - u32 set(cXyz const*, dKy_tevstr_c const*, u8, _GXColor const&, _GXColor const&, + u32 set(cXyz const*, dKy_tevstr_c const*, u8, GXColor const&, GXColor const&, int, f32); virtual ~dPa_simpleEcallBack() {} @@ -361,20 +362,20 @@ public: void setWaterRipple(u32*, cBgS_PolyInfo&, cXyz const*, f32, dKy_tevstr_c const*, cXyz const*, s8); JPABaseEmitter* set(u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*, u8, - dPa_levelEcallBack*, s8, _GXColor const*, _GXColor const*, cXyz const*, + dPa_levelEcallBack*, s8, GXColor const*, GXColor const*, cXyz const*, f32); u32 set(u32, u8, u16, cXyz const*, dKy_tevstr_c const*, csXyz const*, - cXyz const*, u8, dPa_levelEcallBack*, s8, _GXColor const*, - _GXColor const*, cXyz const*, f32); - static s32 getPolyColor(cBgS_PolyInfo&, int, _GXColor*, _GXColor*, u8*, f32*); + cXyz const*, u8, dPa_levelEcallBack*, s8, GXColor const*, + GXColor const*, cXyz const*, f32); + static s32 getPolyColor(cBgS_PolyInfo&, int, GXColor*, GXColor*, u8*, f32*); u32 setPoly(u32, u16, cBgS_PolyInfo&, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*, int, dPa_levelEcallBack*, s8, cXyz const*); JPABaseEmitter* setPoly(u16, cBgS_PolyInfo&, cXyz const*, dKy_tevstr_c const*, csXyz const*, cXyz const*, int, dPa_levelEcallBack*, s8, cXyz const*); bool newSimple(u16, u8, u32*); - u32 setSimple(u16, cXyz const*, dKy_tevstr_c const*, u8, _GXColor const&, - _GXColor const&, int, f32); + u32 setSimple(u16, cXyz const*, dKy_tevstr_c const*, u8, GXColor const&, + GXColor const&, int, f32); dPa_simpleEcallBack* getSimple(u16); u32 setStopContinue(u32); u32 setSimpleFoot(u32, u32*, cBgS_PolyInfo&, cXyz const*, dKy_tevstr_c const*, @@ -427,6 +428,9 @@ public: JKRSolidHeap* getSceneHeap() { return mSceneHeap; } void* getSceneRes() { return m_sceneRes; } + u32 getHeapSize() { return mHeap->getTotalFreeSize(); } + u32 getSceneHeapSize() { return mSceneHeap->getTotalFreeSize(); } + void levelAllForceOnEventMove() { field_0x210.allForceOnEventMove(); } void levelExecute(u32 param_0) { @@ -453,6 +457,7 @@ public: static JPAEmitterManager* getEmitterManager() { return mEmitterMng; } int getEmitterNum() { return mEmitterMng->getEmitterNumber(); }; + int getParticleNum() { return mEmitterMng->getParticleNumber(); } static dPa_light8PcallBack* getLight8PcallBack() { return &mLight8PcallBack; diff --git a/include/d/d_particle_name.h b/include/d/d_particle_name.h index 05c128edd7..72a3332558 100644 --- a/include/d/d_particle_name.h +++ b/include/d/d_particle_name.h @@ -1,7 +1,7 @@ #ifndef D_PARTICLE_D_PARTICLE_NAME_H #define D_PARTICLE_D_PARTICLE_NAME_H -#include "dolphin/types.h" +#include #include // Room scenes use a bit to specify an ID is from a room particle pack, not the common particle pack diff --git a/include/d/d_path.h b/include/d/d_path.h index 7a4e6576ac..6e4e159a61 100644 --- a/include/d/d_path.h +++ b/include/d/d_path.h @@ -1,8 +1,8 @@ #ifndef D_D_PATH_H #define D_D_PATH_H -#include -#include +#include +#include class cBgS_PolyInfo; struct cXyz; @@ -12,19 +12,26 @@ struct dPnt { /* 0x1 */ u8 mArg2; /* 0x2 */ u8 mArg3; /* 0x3 */ u8 mArg0; - /* 0x4 */ Vec m_position; + /* 0x4 */ BE(Vec) m_position; }; // Size: 0x10 struct dPath { - /* 0x0 */ u16 m_num; - /* 0x2 */ u16 m_nextID; + /* 0x0 */ BE(u16) m_num; + /* 0x2 */ BE(u16) m_nextID; /* 0x4 */ u8 field_0x4; /* 0x5 */ bool m_closed; /* 0x6 */ u8 field_0x6; /* 0x7 */ u8 field_0x7; - /* 0x8 */ dPnt* m_points; + /* 0x8 */ OFFSET_PTR(dPnt) m_points; }; +#if VERSION == VERSION_SHIELD_DEBUG +void dPath_Move(); +void dPath_Draw(); +void dPath_Dt(); +void dPath_Ct(); +#endif + inline BOOL dPath_ChkClose(const dPath* i_path) { return i_path->m_closed & 1; } dPath* dPath_GetRoomPath(int path_index, int room_no); diff --git a/include/d/d_procname.h b/include/d/d_procname.h index bc0ed5efc1..6c15c741f0 100644 --- a/include/d/d_procname.h +++ b/include/d/d_procname.h @@ -3,803 +3,839 @@ #include "global.h" -enum { - /* 0x000 */ PROC_OVERLAP0, - /* 0x001 */ PROC_OVERLAP1, - /* 0x002 */ PROC_OVERLAP3, - /* 0x003 */ PROC_OVERLAP6, - /* 0x004 */ PROC_OVERLAP7, - /* 0x005 */ PROC_OVERLAP8, - /* 0x006 */ PROC_OVERLAP9, - /* 0x007 */ PROC_OVERLAP10, - /* 0x008 */ PROC_OVERLAP11, - /* 0x009 */ PROC_LOGO_SCENE, - /* 0x00A */ PROC_MENU_SCENE, - /* 0x00B */ PROC_PLAY_SCENE, - /* 0x00C */ PROC_OPENING_SCENE, - /* 0x00D */ PROC_NAME_SCENE, - /* 0x00E */ PROC_NAMEEX_SCENE, #if VERSION != VERSION_WII_USA_R0 && VERSION != VERSION_WII_PAL - /* 0x00F */ PROC_WARNING_SCENE, - /* 0x010 */ PROC_WARNING2_SCENE, +#define PROCS_NOT_WII \ +/* 0x00F */ X(PROC_WARNING_SCENE) \ +/* 0x010 */ X(PROC_WARNING2_SCENE) +#else +#define PROCS_NOT_WII #endif - /* 0x011 */ PROC_OVERLAP2, - /* 0x012 */ PROC_ROOM_SCENE, - /* 0x013 */ PROC_KANKYO, - /* 0x014 */ PROC_ALLDIE, - /* 0x015 */ PROC_ENVSE, - /* 0x016 */ PROC_Obj_Swpush, - /* 0x017 */ PROC_Obj_Swpush2, - /* 0x018 */ PROC_Obj_Swpush5, - /* 0x019 */ PROC_Tag_Gstart, - /* 0x01A */ PROC_NO_CHG_ROOM, - /* 0x01B */ PROC_Obj_Lv6ElevtA, - /* 0x01C */ PROC_OBJ_SO, - /* 0x01D */ PROC_Obj_Movebox, - /* 0x01E */ PROC_Obj_SwTurn, - /* 0x01F */ PROC_Obj_Lv6SwTurn, - /* 0x020 */ PROC_OBJ_SEKIZOA, - /* 0x021 */ PROC_OBJ_GRA, - /* 0x022 */ PROC_TAG_GRA, - /* 0x023 */ PROC_TAG_YAMI, - /* 0x024 */ PROC_Obj_Ladder, - /* 0x025 */ PROC_OBJ_BEF, - /* 0x026 */ PROC_OBJ_FMOBJ, - /* 0x027 */ PROC_OBJ_LBOX, - /* 0x028 */ PROC_OBJ_WEB0, - /* 0x029 */ PROC_OBJ_WEB1, - /* 0x02A */ PROC_OBJ_CB, - /* 0x02B */ PROC_OBJ_MAKI, - /* 0x02C */ PROC_OBJ_BRG, - /* 0x02D */ PROC_OBJ_GB, - /* 0x02E */ PROC_OBJ_GM, - /* 0x02F */ PROC_OBJ_TOBY, - /* 0x030 */ PROC_OBJ_TP, - /* 0x031 */ PROC_TREESH, - /* 0x032 */ PROC_Obj_ZDoor, - /* 0x033 */ PROC_Obj_Pillar, - /* 0x034 */ PROC_Obj_Cdoor, - /* 0x035 */ PROC_GRDWATER, - /* 0x036 */ PROC_Obj_RotBridge, - /* 0x037 */ PROC_Obj_MagLift, - /* 0x038 */ PROC_Obj_MagLiftRot, - /* 0x039 */ PROC_Obj_Lv1Cdl00, - /* 0x03A */ PROC_Obj_Lv1Cdl01, - /* 0x03B */ PROC_Obj_TvCdlst, - /* 0x03C */ PROC_Obj_HsTarget, - /* 0x03D */ PROC_Obj_HeavySw, - /* 0x03E */ PROC_Obj_GoGate, - /* 0x03F */ PROC_Obj_TaFence, - /* 0x040 */ PROC_Obj_Saidan, - /* 0x041 */ PROC_Obj_SpinLift, - /* 0x042 */ PROC_Obj_BmWindow, - /* 0x043 */ PROC_Obj_RfHole, - /* 0x044 */ PROC_Obj_WaterPillar, - /* 0x045 */ PROC_Obj_SyRock, - /* 0x046 */ PROC_Obj_BsGate, - /* 0x047 */ PROC_Obj_AmiShutter, - /* 0x048 */ PROC_Obj_WtGate, - /* 0x049 */ PROC_Obj_Lv2Candle, - /* 0x04A */ PROC_Obj_TogeTrap, - /* 0x04B */ PROC_Obj_RotTrap, - /* 0x04C */ PROC_Obj_SwallShutter, - /* 0x04D */ PROC_Obj_IceWall, - /* 0x04E */ PROC_Obj_Lv5SwIce, - /* 0x04F */ PROC_Obj_Lv5FBoard, - /* 0x050 */ PROC_Obj_Turara, - /* 0x051 */ PROC_Obj_TwGate, - /* 0x052 */ PROC_Obj_Digholl, - /* 0x053 */ PROC_Obj_Digpl, - /* 0x054 */ PROC_Obj_TestCube, - /* 0x055 */ PROC_Obj_Kshutter, - /* 0x056 */ PROC_NPC_COACH, - /* 0x057 */ PROC_NPC_THEB, - /* 0x058 */ PROC_COACH_FIRE, - /* 0x059 */ PROC_COACH2D, - /* 0x05A */ PROC_BALLOON2D, - /* 0x05B */ PROC_SKIP2D, - /* 0x05C */ PROC_Obj_MvStair, - /* 0x05D */ PROC_Obj_Cowdoor, - /* 0x05E */ PROC_Obj_Swpropeller, - /* 0x05F */ PROC_Obj_BoomShutter, - /* 0x060 */ PROC_NPC_KS, - /* 0x061 */ PROC_Obj_Hfuta, - /* 0x062 */ PROC_Obj_BkDoor, - /* 0x063 */ PROC_Obj_Cboard, - /* 0x064 */ PROC_Obj_MGate, - /* 0x065 */ PROC_Obj_Ikada, - /* 0x066 */ PROC_Obj_Ice_l, - /* 0x067 */ PROC_Obj_Ice_s, - /* 0x068 */ PROC_Obj_E_CREATE, - /* 0x069 */ PROC_Obj_Bhbridge, - /* 0x06A */ PROC_Obj_Kaisou, - /* 0x06B */ PROC_Obj_HHASHI, - /* 0x06C */ PROC_Obj_BHASHI, - /* 0x06D */ PROC_OCTHASHI, - /* 0x06E */ PROC_Obj_THASHI, - /* 0x06F */ PROC_Obj_CRVGATE, - /* 0x070 */ PROC_Obj_CRVFENCE, - /* 0x071 */ PROC_Obj_CRVHAHEN, - /* 0x072 */ PROC_Obj_CRVSTEEL, - /* 0x073 */ PROC_Obj_CRVLH_UP, - /* 0x074 */ PROC_Obj_CRVLH_DW, - /* 0x075 */ PROC_Obj_RIVERROCK, - /* 0x076 */ PROC_Obj_DUST, - /* 0x077 */ PROC_Obj_ITA, - /* 0x078 */ PROC_Obj_Window, - /* 0x079 */ PROC_Obj_MetalBox, - /* 0x07A */ PROC_Obj_BBox, - /* 0x07B */ PROC_OBJ_MSIMA, - /* 0x07C */ PROC_OBJ_MYOGAN, - /* 0x07D */ PROC_B_ZANTS, - /* 0x07E */ PROC_Obj_ChainBlock, - /* 0x07F */ PROC_Obj_ChainWall, - /* 0x080 */ PROC_Obj_KkrGate, - /* 0x081 */ PROC_Obj_RiderGate, - /* 0x082 */ PROC_Obj_Onsen, - /* 0x083 */ PROC_Obj_Chest, - /* 0x084 */ PROC_Obj_Bemos, - /* 0x085 */ PROC_Obj_RopeBridge, - /* 0x086 */ PROC_Obj_WellCover, - /* 0x087 */ PROC_Obj_GraveStone, - /* 0x088 */ PROC_Obj_ZraRock, - /* 0x089 */ PROC_Obj_GraRock, - /* 0x08A */ PROC_Obj_GrzRock, - /* 0x08B */ PROC_GRA_WALL, - /* 0x08C */ PROC_OBJ_ONSEN_FIRE, - /* 0x08D */ PROC_Obj_Lv6bemos, - /* 0x08E */ PROC_Obj_Lv6bemos2, - /* 0x08F */ PROC_Obj_BarDesk, - /* 0x090 */ PROC_Obj_DigSnow, - /* 0x091 */ PROC_Obj_Ytaihou, - /* 0x092 */ PROC_Obj_Elevator, - /* 0x093 */ PROC_Obj_Lv6TogeRoll, - /* 0x094 */ PROC_Obj_Lv6TogeTrap, - /* 0x095 */ PROC_Obj_Lv6Tenbin, - /* 0x096 */ PROC_Obj_Lv6SwGate, - /* 0x097 */ PROC_Obj_Lv6Lblock, - /* 0x098 */ PROC_Obj_Lv6ChgGate, - /* 0x099 */ PROC_Obj_Lv6FuriTrap, - /* 0x09A */ PROC_Obj_Lv6SzGate, - /* 0x09B */ PROC_Obj_Lv4EdShutter, - /* 0x09C */ PROC_Obj_Lv4Gate, - /* 0x09D */ PROC_Obj_Lv4PoGate, - /* 0x09E */ PROC_Obj_Lv4SlideWall, - /* 0x09F */ PROC_Obj_Lv4HsTarget, - /* 0x0A0 */ PROC_Obj_Lv7PropY, - /* 0x0A1 */ PROC_Obj_Lv7BsGate, - /* 0x0A2 */ PROC_Obj_Lv8OptiLift, - /* 0x0A3 */ PROC_Obj_Lv8KekkaiTrap, - /* 0x0A4 */ PROC_Obj_Lv8Lift, - /* 0x0A5 */ PROC_Obj_Lv8UdFloor, - /* 0x0A6 */ PROC_Obj_Lv9SwShutter, - /* 0x0A7 */ PROC_Obj_TobyHouse, - /* 0x0A8 */ PROC_Obj_poCandle, - /* 0x0A9 */ PROC_Obj_Lv4DigSand, - /* 0x0AA */ PROC_Obj_FallObj, - /* 0x0AB */ PROC_Obj_SmgDoor, - /* 0x0AC */ PROC_Obj_SwLight, - /* 0x0AD */ PROC_Obj_Avalanche, - /* 0x0AE */ PROC_Obj_MirrorScrew, - /* 0x0AF */ PROC_Obj_MirrorSand, - /* 0x0B0 */ PROC_Obj_MirrorTable, - /* 0x0B1 */ PROC_Obj_MirrorChain, - /* 0x0B2 */ PROC_Obj_Mirror6Pole, - /* 0x0B3 */ PROC_Obj_SwSpinner, - /* 0x0B4 */ PROC_Obj_TDoor, - /* 0x0B5 */ PROC_Obj_Lv7Bridge, - /* 0x0B6 */ PROC_Obj_zrTurara, - /* 0x0B7 */ PROC_Obj_TakaraDai, - /* 0x0B8 */ PROC_Obj_Table, - /* 0x0B9 */ PROC_Obj_CatDoor, - /* 0x0BA */ PROC_Obj_Gake, - /* 0x0BB */ PROC_CSTAF, - /* 0x0BC */ PROC_Obj_Lv4RailWall, - /* 0x0BD */ PROC_Obj_Lv4Sand, - /* 0x0BE */ PROC_Obj_PushDoor, - /* 0x0BF */ PROC_PushDoor, - /* 0x0C0 */ PROC_Obj_GanonWall2, - /* 0x0C1 */ PROC_Obj_Lv4Bridge, - /* 0x0C2 */ PROC_Obj_Lv4Floor, - /* 0x0C3 */ PROC_Tag_Spinner, - /* 0x0C4 */ PROC_Obj_SwHang, - /* 0x0C5 */ PROC_Obj_RotStair, - /* 0x0C6 */ PROC_Obj_MagneArm, - /* 0x0C7 */ PROC_Obj_KWheel00, - /* 0x0C8 */ PROC_Obj_KWheel01, - /* 0x0C9 */ PROC_Obj_Ychndlr, - /* 0x0CA */ PROC_Obj_PRElvtr, - /* 0x0CB */ PROC_Obj_MHasu, - /* 0x0CC */ PROC_Obj_YIblltray, - /* 0x0CD */ PROC_Obj_Lv6EGate, - /* 0x0CE */ PROC_Obj_PDtile, - /* 0x0CF */ PROC_Obj_PDwall, - /* 0x0D0 */ PROC_Obj_Lv4PRwall, - /* 0x0D1 */ PROC_Obj_KLift00, - /* 0x0D2 */ PROC_B_OH, - /* 0x0D3 */ PROC_Obj_Lv4Chan, - /* 0x0D4 */ PROC_Obj_Lv3R10Saka, - /* 0x0D5 */ PROC_Obj_Lv3Water, - /* 0x0D6 */ PROC_Obj_Lv3Water2, - /* 0x0D7 */ PROC_OBJ_LV3WATERB, - /* 0x0D8 */ PROC_Obj_HBombkoya, - /* 0x0D9 */ PROC_Obj_SZbridge, - /* 0x0DA */ PROC_Obj_KakarikoBrg, - /* 0x0DB */ PROC_Obj_OrdinBrg, - /* 0x0DC */ PROC_Obj_BurnBox, - /* 0x0DD */ PROC_Obj_KJgjs, - /* 0x0DE */ PROC_OBJ_IHASI, - /* 0x0DF */ PROC_Obj_IceBlock, - /* 0x0E0 */ PROC_Obj_VolcanicBall, - /* 0x0E1 */ PROC_Obj_VolcanicBomb, - /* 0x0E2 */ PROC_Obj_VolcGnd, - /* 0x0E3 */ PROC_Obj_KKanban, - /* 0x0E4 */ PROC_E_PH, - /* 0x0E5 */ PROC_NPC_ZRA, - /* 0x0E6 */ PROC_Obj_Chandelier, - /* 0x0E7 */ PROC_Obj_Stopper2, - /* 0x0E8 */ PROC_DOOR20, - /* 0x0E9 */ PROC_Tag_Hinit, - /* 0x0EA */ PROC_Tag_Hjump, - /* 0x0EB */ PROC_Tag_AJnot, - /* 0x0EC */ PROC_Tag_Hstop, - /* 0x0ED */ PROC_CANOE, - /* 0x0EE */ PROC_HORSE, - /* 0x0EF */ PROC_E_WB, - /* 0x0F0 */ PROC_OBJ_ITO, - /* 0x0F1 */ PROC_OBJ_SW, - /* 0x0F2 */ PROC_SPINNER, - /* 0x0F3 */ PROC_B_OB, - /* 0x0F4 */ PROC_KAGO, - /* 0x0F5 */ PROC_E_YC, - /* 0x0F6 */ PROC_B_DS, - /* 0x0F7 */ PROC_B_DR, - /* 0x0F8 */ PROC_B_ZANTZ, - /* 0x0F9 */ PROC_B_ZANT, - /* 0x0FA */ PROC_B_ZANTM, - /* 0x0FB */ PROC_TBOX, - /* 0x0FC */ PROC_TBOX2, - /* 0x0FD */ PROC_ALINK, - /* 0x0FE */ PROC_BOOMERANG, - /* 0x0FF */ PROC_MIDNA, - /* 0x100 */ PROC_NPC_TK, - /* 0x101 */ PROC_NPC_WORM, - /* 0x102 */ PROC_PPolamp, - /* 0x103 */ PROC_BkyRock, - /* 0x104 */ PROC_HITOBJ, - /* 0x105 */ PROC_EP, - /* 0x106 */ PROC_COW, - /* 0x107 */ PROC_PERU, - /* 0x108 */ PROC_NI, - /* 0x109 */ PROC_NPC_TKJ2, - /* 0x10A */ PROC_SQ, - /* 0x10B */ PROC_NPC_SQ, - /* 0x10C */ PROC_DO, - /* 0x10D */ PROC_NPC_NE, - /* 0x10E */ PROC_NPC_TR, - /* 0x10F */ PROC_NPC_LF, - /* 0x110 */ PROC_OBJ_FOOD, - /* 0x111 */ PROC_OBJ_KI, - /* 0x112 */ PROC_OBJ_KITA, - /* 0x113 */ PROC_OBJ_KEY, - /* 0x114 */ PROC_OBJ_KEYHOLE, - /* 0x115 */ PROC_Obj_Lv5Key, - /* 0x116 */ PROC_OBJ_LP, - /* 0x117 */ PROC_OBJ_TATIGI, - /* 0x118 */ PROC_OBJ_ROCK, - /* 0x119 */ PROC_OBJ_WFLAG, - /* 0x11A */ PROC_OBJ_KAGE, - /* 0x11B */ PROC_OBJ_KANBAN2, - /* 0x11C */ PROC_OBJ_BALLOON, - /* 0x11D */ PROC_OBJ_SUISYA, - /* 0x11E */ PROC_OBJ_OILTUBO, - /* 0x11F */ PROC_OBJ_ROTEN, - /* 0x120 */ PROC_OBJ_SSDRINK, - /* 0x121 */ PROC_OBJ_SSITEM, - /* 0x122 */ PROC_TAG_SSDRINK, - /* 0x123 */ PROC_TAG_BTLITM, - /* 0x124 */ PROC_TAG_LV5SOUP, - /* 0x125 */ PROC_TAG_MNLIGHT, - /* 0x126 */ PROC_TAG_SHOPCAM, - /* 0x127 */ PROC_TAG_SHOPITM, - /* 0x128 */ PROC_OBJ_NDOOR, - /* 0x129 */ PROC_OBJ_UDOOR, - /* 0x12A */ PROC_OBJ_USAKU, - /* 0x12B */ PROC_Obj_SM_DOOR, - /* 0x12C */ PROC_OBJ_BED, - /* 0x12D */ PROC_OBJ_BOUMATO, - /* 0x12E */ PROC_OBJ_ITAMATO, - /* 0x12F */ PROC_OBJ_NOUGU, - /* 0x130 */ PROC_OBJ_STICK, - /* 0x131 */ PROC_OBJ_MIE, - /* 0x132 */ PROC_OBJ_SEKIDOOR, - /* 0x133 */ PROC_OBJ_SEKIZO, - /* 0x134 */ PROC_OBJ_SMTILE, - /* 0x135 */ PROC_NPC_FISH, - /* 0x136 */ PROC_MG_FISH, - /* 0x137 */ PROC_FSHOP, - /* 0x138 */ PROC_NPC_DU, - /* 0x139 */ PROC_DISAPPEAR, - /* 0x13A */ PROC_Obj_Mato, - /* 0x13B */ PROC_Obj_Flag, - /* 0x13C */ PROC_Obj_Flag2, - /* 0x13D */ PROC_Obj_Flag3, - /* 0x13E */ PROC_Obj_GOMIKABE, - /* 0x13F */ PROC_Obj_Yousei, - /* 0x140 */ PROC_Obj_Kabuto, - /* 0x141 */ PROC_Obj_Cho, - /* 0x142 */ PROC_Obj_Kuw, - /* 0x143 */ PROC_Obj_Nan, - /* 0x144 */ PROC_Obj_Dan, - /* 0x145 */ PROC_Obj_Kam, - /* 0x146 */ PROC_Obj_Ten, - /* 0x147 */ PROC_Obj_Ari, - /* 0x148 */ PROC_Obj_Kag, - /* 0x149 */ PROC_Obj_Batta, - /* 0x14A */ PROC_Obj_Tombo, - /* 0x14B */ PROC_Obj_Kat, - /* 0x14C */ PROC_Obj_H_Saku, - /* 0x14D */ PROC_Obj_Yobikusa, - /* 0x14E */ PROC_Obj_KazeNeko, - /* 0x14F */ PROC_Obj_KznkArm, - /* 0x150 */ PROC_Obj_NamePlate, - /* 0x151 */ PROC_Obj_OnCloth, - /* 0x152 */ PROC_Obj_LndRope, - /* 0x153 */ PROC_Obj_ItaRope, - /* 0x154 */ PROC_Obj_Sakuita, - /* 0x155 */ PROC_Obj_Laundry, - /* 0x156 */ PROC_WarpBug, - /* 0x157 */ PROC_Izumi_Gate, - /* 0x158 */ PROC_Obj_Fchain, - /* 0x159 */ PROC_Obj_Wchain, - /* 0x15A */ PROC_Tag_Attp, - /* 0x15B */ PROC_Obj_Tornado, - /* 0x15C */ PROC_Obj_Tornado2, - /* 0x15D */ PROC_Obj_FirePillar, - /* 0x15E */ PROC_Obj_FirePillar2, - /* 0x15F */ PROC_Obj_InoBone, - /* 0x160 */ PROC_Obj_Stopper, - /* 0x161 */ PROC_Obj_MHole, - /* 0x162 */ PROC_Tag_Magne, - /* 0x163 */ PROC_Obj_BossWarp, - /* 0x164 */ PROC_Obj_WoodPendulum, - /* 0x165 */ PROC_Obj_WdStick, - /* 0x166 */ PROC_Obj_StairBlock, - /* 0x167 */ PROC_Obj_Geyser, - /* 0x168 */ PROC_Tag_KtOnFire, - /* 0x169 */ PROC_Obj_FireWood, - /* 0x16A */ PROC_Obj_FireWood2, - /* 0x16B */ PROC_Obj_GpTaru, - /* 0x16C */ PROC_Obj_OnsenTaru, - /* 0x16D */ PROC_Obj_KiPot, - /* 0x16E */ PROC_TBOX_SW, - /* 0x16F */ PROC_Obj_SwChain, - /* 0x170 */ PROC_Obj_WoodenSword, - /* 0x171 */ PROC_Obj_StoneMark, - /* 0x172 */ PROC_Obj_Lv3Candle, - /* 0x173 */ PROC_Tag_Lv4Candle, - /* 0x174 */ PROC_Tag_Lv4CandleDm, - /* 0x175 */ PROC_Obj_DamCps, - /* 0x176 */ PROC_Obj_Smoke, - /* 0x177 */ PROC_Obj_WaterFall, - /* 0x178 */ PROC_Obj_ZoraCloth, - /* 0x179 */ PROC_Obj_poFire, - /* 0x17A */ PROC_Tag_poFire, - /* 0x17B */ PROC_Obj_glowSphere, - /* 0x17C */ PROC_Tag_LightBall, - /* 0x17D */ PROC_SwLBall, - /* 0x17E */ PROC_SwBall, - /* 0x17F */ PROC_Obj_WaterEff, - /* 0x180 */ PROC_Tag_RiverBack, - /* 0x181 */ PROC_Tag_KagoFall, - /* 0x182 */ PROC_Tag_Lv2PrChk, - /* 0x183 */ PROC_Obj_Lv4Gear, - /* 0x184 */ PROC_Obj_MasterSword, - /* 0x185 */ PROC_Obj_WoodStatue, - /* 0x186 */ PROC_Obj_Fan, - /* 0x187 */ PROC_Obj_IceLeaf, - /* 0x188 */ PROC_Obj_zrTuraraRc, - /* 0x189 */ PROC_Tag_RetRoom, - /* 0x18A */ PROC_Obj_WindStone, - /* 0x18B */ PROC_Tag_WaraHowl, - /* 0x18C */ PROC_Obj_SCannon, - /* 0x18D */ PROC_Obj_SmWStone, - /* 0x18E */ PROC_Obj_SCannonCrs, - /* 0x18F */ PROC_Tag_SnowEff, - /* 0x190 */ PROC_Tag_CstaSw, - /* 0x191 */ PROC_Tag_Lv6CstaSw, - /* 0x192 */ PROC_Obj_awaPlar, - /* 0x193 */ PROC_Obj_poTbox, - /* 0x194 */ PROC_Obj_TimeFire, - /* 0x195 */ PROC_Obj_TMoon, - /* 0x196 */ PROC_Obj_GanonWall, - /* 0x197 */ PROC_Obj_Prop, - /* 0x198 */ PROC_CSTATUE, - /* 0x199 */ PROC_Obj_SwBallA, - /* 0x19A */ PROC_Obj_SwBallB, - /* 0x19B */ PROC_Obj_SnowSoup, - /* 0x19C */ PROC_Obj_Nagaisu, - /* 0x19D */ PROC_Obj_RCircle, - /* 0x19E */ PROC_Obj_Picture, - /* 0x19F */ PROC_Tag_SetBall, - /* 0x1A0 */ PROC_Tag_SmkEmt, - /* 0x1A1 */ PROC_SwTime, - /* 0x1A2 */ PROC_Obj_HFtr, - /* 0x1A3 */ PROC_Obj_HBarrel, - /* 0x1A4 */ PROC_Obj_Crystal, - /* 0x1A5 */ PROC_Obj_SCannonTen, - /* 0x1A6 */ PROC_Obj_SwBallC, - /* 0x1A7 */ PROC_SCENE_EXIT2, - /* 0x1A8 */ PROC_Obj_Hata, - /* 0x1A9 */ PROC_Obj_ToaruMaki, - /* 0x1AA */ PROC_Tag_AttackItem, - /* 0x1AB */ PROC_Tag_RmbitSw, - /* 0x1AC */ PROC_Obj_Sword, - /* 0x1AD */ PROC_Tag_Spring, - /* 0x1AE */ PROC_Tag_Statue, - /* 0x1AF */ PROC_E_AI, - /* 0x1B0 */ PROC_E_GS, - /* 0x1B1 */ PROC_E_GOB, - /* 0x1B2 */ PROC_E_DD, - /* 0x1B3 */ PROC_E_DN, - /* 0x1B4 */ PROC_E_S1, - /* 0x1B5 */ PROC_E_MF, - /* 0x1B6 */ PROC_E_SG, - /* 0x1B7 */ PROC_E_BS, - /* 0x1B8 */ PROC_E_SF, - /* 0x1B9 */ PROC_E_SH, - /* 0x1BA */ PROC_E_DF, - /* 0x1BB */ PROC_E_GM, - /* 0x1BC */ PROC_E_MD, - /* 0x1BD */ PROC_E_SM, - /* 0x1BE */ PROC_E_SM2, - /* 0x1BF */ PROC_E_ST, - /* 0x1C0 */ PROC_E_ST_LINE, - /* 0x1C1 */ PROC_E_SB, - /* 0x1C2 */ PROC_E_TH, - /* 0x1C3 */ PROC_E_CR, - /* 0x1C4 */ PROC_E_CR_EGG, - /* 0x1C5 */ PROC_E_DB, - /* 0x1C6 */ PROC_E_DB_LEAF, - /* 0x1C7 */ PROC_E_GA, - /* 0x1C8 */ PROC_E_GB, - /* 0x1C9 */ PROC_E_HB, - /* 0x1CA */ PROC_E_HB_LEAF, - /* 0x1CB */ PROC_E_HZELDA, - /* 0x1CC */ PROC_E_YD, - /* 0x1CD */ PROC_E_YH, - /* 0x1CE */ PROC_E_YD_LEAF, - /* 0x1CF */ PROC_E_HM, - /* 0x1D0 */ PROC_E_TK, - /* 0x1D1 */ PROC_E_TK2, - /* 0x1D2 */ PROC_E_TK_BALL, - /* 0x1D3 */ PROC_E_RB, - /* 0x1D4 */ PROC_E_RD, - /* 0x1D5 */ PROC_E_RDB, - /* 0x1D6 */ PROC_E_RDY, - /* 0x1D7 */ PROC_E_FM, - /* 0x1D8 */ PROC_E_FS, - /* 0x1D9 */ PROC_E_PM, - /* 0x1DA */ PROC_E_PO, - /* 0x1DB */ PROC_E_MB, - /* 0x1DC */ PROC_E_MK, - /* 0x1DD */ PROC_E_MM, - /* 0x1DE */ PROC_E_FZ, - /* 0x1DF */ PROC_E_ZS, - /* 0x1E0 */ PROC_E_KK, - /* 0x1E1 */ PROC_E_HP, - /* 0x1E2 */ PROC_E_ZH, - /* 0x1E3 */ PROC_E_ZM, - /* 0x1E4 */ PROC_E_PZ, - /* 0x1E5 */ PROC_E_FB, - /* 0x1E6 */ PROC_E_FK, - /* 0x1E7 */ PROC_E_MS, - /* 0x1E8 */ PROC_E_NEST, - /* 0x1E9 */ PROC_E_NZ, - /* 0x1EA */ PROC_E_BA, - /* 0x1EB */ PROC_E_BU, - /* 0x1EC */ PROC_E_BUG, - /* 0x1ED */ PROC_E_BEE, - /* 0x1EE */ PROC_E_IS, - /* 0x1EF */ PROC_E_KG, - /* 0x1F0 */ PROC_E_KR, - /* 0x1F1 */ PROC_E_SW, - /* 0x1F2 */ PROC_E_GE, - /* 0x1F3 */ PROC_Tag_WatchGe, - /* 0x1F4 */ PROC_E_YM, - /* 0x1F5 */ PROC_E_YM_TAG, - /* 0x1F6 */ PROC_E_YMB, - /* 0x1F7 */ PROC_Tag_FWall, - /* 0x1F8 */ PROC_Tag_WaterFall, - /* 0x1F9 */ PROC_E_YK, - /* 0x1FA */ PROC_E_YR, - /* 0x1FB */ PROC_E_YG, - /* 0x1FC */ PROC_E_HZ, - /* 0x1FD */ PROC_E_WS, - /* 0x1FE */ PROC_E_OC, - /* 0x1FF */ PROC_E_OT, - /* 0x200 */ PROC_E_DT, - /* 0x201 */ PROC_E_BG, - /* 0x202 */ PROC_E_OctBg, - /* 0x203 */ PROC_DR, - /* 0x204 */ PROC_L7lowDr, - /* 0x205 */ PROC_L7ODR, - /* 0x206 */ PROC_E_TT, - /* 0x207 */ PROC_E_DK, - /* 0x208 */ PROC_E_VT, - /* 0x209 */ PROC_E_WW, - /* 0x20A */ PROC_E_GI, - /* 0x20B */ PROC_B_BH, - /* 0x20C */ PROC_B_BQ, - /* 0x20D */ PROC_B_GM, - /* 0x20E */ PROC_B_GND, - /* 0x20F */ PROC_B_GO, - /* 0x210 */ PROC_B_OH2, - /* 0x211 */ PROC_B_YO, - /* 0x212 */ PROC_B_YOI, - /* 0x213 */ PROC_B_TN, - /* 0x214 */ PROC_B_GG, - /* 0x215 */ PROC_B_DRE, - /* 0x216 */ PROC_B_MGN, - /* 0x217 */ PROC_E_WAP, - /* 0x218 */ PROC_ITEM, - /* 0x219 */ PROC_Obj_SmallKey, - /* 0x21A */ PROC_Obj_Kantera, - /* 0x21B */ PROC_Obj_LifeContainer, - /* 0x21C */ PROC_Obj_Shield, - /* 0x21D */ PROC_Demo_Item, - /* 0x21E */ PROC_ShopItem, - /* 0x21F */ PROC_Obj_Drop, - /* 0x220 */ PROC_OBJ_RW, - /* 0x221 */ PROC_NBOMB, - /* 0x222 */ PROC_TAG_CSW, - /* 0x223 */ PROC_TAG_QS, - /* 0x224 */ PROC_HOZELDA, - /* 0x225 */ PROC_SWC00, - /* 0x226 */ PROC_KNOB20, - /* 0x227 */ PROC_DBDOOR, - /* 0x228 */ PROC_BOSS_DOOR, - /* 0x229 */ PROC_L1BOSS_DOOR, - /* 0x22A */ PROC_L1MBOSS_DOOR, - /* 0x22B */ PROC_L5BOSS_DOOR, - /* 0x22C */ PROC_DSHUTTER, - /* 0x22D */ PROC_SPIRAL_DOOR, - /* 0x22E */ PROC_Tag_ChgRestart, - /* 0x22F */ PROC_Tag_Restart, - /* 0x230 */ PROC_ANDSW, - /* 0x231 */ PROC_ANDSW2, - /* 0x232 */ PROC_MYNA, - /* 0x233 */ PROC_NPC_GND, - /* 0x234 */ PROC_NPC_GRA, - /* 0x235 */ PROC_NPC_GRC, - /* 0x236 */ PROC_NPC_GRD, - /* 0x237 */ PROC_NPC_GRM, - /* 0x238 */ PROC_NPC_GRMC, - /* 0x239 */ PROC_NPC_GRO, - /* 0x23A */ PROC_NPC_GRR, - /* 0x23B */ PROC_NPC_GRS, - /* 0x23C */ PROC_NPC_GRZ, - /* 0x23D */ PROC_NPC_YAMID, - /* 0x23E */ PROC_NPC_YAMIT, - /* 0x23F */ PROC_NPC_YAMIS, - /* 0x240 */ PROC_NPC_BLUENS, - /* 0x241 */ PROC_NPC_KAKASHI, - /* 0x242 */ PROC_NPC_KDK, - /* 0x243 */ PROC_NPC_ARU, - /* 0x244 */ PROC_NPC_BANS, - /* 0x245 */ PROC_NPC_BESU, - /* 0x246 */ PROC_NPC_BOU, - /* 0x247 */ PROC_NPC_BOU_S, - /* 0x248 */ PROC_NPC_CLERKA, - /* 0x249 */ PROC_NPC_CLERKB, - /* 0x24A */ PROC_NPC_CLERKT, - /* 0x24B */ PROC_NPC_WRESTLER, - /* 0x24C */ PROC_Tag_Arena, - /* 0x24D */ PROC_Tag_Instruction, - /* 0x24E */ PROC_NPC_DOC, - /* 0x24F */ PROC_NPC_GWOLF, - /* 0x250 */ PROC_NPC_LEN, - /* 0x251 */ PROC_NPC_LUD, - /* 0x252 */ PROC_NPC_FAIRY_SEIREI, - /* 0x253 */ PROC_NPC_FAIRY, - /* 0x254 */ PROC_NPC_HANJO, - /* 0x255 */ PROC_NPC_HENNA, - /* 0x256 */ PROC_NPC_HENNA0, - /* 0x257 */ PROC_NPC_HOZ, - /* 0x258 */ PROC_NPC_JAGAR, - /* 0x259 */ PROC_NPC_KKRI, - /* 0x25A */ PROC_NPC_KN, - /* 0x25B */ PROC_KN_BULLET, - /* 0x25C */ PROC_NPC_KNJ, - /* 0x25D */ PROC_NPC_KOLIN, - /* 0x25E */ PROC_NPC_KOLINB, - /* 0x25F */ PROC_NPC_KYURY, - /* 0x260 */ PROC_NPC_MARO, - /* 0x261 */ PROC_NPC_MIDP, - /* 0x262 */ PROC_NPC_MOI, - /* 0x263 */ PROC_NPC_RACA, - /* 0x264 */ PROC_NPC_SARU, - /* 0x265 */ PROC_NPC_SEIB, - /* 0x266 */ PROC_NPC_SEIC, - /* 0x267 */ PROC_NPC_SEID, - /* 0x268 */ PROC_NPC_SEIRA, - /* 0x269 */ PROC_NPC_SERA2, - /* 0x26A */ PROC_NPC_SEIREI, - /* 0x26B */ PROC_NPC_SHAMAN, - /* 0x26C */ PROC_NPC_SMARO, - /* 0x26D */ PROC_NPC_SOLA, - /* 0x26E */ PROC_NPC_TARO, - /* 0x26F */ PROC_NPC_PACHI_BESU, - /* 0x270 */ PROC_NPC_PACHI_TARO, - /* 0x271 */ PROC_NPC_PACHI_MARO, - /* 0x272 */ PROC_TAG_PATI, - /* 0x273 */ PROC_NPC_THE, - /* 0x274 */ PROC_NPC_TKJ, - /* 0x275 */ PROC_NPC_TKS, - /* 0x276 */ PROC_NPC_TKC, - /* 0x277 */ PROC_OBJ_TKS, - /* 0x278 */ PROC_NPC_TOBY, - /* 0x279 */ PROC_NPC_URI, - /* 0x27A */ PROC_NPC_YELIA, - /* 0x27B */ PROC_NPC_YKM, - /* 0x27C */ PROC_NPC_YKW, - /* 0x27D */ PROC_NPC_ZANB, - /* 0x27E */ PROC_NPC_ZANT, - /* 0x27F */ PROC_NPC_ZELDA, - /* 0x280 */ PROC_NPC_ZELR, - /* 0x281 */ PROC_NPC_ZELRO, - /* 0x282 */ PROC_OBJ_ZRAFREEZE, - /* 0x283 */ PROC_NPC_ZRC, - /* 0x284 */ PROC_NPC_ZRZ, - /* 0x285 */ PROC_ZRA_MARK, - /* 0x286 */ PROC_MYNA2, - /* 0x287 */ PROC_TAG_MYNA2, - /* 0x288 */ PROC_NPC_CD3, - /* 0x289 */ PROC_Tag_Schedule, - /* 0x28A */ PROC_Tag_Escape, - /* 0x28B */ PROC_NPC_CHAT, - /* 0x28C */ PROC_NPC_SOLDIERa, - /* 0x28D */ PROC_NPC_SOLDIERb, - /* 0x28E */ PROC_PASSER_MNG, - /* 0x28F */ PROC_NPC_PASSER, - /* 0x290 */ PROC_NPC_PASSER2, - /* 0x291 */ PROC_NPC_POST, - /* 0x292 */ PROC_NPC_POUYA, - /* 0x293 */ PROC_FORMATION_MNG, - /* 0x294 */ PROC_NPC_FGUARD, - /* 0x295 */ PROC_GUARD_MNG, - /* 0x296 */ PROC_TAG_GUARD, - /* 0x297 */ PROC_NPC_GUARD, - /* 0x298 */ PROC_NPC_ASH, - /* 0x299 */ PROC_NPC_ASHB, - /* 0x29A */ PROC_NPC_SHAD, - /* 0x29B */ PROC_NPC_RAFREL, - /* 0x29C */ PROC_NPC_MOIR, - /* 0x29D */ PROC_NPC_IMPAL, - /* 0x29E */ PROC_NPC_SHOE, - /* 0x29F */ PROC_NPC_DOORBOY, - /* 0x2A0 */ PROC_NPC_PRAYER, - /* 0x2A1 */ PROC_NPC_KASIHANA, - /* 0x2A2 */ PROC_NPC_KASIKYU, - /* 0x2A3 */ PROC_NPC_KASIMICH, - /* 0x2A4 */ PROC_NPC_DRSOL, - /* 0x2A5 */ PROC_NPC_CHIN, - /* 0x2A6 */ PROC_NPC_INS, - /* 0x2A7 */ PROC_NPC_SHOP0, - /* 0x2A8 */ PROC_NPC_MK, - /* 0x2A9 */ PROC_NPC_P2, - /* 0x2AA */ PROC_KYTAG00, - /* 0x2AB */ PROC_KYTAG01, - /* 0x2AC */ PROC_KYTAG02, - /* 0x2AD */ PROC_KYTAG03, - /* 0x2AE */ PROC_KYTAG04, - /* 0x2AF */ PROC_KYTAG05, - /* 0x2B0 */ PROC_KYTAG06, - /* 0x2B1 */ PROC_KYTAG07, - /* 0x2B2 */ PROC_KYTAG08, - /* 0x2B3 */ PROC_KYTAG09, - /* 0x2B4 */ PROC_KYTAG10, - /* 0x2B5 */ PROC_KYTAG11, - /* 0x2B6 */ PROC_KYTAG12, - /* 0x2B7 */ PROC_KYTAG13, - /* 0x2B8 */ PROC_KYTAG14, - /* 0x2B9 */ PROC_KYTAG15, - /* 0x2BA */ PROC_KYTAG16, - /* 0x2BB */ PROC_KYTAG17, - /* 0x2BC */ PROC_Ykgr, - /* 0x2BD */ PROC_TALK, - /* 0x2BE */ PROC_Obj_Crope, - /* 0x2BF */ PROC_Obj_Bombf, - /* 0x2C0 */ PROC_Obj_BkLeaf, - /* 0x2C1 */ PROC_Tag_Mhint, - /* 0x2C2 */ PROC_Tag_Mmsg, - /* 0x2C3 */ PROC_Tag_Mwait, - /* 0x2C4 */ PROC_Tag_Mstop, - /* 0x2C5 */ PROC_Tag_Stream, - /* 0x2C6 */ PROC_Tag_Sppath, - /* 0x2C7 */ PROC_Tag_Wljump, - /* 0x2C8 */ PROC_Tag_TWGate, - /* 0x2C9 */ PROC_Tag_Lv6Gate, - /* 0x2CA */ PROC_Tag_Lv7Gate, - /* 0x2CB */ PROC_Tag_Lv8Gate, - /* 0x2CC */ PROC_Tag_TheBHint, - /* 0x2CD */ PROC_Tag_Assist, - /* 0x2CE */ PROC_DEMO00, - /* 0x2CF */ PROC_TAG_CAMERA, - /* 0x2D0 */ PROC_TAG_CHKPOINT, - /* 0x2D1 */ PROC_TAG_EVENT, - /* 0x2D2 */ PROC_TAG_EVT, - /* 0x2D3 */ PROC_TAG_TELOP, - /* 0x2D4 */ PROC_TAG_HOWL, - /* 0x2D5 */ PROC_TAG_MSG, - /* 0x2D6 */ PROC_TAG_LANTERN, - /* 0x2D7 */ PROC_Tag_Mist, - /* 0x2D8 */ PROC_DMIDNA, - /* 0x2D9 */ PROC_KY_THUNDER, - /* 0x2DA */ PROC_VRBOX, - /* 0x2DB */ PROC_VRBOX2, - /* 0x2DC */ PROC_BG, - /* 0x2DD */ PROC_SET_BG_OBJ, - /* 0x2DE */ PROC_BG_OBJ, - /* 0x2DF */ PROC_MIRROR, - /* 0x2E0 */ PROC_MOVIE_PLAYER, - /* 0x2E1 */ PROC_TITLE, - /* 0x2E2 */ PROC_FR, - /* 0x2E3 */ PROC_ECONT, - /* 0x2E4 */ PROC_MG_ROD, - /* 0x2E5 */ PROC_E_ARROW, - /* 0x2E6 */ PROC_BULLET, - /* 0x2E7 */ PROC_SWHIT0, - /* 0x2E8 */ PROC_E_TH_BALL, - /* 0x2E9 */ PROC_TAG_EVTAREA, - /* 0x2EA */ PROC_TAG_EVTMSG, - /* 0x2EB */ PROC_TAG_KMSG, - /* 0x2EC */ PROC_TAG_PUSH, - /* 0x2ED */ PROC_E_MK_BO, - /* 0x2EE */ PROC_E_MM_MT, - /* 0x2EF */ PROC_OBJ_KBOX, - /* 0x2F0 */ PROC_OBJ_FW, - /* 0x2F1 */ PROC_B_GOS, - /* 0x2F2 */ PROC_OBJ_YSTONE, - /* 0x2F3 */ PROC_MANT, - /* 0x2F4 */ PROC_CROD, - /* 0x2F5 */ PROC_OBJ_PLEAF, - /* 0x2F6 */ PROC_OBJ_KBACKET, - /* 0x2F7 */ PROC_OBJ_YBAG, - /* 0x2F8 */ PROC_OBJ_PUMPKIN, - /* 0x2F9 */ PROC_OBJ_AUTOMATA, - /* 0x2FA */ PROC_OBJ_GADGET, - /* 0x2FB */ PROC_OBJ_KAGO, - /* 0x2FC */ PROC_Obj_Carry, - /* 0x2FD */ PROC_Obj_Stone, - /* 0x2FE */ PROC_OBJ_HB, - /* 0x2FF */ PROC_NPC_INKO, - /* 0x300 */ PROC_BD, - /* 0x301 */ PROC_Obj_Eff, - /* 0x302 */ PROC_WPILLAR, - /* 0x303 */ PROC_WMARK, - /* 0x304 */ PROC_E_BI, - /* 0x305 */ PROC_E_BI_LEAF, - /* 0x306 */ PROC_START_AND_GOAL, - /* 0x307 */ PROC_NPC_DF, - /* 0x308 */ PROC_ARROW, - /* 0x309 */ PROC_PATH_LINE, - /* 0x30A */ PROC_TAG_ALLMATO, - /* 0x30B */ PROC_Obj_Timer, - /* 0x30C */ PROC_SCENE_EXIT, - /* 0x30D */ PROC_CAMERA, - /* 0x30E */ PROC_CAMERA2, - /* 0x30F */ PROC_SUSPEND, - /* 0x310 */ PROC_GRASS, - /* 0x311 */ PROC_KYEFF, - /* 0x312 */ PROC_KYEFF2, - /* 0x313 */ PROC_MSG_OBJECT, - /* 0x314 */ PROC_MENUWINDOW, - /* 0x315 */ PROC_TIMER, - /* 0x316 */ PROC_METER2, - /* 0x317 */ PROC_GAMEOVER, + +#define ALL_PROCS \ +/* 0x000 */ X(PROC_OVERLAP0) \ +/* 0x001 */ X(PROC_OVERLAP1) \ +/* 0x002 */ X(PROC_OVERLAP3) \ +/* 0x003 */ X(PROC_OVERLAP6) \ +/* 0x004 */ X(PROC_OVERLAP7) \ +/* 0x005 */ X(PROC_OVERLAP8) \ +/* 0x006 */ X(PROC_OVERLAP9) \ +/* 0x007 */ X(PROC_OVERLAP10) \ +/* 0x008 */ X(PROC_OVERLAP11) \ +/* 0x009 */ X(PROC_LOGO_SCENE) \ +/* 0x00A */ X(PROC_MENU_SCENE) \ +/* 0x00B */ X(PROC_PLAY_SCENE) \ +/* 0x00C */ X(PROC_OPENING_SCENE) \ +/* 0x00D */ X(PROC_NAME_SCENE) \ +/* 0x00E */ X(PROC_NAMEEX_SCENE) \ +PROCS_NOT_WII \ +/* 0x011 */ X(PROC_OVERLAP2) \ +/* 0x012 */ X(PROC_ROOM_SCENE) \ +/* 0x013 */ X(PROC_KANKYO) \ +/* 0x014 */ X(PROC_ALLDIE) \ +/* 0x015 */ X(PROC_ENVSE) \ +/* 0x016 */ X(PROC_Obj_Swpush) \ +/* 0x017 */ X(PROC_Obj_Swpush2) \ +/* 0x018 */ X(PROC_Obj_Swpush5) \ +/* 0x019 */ X(PROC_Tag_Gstart) \ +/* 0x01A */ X(PROC_NO_CHG_ROOM) \ +/* 0x01B */ X(PROC_Obj_Lv6ElevtA) \ +/* 0x01C */ X(PROC_OBJ_SO) \ +/* 0x01D */ X(PROC_Obj_Movebox) \ +/* 0x01E */ X(PROC_Obj_SwTurn) \ +/* 0x01F */ X(PROC_Obj_Lv6SwTurn) \ +/* 0x020 */ X(PROC_OBJ_SEKIZOA) \ +/* 0x021 */ X(PROC_OBJ_GRA) \ +/* 0x022 */ X(PROC_TAG_GRA) \ +/* 0x023 */ X(PROC_TAG_YAMI) \ +/* 0x024 */ X(PROC_Obj_Ladder) \ +/* 0x025 */ X(PROC_OBJ_BEF) \ +/* 0x026 */ X(PROC_OBJ_FMOBJ) \ +/* 0x027 */ X(PROC_OBJ_LBOX) \ +/* 0x028 */ X(PROC_OBJ_WEB0) \ +/* 0x029 */ X(PROC_OBJ_WEB1) \ +/* 0x02A */ X(PROC_OBJ_CB) \ +/* 0x02B */ X(PROC_OBJ_MAKI) \ +/* 0x02C */ X(PROC_OBJ_BRG) \ +/* 0x02D */ X(PROC_OBJ_GB) \ +/* 0x02E */ X(PROC_OBJ_GM) \ +/* 0x02F */ X(PROC_OBJ_TOBY) \ +/* 0x030 */ X(PROC_OBJ_TP) \ +/* 0x031 */ X(PROC_TREESH) \ +/* 0x032 */ X(PROC_Obj_ZDoor) \ +/* 0x033 */ X(PROC_Obj_Pillar) \ +/* 0x034 */ X(PROC_Obj_Cdoor) \ +/* 0x035 */ X(PROC_GRDWATER) \ +/* 0x036 */ X(PROC_Obj_RotBridge) \ +/* 0x037 */ X(PROC_Obj_MagLift) \ +/* 0x038 */ X(PROC_Obj_MagLiftRot) \ +/* 0x039 */ X(PROC_Obj_Lv1Cdl00) \ +/* 0x03A */ X(PROC_Obj_Lv1Cdl01) \ +/* 0x03B */ X(PROC_Obj_TvCdlst) \ +/* 0x03C */ X(PROC_Obj_HsTarget) \ +/* 0x03D */ X(PROC_Obj_HeavySw) \ +/* 0x03E */ X(PROC_Obj_GoGate) \ +/* 0x03F */ X(PROC_Obj_TaFence) \ +/* 0x040 */ X(PROC_Obj_Saidan) \ +/* 0x041 */ X(PROC_Obj_SpinLift) \ +/* 0x042 */ X(PROC_Obj_BmWindow) \ +/* 0x043 */ X(PROC_Obj_RfHole) \ +/* 0x044 */ X(PROC_Obj_WaterPillar) \ +/* 0x045 */ X(PROC_Obj_SyRock) \ +/* 0x046 */ X(PROC_Obj_BsGate) \ +/* 0x047 */ X(PROC_Obj_AmiShutter) \ +/* 0x048 */ X(PROC_Obj_WtGate) \ +/* 0x049 */ X(PROC_Obj_Lv2Candle) \ +/* 0x04A */ X(PROC_Obj_TogeTrap) \ +/* 0x04B */ X(PROC_Obj_RotTrap) \ +/* 0x04C */ X(PROC_Obj_SwallShutter) \ +/* 0x04D */ X(PROC_Obj_IceWall) \ +/* 0x04E */ X(PROC_Obj_Lv5SwIce) \ +/* 0x04F */ X(PROC_Obj_Lv5FBoard) \ +/* 0x050 */ X(PROC_Obj_Turara) \ +/* 0x051 */ X(PROC_Obj_TwGate) \ +/* 0x052 */ X(PROC_Obj_Digholl) \ +/* 0x053 */ X(PROC_Obj_Digpl) \ +/* 0x054 */ X(PROC_Obj_TestCube) \ +/* 0x055 */ X(PROC_Obj_Kshutter) \ +/* 0x056 */ X(PROC_NPC_COACH) \ +/* 0x057 */ X(PROC_NPC_THEB) \ +/* 0x058 */ X(PROC_COACH_FIRE) \ +/* 0x059 */ X(PROC_COACH2D) \ +/* 0x05A */ X(PROC_BALLOON2D) \ +/* 0x05B */ X(PROC_SKIP2D) \ +/* 0x05C */ X(PROC_Obj_MvStair) \ +/* 0x05D */ X(PROC_Obj_Cowdoor) \ +/* 0x05E */ X(PROC_Obj_Swpropeller) \ +/* 0x05F */ X(PROC_Obj_BoomShutter) \ +/* 0x060 */ X(PROC_NPC_KS) \ +/* 0x061 */ X(PROC_Obj_Hfuta) \ +/* 0x062 */ X(PROC_Obj_BkDoor) \ +/* 0x063 */ X(PROC_Obj_Cboard) \ +/* 0x064 */ X(PROC_Obj_MGate) \ +/* 0x065 */ X(PROC_Obj_Ikada) \ +/* 0x066 */ X(PROC_Obj_Ice_l) \ +/* 0x067 */ X(PROC_Obj_Ice_s) \ +/* 0x068 */ X(PROC_Obj_E_CREATE) \ +/* 0x069 */ X(PROC_Obj_Bhbridge) \ +/* 0x06A */ X(PROC_Obj_Kaisou) \ +/* 0x06B */ X(PROC_Obj_HHASHI) \ +/* 0x06C */ X(PROC_Obj_BHASHI) \ +/* 0x06D */ X(PROC_OCTHASHI) \ +/* 0x06E */ X(PROC_Obj_THASHI) \ +/* 0x06F */ X(PROC_Obj_CRVGATE) \ +/* 0x070 */ X(PROC_Obj_CRVFENCE) \ +/* 0x071 */ X(PROC_Obj_CRVHAHEN) \ +/* 0x072 */ X(PROC_Obj_CRVSTEEL) \ +/* 0x073 */ X(PROC_Obj_CRVLH_UP) \ +/* 0x074 */ X(PROC_Obj_CRVLH_DW) \ +/* 0x075 */ X(PROC_Obj_RIVERROCK) \ +/* 0x076 */ X(PROC_Obj_DUST) \ +/* 0x077 */ X(PROC_Obj_ITA) \ +/* 0x078 */ X(PROC_Obj_Window) \ +/* 0x079 */ X(PROC_Obj_MetalBox) \ +/* 0x07A */ X(PROC_Obj_BBox) \ +/* 0x07B */ X(PROC_OBJ_MSIMA) \ +/* 0x07C */ X(PROC_OBJ_MYOGAN) \ +/* 0x07D */ X(PROC_B_ZANTS) \ +/* 0x07E */ X(PROC_Obj_ChainBlock) \ +/* 0x07F */ X(PROC_Obj_ChainWall) \ +/* 0x080 */ X(PROC_Obj_KkrGate) \ +/* 0x081 */ X(PROC_Obj_RiderGate) \ +/* 0x082 */ X(PROC_Obj_Onsen) \ +/* 0x083 */ X(PROC_Obj_Chest) \ +/* 0x084 */ X(PROC_Obj_Bemos) \ +/* 0x085 */ X(PROC_Obj_RopeBridge) \ +/* 0x086 */ X(PROC_Obj_WellCover) \ +/* 0x087 */ X(PROC_Obj_GraveStone) \ +/* 0x088 */ X(PROC_Obj_ZraRock) \ +/* 0x089 */ X(PROC_Obj_GraRock) \ +/* 0x08A */ X(PROC_Obj_GrzRock) \ +/* 0x08B */ X(PROC_GRA_WALL) \ +/* 0x08C */ X(PROC_OBJ_ONSEN_FIRE) \ +/* 0x08D */ X(PROC_Obj_Lv6bemos) \ +/* 0x08E */ X(PROC_Obj_Lv6bemos2) \ +/* 0x08F */ X(PROC_Obj_BarDesk) \ +/* 0x090 */ X(PROC_Obj_DigSnow) \ +/* 0x091 */ X(PROC_Obj_Ytaihou) \ +/* 0x092 */ X(PROC_Obj_Elevator) \ +/* 0x093 */ X(PROC_Obj_Lv6TogeRoll) \ +/* 0x094 */ X(PROC_Obj_Lv6TogeTrap) \ +/* 0x095 */ X(PROC_Obj_Lv6Tenbin) \ +/* 0x096 */ X(PROC_Obj_Lv6SwGate) \ +/* 0x097 */ X(PROC_Obj_Lv6Lblock) \ +/* 0x098 */ X(PROC_Obj_Lv6ChgGate) \ +/* 0x099 */ X(PROC_Obj_Lv6FuriTrap) \ +/* 0x09A */ X(PROC_Obj_Lv6SzGate) \ +/* 0x09B */ X(PROC_Obj_Lv4EdShutter) \ +/* 0x09C */ X(PROC_Obj_Lv4Gate) \ +/* 0x09D */ X(PROC_Obj_Lv4PoGate) \ +/* 0x09E */ X(PROC_Obj_Lv4SlideWall) \ +/* 0x09F */ X(PROC_Obj_Lv4HsTarget) \ +/* 0x0A0 */ X(PROC_Obj_Lv7PropY) \ +/* 0x0A1 */ X(PROC_Obj_Lv7BsGate) \ +/* 0x0A2 */ X(PROC_Obj_Lv8OptiLift) \ +/* 0x0A3 */ X(PROC_Obj_Lv8KekkaiTrap) \ +/* 0x0A4 */ X(PROC_Obj_Lv8Lift) \ +/* 0x0A5 */ X(PROC_Obj_Lv8UdFloor) \ +/* 0x0A6 */ X(PROC_Obj_Lv9SwShutter) \ +/* 0x0A7 */ X(PROC_Obj_TobyHouse) \ +/* 0x0A8 */ X(PROC_Obj_poCandle) \ +/* 0x0A9 */ X(PROC_Obj_Lv4DigSand) \ +/* 0x0AA */ X(PROC_Obj_FallObj) \ +/* 0x0AB */ X(PROC_Obj_SmgDoor) \ +/* 0x0AC */ X(PROC_Obj_SwLight) \ +/* 0x0AD */ X(PROC_Obj_Avalanche) \ +/* 0x0AE */ X(PROC_Obj_MirrorScrew) \ +/* 0x0AF */ X(PROC_Obj_MirrorSand) \ +/* 0x0B0 */ X(PROC_Obj_MirrorTable) \ +/* 0x0B1 */ X(PROC_Obj_MirrorChain) \ +/* 0x0B2 */ X(PROC_Obj_Mirror6Pole) \ +/* 0x0B3 */ X(PROC_Obj_SwSpinner) \ +/* 0x0B4 */ X(PROC_Obj_TDoor) \ +/* 0x0B5 */ X(PROC_Obj_Lv7Bridge) \ +/* 0x0B6 */ X(PROC_Obj_zrTurara) \ +/* 0x0B7 */ X(PROC_Obj_TakaraDai) \ +/* 0x0B8 */ X(PROC_Obj_Table) \ +/* 0x0B9 */ X(PROC_Obj_CatDoor) \ +/* 0x0BA */ X(PROC_Obj_Gake) \ +/* 0x0BB */ X(PROC_CSTAF) \ +/* 0x0BC */ X(PROC_Obj_Lv4RailWall) \ +/* 0x0BD */ X(PROC_Obj_Lv4Sand) \ +/* 0x0BE */ X(PROC_Obj_PushDoor) \ +/* 0x0BF */ X(PROC_PushDoor) \ +/* 0x0C0 */ X(PROC_Obj_GanonWall2) \ +/* 0x0C1 */ X(PROC_Obj_Lv4Bridge) \ +/* 0x0C2 */ X(PROC_Obj_Lv4Floor) \ +/* 0x0C3 */ X(PROC_Tag_Spinner) \ +/* 0x0C4 */ X(PROC_Obj_SwHang) \ +/* 0x0C5 */ X(PROC_Obj_RotStair) \ +/* 0x0C6 */ X(PROC_Obj_MagneArm) \ +/* 0x0C7 */ X(PROC_Obj_KWheel00) \ +/* 0x0C8 */ X(PROC_Obj_KWheel01) \ +/* 0x0C9 */ X(PROC_Obj_Ychndlr) \ +/* 0x0CA */ X(PROC_Obj_PRElvtr) \ +/* 0x0CB */ X(PROC_Obj_MHasu) \ +/* 0x0CC */ X(PROC_Obj_YIblltray) \ +/* 0x0CD */ X(PROC_Obj_Lv6EGate) \ +/* 0x0CE */ X(PROC_Obj_PDtile) \ +/* 0x0CF */ X(PROC_Obj_PDwall) \ +/* 0x0D0 */ X(PROC_Obj_Lv4PRwall) \ +/* 0x0D1 */ X(PROC_Obj_KLift00) \ +/* 0x0D2 */ X(PROC_B_OH) \ +/* 0x0D3 */ X(PROC_Obj_Lv4Chan) \ +/* 0x0D4 */ X(PROC_Obj_Lv3R10Saka) \ +/* 0x0D5 */ X(PROC_Obj_Lv3Water) \ +/* 0x0D6 */ X(PROC_Obj_Lv3Water2) \ +/* 0x0D7 */ X(PROC_OBJ_LV3WATERB) \ +/* 0x0D8 */ X(PROC_Obj_HBombkoya) \ +/* 0x0D9 */ X(PROC_Obj_SZbridge) \ +/* 0x0DA */ X(PROC_Obj_KakarikoBrg) \ +/* 0x0DB */ X(PROC_Obj_OrdinBrg) \ +/* 0x0DC */ X(PROC_Obj_BurnBox) \ +/* 0x0DD */ X(PROC_Obj_KJgjs) \ +/* 0x0DE */ X(PROC_OBJ_IHASI) \ +/* 0x0DF */ X(PROC_Obj_IceBlock) \ +/* 0x0E0 */ X(PROC_Obj_VolcanicBall) \ +/* 0x0E1 */ X(PROC_Obj_VolcanicBomb) \ +/* 0x0E2 */ X(PROC_Obj_VolcGnd) \ +/* 0x0E3 */ X(PROC_Obj_KKanban) \ +/* 0x0E4 */ X(PROC_E_PH) \ +/* 0x0E5 */ X(PROC_NPC_ZRA) \ +/* 0x0E6 */ X(PROC_Obj_Chandelier) \ +/* 0x0E7 */ X(PROC_Obj_Stopper2) \ +/* 0x0E8 */ X(PROC_DOOR20) \ +/* 0x0E9 */ X(PROC_Tag_Hinit) \ +/* 0x0EA */ X(PROC_Tag_Hjump) \ +/* 0x0EB */ X(PROC_Tag_AJnot) \ +/* 0x0EC */ X(PROC_Tag_Hstop) \ +/* 0x0ED */ X(PROC_CANOE) \ +/* 0x0EE */ X(PROC_HORSE) \ +/* 0x0EF */ X(PROC_E_WB) \ +/* 0x0F0 */ X(PROC_OBJ_ITO) \ +/* 0x0F1 */ X(PROC_OBJ_SW) \ +/* 0x0F2 */ X(PROC_SPINNER) \ +/* 0x0F3 */ X(PROC_B_OB) \ +/* 0x0F4 */ X(PROC_KAGO) \ +/* 0x0F5 */ X(PROC_E_YC) \ +/* 0x0F6 */ X(PROC_B_DS) \ +/* 0x0F7 */ X(PROC_B_DR) \ +/* 0x0F8 */ X(PROC_B_ZANTZ) \ +/* 0x0F9 */ X(PROC_B_ZANT) \ +/* 0x0FA */ X(PROC_B_ZANTM) \ +/* 0x0FB */ X(PROC_TBOX) \ +/* 0x0FC */ X(PROC_TBOX2) \ +/* 0x0FD */ X(PROC_ALINK) \ +/* 0x0FE */ X(PROC_BOOMERANG) \ +/* 0x0FF */ X(PROC_MIDNA) \ +/* 0x100 */ X(PROC_NPC_TK) \ +/* 0x101 */ X(PROC_NPC_WORM) \ +/* 0x102 */ X(PROC_PPolamp) \ +/* 0x103 */ X(PROC_BkyRock) \ +/* 0x104 */ X(PROC_HITOBJ) \ +/* 0x105 */ X(PROC_EP) \ +/* 0x106 */ X(PROC_COW) \ +/* 0x107 */ X(PROC_PERU) \ +/* 0x108 */ X(PROC_NI) \ +/* 0x109 */ X(PROC_NPC_TKJ2) \ +/* 0x10A */ X(PROC_SQ) \ +/* 0x10B */ X(PROC_NPC_SQ) \ +/* 0x10C */ X(PROC_DO) \ +/* 0x10D */ X(PROC_NPC_NE) \ +/* 0x10E */ X(PROC_NPC_TR) \ +/* 0x10F */ X(PROC_NPC_LF) \ +/* 0x110 */ X(PROC_OBJ_FOOD) \ +/* 0x111 */ X(PROC_OBJ_KI) \ +/* 0x112 */ X(PROC_OBJ_KITA) \ +/* 0x113 */ X(PROC_OBJ_KEY) \ +/* 0x114 */ X(PROC_OBJ_KEYHOLE) \ +/* 0x115 */ X(PROC_Obj_Lv5Key) \ +/* 0x116 */ X(PROC_OBJ_LP) \ +/* 0x117 */ X(PROC_OBJ_TATIGI) \ +/* 0x118 */ X(PROC_OBJ_ROCK) \ +/* 0x119 */ X(PROC_OBJ_WFLAG) \ +/* 0x11A */ X(PROC_OBJ_KAGE) \ +/* 0x11B */ X(PROC_OBJ_KANBAN2) \ +/* 0x11C */ X(PROC_OBJ_BALLOON) \ +/* 0x11D */ X(PROC_OBJ_SUISYA) \ +/* 0x11E */ X(PROC_OBJ_OILTUBO) \ +/* 0x11F */ X(PROC_OBJ_ROTEN) \ +/* 0x120 */ X(PROC_OBJ_SSDRINK) \ +/* 0x121 */ X(PROC_OBJ_SSITEM) \ +/* 0x122 */ X(PROC_TAG_SSDRINK) \ +/* 0x123 */ X(PROC_TAG_BTLITM) \ +/* 0x124 */ X(PROC_TAG_LV5SOUP) \ +/* 0x125 */ X(PROC_TAG_MNLIGHT) \ +/* 0x126 */ X(PROC_TAG_SHOPCAM) \ +/* 0x127 */ X(PROC_TAG_SHOPITM) \ +/* 0x128 */ X(PROC_OBJ_NDOOR) \ +/* 0x129 */ X(PROC_OBJ_UDOOR) \ +/* 0x12A */ X(PROC_OBJ_USAKU) \ +/* 0x12B */ X(PROC_Obj_SM_DOOR) \ +/* 0x12C */ X(PROC_OBJ_BED) \ +/* 0x12D */ X(PROC_OBJ_BOUMATO) \ +/* 0x12E */ X(PROC_OBJ_ITAMATO) \ +/* 0x12F */ X(PROC_OBJ_NOUGU) \ +/* 0x130 */ X(PROC_OBJ_STICK) \ +/* 0x131 */ X(PROC_OBJ_MIE) \ +/* 0x132 */ X(PROC_OBJ_SEKIDOOR) \ +/* 0x133 */ X(PROC_OBJ_SEKIZO) \ +/* 0x134 */ X(PROC_OBJ_SMTILE) \ +/* 0x135 */ X(PROC_NPC_FISH) \ +/* 0x136 */ X(PROC_MG_FISH) \ +/* 0x137 */ X(PROC_FSHOP) \ +/* 0x138 */ X(PROC_NPC_DU) \ +/* 0x139 */ X(PROC_DISAPPEAR) \ +/* 0x13A */ X(PROC_Obj_Mato) \ +/* 0x13B */ X(PROC_Obj_Flag) \ +/* 0x13C */ X(PROC_Obj_Flag2) \ +/* 0x13D */ X(PROC_Obj_Flag3) \ +/* 0x13E */ X(PROC_Obj_GOMIKABE) \ +/* 0x13F */ X(PROC_Obj_Yousei) \ +/* 0x140 */ X(PROC_Obj_Kabuto) \ +/* 0x141 */ X(PROC_Obj_Cho) \ +/* 0x142 */ X(PROC_Obj_Kuw) \ +/* 0x143 */ X(PROC_Obj_Nan) \ +/* 0x144 */ X(PROC_Obj_Dan) \ +/* 0x145 */ X(PROC_Obj_Kam) \ +/* 0x146 */ X(PROC_Obj_Ten) \ +/* 0x147 */ X(PROC_Obj_Ari) \ +/* 0x148 */ X(PROC_Obj_Kag) \ +/* 0x149 */ X(PROC_Obj_Batta) \ +/* 0x14A */ X(PROC_Obj_Tombo) \ +/* 0x14B */ X(PROC_Obj_Kat) \ +/* 0x14C */ X(PROC_Obj_H_Saku) \ +/* 0x14D */ X(PROC_Obj_Yobikusa) \ +/* 0x14E */ X(PROC_Obj_KazeNeko) \ +/* 0x14F */ X(PROC_Obj_KznkArm) \ +/* 0x150 */ X(PROC_Obj_NamePlate) \ +/* 0x151 */ X(PROC_Obj_OnCloth) \ +/* 0x152 */ X(PROC_Obj_LndRope) \ +/* 0x153 */ X(PROC_Obj_ItaRope) \ +/* 0x154 */ X(PROC_Obj_Sakuita) \ +/* 0x155 */ X(PROC_Obj_Laundry) \ +/* 0x156 */ X(PROC_WarpBug) \ +/* 0x157 */ X(PROC_Izumi_Gate) \ +/* 0x158 */ X(PROC_Obj_Fchain) \ +/* 0x159 */ X(PROC_Obj_Wchain) \ +/* 0x15A */ X(PROC_Tag_Attp) \ +/* 0x15B */ X(PROC_Obj_Tornado) \ +/* 0x15C */ X(PROC_Obj_Tornado2) \ +/* 0x15D */ X(PROC_Obj_FirePillar) \ +/* 0x15E */ X(PROC_Obj_FirePillar2) \ +/* 0x15F */ X(PROC_Obj_InoBone) \ +/* 0x160 */ X(PROC_Obj_Stopper) \ +/* 0x161 */ X(PROC_Obj_MHole) \ +/* 0x162 */ X(PROC_Tag_Magne) \ +/* 0x163 */ X(PROC_Obj_BossWarp) \ +/* 0x164 */ X(PROC_Obj_WoodPendulum) \ +/* 0x165 */ X(PROC_Obj_WdStick) \ +/* 0x166 */ X(PROC_Obj_StairBlock) \ +/* 0x167 */ X(PROC_Obj_Geyser) \ +/* 0x168 */ X(PROC_Tag_KtOnFire) \ +/* 0x169 */ X(PROC_Obj_FireWood) \ +/* 0x16A */ X(PROC_Obj_FireWood2) \ +/* 0x16B */ X(PROC_Obj_GpTaru) \ +/* 0x16C */ X(PROC_Obj_OnsenTaru) \ +/* 0x16D */ X(PROC_Obj_KiPot) \ +/* 0x16E */ X(PROC_TBOX_SW) \ +/* 0x16F */ X(PROC_Obj_SwChain) \ +/* 0x170 */ X(PROC_Obj_WoodenSword) \ +/* 0x171 */ X(PROC_Obj_StoneMark) \ +/* 0x172 */ X(PROC_Obj_Lv3Candle) \ +/* 0x173 */ X(PROC_Tag_Lv4Candle) \ +/* 0x174 */ X(PROC_Tag_Lv4CandleDm) \ +/* 0x175 */ X(PROC_Obj_DamCps) \ +/* 0x176 */ X(PROC_Obj_Smoke) \ +/* 0x177 */ X(PROC_Obj_WaterFall) \ +/* 0x178 */ X(PROC_Obj_ZoraCloth) \ +/* 0x179 */ X(PROC_Obj_poFire) \ +/* 0x17A */ X(PROC_Tag_poFire) \ +/* 0x17B */ X(PROC_Obj_glowSphere) \ +/* 0x17C */ X(PROC_Tag_LightBall) \ +/* 0x17D */ X(PROC_SwLBall) \ +/* 0x17E */ X(PROC_SwBall) \ +/* 0x17F */ X(PROC_Obj_WaterEff) \ +/* 0x180 */ X(PROC_Tag_RiverBack) \ +/* 0x181 */ X(PROC_Tag_KagoFall) \ +/* 0x182 */ X(PROC_Tag_Lv2PrChk) \ +/* 0x183 */ X(PROC_Obj_Lv4Gear) \ +/* 0x184 */ X(PROC_Obj_MasterSword) \ +/* 0x185 */ X(PROC_Obj_WoodStatue) \ +/* 0x186 */ X(PROC_Obj_Fan) \ +/* 0x187 */ X(PROC_Obj_IceLeaf) \ +/* 0x188 */ X(PROC_Obj_zrTuraraRc) \ +/* 0x189 */ X(PROC_Tag_RetRoom) \ +/* 0x18A */ X(PROC_Obj_WindStone) \ +/* 0x18B */ X(PROC_Tag_WaraHowl) \ +/* 0x18C */ X(PROC_Obj_SCannon) \ +/* 0x18D */ X(PROC_Obj_SmWStone) \ +/* 0x18E */ X(PROC_Obj_SCannonCrs) \ +/* 0x18F */ X(PROC_Tag_SnowEff) \ +/* 0x190 */ X(PROC_Tag_CstaSw) \ +/* 0x191 */ X(PROC_Tag_Lv6CstaSw) \ +/* 0x192 */ X(PROC_Obj_awaPlar) \ +/* 0x193 */ X(PROC_Obj_poTbox) \ +/* 0x194 */ X(PROC_Obj_TimeFire) \ +/* 0x195 */ X(PROC_Obj_TMoon) \ +/* 0x196 */ X(PROC_Obj_GanonWall) \ +/* 0x197 */ X(PROC_Obj_Prop) \ +/* 0x198 */ X(PROC_CSTATUE) \ +/* 0x199 */ X(PROC_Obj_SwBallA) \ +/* 0x19A */ X(PROC_Obj_SwBallB) \ +/* 0x19B */ X(PROC_Obj_SnowSoup) \ +/* 0x19C */ X(PROC_Obj_Nagaisu) \ +/* 0x19D */ X(PROC_Obj_RCircle) \ +/* 0x19E */ X(PROC_Obj_Picture) \ +/* 0x19F */ X(PROC_Tag_SetBall) \ +/* 0x1A0 */ X(PROC_Tag_SmkEmt) \ +/* 0x1A1 */ X(PROC_SwTime) \ +/* 0x1A2 */ X(PROC_Obj_HFtr) \ +/* 0x1A3 */ X(PROC_Obj_HBarrel) \ +/* 0x1A4 */ X(PROC_Obj_Crystal) \ +/* 0x1A5 */ X(PROC_Obj_SCannonTen) \ +/* 0x1A6 */ X(PROC_Obj_SwBallC) \ +/* 0x1A7 */ X(PROC_SCENE_EXIT2) \ +/* 0x1A8 */ X(PROC_Obj_Hata) \ +/* 0x1A9 */ X(PROC_Obj_ToaruMaki) \ +/* 0x1AA */ X(PROC_Tag_AttackItem) \ +/* 0x1AB */ X(PROC_Tag_RmbitSw) \ +/* 0x1AC */ X(PROC_Obj_Sword) \ +/* 0x1AD */ X(PROC_Tag_Spring) \ +/* 0x1AE */ X(PROC_Tag_Statue) \ +/* 0x1AF */ X(PROC_E_AI) \ +/* 0x1B0 */ X(PROC_E_GS) \ +/* 0x1B1 */ X(PROC_E_GOB) \ +/* 0x1B2 */ X(PROC_E_DD) \ +/* 0x1B3 */ X(PROC_E_DN) \ +/* 0x1B4 */ X(PROC_E_S1) \ +/* 0x1B5 */ X(PROC_E_MF) \ +/* 0x1B6 */ X(PROC_E_SG) \ +/* 0x1B7 */ X(PROC_E_BS) \ +/* 0x1B8 */ X(PROC_E_SF) \ +/* 0x1B9 */ X(PROC_E_SH) \ +/* 0x1BA */ X(PROC_E_DF) \ +/* 0x1BB */ X(PROC_E_GM) \ +/* 0x1BC */ X(PROC_E_MD) \ +/* 0x1BD */ X(PROC_E_SM) \ +/* 0x1BE */ X(PROC_E_SM2) \ +/* 0x1BF */ X(PROC_E_ST) \ +/* 0x1C0 */ X(PROC_E_ST_LINE) \ +/* 0x1C1 */ X(PROC_E_SB) \ +/* 0x1C2 */ X(PROC_E_TH) \ +/* 0x1C3 */ X(PROC_E_CR) \ +/* 0x1C4 */ X(PROC_E_CR_EGG) \ +/* 0x1C5 */ X(PROC_E_DB) \ +/* 0x1C6 */ X(PROC_E_DB_LEAF) \ +/* 0x1C7 */ X(PROC_E_GA) \ +/* 0x1C8 */ X(PROC_E_GB) \ +/* 0x1C9 */ X(PROC_E_HB) \ +/* 0x1CA */ X(PROC_E_HB_LEAF) \ +/* 0x1CB */ X(PROC_E_HZELDA) \ +/* 0x1CC */ X(PROC_E_YD) \ +/* 0x1CD */ X(PROC_E_YH) \ +/* 0x1CE */ X(PROC_E_YD_LEAF) \ +/* 0x1CF */ X(PROC_E_HM) \ +/* 0x1D0 */ X(PROC_E_TK) \ +/* 0x1D1 */ X(PROC_E_TK2) \ +/* 0x1D2 */ X(PROC_E_TK_BALL) \ +/* 0x1D3 */ X(PROC_E_RB) \ +/* 0x1D4 */ X(PROC_E_RD) \ +/* 0x1D5 */ X(PROC_E_RDB) \ +/* 0x1D6 */ X(PROC_E_RDY) \ +/* 0x1D7 */ X(PROC_E_FM) \ +/* 0x1D8 */ X(PROC_E_FS) \ +/* 0x1D9 */ X(PROC_E_PM) \ +/* 0x1DA */ X(PROC_E_PO) \ +/* 0x1DB */ X(PROC_E_MB) \ +/* 0x1DC */ X(PROC_E_MK) \ +/* 0x1DD */ X(PROC_E_MM) \ +/* 0x1DE */ X(PROC_E_FZ) \ +/* 0x1DF */ X(PROC_E_ZS) \ +/* 0x1E0 */ X(PROC_E_KK) \ +/* 0x1E1 */ X(PROC_E_HP) \ +/* 0x1E2 */ X(PROC_E_ZH) \ +/* 0x1E3 */ X(PROC_E_ZM) \ +/* 0x1E4 */ X(PROC_E_PZ) \ +/* 0x1E5 */ X(PROC_E_FB) \ +/* 0x1E6 */ X(PROC_E_FK) \ +/* 0x1E7 */ X(PROC_E_MS) \ +/* 0x1E8 */ X(PROC_E_NEST) \ +/* 0x1E9 */ X(PROC_E_NZ) \ +/* 0x1EA */ X(PROC_E_BA) \ +/* 0x1EB */ X(PROC_E_BU) \ +/* 0x1EC */ X(PROC_E_BUG) \ +/* 0x1ED */ X(PROC_E_BEE) \ +/* 0x1EE */ X(PROC_E_IS) \ +/* 0x1EF */ X(PROC_E_KG) \ +/* 0x1F0 */ X(PROC_E_KR) \ +/* 0x1F1 */ X(PROC_E_SW) \ +/* 0x1F2 */ X(PROC_E_GE) \ +/* 0x1F3 */ X(PROC_Tag_WatchGe) \ +/* 0x1F4 */ X(PROC_E_YM) \ +/* 0x1F5 */ X(PROC_E_YM_TAG) \ +/* 0x1F6 */ X(PROC_E_YMB) \ +/* 0x1F7 */ X(PROC_Tag_FWall) \ +/* 0x1F8 */ X(PROC_Tag_WaterFall) \ +/* 0x1F9 */ X(PROC_E_YK) \ +/* 0x1FA */ X(PROC_E_YR) \ +/* 0x1FB */ X(PROC_E_YG) \ +/* 0x1FC */ X(PROC_E_HZ) \ +/* 0x1FD */ X(PROC_E_WS) \ +/* 0x1FE */ X(PROC_E_OC) \ +/* 0x1FF */ X(PROC_E_OT) \ +/* 0x200 */ X(PROC_E_DT) \ +/* 0x201 */ X(PROC_E_BG) \ +/* 0x202 */ X(PROC_E_OctBg) \ +/* 0x203 */ X(PROC_DR) \ +/* 0x204 */ X(PROC_L7lowDr) \ +/* 0x205 */ X(PROC_L7ODR) \ +/* 0x206 */ X(PROC_E_TT) \ +/* 0x207 */ X(PROC_E_DK) \ +/* 0x208 */ X(PROC_E_VT) \ +/* 0x209 */ X(PROC_E_WW) \ +/* 0x20A */ X(PROC_E_GI) \ +/* 0x20B */ X(PROC_B_BH) \ +/* 0x20C */ X(PROC_B_BQ) \ +/* 0x20D */ X(PROC_B_GM) \ +/* 0x20E */ X(PROC_B_GND) \ +/* 0x20F */ X(PROC_B_GO) \ +/* 0x210 */ X(PROC_B_OH2) \ +/* 0x211 */ X(PROC_B_YO) \ +/* 0x212 */ X(PROC_B_YOI) \ +/* 0x213 */ X(PROC_B_TN) \ +/* 0x214 */ X(PROC_B_GG) \ +/* 0x215 */ X(PROC_B_DRE) \ +/* 0x216 */ X(PROC_B_MGN) \ +/* 0x217 */ X(PROC_E_WAP) \ +/* 0x218 */ X(PROC_ITEM) \ +/* 0x219 */ X(PROC_Obj_SmallKey) \ +/* 0x21A */ X(PROC_Obj_Kantera) \ +/* 0x21B */ X(PROC_Obj_LifeContainer) \ +/* 0x21C */ X(PROC_Obj_Shield) \ +/* 0x21D */ X(PROC_Demo_Item) \ +/* 0x21E */ X(PROC_ShopItem) \ +/* 0x21F */ X(PROC_Obj_Drop) \ +/* 0x220 */ X(PROC_OBJ_RW) \ +/* 0x221 */ X(PROC_NBOMB) \ +/* 0x222 */ X(PROC_TAG_CSW) \ +/* 0x223 */ X(PROC_TAG_QS) \ +/* 0x224 */ X(PROC_HOZELDA) \ +/* 0x225 */ X(PROC_SWC00) \ +/* 0x226 */ X(PROC_KNOB20) \ +/* 0x227 */ X(PROC_DBDOOR) \ +/* 0x228 */ X(PROC_BOSS_DOOR) \ +/* 0x229 */ X(PROC_L1BOSS_DOOR) \ +/* 0x22A */ X(PROC_L1MBOSS_DOOR) \ +/* 0x22B */ X(PROC_L5BOSS_DOOR) \ +/* 0x22C */ X(PROC_DSHUTTER) \ +/* 0x22D */ X(PROC_SPIRAL_DOOR) \ +/* 0x22E */ X(PROC_Tag_ChgRestart) \ +/* 0x22F */ X(PROC_Tag_Restart) \ +/* 0x230 */ X(PROC_ANDSW) \ +/* 0x231 */ X(PROC_ANDSW2) \ +/* 0x232 */ X(PROC_MYNA) \ +/* 0x233 */ X(PROC_NPC_GND) \ +/* 0x234 */ X(PROC_NPC_GRA) \ +/* 0x235 */ X(PROC_NPC_GRC) \ +/* 0x236 */ X(PROC_NPC_GRD) \ +/* 0x237 */ X(PROC_NPC_GRM) \ +/* 0x238 */ X(PROC_NPC_GRMC) \ +/* 0x239 */ X(PROC_NPC_GRO) \ +/* 0x23A */ X(PROC_NPC_GRR) \ +/* 0x23B */ X(PROC_NPC_GRS) \ +/* 0x23C */ X(PROC_NPC_GRZ) \ +/* 0x23D */ X(PROC_NPC_YAMID) \ +/* 0x23E */ X(PROC_NPC_YAMIT) \ +/* 0x23F */ X(PROC_NPC_YAMIS) \ +/* 0x240 */ X(PROC_NPC_BLUENS) \ +/* 0x241 */ X(PROC_NPC_KAKASHI) \ +/* 0x242 */ X(PROC_NPC_KDK) \ +/* 0x243 */ X(PROC_NPC_ARU) \ +/* 0x244 */ X(PROC_NPC_BANS) \ +/* 0x245 */ X(PROC_NPC_BESU) \ +/* 0x246 */ X(PROC_NPC_BOU) \ +/* 0x247 */ X(PROC_NPC_BOU_S) \ +/* 0x248 */ X(PROC_NPC_CLERKA) \ +/* 0x249 */ X(PROC_NPC_CLERKB) \ +/* 0x24A */ X(PROC_NPC_CLERKT) \ +/* 0x24B */ X(PROC_NPC_WRESTLER) \ +/* 0x24C */ X(PROC_Tag_Arena) \ +/* 0x24D */ X(PROC_Tag_Instruction) \ +/* 0x24E */ X(PROC_NPC_DOC) \ +/* 0x24F */ X(PROC_NPC_GWOLF) \ +/* 0x250 */ X(PROC_NPC_LEN) \ +/* 0x251 */ X(PROC_NPC_LUD) \ +/* 0x252 */ X(PROC_NPC_FAIRY_SEIREI) \ +/* 0x253 */ X(PROC_NPC_FAIRY) \ +/* 0x254 */ X(PROC_NPC_HANJO) \ +/* 0x255 */ X(PROC_NPC_HENNA) \ +/* 0x256 */ X(PROC_NPC_HENNA0) \ +/* 0x257 */ X(PROC_NPC_HOZ) \ +/* 0x258 */ X(PROC_NPC_JAGAR) \ +/* 0x259 */ X(PROC_NPC_KKRI) \ +/* 0x25A */ X(PROC_NPC_KN) \ +/* 0x25B */ X(PROC_KN_BULLET) \ +/* 0x25C */ X(PROC_NPC_KNJ) \ +/* 0x25D */ X(PROC_NPC_KOLIN) \ +/* 0x25E */ X(PROC_NPC_KOLINB) \ +/* 0x25F */ X(PROC_NPC_KYURY) \ +/* 0x260 */ X(PROC_NPC_MARO) \ +/* 0x261 */ X(PROC_NPC_MIDP) \ +/* 0x262 */ X(PROC_NPC_MOI) \ +/* 0x263 */ X(PROC_NPC_RACA) \ +/* 0x264 */ X(PROC_NPC_SARU) \ +/* 0x265 */ X(PROC_NPC_SEIB) \ +/* 0x266 */ X(PROC_NPC_SEIC) \ +/* 0x267 */ X(PROC_NPC_SEID) \ +/* 0x268 */ X(PROC_NPC_SEIRA) \ +/* 0x269 */ X(PROC_NPC_SERA2) \ +/* 0x26A */ X(PROC_NPC_SEIREI) \ +/* 0x26B */ X(PROC_NPC_SHAMAN) \ +/* 0x26C */ X(PROC_NPC_SMARO) \ +/* 0x26D */ X(PROC_NPC_SOLA) \ +/* 0x26E */ X(PROC_NPC_TARO) \ +/* 0x26F */ X(PROC_NPC_PACHI_BESU) \ +/* 0x270 */ X(PROC_NPC_PACHI_TARO) \ +/* 0x271 */ X(PROC_NPC_PACHI_MARO) \ +/* 0x272 */ X(PROC_TAG_PATI) \ +/* 0x273 */ X(PROC_NPC_THE) \ +/* 0x274 */ X(PROC_NPC_TKJ) \ +/* 0x275 */ X(PROC_NPC_TKS) \ +/* 0x276 */ X(PROC_NPC_TKC) \ +/* 0x277 */ X(PROC_OBJ_TKS) \ +/* 0x278 */ X(PROC_NPC_TOBY) \ +/* 0x279 */ X(PROC_NPC_URI) \ +/* 0x27A */ X(PROC_NPC_YELIA) \ +/* 0x27B */ X(PROC_NPC_YKM) \ +/* 0x27C */ X(PROC_NPC_YKW) \ +/* 0x27D */ X(PROC_NPC_ZANB) \ +/* 0x27E */ X(PROC_NPC_ZANT) \ +/* 0x27F */ X(PROC_NPC_ZELDA) \ +/* 0x280 */ X(PROC_NPC_ZELR) \ +/* 0x281 */ X(PROC_NPC_ZELRO) \ +/* 0x282 */ X(PROC_OBJ_ZRAFREEZE) \ +/* 0x283 */ X(PROC_NPC_ZRC) \ +/* 0x284 */ X(PROC_NPC_ZRZ) \ +/* 0x285 */ X(PROC_ZRA_MARK) \ +/* 0x286 */ X(PROC_MYNA2) \ +/* 0x287 */ X(PROC_TAG_MYNA2) \ +/* 0x288 */ X(PROC_NPC_CD3) \ +/* 0x289 */ X(PROC_Tag_Schedule) \ +/* 0x28A */ X(PROC_Tag_Escape) \ +/* 0x28B */ X(PROC_NPC_CHAT) \ +/* 0x28C */ X(PROC_NPC_SOLDIERa) \ +/* 0x28D */ X(PROC_NPC_SOLDIERb) \ +/* 0x28E */ X(PROC_PASSER_MNG) \ +/* 0x28F */ X(PROC_NPC_PASSER) \ +/* 0x290 */ X(PROC_NPC_PASSER2) \ +/* 0x291 */ X(PROC_NPC_POST) \ +/* 0x292 */ X(PROC_NPC_POUYA) \ +/* 0x293 */ X(PROC_FORMATION_MNG) \ +/* 0x294 */ X(PROC_NPC_FGUARD) \ +/* 0x295 */ X(PROC_GUARD_MNG) \ +/* 0x296 */ X(PROC_TAG_GUARD) \ +/* 0x297 */ X(PROC_NPC_GUARD) \ +/* 0x298 */ X(PROC_NPC_ASH) \ +/* 0x299 */ X(PROC_NPC_ASHB) \ +/* 0x29A */ X(PROC_NPC_SHAD) \ +/* 0x29B */ X(PROC_NPC_RAFREL) \ +/* 0x29C */ X(PROC_NPC_MOIR) \ +/* 0x29D */ X(PROC_NPC_IMPAL) \ +/* 0x29E */ X(PROC_NPC_SHOE) \ +/* 0x29F */ X(PROC_NPC_DOORBOY) \ +/* 0x2A0 */ X(PROC_NPC_PRAYER) \ +/* 0x2A1 */ X(PROC_NPC_KASIHANA) \ +/* 0x2A2 */ X(PROC_NPC_KASIKYU) \ +/* 0x2A3 */ X(PROC_NPC_KASIMICH) \ +/* 0x2A4 */ X(PROC_NPC_DRSOL) \ +/* 0x2A5 */ X(PROC_NPC_CHIN) \ +/* 0x2A6 */ X(PROC_NPC_INS) \ +/* 0x2A7 */ X(PROC_NPC_SHOP0) \ +/* 0x2A8 */ X(PROC_NPC_MK) \ +/* 0x2A9 */ X(PROC_NPC_P2) \ +/* 0x2AA */ X(PROC_KYTAG00) \ +/* 0x2AB */ X(PROC_KYTAG01) \ +/* 0x2AC */ X(PROC_KYTAG02) \ +/* 0x2AD */ X(PROC_KYTAG03) \ +/* 0x2AE */ X(PROC_KYTAG04) \ +/* 0x2AF */ X(PROC_KYTAG05) \ +/* 0x2B0 */ X(PROC_KYTAG06) \ +/* 0x2B1 */ X(PROC_KYTAG07) \ +/* 0x2B2 */ X(PROC_KYTAG08) \ +/* 0x2B3 */ X(PROC_KYTAG09) \ +/* 0x2B4 */ X(PROC_KYTAG10) \ +/* 0x2B5 */ X(PROC_KYTAG11) \ +/* 0x2B6 */ X(PROC_KYTAG12) \ +/* 0x2B7 */ X(PROC_KYTAG13) \ +/* 0x2B8 */ X(PROC_KYTAG14) \ +/* 0x2B9 */ X(PROC_KYTAG15) \ +/* 0x2BA */ X(PROC_KYTAG16) \ +/* 0x2BB */ X(PROC_KYTAG17) \ +/* 0x2BC */ X(PROC_Ykgr) \ +/* 0x2BD */ X(PROC_TALK) \ +/* 0x2BE */ X(PROC_Obj_Crope) \ +/* 0x2BF */ X(PROC_Obj_Bombf) \ +/* 0x2C0 */ X(PROC_Obj_BkLeaf) \ +/* 0x2C1 */ X(PROC_Tag_Mhint) \ +/* 0x2C2 */ X(PROC_Tag_Mmsg) \ +/* 0x2C3 */ X(PROC_Tag_Mwait) \ +/* 0x2C4 */ X(PROC_Tag_Mstop) \ +/* 0x2C5 */ X(PROC_Tag_Stream) \ +/* 0x2C6 */ X(PROC_Tag_Sppath) \ +/* 0x2C7 */ X(PROC_Tag_Wljump) \ +/* 0x2C8 */ X(PROC_Tag_TWGate) \ +/* 0x2C9 */ X(PROC_Tag_Lv6Gate) \ +/* 0x2CA */ X(PROC_Tag_Lv7Gate) \ +/* 0x2CB */ X(PROC_Tag_Lv8Gate) \ +/* 0x2CC */ X(PROC_Tag_TheBHint) \ +/* 0x2CD */ X(PROC_Tag_Assist) \ +/* 0x2CE */ X(PROC_DEMO00) \ +/* 0x2CF */ X(PROC_TAG_CAMERA) \ +/* 0x2D0 */ X(PROC_TAG_CHKPOINT) \ +/* 0x2D1 */ X(PROC_TAG_EVENT) \ +/* 0x2D2 */ X(PROC_TAG_EVT) \ +/* 0x2D3 */ X(PROC_TAG_TELOP) \ +/* 0x2D4 */ X(PROC_TAG_HOWL) \ +/* 0x2D5 */ X(PROC_TAG_MSG) \ +/* 0x2D6 */ X(PROC_TAG_LANTERN) \ +/* 0x2D7 */ X(PROC_Tag_Mist) \ +/* 0x2D8 */ X(PROC_DMIDNA) \ +/* 0x2D9 */ X(PROC_KY_THUNDER) \ +/* 0x2DA */ X(PROC_VRBOX) \ +/* 0x2DB */ X(PROC_VRBOX2) \ +/* 0x2DC */ X(PROC_BG) \ +/* 0x2DD */ X(PROC_SET_BG_OBJ) \ +/* 0x2DE */ X(PROC_BG_OBJ) \ +/* 0x2DF */ X(PROC_MIRROR) \ +/* 0x2E0 */ X(PROC_MOVIE_PLAYER) \ +/* 0x2E1 */ X(PROC_TITLE) \ +/* 0x2E2 */ X(PROC_FR) \ +/* 0x2E3 */ X(PROC_ECONT) \ +/* 0x2E4 */ X(PROC_MG_ROD) \ +/* 0x2E5 */ X(PROC_E_ARROW) \ +/* 0x2E6 */ X(PROC_BULLET) \ +/* 0x2E7 */ X(PROC_SWHIT0) \ +/* 0x2E8 */ X(PROC_E_TH_BALL) \ +/* 0x2E9 */ X(PROC_TAG_EVTAREA) \ +/* 0x2EA */ X(PROC_TAG_EVTMSG) \ +/* 0x2EB */ X(PROC_TAG_KMSG) \ +/* 0x2EC */ X(PROC_TAG_PUSH) \ +/* 0x2ED */ X(PROC_E_MK_BO) \ +/* 0x2EE */ X(PROC_E_MM_MT) \ +/* 0x2EF */ X(PROC_OBJ_KBOX) \ +/* 0x2F0 */ X(PROC_OBJ_FW) \ +/* 0x2F1 */ X(PROC_B_GOS) \ +/* 0x2F2 */ X(PROC_OBJ_YSTONE) \ +/* 0x2F3 */ X(PROC_MANT) \ +/* 0x2F4 */ X(PROC_CROD) \ +/* 0x2F5 */ X(PROC_OBJ_PLEAF) \ +/* 0x2F6 */ X(PROC_OBJ_KBACKET) \ +/* 0x2F7 */ X(PROC_OBJ_YBAG) \ +/* 0x2F8 */ X(PROC_OBJ_PUMPKIN) \ +/* 0x2F9 */ X(PROC_OBJ_AUTOMATA) \ +/* 0x2FA */ X(PROC_OBJ_GADGET) \ +/* 0x2FB */ X(PROC_OBJ_KAGO) \ +/* 0x2FC */ X(PROC_Obj_Carry) \ +/* 0x2FD */ X(PROC_Obj_Stone) \ +/* 0x2FE */ X(PROC_OBJ_HB) \ +/* 0x2FF */ X(PROC_NPC_INKO) \ +/* 0x300 */ X(PROC_BD) \ +/* 0x301 */ X(PROC_Obj_Eff) \ +/* 0x302 */ X(PROC_WPILLAR) \ +/* 0x303 */ X(PROC_WMARK) \ +/* 0x304 */ X(PROC_E_BI) \ +/* 0x305 */ X(PROC_E_BI_LEAF) \ +/* 0x306 */ X(PROC_START_AND_GOAL) \ +/* 0x307 */ X(PROC_NPC_DF) \ +/* 0x308 */ X(PROC_ARROW) \ +/* 0x309 */ X(PROC_PATH_LINE) \ +/* 0x30A */ X(PROC_TAG_ALLMATO) \ +/* 0x30B */ X(PROC_Obj_Timer) \ +/* 0x30C */ X(PROC_SCENE_EXIT) \ +/* 0x30D */ X(PROC_CAMERA) \ +/* 0x30E */ X(PROC_CAMERA2) \ +/* 0x30F */ X(PROC_SUSPEND) \ +/* 0x310 */ X(PROC_GRASS) \ +/* 0x311 */ X(PROC_KYEFF) \ +/* 0x312 */ X(PROC_KYEFF2) \ +/* 0x313 */ X(PROC_MSG_OBJECT) \ +/* 0x314 */ X(PROC_MENUWINDOW) \ +/* 0x315 */ X(PROC_TIMER) \ +/* 0x316 */ X(PROC_METER2) \ +/* 0x317 */ X(PROC_GAMEOVER) \ + +#define X(name) name, +enum { + ALL_PROCS PROC_MAX_NUM, }; +#undef X + +#if PROCS_DUMP_NAMES +struct ProcName { + unsigned int id; + const char* name; +}; + +#define X(name) { name, #name }, +inline const ProcName procNames[] = { + ALL_PROCS +}; +#undef X + +inline const char* GetProcName(unsigned int id) { + for (auto procName : procNames) { + if (procName.id == id) { + return procName.name; + } + } + + return nullptr; +} + +#endif + +#undef ALL_PROCS #endif /* D_PROCNAME_H */ diff --git a/include/d/d_resorce.h b/include/d/d_resorce.h index 000146822b..31d028a082 100644 --- a/include/d/d_resorce.h +++ b/include/d/d_resorce.h @@ -39,6 +39,7 @@ public: char* getArchiveName() { return mArchiveName; } mDoDvdThd_mountArchive_c* getDMCommand() { return mDMCommand; } JKRArchive* getArchive() { return mArchive; } + JKRSolidHeap* getDataHeap() { return mDataHeap; } u32 incCount() { return ++mCount; } u32 decCount() { return --mCount; } @@ -138,6 +139,14 @@ public: return getResInfo(i_arcName, mStageInfo, ARRAY_SIZEU(mStageInfo)); } + u32 getObjectSize(const char* i_arcName) { + return getSize(i_arcName, mObjectInfo, ARRAY_SIZEU(mObjectInfo)); + } + + u32 getStageSize(const char* i_arcName) { + return getSize(i_arcName, mStageInfo, ARRAY_SIZEU(mStageInfo)); + } + /* 0x0000 */ dRes_info_c mObjectInfo[128]; /* 0x1200 */ dRes_info_c mStageInfo[64]; }; // Size: 0x1B00 diff --git a/include/d/d_s_logo.h b/include/d/d_s_logo.h index 0a611b83c3..56d10eef82 100644 --- a/include/d/d_s_logo.h +++ b/include/d/d_s_logo.h @@ -2,6 +2,7 @@ #define D_S_D_S_LOGO_H #include "f_op/f_op_scene.h" +#include "m_Do/m_Do_dvd_thread.h" class JKRExpHeap; class JKRHeap; @@ -11,33 +12,41 @@ class mDoDvdThd_mountXArchive_c; class mDoDvdThd_mountArchive_c; class mDoDvdThd_toMainRam_c; -class dLog_HIO_c { -public: - dLog_HIO_c(); - virtual ~dLog_HIO_c(); - - u8 field_0x4[0x8 - 0x4]; -}; // Size: 0x8 - class dScnLogo_c : public scene_class { public: enum { - /* 0x0 */ EXEC_WARNING_IN, - /* 0x1 */ EXEC_WARNING_DISP, - /* 0x2 */ EXEC_WARNING_OUT, - /* 0x3 */ EXEC_NINTENDO_IN, - /* 0x4 */ EXEC_NINTENDO_OUT, - /* 0x5 */ EXEC_DOLBY_IN, - /* 0x6 */ EXEC_DOLBY_OUT, - /* 0x7 */ EXEC_DOLBY_OUT2, - /* 0x8 */ EXEC_PROG_IN, - /* 0x9 */ EXEC_PROG_SEL, - /* 0xA */ EXEC_PROG_OUT, - /* 0xB */ EXEC_PROG_SET, - /* 0xC */ EXEC_PROG_SET2, - /* 0xD */ EXEC_PROG_CHANGE, - /* 0xE */ EXEC_DVD_WAIT, - /* 0xF */ EXEC_SCENE_CHANGE, + /* 0 */ EXEC_WARNING_IN, + /* 1 */ EXEC_WARNING_DISP, + /* 2 */ EXEC_WARNING_OUT, + /* 3 */ EXEC_NINTENDO_IN, + /* 4 */ EXEC_NINTENDO_OUT, + /* 5 */ EXEC_DOLBY_IN, + /* 6 */ EXEC_DOLBY_OUT, + /* 7 */ EXEC_DOLBY_OUT2, + /* 8 */ EXEC_PROG_IN, + /* 9 */ EXEC_PROG_SEL, + /* 10 */ EXEC_PROG_OUT, + /* 11 */ EXEC_PROG_SET, + /* 12 */ EXEC_PROG_SET2, + /* 13 */ EXEC_PROG_CHANGE, + /* 14 */ EXEC_DVD_WAIT, + /* 15 */ EXEC_SCENE_CHANGE, + + #if PLATFORM_WII || PLATFORM_SHIELD + /* 16 */ EXEC_STRAP_IN, + /* 17 */ EXEC_STRAP_DISP, + /* 18 */ EXEC_STRAP_OUT, + /* 19 */ EXEC_STRAP_OUT2, + #endif + + #if VERSION == VERSION_SHIELD + /* 20 */ EXEC_MOC_IN, + /* 21 */ EXEC_MOC_DISP, + /* 22 */ EXEC_MOC_OUT, + /* 23 */ EXEC_NVLOGO_IN, + /* 24 */ EXEC_NVLOGO_DISP, + /* 25 */ EXEC_NVLOGO_OUT, + #endif }; dScnLogo_c() {} @@ -64,30 +73,66 @@ public: void nextSceneChange(); ~dScnLogo_c(); int create(); - void logoInitGC(); void dvdDataLoad(); void setProgressiveMode(u8); u8 getProgressiveMode(); bool isProgressiveMode(); void setRenderMode(); - #if VERSION == VERSION_GCN_PAL + #if VERSION == VERSION_GCN_PAL || PLATFORM_WII || PLATFORM_SHIELD u8 getPalLanguage(); #endif - #if DEBUG - static void onOpeningCut() { - mOpeningCut = true; + #if PLATFORM_WII || PLATFORM_SHIELD + void logoInitWii(); + void strapInDraw(); + void strapDispDraw(); + void strapOutDraw(); + void strapOut2Draw(); + #else + void logoInitGC(); + #endif + + #if VERSION == VERSION_SHIELD + void mocInDraw(); + void mocDispDraw(); + void mocOutDraw(); + void nvLogoInDraw(); + void nvLogoDispDraw(); + void nvLogoOutDraw(); + #endif + + mDoDvdThd_mountXArchive_c* aramMount(const char* i_arcPath, JKRHeap* i_heap) { + return mDoDvdThd_mountXArchive_c::create(i_arcPath, 0, JKRArchive::MOUNT_ARAM, i_heap); + } + + mDoDvdThd_mountXArchive_c* onMemMount(const char* i_arcPath) { + return mDoDvdThd_mountXArchive_c::create(i_arcPath, 0, JKRArchive::MOUNT_MEM, NULL); } + static void onOpeningCut() { + #if DEBUG + mOpeningCut = true; + #endif + } + + static u8 isOpeningCut() { + #if DEBUG + return mOpeningCut; + #else + return 0; + #endif + } + + #if DEBUG static u8 mOpeningCut; #endif public: /* 0x1C4 */ request_of_phase_process_class field_0x1c4; /* 0x1CC */ mDoDvdThd_toMainRam_c* sceneCommand; - /* 0x1D0 */ JKRExpHeap* field_0x1d0; - /* 0x1D4 */ JKRExpHeap* field_0x1d4; + /* 0x1D0 */ JKRExpHeap* mLogoHeap; + /* 0x1D4 */ JKRExpHeap* mLogo01Heap; /* 0x1D8 */ JKRHeap* mpHeap; /* 0x1DC */ dDlst_2D_c* mWarning; /* 0x1E0 */ dDlst_2D_c* mWarningStart; @@ -97,6 +142,13 @@ public: /* 0x1F0 */ dDlst_2D_c* mProgressiveYes; /* 0x1F4 */ dDlst_2D_c* mProgressiveNo; /* 0x1F8 */ dDlst_2D_c* mProgressiveSel; +#if PLATFORM_WII || PLATFORM_SHIELD + /* 0x1FC */ dDlst_2D_c* mStrapImg; +#endif +#if VERSION == VERSION_SHIELD + /* 0x200 */ dDlst_2D_c* mNvLogo; + /* 0x204 */ dDlst_2D_c* mMocImg; +#endif #if VERSION == VERSION_GCN_PAL /* 0x1FC */ mDoDvdThd_mountArchive_c* mpPalLogoResCommand; #endif @@ -114,6 +166,10 @@ public: /* 0x214 */ u16 field_0x214; /* 0x218 */ u32 field_0x218; /* 0x21C */ void* dummyGameAlloc; +#if PLATFORM_WII || VERSION == VERSION_SHIELD + /* 0x224 */ mDoDvdThd_toMainRam_c* mpHomeBtnCommand; + /* 0x228 */ int mHomeBtnRegion; +#endif /* 0x220 */ mDoDvdThd_mountXArchive_c* mpField0Command; /* 0x224 */ mDoDvdThd_mountXArchive_c* mpAlAnmCommand; /* 0x228 */ u8 field_0x228[4]; diff --git a/include/d/d_s_menu.h b/include/d/d_s_menu.h index a544c65576..d2e0e9bde0 100644 --- a/include/d/d_s_menu.h +++ b/include/d/d_s_menu.h @@ -83,6 +83,8 @@ public: extern int g_playerKind; extern int g_debugHpMode; extern int g_horsePosInit; + +u8 dSm_read_stageset(u8* i_data); #else class dScnMenu_c {}; #endif diff --git a/include/d/d_s_play.h b/include/d/d_s_play.h index 7181cf0b60..45b60220b0 100644 --- a/include/d/d_s_play.h +++ b/include/d/d_s_play.h @@ -9,9 +9,15 @@ class mDoDvdThd_mountXArchive_c; class mDoDvdThd_toMainRam_c; -class dScnPly_reg_childHIO_c { +class dScnPly_reg_childHIO_c : public JORReflexible { public: - /* 0x00 */ void* vtable; +#if ENABLE_REGHIO + dScnPly_reg_childHIO_c(); + virtual ~dScnPly_reg_childHIO_c() {} + + void genMessage(JORMContext*); +#endif + /* 0x04 */ f32 mFloatReg[30]; /* 0x7C */ s16 mShortReg[10]; }; @@ -37,9 +43,10 @@ public: void genMessage(JORMContext*); }; -class dScnPly_env_HIO_c { +class dScnPly_env_HIO_c : public JORReflexible { public: virtual ~dScnPly_env_HIO_c() {} + void genMessage(JORMContext*); /* 0x04 */ s8 field_0x4; /* 0x08 */ dScnPly_env_otherHIO_c mOther; @@ -79,6 +86,18 @@ public: static s8 pauseTimer; static s8 nextPauseTimer; + #if DEBUG + void onDebugPause() { + debugPause = TRUE; + } + + void offDebugPause() { + debugPause = FALSE; + } + + static u8 debugPause; + #endif + /* 0x1C4 */ request_of_phase_process_class field_0x1c4; /* 0x1CC */ mDoDvdThd_toMainRam_c* sceneCommand; /* 0x1D0 */ mDoDvdThd_mountXArchive_c* field_0x1d0; diff --git a/include/d/d_s_play_env.h b/include/d/d_s_play_env.h index 79eed8a63d..d2b23d9f8c 100644 --- a/include/d/d_s_play_env.h +++ b/include/d/d_s_play_env.h @@ -6,7 +6,9 @@ public: dScnPly_env_otherHIO_c(); virtual ~dScnPly_env_otherHIO_c() {} + void listenPropertyEvent(const JORPropertyEvent*); void genMessage(JORMContext*); + void addSetEmitterID(u16 param_0) { #if DEBUG field_0x1c[field_0x4f++] = param_0; @@ -14,6 +16,8 @@ public: #endif } + void printParticle(); + #if DEBUG /* 0x04 */ s8 field_0x04; #endif @@ -53,6 +57,7 @@ public: dScnPly_env_debugHIO_c(); virtual ~dScnPly_env_debugHIO_c() {} + void listenPropertyEvent(const JORPropertyEvent*); void genMessage(JORMContext*); /* 0x04 */ u8 field_0x4; diff --git a/include/d/d_save.h b/include/d/d_save.h index abb77dd69c..9a57f9eb15 100644 --- a/include/d/d_save.h +++ b/include/d/d_save.h @@ -3,7 +3,7 @@ #include #include "SSystem/SComponent/c_xyz.h" -#include +#include #include "global.h" #include "f_pc/f_pc_name.h" #include "JSystem/JUtility/JUTAssert.h" diff --git a/include/d/d_save_HIO.h b/include/d/d_save_HIO.h index cc2f8af706..e149f7fcb9 100644 --- a/include/d/d_save_HIO.h +++ b/include/d/d_save_HIO.h @@ -209,11 +209,12 @@ private: /* 0x1A0 */ dSvBit_childItOneZoneHIO_c mOneZoneSave; }; -class dSvBit_HIO_c { +class dSvBit_HIO_c : public JORReflexible { public: void init(); virtual ~dSvBit_HIO_c() {} + void genMessage(JORMContext*); /* 0x004 */ s8 field_0x4; /* 0x008 */ dSvBit_childSwitchHIO_c mSwitch; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 6f558f87c0..7b29b2b193 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -4,8 +4,10 @@ #include "SSystem/SComponent/c_lib.h" #include "d/d_kankyo.h" #include "d/d_kankyo_data.h" +#include "dusk/offset_ptr.h" #include "f_op/f_op_actor_mng.h" #include "global.h" +#include "os_report.h" enum StageType { /* 0x0 */ ST_FIELD, @@ -18,14 +20,16 @@ enum StageType { // made up name struct dStage_nodeHeader { + // m_tag is actually a 4-char string (like "STAG"), + // so keep it as big endian without conversion so matching it keeps working. /* 0x0 */ u32 m_tag; - /* 0x4 */ int m_entryNum; - /* 0x8 */ u32 m_offset; + /* 0x4 */ BE(int) m_entryNum; + /* 0x8 */ OFFSET_PTR_RAW m_offset; }; // made up name struct dStage_fileHeader { - /* 0x0 */ int m_chunkCount; + /* 0x0 */ BE(int) m_chunkCount; /* 0x4 */ dStage_nodeHeader m_nodes[1]; // Variable length }; @@ -55,27 +59,27 @@ struct stage_tresure_data_class { }; // Size: 0x20 struct stage_tresure_class { - /* 0x00 */ int num; - /* 0x04 */ stage_tresure_data_class* m_entries; + /* 0x00 */ BE(int) num; + /* 0x04 */ OFFSET_PTR(stage_tresure_data_class) m_entries; }; // STAG struct stage_stag_info_class { - /* 0x00 */ f32 mNear; - /* 0x04 */ f32 mFar; + /* 0x00 */ BE(f32) mNear; + /* 0x04 */ BE(f32) mFar; /* 0x08 */ u8 mCameraType; /* 0x09 */ u8 field_0x09; - /* 0x0A */ u16 field_0x0a; - /* 0x0C */ u32 field_0x0c; - /* 0x10 */ u32 field_0x10; + /* 0x0A */ BE(u16) field_0x0a; + /* 0x0C */ BE(u32) field_0x0c; + /* 0x10 */ BE(u32) field_0x10; /* 0x14 */ u8 field_0x14[6]; // usually all 0xFF - /* 0x1A */ s16 mGapLevel; - /* 0x1C */ s16 mRangeUp; - /* 0x1E */ s16 mRangeDown; - /* 0x20 */ f32 field_0x20; - /* 0x24 */ f32 field_0x24; + /* 0x1A */ BE(s16) mGapLevel; + /* 0x1C */ BE(s16) mRangeUp; + /* 0x1E */ BE(s16) mRangeDown; + /* 0x20 */ BE(f32) field_0x20; + /* 0x24 */ BE(f32) field_0x24; /* 0x28 */ u8 mMsgGroup; - /* 0x2A */ u16 mStageTitleNo; + /* 0x2A */ BE(u16) mStageTitleNo; /* 0x2C */ u8 mParticleNo[16]; }; // Size: 0x3C @@ -101,17 +105,17 @@ struct stage_scls_info_class { }; // Size: 0xD struct stage_scls_info_dummy_class { - /* 0x00 */ int num; - /* 0x04 */ stage_scls_info_class* m_entries; + /* 0x00 */ BE(int) num; + /* 0x04 */ OFFSET_PTR(stage_scls_info_class) m_entries; }; // LGT struct stage_pure_lightvec_info_class { - /* 0x00 */ Vec position; - /* 0x0C */ f32 radius; - /* 0x10 */ f32 directionX; - /* 0x14 */ f32 directionY; - /* 0x18 */ f32 spotCutoff; + /* 0x00 */ BE(Vec) position; + /* 0x0C */ BE(f32) radius; + /* 0x10 */ BE(f32) directionX; + /* 0x14 */ BE(f32) directionY; + /* 0x18 */ BE(f32) spotCutoff; /* 0x1C */ u8 spot_type; /* 0x1D */ u8 dist_atten_type; /* 0x1E */ u8 flags; @@ -121,13 +125,13 @@ struct stage_pure_lightvec_info_class { // COLO struct stage_pselect_info_class { /* 0x0 */ u8 palette_id[8]; - /* 0x8 */ f32 change_rate; + /* 0x8 */ BE(f32) change_rate; }; // Size: 0xC // LGHT struct stage_plight_info_class { - /* 0x00 */ Vec position; - /* 0x0C */ f32 power; + /* 0x00 */ BE(Vec) position; + /* 0x0C */ BE(f32) power; /* 0x10 */ u8 field_0x10[0x18 - 0x10]; /* 0x18 */ color_RGB_class color; /* 0x1B */ u8 fluctuation; @@ -139,8 +143,8 @@ struct stage_palette_info_class { /* 0x03 */ color_RGB_class bg_amb_col[4]; /* 0x0F */ color_RGB_class plight_col[6]; /* 0x21 */ color_RGB_class fog_col; - /* 0x24 */ f32 fog_start_z; - /* 0x28 */ f32 fog_end_z; + /* 0x24 */ BE(f32) fog_start_z; + /* 0x28 */ BE(f32) fog_end_z; /* 0x2C */ u8 vrboxcol_id; /* 0x2D */ u8 bg_light_influence; /* 0x2E */ u8 cloud_shadow_density; @@ -158,8 +162,8 @@ struct stage_map_info_class { }; // Size: 0x38 struct stage_map_info_dummy_class { - /* 0x0 */ int num; - /* 0x4 */ stage_map_info_class* m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(stage_map_info_class) m_entries; }; // Env @@ -174,29 +178,29 @@ struct stage_camera2_data_class { /* 0x11 */ u8 field_0x11; /* 0x12 */ u8 field_0x12; /* 0x13 */ u8 field_0x13; - /* 0x14 */ u16 field_0x14; - /* 0x16 */ u16 field_0x16; + /* 0x14 */ BE(u16) field_0x14; + /* 0x16 */ BE(u16) field_0x16; }; // Size: 0x18 struct stage_camera_class { - /* 0x0 */ int num; - /* 0x4 */ stage_camera2_data_class* m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(stage_camera2_data_class) m_entries; }; // AROB / RARO struct stage_arrow_data_class { - /* 0x00 */ f32 posX; - /* 0x04 */ f32 posY; - /* 0x08 */ f32 posZ; - /* 0x0C */ s16 angleX; - /* 0x0E */ s16 angleY; - /* 0x10 */ s16 angleZ; - /* 0x12 */ s16 field_0x12; + /* 0x00 */ BE(f32) posX; + /* 0x04 */ BE(f32) posY; + /* 0x08 */ BE(f32) posZ; + /* 0x0C */ BE(s16) angleX; + /* 0x0E */ BE(s16) angleY; + /* 0x10 */ BE(s16) angleZ; + /* 0x12 */ BE(s16) field_0x12; }; // Size: 0x14 struct stage_arrow_class { - /* 0x00 */ int num; - /* 0x04 */ stage_arrow_data_class* m_entries; + /* 0x00 */ BE(int) num; + /* 0x04 */ OFFSET_PTR(stage_arrow_data_class) m_entries; }; // ACT @@ -206,8 +210,8 @@ struct stage_actor_data_class { }; // Size: 0x20 struct stage_actor_class { - /* 0x0 */ int num; - /* 0x4 */ stage_actor_data_class* m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(stage_actor_data_class) m_entries; }; // TGSC / SCOB / TGDR / Door @@ -220,14 +224,14 @@ struct stage_tgsc_data_class { STATIC_ASSERT(sizeof(stage_tgsc_data_class) == 0x24); struct stage_tgsc_class { - /* 0x00 */ int num; - /* 0x04 */ stage_tgsc_data_class* m_entries; + /* 0x00 */ BE(int) num; + /* 0x04 */ OFFSET_PTR(stage_tgsc_data_class) m_entries; }; // MPAT struct map_path_class { - /* 0x0 */ int num; - /* 0x4 */ void* m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(void) m_entries; }; // RTBL @@ -235,18 +239,18 @@ struct roomRead_data_class { /* 0x0 */ u8 num; /* 0x1 */ u8 field_0x1; /* 0x2 */ u8 field_0x2; - /* 0x4 */ u8* m_rooms; + /* 0x4 */ OFFSET_PTR(u8) m_rooms; }; // Size: 0x8 struct roomRead_class { - /* 0x0 */ int num; - /* 0x4 */ roomRead_data_class** m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(OFFSET_PTR(roomRead_data_class)) m_entries; }; // MEM struct dStage_MemoryMap_c { - /* 0x0 */ int m_num; - /* 0x4 */ u32* field_0x4; + /* 0x0 */ BE(int) m_num; + /* 0x4 */ OFFSET_PTR(BE(u32)) field_0x4; }; // MEC @@ -256,41 +260,41 @@ struct dStage_MemoryConfig_data { }; // Size: 0x2 struct dStage_MemoryConfig_c { - /* 0x0 */ int m_num; - /* 0x4 */ dStage_MemoryConfig_data* field_0x4; + /* 0x0 */ BE(int) m_num; + /* 0x4 */ OFFSET_PTR(dStage_MemoryConfig_data) field_0x4; }; // PATH / RPAT struct dPath; struct dStage_dPath_c { - /* 0x0 */ int m_num; - /* 0x4 */ dPath* m_path; + /* 0x0 */ BE(int) m_num; + /* 0x4 */ OFFSET_PTR(dPath) m_path; }; // PPNT / RPPN struct dStage_dPnt_c { - /* 0x0 */ int num; - /* 0x4 */ u32 m_pnt_offset; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(void) m_pnt_offset; }; // Size: 0x8 // MULT struct dStage_Mult_info { - /* 0x0 */ f32 mTransX; - /* 0x4 */ f32 mTransY; - /* 0x8 */ s16 mAngle; + /* 0x0 */ BE(f32) mTransX; + /* 0x4 */ BE(f32) mTransY; + /* 0x8 */ BE(s16) mAngle; /* 0xA */ u8 mRoomNo; }; // Size: 0xC class dStage_Multi_c { public: - /* 0x0 */ int num; - /* 0x4 */ dStage_Mult_info* m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(dStage_Mult_info) m_entries; }; // SOND struct stage_sound_data { /* 0x00 */ char field_0x0[8]; - /* 0x08 */ Vec field_0x8; + /* 0x08 */ BE(Vec) field_0x8; /* 0x14 */ u8 field_0x14; /* 0x15 */ u8 field_0x15; /* 0x16 */ u8 field_0x16; @@ -301,55 +305,55 @@ struct stage_sound_data { }; // Size: 0x1C struct dStage_SoundInfo_c { - /* 0x0 */ int num; - /* 0x4 */ stage_sound_data* entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(stage_sound_data) entries; }; // FILI class dStage_FileList_dt_c { public: - /* 0x00 */ u32 mParameters; - /* 0x04 */ f32 mSeaLevel; - /* 0x08 */ f32 field_0x8; - /* 0x0C */ f32 field_0xc; + /* 0x00 */ BE(u32) mParameters; + /* 0x04 */ BE(f32) mSeaLevel; + /* 0x08 */ BE(f32) field_0x8; + /* 0x0C */ BE(f32) field_0xc; /* 0x10 */ u8 field_0x10[10]; /* 0x1A */ u8 mDefaultCamera; /* 0x1B */ u8 mBitSw; - /* 0x1C */ u16 mMsg; + /* 0x1C */ BE(u16) mMsg; }; // Size: 0x20 // FILI class dStage_FileList2_dt_c { public: - /* 0x00 */ f32 mLeftRmX; - /* 0x04 */ f32 mInnerRmZ; - /* 0x08 */ f32 mRightRmX; - /* 0x0C */ f32 mFrontRmZ; + /* 0x00 */ BE(f32) mLeftRmX; + /* 0x04 */ BE(f32) mInnerRmZ; + /* 0x08 */ BE(f32) mRightRmX; + /* 0x0C */ BE(f32) mFrontRmZ; /* 0x10 */ u8 mMinFloorNo; /* 0x11 */ u8 mMaxFloorNo; /* 0x12 */ u8 field_0x12; /* 0x13 */ u8 field_0x13; - /* 0x14 */ f32 field_0x14; - /* 0x18 */ f32 field_0x18; - /* 0x1C */ s16 field_0x1c; + /* 0x14 */ BE(f32) field_0x14; + /* 0x18 */ BE(f32) field_0x18; + /* 0x1C */ BE(s16) field_0x1c; }; // Size: 0x20 struct dStage_FileList2_c { - /* 0x0 */ int num; - /* 0x4 */ dStage_FileList2_dt_c* entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(dStage_FileList2_dt_c) entries; }; // FLOR struct dStage_FloorInfo_dt_c { // Copied from TWW, may not be right - /* 0x00 */ int field_0x00; + /* 0x00 */ BE(int) field_0x00; /* 0x04 */ u8 floorNo; /* 0x05 */ s8 field_0x05[14]; }; // Size: 0x14 struct dStage_FloorInfo_c { - /* 0x00 */ int num; - /* 0x04 */ dStage_FloorInfo_dt_c* m_entries; + /* 0x00 */ BE(int) num; + /* 0x04 */ OFFSET_PTR(dStage_FloorInfo_dt_c) m_entries; }; // LBNK @@ -361,8 +365,8 @@ public: }; struct dStage_Lbnk_c { - /* 0x0 */ int num; - /* 0x4 */ dStage_Lbnk_dt_c* entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(dStage_Lbnk_dt_c) entries; }; struct dStage_Elst_dt_c { @@ -370,22 +374,22 @@ struct dStage_Elst_dt_c { }; // Size: 0xF struct dStage_Elst_c { - /* 0x0 */ int m_entryNum; - /* 0x4 */ dStage_Elst_dt_c* m_entries; + /* 0x0 */ BE(int) m_entryNum; + /* 0x4 */ OFFSET_PTR(dStage_Elst_dt_c) m_entries; }; // DMAP struct dStage_DMap_dt_c { // Copied from TWW, may not be right - /* 0x00 */ int field_0x00; - /* 0x04 */ int field_0x04; - /* 0x08 */ int field_0x08; - /* 0x0C */ f32 offsetY; + /* 0x00 */ BE(int) field_0x00; + /* 0x04 */ BE(int) field_0x04; + /* 0x08 */ BE(int) field_0x08; + /* 0x0C */ BE(f32) offsetY; }; // Size: 0x10 struct dStage_DMap_c { - /* 0x00 */ int num; - /* 0x04 */ dStage_DMap_dt_c* entries; + /* 0x00 */ BE(int) num; + /* 0x04 */ OFFSET_PTR(dStage_DMap_dt_c) entries; }; /** @@ -417,7 +421,7 @@ struct dStage_MapEvent_dt_c { /* 0x0D */ char event_name[13]; struct { /* 0x0D */ u8 field_0xd[0x14 - 0xD]; - /* 0x14 */ u16 field_0x14; + /* 0x14 */ BE(u16) field_0x14; /* 0x16 */ u8 field_0x16; /* 0x17 */ u8 field_0x17; /* 0x18 */ u8 sound_type; @@ -437,8 +441,8 @@ enum dStage_MapEvent_dt_type { }; struct dStage_MapEventInfo_c { - /* 0x0 */ int num; - /* 0x4 */ dStage_MapEvent_dt_c* m_entries; + /* 0x0 */ BE(int) num; + /* 0x4 */ OFFSET_PTR(dStage_MapEvent_dt_c) m_entries; }; class dStage_dt_c { @@ -1062,7 +1066,7 @@ public: /* 0x3F7 */ s8 mZoneNo; /* 0x3F8 */ s8 mMemBlockID; /* 0x3F9 */ u8 mRegionNo; - /* 0x3FC */ int mProcID; + /* 0x3FC */ fpc_ProcID mProcID; /* 0x400 */ dBgW_Base* mpBgW; int getZoneNo() const { return mZoneNo; } @@ -1118,8 +1122,8 @@ public: static s8 getRoomReadId() { return mRoomReadId; } static void setRoomReadId(s8 id) { mRoomReadId = id; } - static u32 getProcID() { return mProcID; } - static void setProcID(u32 id) { mProcID = id; } + static fpc_ProcID getProcID() { return mProcID; } + static void setProcID(fpc_ProcID id) { mProcID = id; } static int getStayNo() { return mStayNo; } static int getNextStayNo() { return mNextStayNo; } static BOOL GetTimePass() { return m_time_pass; } @@ -1193,7 +1197,7 @@ public: JUT_ASSERT(2770, 0 <= i_roomNo && i_roomNo < 64); mStatus[i_roomNo].mProcID = i_id; } - static int getStatusProcID(int i_roomNo) { + static fpc_ProcID getStatusProcID(int i_roomNo) { JUT_ASSERT(2774, 0 <= i_roomNo && i_roomNo < 64); return mStatus[i_roomNo].mProcID; } @@ -1223,7 +1227,7 @@ public: static char mArcBank[32][10]; static dStage_roomStatus_c mStatus[0x40]; static char mDemoArcName[10]; - static u32 mProcID; + static fpc_ProcID mProcID; static nameData* mArcBankName; static bankData* mArcBankData; static roomDzs_c m_roomDzs; @@ -1398,6 +1402,10 @@ dStage_KeepDoorInfo* dStage_GetKeepDoorInfo(); dStage_KeepDoorInfo* dStage_GetRoomKeepDoorInfo(); void dStage_dt_c_fieldMapLoader(void* i_data, dStage_dt_c* i_stage); +#if DEBUG +void dStage_DebugDisp(); +#endif + #define dStage_NAME_LENGTH 8 const char* dStage_getName(s16 procName, s8 argument); diff --git a/include/d/d_tresure.h b/include/d/d_tresure.h index 53315bacdc..236e2690c6 100644 --- a/include/d/d_tresure.h +++ b/include/d/d_tresure.h @@ -1,7 +1,8 @@ #ifndef D_D_TRESURE_H #define D_D_TRESURE_H -#include +#include +#include "dusk/offset_ptr.h" class dTres_c { public: @@ -12,7 +13,7 @@ public: /* 0x01 */ s8 mRoomNo; /* 0x02 */ u8 mStatus; /* 0x03 */ u8 mArg1; - /* 0x04 */ Vec mPos; + /* 0x04 */ BE(Vec) mPos; /* 0x10 */ u8 mSwBit; /* 0x11 */ u8 mType; /* 0x12 */ u8 mArg2; @@ -30,7 +31,7 @@ public: u8 getStatus() const { return mStatus; } void setStatus(u8 status) { mStatus = status; } void setArg1(u8 arg1) { mArg1 = arg1; } - const Vec* getPos() const { return &mPos; } + const BE(Vec)* getPos() const { return &mPos; } void setPos(const Vec& pos) { mPos = pos; } u8 getSwBit() const { return mSwBit; } void setSwBit(u8 swBit) { mSwBit = swBit; } @@ -48,8 +49,13 @@ public: }; // Size: 0x1C struct list_class { - /* 0x0 */ int field_0x0; + /* 0x0 */ BE(int) field_0x0; +#if TARGET_PC + // idk why but MSVC refused to compile this when using the macro ??? + /* 0x4 */ OffsetPtrT field_0x4; +#else /* 0x4 */ typeGroupData_c* field_0x4; +#endif /* 0x8 */ u8 mNumber; }; diff --git a/include/d/d_vib_pattern.h b/include/d/d_vib_pattern.h index 55d213513b..a794bdbf39 100644 --- a/include/d/d_vib_pattern.h +++ b/include/d/d_vib_pattern.h @@ -1,7 +1,7 @@ #ifndef D_D_VIB_PATTERN_H #define D_D_VIB_PATTERN_H -#include +#include diff --git a/include/dusk/audio.h b/include/dusk/audio.h new file mode 100644 index 0000000000..46a2dd8859 --- /dev/null +++ b/include/dusk/audio.h @@ -0,0 +1,16 @@ +#ifndef DUSK_AUDIO_H +#define DUSK_AUDIO_H + +#if TARGET_PC +#define DUSK_AUDIO_DISABLED 1 +#else +#define DUSK_AUDIO_DISABLED 0 +#endif + +#if TARGET_PC +#define DUSK_AUDIO_SKIP(...) return __VA_ARGS__; +#else +#define DUSK_AUDIO_SKIP(...) +#endif + +#endif // DUSK_AUDIO_H diff --git a/include/dusk/dusk.h b/include/dusk/dusk.h new file mode 100644 index 0000000000..d84e496827 --- /dev/null +++ b/include/dusk/dusk.h @@ -0,0 +1,8 @@ +#ifndef DUSK_DUSK_H +#define DUSK_DUSK_H + +#include + +extern AuroraInfo auroraInfo; + +#endif // DUSK_DUSK_H diff --git a/include/dusk/endian.h b/include/dusk/endian.h index 179bdf046e..58e9bd31ab 100644 --- a/include/dusk/endian.h +++ b/include/dusk/endian.h @@ -18,9 +18,11 @@ #include #define BSWAP16(x) _byteswap_ushort(x) #define BSWAP32(x) _byteswap_ulong(x) + #define BSWAP64(x) _byteswap_uint64(x) #else #define BSWAP16(x) __builtin_bswap16(x) #define BSWAP32(x) __builtin_bswap32(x) + #define BSWAP64(x) __builtin_bswap64(x) #endif #else #define BSWAP16(x) (x) @@ -31,8 +33,9 @@ inline u16 be16(u16 val) { return BSWAP16(val); } inline s16 be16s(s16 val) { return (s16)BSWAP16((u16)val); } inline u32 be32(u32 val) { return BSWAP32(val); } - inline s32 be32s(s32 val) { return (s32)BSWAP32((u32)val); } +inline u64 be64(u64 val) { return BSWAP64(val); } +inline s64 be64s(s64 val) { return (s64)BSWAP64((u64)val); } #ifdef TARGET_PC // Helper wrappers so code below reads nicely: @@ -48,6 +51,12 @@ static inline u32 RES_U32(u32 v) { static inline s32 RES_S32(s32 v) { return be32s(v); } +static inline u64 RES_U64(u64 v) { + return be64(v); +} +static inline s64 RES_S64(s64 v) { + return be64s(v); +} static inline f32 RES_F32(f32 v) { return std::bit_cast(RES_S32(std::bit_cast(v))); } @@ -73,6 +82,19 @@ struct BE { inner = swap(from); } + // post-ops + T operator--(int) { + T orig = inner; + *this -= 1; + return swap(orig); + } + + T operator++(int) { + T orig = inner; + *this += 1; + return swap(orig); + } + operator T() const { return swap(inner); } @@ -84,6 +106,25 @@ struct BE { static T swap[[nodiscard]](T val); }; +#define BIN_ASSIGN_OP(op) \ + \ +template \ +constexpr BE& operator op(BE& a, TB b) { \ + TA aCopy = a; \ + aCopy op b; \ + a = aCopy; \ + return a; \ +} + +BIN_ASSIGN_OP(&=); +BIN_ASSIGN_OP(|=); +BIN_ASSIGN_OP(+=); +BIN_ASSIGN_OP(-=); +BIN_ASSIGN_OP(/=); + +#undef BIN_ASSIGN_OP + + template<> inline u16 BE::swap(u16 val) { return RES_U16(val); @@ -104,17 +145,48 @@ inline s32 BE::swap(s32 val) { return RES_S32(val); } +template<> +inline s64 BE::swap(s64 val) { + return RES_S64(val); +} + +template<> +inline u64 BE::swap(u64 val) { + return RES_U64(val); +} + template<> inline f32 BE::swap(f32 val) { return RES_F32(val); } +template<> +inline S16Vec BE::swap(S16Vec val) { + return { + BE::swap(val.x), + BE::swap(val.y), + BE::swap(val.z), + }; +} + template<> struct BE { BE x; BE y; BE z; + BE() = default; + BE(f32 x, f32 y, f32 z) { + this->x = x; + this->y = y; + this->z = z; + } + BE(const Vec& from) { + x = from.x; + y = from.y; + z = from.z; + } + operator Vec() const { return { x, y, z }; } diff --git a/include/dusk/endian_ssystem.h b/include/dusk/endian_ssystem.h new file mode 100644 index 0000000000..fe9248ffa4 --- /dev/null +++ b/include/dusk/endian_ssystem.h @@ -0,0 +1,65 @@ +#ifndef _DUSK_ENDIAN_SSYSTEM_H_ +#define _DUSK_ENDIAN_SSYSTEM_H_ + +#include "SSystem/SComponent/c_sxyz.h" +#include "endian.h" + +template<> +struct BE { + BE x; + BE y; + BE z; + + auto & operator =(const csXyz & arg) { + this->x = arg.x; + this->y = arg.y; + this->z = arg.z; + return *this; + } + + void set(s16 oX, s16 oY, s16 oZ) { + x = oX; + y = oY; + z = oZ; + } + + operator csXyz() const { + return { x, y, z }; + } + + static csXyz swap(csXyz val) { + return { + BE::swap(val.x), + BE::swap(val.y), + BE::swap(val.z), + }; + } +}; + +template<> +struct BE { + BE x; + BE y; + BE z; + + auto & operator =(const cXyz & arg) { + this->x = arg.x; + this->y = arg.y; + this->z = arg.z; + return *this; + } + + operator cXyz() const { + return { x, y, z }; + } + + static cXyz swap(cXyz val) { + return { + BE::swap(val.x), + BE::swap(val.y), + BE::swap(val.z), + }; + } +}; + +#endif \ No newline at end of file diff --git a/include/dusk/offset_ptr.h b/include/dusk/offset_ptr.h new file mode 100644 index 0000000000..3a940804c2 --- /dev/null +++ b/include/dusk/offset_ptr.h @@ -0,0 +1,67 @@ +#ifndef DUSK_OFFSET_PTR_H +#define DUSK_OFFSET_PTR_H + +#if TARGET_PC + +#include "global.h" +#include "endian.h" + +struct OffsetPtr { + // Top bit is used to store "already relocated" flag as a guard thing. + BE value; + + bool setBase(void* base); + bool isRelocated(); + + template + explicit operator T*() const { + s32 swapped = value; + if (swapped == 0) { + // This shouldn't be able to happen but the original offsetting code has the safeguard. + return nullptr; + } + + // Because we use the top (31st) bit as an "already relocated" flag, + // we need to make sure to check the 30th bit to see if we're actually negative. + // And cut off the 31st bit if we're supposed to be positive. + // Effective range this gives us is still like a gigabyte in both directions, + // so we'll be fine on that front. + s32 realOffset = (swapped & 0x4000'0000) ? swapped : (swapped & 0x7FFF'FFFF); + return (T*)POINTER_ADD(this, realOffset); + } +}; + +template +struct OffsetPtrT { + OffsetPtr value; + + bool setBase(void* base) { + return value.setBase(base); + } + bool isRelocated() { + return value.isRelocated(); + } + + T* operator->() { + return (T*) value; + } + + operator T*() const { + return (T*) value; + } + + template + explicit operator TOther*() const { + return (TOther*) value; + } +}; + + +#define OFFSET_PTR(T) OffsetPtrT +#define OFFSET_PTR_RAW OffsetPtr +#else +#define OFFSET_PTR(T) T* +#define OFFSET_PTR_RAW u32 +#endif + +#endif // DUSK_OFFSET_PTR_H diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 6aa5713e1b..6d24ed130d 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -71,6 +71,8 @@ enum fopAc_Cull_e { fopAc_CULLBOX_14_e, #endif fopAc_CULLBOX_CUSTOM_e, + fopAc_CULLBOX_MAX_e = fopAc_CULLBOX_CUSTOM_e, + fopAc_CULLSPHERE_0_e, fopAc_CULLSPHERE_1_e, fopAc_CULLSPHERE_2_e, @@ -83,6 +85,7 @@ enum fopAc_Cull_e { fopAc_CULLSPHERE_8_e, #endif fopAc_CULLSPHERE_CUSTOM_e, + fopAc_CULLSPHERE_MAX_e = fopAc_CULLSPHERE_CUSTOM_e - fopAc_CULLSPHERE_0_e, }; enum fopAc_attention_type { @@ -240,9 +243,14 @@ struct cull_box { /* 0xC */ Vec max; }; +#if __MWERKS__ class fopAc_ac_c { public: /* 0x000 */ leafdraw_class base; +#else +class fopAc_ac_c : public leafdraw_class { +public: +#endif /* 0x0C0 */ int actor_type; /* 0x0C4 */ create_tag_class actor_tag; /* 0x0D8 */ create_tag_class draw_tag; @@ -285,8 +293,16 @@ public: /* 0x566 */ s8 field_0x566; /* 0x567 */ s8 field_0x567; +#if !__MWERKS__ + s8 actor_last_base_field; +#endif + fopAc_ac_c(); +#if !__MWERKS__ + ~fopAc_ac_c() override; +#else ~fopAc_ac_c(); +#endif static u32 getStopStatus() { return stopStatus; } static void setStopStatus(u32 status) { stopStatus = status; } diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index b3a8873bcc..d0538422b7 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -12,12 +12,31 @@ #include "f_pc/f_pc_manager.h" #include "m_Do/m_Do_hostIO.h" #include "SSystem/SComponent/c_phase.h" +#include "dusk/endian_ssystem.h" + +#if !__MWERKS__ +// Modern compilers will zero the parent struct in default constructors. +// So instead of adding default constructors to everything, +// we'll just save & restore that data. +#define fopAcM_ct_placement_copy_length offsetof(fopAc_ac_c, actor_last_base_field) - offsetof(fopAc_ac_c, type) + +#define fopAcM_ct_placement(ptr, ClassName) \ + fopAc_ac_c copy; \ + memcpy(©.type, &(ptr)->type, fopAcM_ct_placement_copy_length); \ + new (ptr) ClassName() ; \ + memcpy(&(ptr)->type, ©.type, fopAcM_ct_placement_copy_length); +#else +#define fopAcM_ct_placement(ptr, ClassName) new (ptr) ClassName() +#endif #define fopAcM_ct(ptr, ClassName) \ + if ((ptr)->layer_tag.layer == NULL) { OSPanic(__FILE__, __LINE__, "UH OH"); } \ if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \ - new (ptr) ClassName(); \ + fopAcM_ct_placement(ptr, ClassName); \ fopAcM_OnCondition(ptr, fopAcCnd_INIT_e); \ - } + } \ + if ((ptr)->layer_tag.layer == NULL) { OSPanic(__FILE__, __LINE__, "Oh come on"); } + #define fopAcM_RegisterDeleteID(i_this, actor_name_str) \ ("Delete -> " actor_name_str "(id=%d)\n", fopAcM_GetID(i_this)) @@ -49,10 +68,10 @@ extern int HeapAdjustMargin; } // namespace fopAcM struct fopAcM_prmBase_class { - /* 0x00 */ u32 parameters; - /* 0x04 */ cXyz position; - /* 0x10 */ csXyz angle; - /* 0x16 */ u16 setID; + /* 0x00 */ BE(u32) parameters; + /* 0x04 */ BE(cXyz) position; + /* 0x10 */ BE(csXyz) angle; + /* 0x16 */ BE(u16) setID; }; // Size: 0x18 struct fopAcM_prmScale_class { @@ -847,6 +866,9 @@ BOOL fopAcM_getNameString(const fopAc_ac_c*, char*); inline void fopAcM_SetStatusMap(fopAc_ac_c*, u32) {} +extern cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e]; +extern cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e]; + class fopAcM_lc_c { public: fopAcM_lc_c() { mLineCheck.ClrSttsRoofOff(); } diff --git a/include/f_op/f_op_kankyo.h b/include/f_op/f_op_kankyo.h index 9d2b3b87eb..7741d6c09d 100644 --- a/include/f_op/f_op_kankyo.h +++ b/include/f_op/f_op_kankyo.h @@ -19,7 +19,7 @@ struct kankyo_process_profile_definition { /* 0x24 */ leafdraw_method_class* sub_method; }; // Size: 0x28 -void fopKy_IsKankyo(void* i_this); +BOOL fopKy_IsKankyo(void* i_this); extern leafdraw_method_class g_fopKy_Method; diff --git a/include/f_op/f_op_kankyo_mng.h b/include/f_op/f_op_kankyo_mng.h index 975c1d2028..dcd36635ae 100644 --- a/include/f_op/f_op_kankyo_mng.h +++ b/include/f_op/f_op_kankyo_mng.h @@ -21,6 +21,7 @@ base_process_class* fopKyM_fastCreate(s16 i_procName, int i_param, cXyz* i_pos, fopKyM_CreateFunc i_createFunc); fpc_ProcID fopKyM_createWpillar(cXyz const* i_pos, f32 scale, int i_param); fpc_ProcID fopKyM_createMpillar(cXyz const* i_pos, f32 i_size); +BOOL fopKyM_IsKy(void* i_process); inline fopKyM_prm_class* fopKyM_GetAppend(void* i_process) { return (fopKyM_prm_class*)fpcM_GetAppend(i_process); diff --git a/include/f_op/f_op_view.h b/include/f_op/f_op_view.h index cd6aeccbbc..a605923b2f 100644 --- a/include/f_op/f_op_view.h +++ b/include/f_op/f_op_view.h @@ -2,7 +2,7 @@ #define F_F_OP_VIEW_H_ #include "SSystem/SComponent/c_xyz.h" -#include +#include #include "f_pc/f_pc_leaf.h" struct view_process_profile_definition { diff --git a/include/f_pc/f_pc_base.h b/include/f_pc/f_pc_base.h index 896e7a9c9d..4910b1e86a 100644 --- a/include/f_pc/f_pc_base.h +++ b/include/f_pc/f_pc_base.h @@ -20,7 +20,7 @@ typedef struct state_class { } state_class; typedef struct base_process_class { - /* 0x00 */ int type; + /* 0x00 */ int type; // DUSK NOTE: fopAcM_ct_placement relies on this being the *very* first field! /* 0x04 */ fpc_ProcID id; /* 0x08 */ s16 name; /* 0x0A */ s8 unk_0xA; @@ -37,6 +37,14 @@ typedef struct base_process_class { /* 0xAC */ void* append; /* 0xB0 */ u32 parameters; /* 0xB4 */ int subtype; +#if !__MWERKS__ + // MSVC places vtables at the start of a class, *even* if that class inherits from something + // without vtable. This breaks everything. + // TO avoid issues with pointer casting, we make base_process_class also have a vtable and + // ensure we're using inheritance on it. + + virtual ~base_process_class(); +#endif } base_process_class; // Size: 0xB8 BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB); diff --git a/include/f_pc/f_pc_create_iter.h b/include/f_pc/f_pc_create_iter.h index 509a0fe1c0..c9e25c98ff 100644 --- a/include/f_pc/f_pc_create_iter.h +++ b/include/f_pc/f_pc_create_iter.h @@ -2,7 +2,7 @@ #ifndef F_PC_CREATE_ITER_H_ #define F_PC_CREATE_ITER_H_ -#include +#include typedef struct create_tag create_tag; diff --git a/include/f_pc/f_pc_debug_sv.h b/include/f_pc/f_pc_debug_sv.h index 680f90bd82..d2fcfcb84c 100644 --- a/include/f_pc/f_pc_debug_sv.h +++ b/include/f_pc/f_pc_debug_sv.h @@ -2,7 +2,11 @@ #ifndef F_PC_DEBUG_SV_H_ #define F_PC_DEBUG_SV_H_ -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #if DEBUG diff --git a/include/f_pc/f_pc_deletor.h b/include/f_pc/f_pc_deletor.h index 9f4cbeb014..c0b7da0fc2 100644 --- a/include/f_pc/f_pc_deletor.h +++ b/include/f_pc/f_pc_deletor.h @@ -2,7 +2,7 @@ #ifndef F_PC_DELETOR_H_ #define F_PC_DELETOR_H_ -#include +#include typedef struct base_process_class base_process_class; diff --git a/include/f_pc/f_pc_draw.h b/include/f_pc/f_pc_draw.h index dc971c8c27..889a67ab35 100644 --- a/include/f_pc/f_pc_draw.h +++ b/include/f_pc/f_pc_draw.h @@ -1,7 +1,7 @@ #ifndef F_PC_DRAW_H_ #define F_PC_DRAW_H_ -#include +#include typedef struct base_process_class base_process_class; diff --git a/include/f_pc/f_pc_draw_priority.h b/include/f_pc/f_pc_draw_priority.h index b34a810f70..467d53ced2 100644 --- a/include/f_pc/f_pc_draw_priority.h +++ b/include/f_pc/f_pc_draw_priority.h @@ -2,7 +2,7 @@ #ifndef F_PC_DRAW_PRIORITY_H_ #define F_PC_DRAW_PRIORITY_H_ -#include +#include typedef struct draw_priority_class { s16 priority; diff --git a/include/f_pc/f_pc_layer_iter.h b/include/f_pc/f_pc_layer_iter.h index 35e16fd8fa..19130d4d67 100644 --- a/include/f_pc/f_pc_layer_iter.h +++ b/include/f_pc/f_pc_layer_iter.h @@ -1,7 +1,7 @@ #ifndef F_PC_LAYER_ITER_H_ #define F_PC_LAYER_ITER_H_ -#include +#include typedef struct layer_class layer_class; diff --git a/include/f_pc/f_pc_layer_tag.h b/include/f_pc/f_pc_layer_tag.h index e0d4abc53a..72199d6eb3 100644 --- a/include/f_pc/f_pc_layer_tag.h +++ b/include/f_pc/f_pc_layer_tag.h @@ -4,7 +4,11 @@ #include "SSystem/SComponent/c_tag.h" +#if !__MWERKS__ +enum : u32 { +#else enum { +#endif fpcLy_ROOT_e = 0, fpcLy_CURRENT_e = 0xFFFFFFFD, fpcLy_SPECIAL_e = 0xFFFFFFFE, diff --git a/include/f_pc/f_pc_leaf.h b/include/f_pc/f_pc_leaf.h index d9de82659c..413cdae871 100644 --- a/include/f_pc/f_pc_leaf.h +++ b/include/f_pc/f_pc_leaf.h @@ -13,8 +13,16 @@ typedef struct leafdraw_method_class { /* 0x10 */ process_method_func draw_method; } leafdraw_method_class; +#if __MWERKS__ +#define LEAFDRAW_BASE(val) (val)->base + typedef struct leafdraw_class { /* 0x00 */ base_process_class base; +#else +#define LEAFDRAW_BASE(val) (*(base_process_class*)val) + +typedef struct leafdraw_class : base_process_class { +#endif /* 0xB8 */ leafdraw_method_class* leaf_methods; /* 0xBC */ s8 unk_0xBC; /* 0xBD */ u8 unk_0xBD; diff --git a/include/f_pc/f_pc_load.h b/include/f_pc/f_pc_load.h index b71a767982..80db744aef 100644 --- a/include/f_pc/f_pc_load.h +++ b/include/f_pc/f_pc_load.h @@ -2,7 +2,7 @@ #ifndef F_PC_LOAD_H_ #define F_PC_LOAD_H_ -#include +#include BOOL fpcLd_Use(s16 i_procName); BOOL fpcLd_IsLoaded(s16 i_procName); diff --git a/include/f_pc/f_pc_method.h b/include/f_pc/f_pc_method.h index b87aa81e15..342a41008c 100644 --- a/include/f_pc/f_pc_method.h +++ b/include/f_pc/f_pc_method.h @@ -1,7 +1,7 @@ #ifndef F_PC_METHOD_H_ #define F_PC_METHOD_H_ -#include +#include typedef int (*process_method_func)(void*); diff --git a/include/f_pc/f_pc_method_iter.h b/include/f_pc/f_pc_method_iter.h index 05c1de4402..94e77c24d8 100644 --- a/include/f_pc/f_pc_method_iter.h +++ b/include/f_pc/f_pc_method_iter.h @@ -2,7 +2,7 @@ #ifndef F_PC_METHOD_ITER_H_ #define F_PC_METHOD_ITER_H_ -#include +#include typedef struct node_list_class node_list_class; diff --git a/include/f_pc/f_pc_pause.h b/include/f_pc/f_pc_pause.h index 0bc14c72b3..fb1c5f2c1e 100644 --- a/include/f_pc/f_pc_pause.h +++ b/include/f_pc/f_pc_pause.h @@ -1,7 +1,7 @@ #ifndef F_PC_PAUSE_ #define F_PC_PAUSE_ -#include +#include int fpcPause_IsEnable(void* pProc, u8 expected); int fpcPause_Enable(void* pProc, u8 pauseMask); diff --git a/include/f_pc/f_pc_profile.h b/include/f_pc/f_pc_profile.h index 8bc40fadc7..865d9a9a4f 100644 --- a/include/f_pc/f_pc_profile.h +++ b/include/f_pc/f_pc_profile.h @@ -2,7 +2,7 @@ #ifndef F_PC_PROFILE_H_ #define F_PC_PROFILE_H_ -#include +#include typedef struct nodedraw_method_class nodedraw_method_class; typedef struct leafdraw_method_class leafdraw_method_class; diff --git a/include/m_Do/m_Do_MemCard.h b/include/m_Do/m_Do_MemCard.h index 1dd2c37b13..f369bf2f2f 100644 --- a/include/m_Do/m_Do_MemCard.h +++ b/include/m_Do/m_Do_MemCard.h @@ -1,8 +1,8 @@ #ifndef M_DO_M_DO_MEMCARD_H #define M_DO_M_DO_MEMCARD_H -#include -#include +#include +#include #include "global.h" #define SAVEDATA_SIZE 0xA94 // Size of 1 Quest Log diff --git a/include/m_Do/m_Do_MemCardRWmng.h b/include/m_Do/m_Do_MemCardRWmng.h index 5263a53327..15f95d6347 100644 --- a/include/m_Do/m_Do_MemCardRWmng.h +++ b/include/m_Do/m_Do_MemCardRWmng.h @@ -2,7 +2,7 @@ #define M_DO_M_DO_MEMCARDRWMNG_H #include "global.h" -#include +#include #if PLATFORM_WII || PLATFORM_SHIELD #include diff --git a/include/m_Do/m_Do_Reset.h b/include/m_Do/m_Do_Reset.h index 5396a1510d..a426460ba9 100644 --- a/include/m_Do/m_Do_Reset.h +++ b/include/m_Do/m_Do_Reset.h @@ -1,11 +1,15 @@ #ifndef M_DO_M_DO_RESET_H #define M_DO_M_DO_RESET_H -#include +#include void mDoRst_reset(int, u32, int); void mDoRst_resetCallBack(int, void*); +#if !PLATFORM_GCN +void mDoRst_shutdownCallBack(); +#endif + struct mDoRstData { /* 0x00 */ int mReset; /* 0x04 */ int mResetPrepare; diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index 7c456b0cfe..1d58e8d8f2 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -4,6 +4,7 @@ #include "Z2AudioLib/Z2AudioMgr.h" #include "Z2AudioLib/Z2EnvSeMgr.h" #include "Z2AudioLib/Z2LinkMgr.h" +#include "dusk/audio.h" class mDoAud_zelAudio_c : public Z2AudioMgr { public: @@ -27,13 +28,13 @@ public: static u8 isResetFlag() { return mResetFlag; } static void onResetFlag() { mResetFlag = true; } static void offResetFlag() { mResetFlag = false; } - static bool isBgmSet() { return mBgmSet; } + static u8 isBgmSet() { return mBgmSet; } static void onBgmSet() { mBgmSet = true; } static void offBgmSet() { mBgmSet = false; } static u8 mInitFlag; static u8 mResetFlag; - static bool mBgmSet; + static u8 mBgmSet; }; extern JKRSolidHeap* g_mDoAud_audioHeap; @@ -47,273 +48,338 @@ void mDoAud_setFadeInStart(u8 param_0); void mDoAud_setFadeOutStart(u8 param_0); inline void mDoAud_setLinkGroupInfo(u8 param_0) { + DUSK_AUDIO_SKIP() if (Z2GetLink() != NULL) { Z2GetLink()->setLinkGroupInfo(param_0); } } inline void mDoAud_setLinkHp(s32 param_0, s32 param_1) { + DUSK_AUDIO_SKIP() if (Z2GetLink() != NULL) { Z2GetLink()->setLinkHp(param_0, param_1); } } inline void mDoAud_bgmSetSwordUsing(s32 id) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmSetSwordUsing(id); } inline void mDoAud_bgmStart(u32 i_bgmID) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmStart(i_bgmID, 0, 0); } inline void mDoAud_bgmAllMute(u32 i_count) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmAllMute(i_count, 0.0f); } inline void mDoAud_subBgmStart(u32 i_bgmID) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->subBgmStart(i_bgmID); } inline void mDoAud_subBgmStop() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->subBgmStop(); } inline u32 mDoAud_checkPlayingSubBgmFlag() { + DUSK_AUDIO_SKIP(0) return Z2AudioMgr::getInterface()->checkPlayingSubBgmFlag(); } inline void mDoAud_bgmNowBattle(f32 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmNowBattle(param_0); } inline void mDoAud_bgmStreamPrepare(u32 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmStreamPrepare(param_0); } inline void mDoAud_bgmStreamPlay() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmStreamPlay(); } inline void mDoAud_setHour(s32 hour) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setHour(hour); } inline void mDoAud_setMinute(s32 min) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setMinute(min); } inline void mDoAud_setWeekday(s32 day) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setWeekday(day); } inline void mDoAud_setInDarkness(bool state) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setInDarkness(state); } inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->seStart(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f, -1.0f, -1.0f, 0); } inline void mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->seStartLevel(i_sfxID, i_sePos, param_2, i_reverb, 1.0f, 1.0f, -1.0f, -1.0f, 0); } inline void mDoAud_seStop(u32 i_sfxID, u32 param_1) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->seStop(i_sfxID, param_1); } inline void mDoAud_messageSePlay(u16 param_0, Vec* position, s8 param_2) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->messageSePlay(param_0, position, param_2); } inline void mDoAud_sceneBgmStart() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->sceneBgmStart(); } inline void mDoAud_seDeleteObject(Vec*) {} inline void mDoAud_load2ndDynamicWave() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->load2ndDynamicWave(); } inline bool mDoAud_check1stDynamicWave() { + DUSK_AUDIO_SKIP(false) return Z2AudioMgr::getInterface()->check1stDynamicWave(); } inline void mDoAud_bgmStop(u32 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->bgmStop(param_0, 0); } inline void mDoAud_rainPlay(s32 enable) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startRainSe(enable, 0); } inline void mDoAud_heartGaugeOn() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->heartGaugeOn(); } inline void mDoAud_setSnowPower(s8 i_power) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.setSnowPower(i_power); } inline void mDoAud_setFogWipeWidth(f32 i_width) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.setFogWipeWidth(i_width); } inline void mDoAud_startFogWipeTrigger(const Vec* param_0) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startFogWipeTrigger((Vec*)param_0); } inline void mDoAud_changeSubBgmStatus(s32 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->changeSubBgmStatus(param_0); } inline void mDoAud_taktModeMute() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->taktModeMute(); } inline void mDoAud_taktModeMuteOff() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->taktModeMuteOff(); } inline void mDoAud_getCameraMapInfo(u32 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->getCameraMapInfo(param_0); } inline void mDoAud_setCameraGroupInfo(u8 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setCameraGroupInfo(param_0); } inline void mDoAud_setLinkShieldType(s32 param_0, s32 param_1) { + DUSK_AUDIO_SKIP() if (Z2GetLink() != NULL) { Z2GetLink()->setLinkShieldType(param_0, param_1); } } inline void mDoAud_mEnvse_framework() { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.framework(); } inline void mDoAud_mEnvse_resetScene() { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.resetScene(); } inline void mDoAud_mEnvSe_startFarThunderSe(const Vec* param_0) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startFarThunderSe((Vec*)param_0, 0); } inline void mDoAud_mEnvSe_startNearThunderSe() { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startNearThunderSe(0); } inline void mDoAud_mEnvse_initStrongWind() { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.initStrongWindSe(); } inline void mDoAud_mEnvse_setWindDirection(Vec* i_direction) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.setWindDirection(i_direction); } inline void mDoAud_mEnvse_startStrongWindSe(s8 i_reverb) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startStrongWindSe(i_reverb); } inline void mDoAud_mEnvse_setWindType(u8 i_type) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.setWindType(i_type); } inline void mDoAud_mEnvse_initStaticEnvSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3, const Vec* param_4) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.initStaticEnvSe(param_0, param_1, param_2, param_3, (Vec*)param_4); } inline void mDoAud_mEnvse_startStaticEnvSe(s8 i_reverb) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startStaticEnvSe(i_reverb); } inline void mDoAud_mEnvse_initRiverSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.initRiverSe(param_0, param_1, param_2, param_3); } inline void mDoAud_mEnvse_registRiverSePos(const Vec* i_pos) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.registRiverSePos((Vec*)i_pos); } inline void mDoAud_mEnvse_startRiverSe(s8 i_reverb) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startRiverSe(i_reverb); } inline void mDoAud_mEnvse_initFallSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.initFallSe(param_0, param_1, param_2, param_3); } inline void mDoAud_mEnvse_registFallSePos(const Vec* i_pos) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.registFallSePos((Vec*)i_pos); } inline void mDoAud_mEnvse_startFallSe(s8 i_reverb) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startFallSe(i_reverb); } inline void mDoAud_mEnvse_initSmellSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.initSmellSe(param_0, param_1, param_2, param_3); } inline void mDoAud_mEnvse_registSmellSePos(const Vec* i_pos) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.registSmellSePos((Vec*)i_pos); } inline void mDoAud_mEnvse_startSmellSe(s8 i_reverb) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startSmellSe(i_reverb); } inline void mDoAud_mEnvse_registWindowPos(const Vec* i_pos) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.registWindowPos((Vec*)i_pos); } inline void mDoAud_mEnvse_registWolfSmellSePos(const Vec* i_pos) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.registWolfSmellSePos((Vec*)i_pos); } inline void mDoAud_initLv3WaterSe(u8 param_0, u8 param_1, u8 param_2, u8 param_3) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.initLv3WaterSe(param_0, param_1, param_2, param_3); } inline void mDoAud_registLv3WaterSePos(u8 param_0, const Vec* i_pos) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.registLv3WaterSePos(param_0, (Vec*)i_pos); } inline void mDoAud_startLv3WaterSe(s8 i_reverb) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startLv3WaterSe(i_reverb); } inline void mDoAud_setHyrulSewerOpen(bool i_close) { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.setHyrulSewerOpen(i_close); } inline void mDoAud_startFogSe() { + DUSK_AUDIO_SKIP() g_mEnvSeMgr.startFogSe(); } inline void mDoAud_talkOut() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->talkOut(); } inline void mDoAud_talkIn() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->talkIn(); } inline void mDoAud_setOutputMode(u32 mode) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setOutputMode(mode); } inline void mDoAud_loadStaticWaves() { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->loadStaticWaves(); } inline int mDoAud_monsSeStart(u32 i_soundId, const Vec* i_pos, u32 i_actorId, u32 param_3, s8 i_reverb) { + DUSK_AUDIO_SKIP(0) UNUSED(i_actorId); return Z2GetAudioMgr()->seStart(i_soundId, i_pos, param_3, i_reverb, 1.0f, 1.0f, -1.0f, -1.0f, 0); diff --git a/include/m_Do/m_Do_dvd_thread.h b/include/m_Do/m_Do_dvd_thread.h index ad053bd051..b4d6b36e62 100644 --- a/include/m_Do/m_Do_dvd_thread.h +++ b/include/m_Do/m_Do_dvd_thread.h @@ -2,8 +2,8 @@ #define M_DO_M_DO_DVD_THREAD_H #include "JSystem/JKernel/JKRArchive.h" -#include -#include +#include +#include #include "f_pc/f_pc_node.h" #define mDoDvd_MOUNT_DIRECTION_HEAD 0 @@ -149,9 +149,9 @@ struct mDoDvdThd { namespace mDoDvdHack { typedef struct FSTEntry { - /* 0x00 */ uint isDirAndStringOff; - /* 0x04 */ uint parentOrPosition; - /* 0x08 */ uint nextEntryOrLength; + /* 0x00 */ u32 isDirAndStringOff; + /* 0x04 */ u32 parentOrPosition; + /* 0x08 */ u32 nextEntryOrLength; } FSTEntry; extern OSBootInfo* BootInfo; diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index 4478098064..5bcd2f3ac1 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -16,6 +16,7 @@ class JKRHeap; class JKRSolidHeap; struct ResTIMG; class Z2Creature; +struct cXy; namespace mDoExt { extern u8 CurrentHeapAdjustVerbose; @@ -483,11 +484,6 @@ struct mDoExt_3Dline_field_0x10_c { s8 z; }; -struct mDoExt_3Dline_field_0x18_c { - f32 field_0x0; - f32 field_0x4; -}; - class mDoExt_3Dline_c { public: int init(u16, int, BOOL); @@ -495,12 +491,9 @@ public: /* 0x00 */ cXyz* field_0x0; /* 0x04 */ f32* field_0x4; - /* 0x08 */ cXyz* field_0x8; - /* 0x0C */ cXyz* field_0xc; - /* 0x10 */ mDoExt_3Dline_field_0x10_c* field_0x10; - /* 0x14 */ mDoExt_3Dline_field_0x10_c* field_0x14; - /* 0x18 */ mDoExt_3Dline_field_0x18_c* field_0x18; - /* 0x1C */ mDoExt_3Dline_field_0x18_c* field_0x1c; + /* 0x08 */ cXyz* field_0x8[2]; + /* 0x10 */ mDoExt_3Dline_field_0x10_c* field_0x10[2]; + /* 0x18 */ cXy* field_0x18[2]; }; class mDoExt_offCupOnAupPacket : public J3DPacket { @@ -555,8 +548,8 @@ public: class mDoExt_3DlineMat0_c : public mDoExt_3DlineMat_c { public: int init(u16, u16, int); - void update(int, f32, _GXColor&, u16, dKy_tevstr_c*); - void update(int, _GXColor&, dKy_tevstr_c*); + void update(int, f32, GXColor&, u16, dKy_tevstr_c*); + void update(int, GXColor&, dKy_tevstr_c*); virtual int getMaterialID() { return 0; } virtual void setMaterial(); @@ -774,6 +767,12 @@ void mDoExt_restoreCurrentHeap(); JKRExpHeap* mDoExt_getGameHeap(); void mDoExt_setSafeGameHeapSize(); size_t mDoExt_getSafeGameHeapSize(); +intptr_t mDoExt_getSafeArchiveHeapSize(); +intptr_t mDoExt_getSafeJ2dHeapSize(); +intptr_t mDoExt_getSafeCommandHeapSize(); +void mDoExt_setSafeCommandHeapSize(); +void mDoExt_setSafeArchiveHeapSize(); +void mDoExt_setSafeJ2dHeapSize(); void mDoExt_destroySolidHeap(JKRSolidHeap* i_heap); JKRHeap* mDoExt_setCurrentHeap(JKRHeap* i_heap); JKRExpHeap* mDoExt_getArchiveHeap(); diff --git a/include/m_Do/m_Do_graphic.h b/include/m_Do/m_Do_graphic.h index 36ee7609b0..298af48593 100644 --- a/include/m_Do/m_Do_graphic.h +++ b/include/m_Do/m_Do_graphic.h @@ -76,11 +76,11 @@ public: static void create(); static void beginRender(); static void fadeOut(f32); - static void fadeOut(f32, _GXColor&); - static void fadeIn(f32 fadeSpeed, _GXColor& fadeColor) { + static void fadeOut(f32, GXColor&); + static void fadeIn(f32 fadeSpeed, GXColor& fadeColor) { fadeOut(-fadeSpeed, fadeColor); } - static void fadeOut_f(f32, _GXColor&); + static void fadeOut_f(f32, GXColor&); static void onBlure(const Mtx); static void onBlure(); static void calcFade(); @@ -106,7 +106,7 @@ public: static void endFrame() { JFWDisplay::getManager()->endFrame(); } static void offFade() { mFade = 0; } static u8 isFade() { return mFade; } - static void fadeIn_f(f32 i_fadeSpeed, _GXColor& i_fadeColor) { fadeOut_f(-i_fadeSpeed, i_fadeColor); } + static void fadeIn_f(f32 i_fadeSpeed, GXColor& i_fadeColor) { fadeOut_f(-i_fadeSpeed, i_fadeColor); } static void offBlure() { mBlureFlag = false; } static u8 isBlure() { return mBlureFlag; } static void setBlureRate(u8 i_rate) { mBlureRate = i_rate; } diff --git a/include/m_Do/m_Do_lib.h b/include/m_Do/m_Do_lib.h index d53678ef8e..c13288103e 100644 --- a/include/m_Do/m_Do_lib.h +++ b/include/m_Do/m_Do_lib.h @@ -2,9 +2,8 @@ #define M_DO_M_DO_LIB_H #include "JSystem/J3DU/J3DUClipper.h" +#include -typedef struct _GXTexObj GXTexObj; -typedef struct _GXTlutObj GXTlutObj; typedef struct Vec Vec; struct ResTIMG; diff --git a/include/m_Do/m_Do_machine.h b/include/m_Do/m_Do_machine.h index 47879f3adb..53c47c07a7 100644 --- a/include/m_Do/m_Do_machine.h +++ b/include/m_Do/m_Do_machine.h @@ -1,7 +1,7 @@ #ifndef M_DO_M_DO_MACHINE_H #define M_DO_M_DO_MACHINE_H -#include +#include typedef struct OSContext OSContext; class JKRHeap; diff --git a/include/m_Do/m_Do_main.h b/include/m_Do/m_Do_main.h index ff5aa4d12a..9bedc21a39 100644 --- a/include/m_Do/m_Do_main.h +++ b/include/m_Do/m_Do_main.h @@ -2,7 +2,7 @@ #define M_DO_M_DO_MAIN_H #include "JSystem/JKernel/JKRExpHeap.h" -#include +#include class JKRExpHeap; diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h index ad5d0bce30..23db8b6d94 100644 --- a/include/m_Do/m_Do_mtx.h +++ b/include/m_Do/m_Do_mtx.h @@ -3,8 +3,10 @@ #include "SSystem/SComponent/c_sxyz.h" #include "SSystem/SComponent/c_xyz.h" -#include +#include + #include "JSystem/JMath/JMath.h" +#include "dusk/endian.h" extern u8 g_printCurrentHeapDebug; extern u8 g_printOtherHeapDebug; @@ -263,6 +265,12 @@ public: * @param b The output Vec */ static void multVec(const Vec* a, Vec* b) { PSMTXMultVec(now, a, b); } +#if TARGET_LITTLE_ENDIAN + static void multVec(const BE(Vec)* a, Vec* b) { + Vec aCopy = *a; + multVec(&aCopy, b); + } +#endif /** * Multiplies a given Vec `a` by the `now` Matrix's "Scale-and-Rotate" component and places the result into Vec `b` diff --git a/include/m_Do/m_Do_printf.h b/include/m_Do/m_Do_printf.h index 032efe518b..527be3d58a 100644 --- a/include/m_Do/m_Do_printf.h +++ b/include/m_Do/m_Do_printf.h @@ -1,8 +1,8 @@ #ifndef M_DO_M_DO_PRINTF_H #define M_DO_M_DO_PRINTF_H -#include -#include "dolphin/types.h" +#include +#include "dusk/endian.h" void my_PutString(const char*); void mDoPrintf_vprintf_Interrupt(char const*, va_list); diff --git a/include/m_Re/m_Re_controller_pad.h b/include/m_Re/m_Re_controller_pad.h index ac77462a91..1b58bfd4af 100644 --- a/include/m_Re/m_Re_controller_pad.h +++ b/include/m_Re/m_Re_controller_pad.h @@ -187,6 +187,8 @@ public: static u32 getTrigUp(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_UP; } static u32 getTrigStart(u32 i_pad) { return getTrig(i_pad) & WPAD_BUTTON_PLUS; } + static f32 getStickX(u32 i_pad) { return getPad(i_pad).field_0x4[0].ex_status.fs.stick.x; } + static WPADInfo m_pad_info[WPAD_MAX_CONTROLLERS]; static Pad m_pad[WPAD_MAX_CONTROLLERS]; static motorWave_t m_motorWave[WPAD_MAX_CONTROLLERS]; diff --git a/include/os_report.h b/include/os_report.h new file mode 100644 index 0000000000..1fcf08bc57 --- /dev/null +++ b/include/os_report.h @@ -0,0 +1,34 @@ +#ifndef _OS_REPORT_H +#define _OS_REPORT_H + +#include + +DECL_WEAK void OSAttention(const char* msg, ...); +DECL_WEAK void OSReport_Error(const char* fmt, ...); +DECL_WEAK void OSReport_FatalError(const char* fmt, ...); +DECL_WEAK void OSReport_System(const char* fmt, ...); +DECL_WEAK void OSReport_Warning(const char* fmt, ...); +DECL_WEAK void OSReportDisable(void); +DECL_WEAK void OSReportEnable(void); +DECL_WEAK void OSReportForceEnableOff(void); +DECL_WEAK void OSReportForceEnableOn(void); + +#if DEBUG +#define OS_REPORT(...) OSReport(__VA_ARGS__) +#define OS_WARNING(...) OSReport_Warning(__VA_ARGS__) +#define OS_REPORT_ERROR(...) OSReport_Error(__VA_ARGS__) +#define OS_PANIC(line, msg) OSPanic(__FILE__, line, msg) +#else +#define OS_REPORT(...) +#define OS_WARNING(...) +#define OS_REPORT_ERROR(...) +#define OS_PANIC(...) +#endif + +extern u8 __OSReport_disable; +extern u8 __OSReport_Error_disable; +extern u8 __OSReport_Warning_disable; +extern u8 __OSReport_System_disable; +extern u8 __OSReport_enable; + +#endif // _OS_REPORT_H diff --git a/include/JSystem/J2DGraph/J2DAnimation.h b/libs/JSystem/include/JSystem/J2DGraph/J2DAnimation.h similarity index 97% rename from include/JSystem/J2DGraph/J2DAnimation.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DAnimation.h index 64b2a37b76..0493541afe 100644 --- a/include/JSystem/J2DGraph/J2DAnimation.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DAnimation.h @@ -5,8 +5,6 @@ #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/JUtility/JUTPalette.h" -typedef struct _GXColor GXColor; -typedef struct _GXColorS10 GXColorS10; class J2DScreen; struct ResTIMG; @@ -66,7 +64,7 @@ public: } } virtual ~J2DAnmVtxColor() {} - virtual void getColor(u8, u16, _GXColor*) const {} + virtual void getColor(u8, u16, GXColor*) const {} u16 getAnmTableNum(u8 param_0) const { J3D_PANIC(342, param_0 < 2, "Error : range over."); return mAnmTableNum[param_0]; @@ -101,7 +99,7 @@ public: } } virtual ~J2DAnmVtxColorKey() {} - virtual void getColor(u8, u16, _GXColor*) const; + virtual void getColor(u8, u16, GXColor*) const; /* 0x24 */ J3DAnmColorKeyTable* mInfoTable[2]; /* 0x2C */ s16* mRValues; @@ -122,7 +120,7 @@ public: } } virtual ~J2DAnmVtxColorFull() {} - virtual void getColor(u8, u16, _GXColor*) const; + virtual void getColor(u8, u16, GXColor*) const; /* 0x24 */ J3DAnmColorFullTable* mInfoTable[2]; /* 0x2C */ u8* mRValues; @@ -400,7 +398,7 @@ public: } virtual ~J2DAnmColor() {} virtual void searchUpdateMaterialID(J2DScreen*); - virtual void getColor(u16, _GXColor*) const {} + virtual void getColor(u16, GXColor*) const {} u16 getUpdateMaterialNum() const { return mUpdateMaterialNum; } u16 getUpdateMaterialID(u16 i) const { J3D_PANIC(224, i < mUpdateMaterialNum, "Error : range over."); @@ -430,7 +428,7 @@ public: mInfoTable = NULL; } virtual ~J2DAnmColorKey() {} - virtual void getColor(u16, _GXColor*) const; + virtual void getColor(u16, GXColor*) const; /* 0x30 */ s16* mRValues; /* 0x34 */ s16* mGValues; @@ -468,7 +466,7 @@ public: mInfoTable = NULL; } virtual ~J2DAnmColorFull() {} - virtual void getColor(u16, _GXColor*) const; + virtual void getColor(u16, GXColor*) const; /* 0x30 */ u8* mRValues; /* 0x34 */ u8* mGValues; diff --git a/include/JSystem/J2DGraph/J2DAnmLoader.h b/libs/JSystem/include/JSystem/J2DGraph/J2DAnmLoader.h similarity index 100% rename from include/JSystem/J2DGraph/J2DAnmLoader.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DAnmLoader.h diff --git a/include/JSystem/J2DGraph/J2DGrafContext.h b/libs/JSystem/include/JSystem/J2DGraph/J2DGrafContext.h similarity index 98% rename from include/JSystem/J2DGraph/J2DGrafContext.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DGrafContext.h index 9f9ff431a7..8a7e1a74a2 100644 --- a/include/JSystem/J2DGraph/J2DGrafContext.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DGrafContext.h @@ -3,7 +3,7 @@ #include "JSystem/JGeometry.h" #include "JSystem/JUtility/TColor.h" -#include +#include /** * @ingroup jsystem-j2d diff --git a/include/JSystem/J2DGraph/J2DManage.h b/libs/JSystem/include/JSystem/J2DGraph/J2DManage.h similarity index 95% rename from include/JSystem/J2DGraph/J2DManage.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DManage.h index abccbe04c2..ebbf3cf46d 100644 --- a/include/JSystem/J2DGraph/J2DManage.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DManage.h @@ -1,7 +1,7 @@ #ifndef J2DMANAGE_H #define J2DMANAGE_H -#include +#include class JSUInputStream; diff --git a/include/JSystem/J2DGraph/J2DMatBlock.h b/libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h similarity index 99% rename from include/JSystem/J2DGraph/J2DMatBlock.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h index 36db0fe0a5..7a5a3e594a 100644 --- a/include/JSystem/J2DGraph/J2DMatBlock.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DMatBlock.h @@ -69,7 +69,7 @@ class J2DTevBlock { public: virtual void initialize() {} virtual void setGX() {} - virtual void loadTexture(_GXTexMapID, u32) {} + virtual void loadTexture(GXTexMapID, u32) {} virtual u32 getType() = 0; virtual u8 getMaxStage() = 0; virtual void setTexNo(u32, u16) {} @@ -124,7 +124,7 @@ public: virtual void initialize(); virtual void setGX(); - virtual void loadTexture(_GXTexMapID, u32); + virtual void loadTexture(GXTexMapID, u32); virtual u32 getType() { return 'TVB1'; } virtual u8 getMaxStage() { return 1; } virtual void setTexNo(u32 index, u16 texNo) { @@ -264,7 +264,7 @@ public: virtual void initialize(); virtual void setGX(); - virtual void loadTexture(_GXTexMapID, u32); + virtual void loadTexture(GXTexMapID, u32); virtual u32 getType() { return 'TVB2'; } virtual u8 getMaxStage() { return 2; } virtual void setTexNo(u32 index, u16 texNo) { @@ -406,7 +406,7 @@ public: virtual void initialize(); virtual void setGX(); - virtual void loadTexture(_GXTexMapID, u32); + virtual void loadTexture(GXTexMapID, u32); virtual u32 getType() { return 'TVB4'; } virtual u8 getMaxStage() { return 4; } virtual void setTexNo(u32 index, u16 texNo) { @@ -548,7 +548,7 @@ public: virtual void initialize(); virtual void setGX(); - virtual void loadTexture(_GXTexMapID, u32); + virtual void loadTexture(GXTexMapID, u32); virtual u32 getType() { return 'TVB8'; } virtual u8 getMaxStage() { return 8; } virtual void setTexNo(u32 index, u16 texNo) { @@ -691,7 +691,7 @@ public: virtual void initialize(); virtual void setGX(); - virtual void loadTexture(_GXTexMapID, u32); + virtual void loadTexture(GXTexMapID, u32); virtual u32 getType() { return 'TV16'; } virtual u8 getMaxStage() { return 16; } virtual void setTexNo(u32 index, u16 texNo) { diff --git a/include/JSystem/J2DGraph/J2DMaterial.h b/libs/JSystem/include/JSystem/J2DGraph/J2DMaterial.h similarity index 100% rename from include/JSystem/J2DGraph/J2DMaterial.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DMaterial.h diff --git a/include/JSystem/J2DGraph/J2DMaterialFactory.h b/libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h similarity index 76% rename from include/JSystem/J2DGraph/J2DMaterialFactory.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h index 20bcbe1eb4..f82788d57c 100644 --- a/include/JSystem/J2DGraph/J2DMaterialFactory.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DMaterialFactory.h @@ -40,8 +40,6 @@ struct J2DMaterialBlock { BE(u32) field_0x64; }; -typedef struct _GXColor GXColor; -typedef struct _GXColorS10 GXColorS10; struct J2DAlphaCompInfo; struct J2DBlendInfo; struct J2DColorChanInfo; @@ -136,38 +134,38 @@ public: u8 newDither(int) const; u8 getMaterialMode(int idx) const { - return field_0x4[field_0x8[idx]].field_0x0; + return mpMaterialInitData[mpMaterialID[idx]].field_0x0; } u8 getMaterialAlphaCalc(int idx) const { - return field_0x4[field_0x8[idx]].field_0x6; + return mpMaterialInitData[mpMaterialID[idx]].field_0x6; } private: - /* 0x00 */ u16 field_0x0; + /* 0x00 */ u16 mMaterialNum; /* 0x02 */ u16 field_0x2; - /* 0x04 */ J2DMaterialInitData* field_0x4; - /* 0x08 */ u16* field_0x8; - /* 0x0C */ J2DIndInitData* field_0xc; - /* 0x10 */ GXColor* field_0x10; - /* 0x14 */ u8* field_0x14; - /* 0x18 */ J2DColorChanInfo* field_0x18; - /* 0x1C */ u8* field_0x1c; - /* 0x20 */ J2DTexCoordInfo* field_0x20; - /* 0x24 */ J2DTexMtxInfo* field_0x24; - /* 0x28 */ u16* field_0x28; - /* 0x2C */ u16* field_0x2c; - /* 0x30 */ BE(GXCullMode)* field_0x30; - /* 0x34 */ J2DTevOrderInfo* field_0x34; - /* 0x38 */ BE(GXColorS10)* field_0x38; - /* 0x3C */ GXColor* field_0x3c; - /* 0x40 */ u8* field_0x40; - /* 0x44 */ J2DTevStageInfo* field_0x44; - /* 0x48 */ J2DTevSwapModeInfo* field_0x48; - /* 0x4C */ J2DTevSwapModeTableInfo* field_0x4c; - /* 0x50 */ J2DAlphaCompInfo* field_0x50; - /* 0x54 */ J2DBlendInfo* field_0x54; - /* 0x58 */ u8* field_0x58; + /* 0x04 */ J2DMaterialInitData* mpMaterialInitData; + /* 0x08 */ BE(u16)* mpMaterialID; + /* 0x0C */ J2DIndInitData* mpIndInitData; + /* 0x10 */ GXColor* mpMatColor; + /* 0x14 */ u8* mpColorChanNum; + /* 0x18 */ J2DColorChanInfo* mpColorChanInfo; + /* 0x1C */ u8* mpTexGenNum; + /* 0x20 */ J2DTexCoordInfo* mpTexCoordInfo; + /* 0x24 */ J2DTexMtxInfo* mpTexMtxInfo; + /* 0x28 */ BE(u16)* mpTexNo; + /* 0x2C */ BE(u16)* mpFontNo; + /* 0x30 */ BE(GXCullMode)* mpCullMode; + /* 0x34 */ J2DTevOrderInfo* mpTevOrderInfo; + /* 0x38 */ BE(GXColorS10)* mpTevColor; + /* 0x3C */ GXColor* mpTevKColor; + /* 0x40 */ u8* mpTevStageNum; + /* 0x44 */ J2DTevStageInfo* mpTevStageInfo; + /* 0x48 */ J2DTevSwapModeInfo* mpTevSwapModeInfo; + /* 0x4C */ J2DTevSwapModeTableInfo* mpTevSwapModeTableInfo; + /* 0x50 */ J2DAlphaCompInfo* mpAlphaCompInfo; + /* 0x54 */ J2DBlendInfo* mpBlendInfo; + /* 0x58 */ u8* mpDither; }; #endif /* J2DMATERIALFACTORY_H */ diff --git a/include/JSystem/J2DGraph/J2DOrthoGraph.h b/libs/JSystem/include/JSystem/J2DGraph/J2DOrthoGraph.h similarity index 100% rename from include/JSystem/J2DGraph/J2DOrthoGraph.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DOrthoGraph.h diff --git a/include/JSystem/J2DGraph/J2DPane.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h similarity index 97% rename from include/JSystem/J2DGraph/J2DPane.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DPane.h index 8ef7bd802f..60f382f064 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPane.h @@ -3,8 +3,9 @@ #include "JSystem/JGeometry.h" #include "JSystem/JSupport/JSUList.h" -#include -#include +#include +#include +#include "dusk/endian.h" class J2DAnmBase; class J2DAnmColor; @@ -40,8 +41,8 @@ enum J2DBasePosition { * */ struct J2DPaneHeader { - /* 0x0 */ u32 mKind; - /* 0x4 */ u32 mSize; + /* 0x0 */ BE(u32) mKind; + /* 0x4 */ BE(u32) mSize; }; /** @@ -95,7 +96,7 @@ public: setCullBack(mode); } - /* vt 0x20 */ virtual void setCullBack(_GXCullMode cmode); + /* vt 0x20 */ virtual void setCullBack(GXCullMode cmode); /* vt 0x24 */ virtual void setAlpha(u8 alpha) { mAlpha = alpha; }; diff --git a/include/JSystem/J2DGraph/J2DPicture.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h similarity index 94% rename from include/JSystem/J2DGraph/J2DPicture.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h index e73fd3fc9b..70761e972d 100644 --- a/include/JSystem/J2DGraph/J2DPicture.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPicture.h @@ -4,6 +4,7 @@ #include "JSystem/J2DGraph/J2DPane.h" #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JUtility/TColor.h" +#include "dusk/endian.h" class J2DMaterial; class JUTPalette; @@ -31,8 +32,8 @@ enum J2DBinding { * */ struct J2DPicHeader { - /* 0x0 */ u32 mTag; - /* 0x4 */ u32 mSize; + /* 0x0 */ BE(u32) mTag; + /* 0x4 */ BE(u32) mSize; }; /** @@ -40,12 +41,12 @@ struct J2DPicHeader { * */ struct J2DScrnBlockPictureParameter { - /* 0x00 */ u16 field_0x0; - /* 0x02 */ u16 mMaterialNum; - /* 0x04 */ u16 field_0x4; - /* 0x06 */ u16 field_0x6; - /* 0x08 */ u16 field_0x8[4]; - /* 0x10 */ JGeometry::TVec2 field_0x10[4]; + /* 0x00 */ BE(u16) field_0x0; + /* 0x02 */ BE(u16) mMaterialNum; + /* 0x04 */ BE(u16) field_0x4; + /* 0x06 */ BE(u16) field_0x6; + /* 0x08 */ BE(u16) field_0x8[4]; + /* 0x10 */ JGeometry::TVec2 field_0x10[4]; /* 0x20 */ u32 mCornerColor[4]; }; // Size: 0x30 @@ -129,12 +130,12 @@ public: JGeometry::TBox2(param_4, param_5, param_4 + param_6, param_5 + param_7)); } virtual void drawOut(JGeometry::TBox2 const&, JGeometry::TBox2 const&); - virtual void load(_GXTexMapID param_0, u8 param_1) { + virtual void load(GXTexMapID param_0, u8 param_1) { if (param_1 < mTextureNum && param_1 < 2 && mTexture[param_1] != NULL) { mTexture[param_1]->load(param_0); } } - virtual void load(u8 param_0) { load((_GXTexMapID)param_0, param_0); } + virtual void load(u8 param_0) { load((GXTexMapID)param_0, param_0); } virtual void setBlendRatio(f32 param_0, f32 param_1) { setBlendColorRatio(param_0, param_1); setBlendAlphaRatio(param_0, param_1); diff --git a/include/JSystem/J2DGraph/J2DPictureEx.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPictureEx.h similarity index 98% rename from include/JSystem/J2DGraph/J2DPictureEx.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DPictureEx.h index d58530c037..86a99cd5fb 100644 --- a/include/JSystem/J2DGraph/J2DPictureEx.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DPictureEx.h @@ -39,7 +39,7 @@ public: virtual ~J2DPictureEx(); virtual void setCullBack(bool); - virtual void setCullBack(_GXCullMode); + virtual void setCullBack(GXCullMode); virtual void setAlpha(u8); virtual void drawSelf(f32, f32, f32 (*)[3][4]); virtual bool isUsed(ResTIMG const*); @@ -80,7 +80,7 @@ public: virtual void drawOut(f32, f32, f32, f32, f32, f32); virtual void drawOut(f32, f32, f32, f32, f32, f32, f32, f32); virtual void drawOut(JGeometry::TBox2 const&, JGeometry::TBox2 const&); - virtual void load(_GXTexMapID, u8); + virtual void load(GXTexMapID, u8); virtual void load(u8); virtual void setBlendColorRatio(f32, f32); virtual void setBlendAlphaRatio(f32, f32); diff --git a/include/JSystem/J2DGraph/J2DPrint.h b/libs/JSystem/include/JSystem/J2DGraph/J2DPrint.h similarity index 100% rename from include/JSystem/J2DGraph/J2DPrint.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DPrint.h diff --git a/include/JSystem/J2DGraph/J2DScreen.h b/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h similarity index 89% rename from include/JSystem/J2DGraph/J2DScreen.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h index fbd65db10b..6f959f56fc 100644 --- a/include/JSystem/J2DGraph/J2DScreen.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DScreen.h @@ -4,6 +4,7 @@ #include "JSystem/J2DGraph/J2DManage.h" #include "JSystem/J2DGraph/J2DPane.h" #include "JSystem/JUtility/TColor.h" +#include "dusk/endian.h" class J2DMaterial; class JUTNameTab; @@ -13,10 +14,10 @@ class JUTNameTab; * */ struct J2DScrnHeader { - /* 0x00 */ u32 mTag; - /* 0x04 */ u32 mType; - /* 0x08 */ u32 mFileSize; - /* 0x0C */ u32 mBlockNum; + /* 0x00 */ BE(u32) mTag; + /* 0x04 */ BE(u32) mType; + /* 0x08 */ BE(u32) mFileSize; + /* 0x0C */ BE(u32) mBlockNum; /* 0x10 */ u8 padding[0x10]; }; @@ -25,10 +26,10 @@ struct J2DScrnHeader { * */ struct J2DScrnInfoHeader { - /* 0x0 */ u32 mTag; - /* 0x4 */ u32 mSize; - /* 0x8 */ u16 mWidth; - /* 0xA */ u16 mHeight; + /* 0x0 */ BE(u32) mTag; + /* 0x4 */ BE(u32) mSize; + /* 0x8 */ BE(u16) mWidth; + /* 0xA */ BE(u16) mHeight; /* 0xC */ u32 mColor; }; @@ -37,8 +38,8 @@ struct J2DScrnInfoHeader { * */ struct J2DScrnBlockHeader { - /* 0x00 */ u32 mTag; - /* 0x04 */ s32 mSize; + /* 0x00 */ BE(u32) mTag; + /* 0x04 */ BE(s32) mSize; }; /** diff --git a/include/JSystem/J2DGraph/J2DTevs.h b/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h similarity index 98% rename from include/JSystem/J2DGraph/J2DTevs.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h index f7ce3f4ef9..2d5f3ca2d6 100644 --- a/include/JSystem/J2DGraph/J2DTevs.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DTevs.h @@ -1,20 +1,21 @@ #ifndef J2DTEVS_H #define J2DTEVS_H -#include -#include +#include +#include #include "global.h" +#include "dusk/endian.h" /** * @ingroup jsystem-j2d * */ struct J2DTextureSRTInfo { - /* 0x00 */ f32 mScaleX; - /* 0x04 */ f32 mScaleY; - /* 0x08 */ f32 mRotationDeg; - /* 0x0C */ f32 mTranslationX; - /* 0x10 */ f32 mTranslationY; + /* 0x00 */ BE(f32) mScaleX; + /* 0x04 */ BE(f32) mScaleY; + /* 0x08 */ BE(f32) mRotationDeg; + /* 0x0C */ BE(f32) mTranslationX; + /* 0x10 */ BE(f32) mTranslationY; }; // Size: 0x14 /** @@ -31,7 +32,7 @@ struct J2DTexMtxInfo { /* 0x01 */ u8 mTexMtxDCC; /* 0x02 */ u8 field_0x2; // padding ? /* 0x03 */ u8 field_0x3; // padding ? - /* 0x04 */ Vec mCenter; + /* 0x04 */ BE(Vec) mCenter; /* 0x10 */ J2DTextureSRTInfo mTexSRTInfo; GXTexMtxType getTexMtxType() const { return (GXTexMtxType)mTexMtxType; } diff --git a/include/JSystem/J2DGraph/J2DTextBox.h b/libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h similarity index 92% rename from include/JSystem/J2DGraph/J2DTextBox.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h index 417e6ede77..ff4781297a 100644 --- a/include/JSystem/J2DGraph/J2DTextBox.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DTextBox.h @@ -3,6 +3,7 @@ #include "JSystem/J2DGraph/J2DMaterial.h" #include "JSystem/J2DGraph/J2DPane.h" +#include "dusk/endian.h" class J2DMaterial; class JUTFont; @@ -24,8 +25,8 @@ enum J2DTextBoxHBinding { * */ struct J2DTbxBlockHeader { - /* 0x00 */ u32 mTag; - /* 0x04 */ s32 mSize; + /* 0x00 */ BE(u32) mTag; + /* 0x04 */ BE(s32) mSize; }; /** @@ -33,17 +34,17 @@ struct J2DTbxBlockHeader { * */ struct J2DTextBoxInfo { - /* 0x00 */ u16 field_0x0; - /* 0x02 */ u16 field_0x2; - /* 0x04 */ u16 mMaterialNum; - /* 0x06 */ s16 mCharSpace; - /* 0x08 */ s16 mLineSpace; - /* 0x0A */ u16 mFontSizeX; - /* 0x0C */ u16 mFontSizeY; + /* 0x00 */ BE(u16) field_0x0; + /* 0x02 */ BE(u16) field_0x2; + /* 0x04 */ BE(u16) mMaterialNum; + /* 0x06 */ BE(s16) mCharSpace; + /* 0x08 */ BE(s16) mLineSpace; + /* 0x0A */ BE(u16) mFontSizeX; + /* 0x0C */ BE(u16) mFontSizeY; /* 0x0E */ u8 mHBind; /* 0x0F */ u8 mVBind; - /* 0x10 */ u32 mCharColor; - /* 0x14 */ u32 mGradColor; + /* 0x10 */ BE(u32) mCharColor; + /* 0x14 */ BE(u32) mGradColor; /* 0x18 */ u8 mConnected; /* 0x19 */ char field_0x19[3]; /* 0x1C */ u16 field_0x1c; diff --git a/include/JSystem/J2DGraph/J2DTextBoxEx.h b/libs/JSystem/include/JSystem/J2DGraph/J2DTextBoxEx.h similarity index 98% rename from include/JSystem/J2DGraph/J2DTextBoxEx.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DTextBoxEx.h index 470704562d..f0c2b389ca 100644 --- a/include/JSystem/J2DGraph/J2DTextBoxEx.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DTextBoxEx.h @@ -26,7 +26,7 @@ public: virtual ~J2DTextBoxEx(); virtual void setCullBack(bool); - virtual void setCullBack(_GXCullMode); + virtual void setCullBack(GXCullMode); virtual void setAlpha(u8); virtual void drawSelf(f32, f32, f32 (*)[3][4]); virtual bool isUsed(ResTIMG const*); diff --git a/include/JSystem/J2DGraph/J2DWindow.h b/libs/JSystem/include/JSystem/J2DGraph/J2DWindow.h similarity index 100% rename from include/JSystem/J2DGraph/J2DWindow.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DWindow.h diff --git a/include/JSystem/J2DGraph/J2DWindowEx.h b/libs/JSystem/include/JSystem/J2DGraph/J2DWindowEx.h similarity index 98% rename from include/JSystem/J2DGraph/J2DWindowEx.h rename to libs/JSystem/include/JSystem/J2DGraph/J2DWindowEx.h index 467d70864e..42bcfcc774 100644 --- a/include/JSystem/J2DGraph/J2DWindowEx.h +++ b/libs/JSystem/include/JSystem/J2DGraph/J2DWindowEx.h @@ -31,7 +31,7 @@ public: virtual ~J2DWindowEx(); virtual void setCullBack(bool); - virtual void setCullBack(_GXCullMode); + virtual void setCullBack(GXCullMode); virtual void setAlpha(u8); virtual void drawSelf(f32, f32, f32 (*)[3][4]); virtual bool isUsed(ResTIMG const*); diff --git a/include/JSystem/J3DAssert.h b/libs/JSystem/include/JSystem/J3DAssert.h similarity index 100% rename from include/JSystem/J3DAssert.h rename to libs/JSystem/include/JSystem/J3DAssert.h diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h similarity index 98% rename from include/JSystem/J3DGraphAnimator/J3DAnimation.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h index cd313d68ea..84f8625a84 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -3,7 +3,7 @@ #include "JSystem/J3DAssert.h" #include "JSystem/JUtility/JUTNameTab.h" -#include +#include #include "global.h" #include "dusk/endian.h" @@ -53,9 +53,6 @@ struct J3DAnmTransform_ANK1 { /* 0x20 */ BE(u32) translation_data_offset; }; -typedef struct _GXColor GXColor; -typedef struct _GXColorS10 GXColorS10; - /** * @ingroup jsystem-j3d * @@ -427,15 +424,17 @@ struct J3DAnmClusterKeyTable { */ struct J3DAnmTransformKeyData { /* 0x00 */ JUTDataBlockHeader mHeader; - /* 0x08 */ u8 field_0x8; - /* 0x09 */ u8 field_0x9; + /* 0x08 */ u8 mLoopMode; + /* 0x09 */ u8 mRotationDecimal; /* 0x0A */ BE(s16) mFrameMax; - /* 0x0C */ BE(u16) field_0xc; - /* 0x10 */ int field_0x10; - /* 0x14 */ OFFSET_PTR mTableOffset; - /* 0x18 */ OFFSET_PTR field_0x18; - /* 0x1c */ OFFSET_PTR field_0x1c; - /* 0x20 */ OFFSET_PTR field_0x20; + /* 0x0C */ BE(u16) mJointAnimationTableCount; + /* 0x0E */ BE(u16) mSCount; + /* 0x10 */ BE(u16) mRCount; + /* 0x12 */ BE(u16) mTCount; + /* 0x14 */ OFFSET_PTR mJointAnimationTableOffs; + /* 0x18 */ OFFSET_PTR mSTableOffs; + /* 0x1c */ OFFSET_PTR mRTableOffs; + /* 0x20 */ OFFSET_PTR mTTableOffs; }; /** @@ -837,8 +836,8 @@ public: class J3DAnmTevRegKey : public J3DAnmBase { public: J3DAnmTevRegKey(); - void getTevColorReg(u16, _GXColorS10*) const; - void getTevKonstReg(u16, _GXColor*) const; + void getTevColorReg(u16, GXColorS10*) const; + void getTevKonstReg(u16, GXColor*) const; void searchUpdateMaterialID(J3DMaterialTable*); void searchUpdateMaterialID(J3DModelData*); diff --git a/include/JSystem/J3DGraphAnimator/J3DCluster.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DCluster.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DCluster.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DCluster.h diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJoint.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DJoint.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJoint.h diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJointTree.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DJointTree.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DJointTree.h diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAttach.h diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h similarity index 99% rename from include/JSystem/J3DGraphAnimator/J3DModel.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h index 4de7175e85..5ec2aa5f2e 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphAnimator/J3DSkinDeform.h" #include "JSystem/J3DGraphBase/J3DPacket.h" -#include +#include enum J3DMdlFlag { J3DMdlFlag_None = 0x0, diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModelData.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DModelData.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DModelData.h diff --git a/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMtxBuffer.h diff --git a/include/JSystem/J3DGraphAnimator/J3DShapeTable.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DShapeTable.h similarity index 100% rename from include/JSystem/J3DGraphAnimator/J3DShapeTable.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DShapeTable.h diff --git a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h similarity index 99% rename from include/JSystem/J3DGraphAnimator/J3DSkinDeform.h rename to libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h index 60fa5fc776..64923d761d 100644 --- a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphAnimator/J3DCluster.h" #include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h" -#include +#include #include class J3DModel; diff --git a/include/JSystem/J3DGraphBase/J3DDrawBuffer.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DDrawBuffer.h similarity index 100% rename from include/JSystem/J3DGraphBase/J3DDrawBuffer.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DDrawBuffer.h diff --git a/include/JSystem/J3DGraphBase/J3DEnum.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DEnum.h similarity index 100% rename from include/JSystem/J3DGraphBase/J3DEnum.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DEnum.h diff --git a/include/JSystem/J3DGraphBase/J3DFifo.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DFifo.h similarity index 97% rename from include/JSystem/J3DGraphBase/J3DFifo.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DFifo.h index a1cd2ff5b8..ac71c2afdd 100644 --- a/include/JSystem/J3DGraphBase/J3DFifo.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DFifo.h @@ -1,8 +1,8 @@ #ifndef J3DFIFO_H #define J3DFIFO_H -#include -#include +#include +#include inline void J3DFifoLoadBPCmd(u32 regval) { GXCmd1u8(GX_LOAD_BP_REG); diff --git a/include/JSystem/J3DGraphBase/J3DGD.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DGD.h similarity index 96% rename from include/JSystem/J3DGraphBase/J3DGD.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DGD.h index b01dc7187f..e61ca2fa30 100644 --- a/include/JSystem/J3DGraphBase/J3DGD.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DGD.h @@ -1,8 +1,8 @@ #ifndef J3DGD_H #define J3DGD_H -#include -#include +#include +#include inline void J3DGDWrite_u8(u8 data) { __GDWrite(data); @@ -81,8 +81,8 @@ void J3DGDSetTexLookupMode(GXTexMapID, GXTexWrapMode, GXTexWrapMode, GXTexFilter void J3DGDSetTexImgAttr(GXTexMapID, u16, u16, GXTexFmt); void J3DGDSetTexImgPtr(GXTexMapID, void*); void J3DGDSetTexImgPtrRaw(GXTexMapID, u32); -void J3DGDSetTexTlut(GXTexMapID, u32, _GXTlutFmt); -void J3DGDLoadTlut(void*, u32, _GXTlutSize); +void J3DGDSetTexTlut(GXTexMapID, u32, GXTlutFmt); +void J3DGDLoadTlut(void*, u32, GXTlutSize); void J3DGDSetIndTexMtx(GXIndTexMtxID, f32 (*)[3], s8); void J3DGDSetIndTexCoordScale(GXIndTexStageID, GXIndTexScale, GXIndTexScale, GXIndTexScale, GXIndTexScale); @@ -93,7 +93,7 @@ void J3DGDSetTevOrder(GXTevStageID, GXTexCoordID, GXTexMapID, GXChannelID, GXTex void J3DGDSetTevKColor(GXTevKColorID, GXColor); void J3DGDSetTevColorS10(GXTevRegID, GXColorS10); void J3DGDSetFog(GXFogType, f32, f32, f32, f32, GXColor); -void J3DGDSetFogRangeAdj(u8, u16, _GXFogAdjTable*); +void J3DGDSetFogRangeAdj(GXBool, u16, _GXFogAdjTable*); inline void J3DGDSetNumChans(u8 numChans) { J3DGDWriteXFCmd(0x1009, numChans); diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DMatBlock.h similarity index 100% rename from include/JSystem/J3DGraphBase/J3DMatBlock.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DMatBlock.h diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DMaterial.h similarity index 100% rename from include/JSystem/J3DGraphBase/J3DMaterial.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DMaterial.h diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h similarity index 99% rename from include/JSystem/J3DGraphBase/J3DPacket.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h index 3e94e1830c..79e19651e4 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DPacket.h @@ -4,8 +4,8 @@ #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/J3DGraphBase/J3DEnum.h" -#include -#include +#include +#include #include class J3DMatPacket; diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h similarity index 98% rename from include/JSystem/J3DGraphBase/J3DShape.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h index 4b52fe4526..2a1ba0322b 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShape.h @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphBase/J3DShapeDraw.h" #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DFifo.h" -#include +#include #include "dusk/endian_gx.hpp" class J3DShapeMtx; @@ -125,8 +125,8 @@ public: static const int kVcdVatDLSize = 0xC0; void initialize(); - void addTexMtxIndexInDL(_GXAttr, u32); - void addTexMtxIndexInVcd(_GXAttr); + void addTexMtxIndexInDL(GXAttr, u32); + void addTexMtxIndexInVcd(GXAttr); void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]); u16 countBumpMtxNum() const; void loadVtxArray() const; diff --git a/include/JSystem/J3DGraphBase/J3DShapeDraw.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeDraw.h similarity index 95% rename from include/JSystem/J3DGraphBase/J3DShapeDraw.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeDraw.h index ad3f7ec4cb..e6e8d61786 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeDraw.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeDraw.h @@ -1,7 +1,7 @@ #ifndef J3DSHAPEDRAW_H #define J3DSHAPEDRAW_H -#include +#include /** * @ingroup jsystem-j3d diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h similarity index 99% rename from include/JSystem/J3DGraphBase/J3DShapeMtx.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h index e6bdcf1993..313fa1ef30 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphBase/J3DShape.h" #include "JSystem/J3DAssert.h" -#include +#include #include "dusk/endian.h" class J3DTexMtx; diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h similarity index 98% rename from include/JSystem/J3DGraphBase/J3DStruct.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h index 59fb3b14c0..422cc0fcf6 100644 --- a/include/JSystem/J3DGraphBase/J3DStruct.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DStruct.h @@ -1,9 +1,9 @@ #ifndef J3DSTRUCT_H #define J3DSTRUCT_H -#include -#include -#include +#include +#include +#include #include "global.h" #include "JSystem/JMath/JMath.h" diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h similarity index 95% rename from include/JSystem/J3DGraphBase/J3DSys.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h index 0d88487f5f..417bd68790 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DSys.h @@ -1,8 +1,8 @@ #ifndef J3DSYS_H #define J3DSYS_H -#include -#include +#include +#include #include "JSystem/J3DAssert.h" #include "JSystem/JMath/JMath.h" @@ -145,13 +145,13 @@ struct J3DSys { void setModelDrawMtx(Mtx* pMtxArr) { J3D_ASSERT_NULLPTR(230, pMtxArr); mModelDrawMtx = pMtxArr; - GXSetArray(GX_POS_MTX_ARRAY, mModelDrawMtx, sizeof(*mModelDrawMtx)); + GXSETARRAY(GX_POS_MTX_ARRAY, mModelDrawMtx, sizeof(*mModelDrawMtx), sizeof(*mModelDrawMtx)); } void setModelNrmMtx(Mtx33* pMtxArr) { J3D_ASSERT_NULLPTR(241, pMtxArr); mModelNrmMtx = pMtxArr; - GXSetArray(GX_NRM_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx)); + GXSETARRAY(GX_POS_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx), sizeof(*mModelNrmMtx)); } void* getVtxPos() { return mVtxPos; } diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h similarity index 99% rename from include/JSystem/J3DGraphBase/J3DTevs.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h index 4c21d1374f..36d2b467c2 100644 --- a/include/JSystem/J3DGraphBase/J3DTevs.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTevs.h @@ -1,8 +1,8 @@ #ifndef J3DTEVS_H #define J3DTEVS_H -#include -#include +#include +#include #include "JSystem/J3DGraphBase/J3DGD.h" #include "JSystem/J3DGraphBase/J3DStruct.h" diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h similarity index 100% rename from include/JSystem/J3DGraphBase/J3DTexture.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DTexture.h diff --git a/include/JSystem/J3DGraphBase/J3DTransform.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h similarity index 99% rename from include/JSystem/J3DGraphBase/J3DTransform.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h index 523bf81c69..f8f27b26d9 100644 --- a/include/JSystem/J3DGraphBase/J3DTransform.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DTransform.h @@ -1,7 +1,7 @@ #ifndef J3DTRANSFORM_H #define J3DTRANSFORM_H -#include +#include #include "JSystem/JMath/JMath.h" struct J3DTextureSRTInfo; diff --git a/include/JSystem/J3DGraphBase/J3DVertex.h b/libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h similarity index 98% rename from include/JSystem/J3DGraphBase/J3DVertex.h rename to libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h index f52a2f360e..84eea5ad2a 100644 --- a/include/JSystem/J3DGraphBase/J3DVertex.h +++ b/libs/JSystem/include/JSystem/J3DGraphBase/J3DVertex.h @@ -1,11 +1,10 @@ #ifndef J3DVERTEX_H #define J3DVERTEX_H -#include -#include +#include +#include #include "dusk/endian_gx.hpp" -typedef struct _GXColor GXColor; class J3DModel; class J3DAnmVtxColor; class J3DVertexBuffer; diff --git a/include/JSystem/J3DGraphLoader/J3DAnmLoader.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DAnmLoader.h similarity index 100% rename from include/JSystem/J3DGraphLoader/J3DAnmLoader.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DAnmLoader.h diff --git a/include/JSystem/J3DGraphLoader/J3DClusterLoader.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DClusterLoader.h similarity index 100% rename from include/JSystem/J3DGraphLoader/J3DClusterLoader.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DClusterLoader.h diff --git a/include/JSystem/J3DGraphLoader/J3DJointFactory.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DJointFactory.h similarity index 100% rename from include/JSystem/J3DGraphLoader/J3DJointFactory.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DJointFactory.h diff --git a/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h similarity index 99% rename from include/JSystem/J3DGraphLoader/J3DMaterialFactory.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h index e3834dc87f..9e5f9f14fe 100644 --- a/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DMaterialFactory.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphBase/J3DMatBlock.h" #include "JSystem/J3DGraphLoader/J3DModelLoader.h" -#include +#include class J3DMaterial; diff --git a/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h similarity index 99% rename from include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h index e59d158959..381c27a1e7 100644 --- a/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphBase/J3DMatBlock.h" #include "JSystem/J3DGraphLoader/J3DModelLoader.h" -#include +#include class J3DMaterial; struct J3DTexCoord2Info; diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoader.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h similarity index 64% rename from include/JSystem/J3DGraphLoader/J3DModelLoader.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h index 3365713d76..1aa2bfb13c 100644 --- a/include/JSystem/J3DGraphLoader/J3DModelLoader.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoader.h @@ -2,7 +2,7 @@ #define J3DMODELLOADER_H #include "JSystem/J3DGraphBase/J3DSys.h" -#include +#include #include "dusk/endian.h" @@ -11,9 +11,9 @@ class J3DMaterialTable; struct J3DModelHierarchy; #if TARGET_PC -#define OFFSET_PTR BE(u32) +#define OFFSET_PTR_V0 BE(u32) #else -#define OFFSET_PTR void* +#define OFFSET_PTR_V0 void* #endif /** @@ -47,7 +47,7 @@ struct J3DModelInfoBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mFlags; /* 0x0C */ BE(u32) mPacketNum; /* 0x10 */ BE(u32) mVtxNum; - /* 0x14 */ OFFSET_PTR mpHierarchy; + /* 0x14 */ OFFSET_PTR_V0 mpHierarchy; }; // size 0x18 /** @@ -55,12 +55,12 @@ struct J3DModelInfoBlock : public J3DModelBlock { * */ struct J3DVertexBlock : public J3DModelBlock { - /* 0x08 */ OFFSET_PTR mpVtxAttrFmtList; - /* 0x0C */ OFFSET_PTR mpVtxPosArray; - /* 0x10 */ OFFSET_PTR mpVtxNrmArray; - /* 0x14 */ OFFSET_PTR mpVtxNBTArray; - /* 0x18 */ OFFSET_PTR mpVtxColorArray[2]; - /* 0x20 */ OFFSET_PTR mpVtxTexCoordArray[8]; + /* 0x08 */ OFFSET_PTR_V0 mpVtxAttrFmtList; + /* 0x0C */ OFFSET_PTR_V0 mpVtxPosArray; + /* 0x10 */ OFFSET_PTR_V0 mpVtxNrmArray; + /* 0x14 */ OFFSET_PTR_V0 mpVtxNBTArray; + /* 0x18 */ OFFSET_PTR_V0 mpVtxColorArray[2]; + /* 0x20 */ OFFSET_PTR_V0 mpVtxTexCoordArray[8]; }; // size 0x40 /** @@ -69,10 +69,10 @@ struct J3DVertexBlock : public J3DModelBlock { */ struct J3DEnvelopeBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mWEvlpMtxNum; - /* 0x0C */ OFFSET_PTR mpWEvlpMixMtxNum; - /* 0x10 */ OFFSET_PTR mpWEvlpMixIndex; - /* 0x14 */ OFFSET_PTR mpWEvlpMixWeight; - /* 0x18 */ OFFSET_PTR mpInvJointMtx; + /* 0x0C */ OFFSET_PTR_V0 mpWEvlpMixMtxNum; + /* 0x10 */ OFFSET_PTR_V0 mpWEvlpMixIndex; + /* 0x14 */ OFFSET_PTR_V0 mpWEvlpMixWeight; + /* 0x18 */ OFFSET_PTR_V0 mpInvJointMtx; }; // size 0x1C /** @@ -81,8 +81,8 @@ struct J3DEnvelopeBlock : public J3DModelBlock { */ struct J3DDrawBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mMtxNum; - /* 0x0C */ OFFSET_PTR mpDrawMtxFlag; - /* 0x10 */ OFFSET_PTR mpDrawMtxIndex; + /* 0x0C */ OFFSET_PTR_V0 mpDrawMtxFlag; + /* 0x10 */ OFFSET_PTR_V0 mpDrawMtxIndex; }; // size 0x14 /** @@ -91,9 +91,9 @@ struct J3DDrawBlock : public J3DModelBlock { */ struct J3DJointBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mJointNum; - /* 0x0C */ OFFSET_PTR mpJointInitData; - /* 0x10 */ OFFSET_PTR mpIndexTable; - /* 0x14 */ OFFSET_PTR mpNameTable; + /* 0x0C */ OFFSET_PTR_V0 mpJointInitData; + /* 0x10 */ OFFSET_PTR_V0 mpIndexTable; + /* 0x14 */ OFFSET_PTR_V0 mpNameTable; }; // size 0x18 /** @@ -102,36 +102,36 @@ struct J3DJointBlock : public J3DModelBlock { */ struct J3DMaterialBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mMaterialNum; - /* 0x0C */ OFFSET_PTR mpMaterialInitData; - /* 0x10 */ OFFSET_PTR mpMaterialID; - /* 0x14 */ OFFSET_PTR mpNameTable; - /* 0x18 */ OFFSET_PTR mpIndInitData; - /* 0x1C */ OFFSET_PTR mpCullMode; - /* 0x20 */ OFFSET_PTR mpMatColor; - /* 0x24 */ OFFSET_PTR mpColorChanNum; - /* 0x28 */ OFFSET_PTR mpColorChanInfo; - /* 0x2C */ OFFSET_PTR mpAmbColor; - /* 0x30 */ OFFSET_PTR mpLightInfo; - /* 0x34 */ OFFSET_PTR mpTexGenNum; - /* 0x38 */ OFFSET_PTR mpTexCoordInfo; - /* 0x3C */ OFFSET_PTR mpTexCoord2Info; - /* 0x40 */ OFFSET_PTR mpTexMtxInfo; - /* 0x44 */ OFFSET_PTR field_0x44; - /* 0x48 */ OFFSET_PTR mpTexNo; - /* 0x4C */ OFFSET_PTR mpTevOrderInfo; - /* 0x50 */ OFFSET_PTR mpTevColor; - /* 0x54 */ OFFSET_PTR mpTevKColor; - /* 0x58 */ OFFSET_PTR mpTevStageNum; - /* 0x5C */ OFFSET_PTR mpTevStageInfo; - /* 0x60 */ OFFSET_PTR mpTevSwapModeInfo; - /* 0x64 */ OFFSET_PTR mpTevSwapModeTableInfo; - /* 0x68 */ OFFSET_PTR mpFogInfo; - /* 0x6C */ OFFSET_PTR mpAlphaCompInfo; - /* 0x70 */ OFFSET_PTR mpBlendInfo; - /* 0x74 */ OFFSET_PTR mpZModeInfo; - /* 0x78 */ OFFSET_PTR mpZCompLoc; - /* 0x7C */ OFFSET_PTR mpDither; - /* 0x80 */ OFFSET_PTR mpNBTScaleInfo; + /* 0x0C */ OFFSET_PTR_V0 mpMaterialInitData; + /* 0x10 */ OFFSET_PTR_V0 mpMaterialID; + /* 0x14 */ OFFSET_PTR_V0 mpNameTable; + /* 0x18 */ OFFSET_PTR_V0 mpIndInitData; + /* 0x1C */ OFFSET_PTR_V0 mpCullMode; + /* 0x20 */ OFFSET_PTR_V0 mpMatColor; + /* 0x24 */ OFFSET_PTR_V0 mpColorChanNum; + /* 0x28 */ OFFSET_PTR_V0 mpColorChanInfo; + /* 0x2C */ OFFSET_PTR_V0 mpAmbColor; + /* 0x30 */ OFFSET_PTR_V0 mpLightInfo; + /* 0x34 */ OFFSET_PTR_V0 mpTexGenNum; + /* 0x38 */ OFFSET_PTR_V0 mpTexCoordInfo; + /* 0x3C */ OFFSET_PTR_V0 mpTexCoord2Info; + /* 0x40 */ OFFSET_PTR_V0 mpTexMtxInfo; + /* 0x44 */ OFFSET_PTR_V0 field_0x44; + /* 0x48 */ OFFSET_PTR_V0 mpTexNo; + /* 0x4C */ OFFSET_PTR_V0 mpTevOrderInfo; + /* 0x50 */ OFFSET_PTR_V0 mpTevColor; + /* 0x54 */ OFFSET_PTR_V0 mpTevKColor; + /* 0x58 */ OFFSET_PTR_V0 mpTevStageNum; + /* 0x5C */ OFFSET_PTR_V0 mpTevStageInfo; + /* 0x60 */ OFFSET_PTR_V0 mpTevSwapModeInfo; + /* 0x64 */ OFFSET_PTR_V0 mpTevSwapModeTableInfo; + /* 0x68 */ OFFSET_PTR_V0 mpFogInfo; + /* 0x6C */ OFFSET_PTR_V0 mpAlphaCompInfo; + /* 0x70 */ OFFSET_PTR_V0 mpBlendInfo; + /* 0x74 */ OFFSET_PTR_V0 mpZModeInfo; + /* 0x78 */ OFFSET_PTR_V0 mpZCompLoc; + /* 0x7C */ OFFSET_PTR_V0 mpDither; + /* 0x80 */ OFFSET_PTR_V0 mpNBTScaleInfo; }; /** @@ -140,33 +140,33 @@ struct J3DMaterialBlock : public J3DModelBlock { */ struct J3DMaterialBlock_v21 : public J3DModelBlock { /* 0x08 */ BE(u16) mMaterialNum; - /* 0x0C */ OFFSET_PTR mpMaterialInitData; - /* 0x10 */ OFFSET_PTR mpMaterialID; - /* 0x14 */ OFFSET_PTR mpNameTable; - /* 0x18 */ OFFSET_PTR mpCullMode; - /* 0x1C */ OFFSET_PTR mpMatColor; - /* 0x20 */ OFFSET_PTR mpColorChanNum; - /* 0x24 */ OFFSET_PTR mpColorChanInfo; - /* 0x28 */ OFFSET_PTR mpTexGenNum; - /* 0x2C */ OFFSET_PTR mpTexCoordInfo; - /* 0x30 */ OFFSET_PTR mpTexCoord2Info; - /* 0x34 */ OFFSET_PTR mpTexMtxInfo; - /* 0x38 */ OFFSET_PTR field_0x38; - /* 0x3C */ OFFSET_PTR mpTexNo; - /* 0x40 */ OFFSET_PTR mpTevOrderInfo; - /* 0x44 */ OFFSET_PTR mpTevColor; - /* 0x48 */ OFFSET_PTR mpTevKColor; - /* 0x4C */ OFFSET_PTR mpTevStageNum; - /* 0x50 */ OFFSET_PTR mpTevStageInfo; - /* 0x54 */ OFFSET_PTR mpTevSwapModeInfo; - /* 0x58 */ OFFSET_PTR mpTevSwapModeTableInfo; - /* 0x5C */ OFFSET_PTR mpFogInfo; - /* 0x60 */ OFFSET_PTR mpAlphaCompInfo; - /* 0x64 */ OFFSET_PTR mpBlendInfo; - /* 0x68 */ OFFSET_PTR mpZModeInfo; - /* 0x6C */ OFFSET_PTR mpZCompLoc; - /* 0x70 */ OFFSET_PTR mpDither; - /* 0x74 */ OFFSET_PTR mpNBTScaleInfo; + /* 0x0C */ OFFSET_PTR_V0 mpMaterialInitData; + /* 0x10 */ OFFSET_PTR_V0 mpMaterialID; + /* 0x14 */ OFFSET_PTR_V0 mpNameTable; + /* 0x18 */ OFFSET_PTR_V0 mpCullMode; + /* 0x1C */ OFFSET_PTR_V0 mpMatColor; + /* 0x20 */ OFFSET_PTR_V0 mpColorChanNum; + /* 0x24 */ OFFSET_PTR_V0 mpColorChanInfo; + /* 0x28 */ OFFSET_PTR_V0 mpTexGenNum; + /* 0x2C */ OFFSET_PTR_V0 mpTexCoordInfo; + /* 0x30 */ OFFSET_PTR_V0 mpTexCoord2Info; + /* 0x34 */ OFFSET_PTR_V0 mpTexMtxInfo; + /* 0x38 */ OFFSET_PTR_V0 field_0x38; + /* 0x3C */ OFFSET_PTR_V0 mpTexNo; + /* 0x40 */ OFFSET_PTR_V0 mpTevOrderInfo; + /* 0x44 */ OFFSET_PTR_V0 mpTevColor; + /* 0x48 */ OFFSET_PTR_V0 mpTevKColor; + /* 0x4C */ OFFSET_PTR_V0 mpTevStageNum; + /* 0x50 */ OFFSET_PTR_V0 mpTevStageInfo; + /* 0x54 */ OFFSET_PTR_V0 mpTevSwapModeInfo; + /* 0x58 */ OFFSET_PTR_V0 mpTevSwapModeTableInfo; + /* 0x5C */ OFFSET_PTR_V0 mpFogInfo; + /* 0x60 */ OFFSET_PTR_V0 mpAlphaCompInfo; + /* 0x64 */ OFFSET_PTR_V0 mpBlendInfo; + /* 0x68 */ OFFSET_PTR_V0 mpZModeInfo; + /* 0x6C */ OFFSET_PTR_V0 mpZCompLoc; + /* 0x70 */ OFFSET_PTR_V0 mpDither; + /* 0x74 */ OFFSET_PTR_V0 mpNBTScaleInfo; }; /** @@ -175,12 +175,12 @@ struct J3DMaterialBlock_v21 : public J3DModelBlock { */ struct J3DMaterialDLBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mMaterialNum; - /* 0x0C */ OFFSET_PTR mpDisplayListInit; - /* 0x10 */ OFFSET_PTR mpPatchingInfo; - /* 0x14 */ OFFSET_PTR mpCurrentMtxInfo; - /* 0x18 */ OFFSET_PTR mpMaterialMode; - /* 0x1C */ OFFSET_PTR field_0x1c; - /* 0x20 */ OFFSET_PTR mpNameTable; + /* 0x0C */ OFFSET_PTR_V0 mpDisplayListInit; + /* 0x10 */ OFFSET_PTR_V0 mpPatchingInfo; + /* 0x14 */ OFFSET_PTR_V0 mpCurrentMtxInfo; + /* 0x18 */ OFFSET_PTR_V0 mpMaterialMode; + /* 0x1C */ OFFSET_PTR_V0 field_0x1c; + /* 0x20 */ OFFSET_PTR_V0 mpNameTable; }; /** @@ -189,14 +189,14 @@ struct J3DMaterialDLBlock : public J3DModelBlock { */ struct J3DShapeBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mShapeNum; - /* 0x0C */ OFFSET_PTR mpShapeInitData; - /* 0x10 */ OFFSET_PTR mpIndexTable; - /* 0x14 */ OFFSET_PTR mpNameTable; - /* 0x18 */ OFFSET_PTR mpVtxDescList; - /* 0x1C */ OFFSET_PTR mpMtxTable; - /* 0x20 */ OFFSET_PTR mpDisplayListData; - /* 0x24 */ OFFSET_PTR mpMtxInitData; - /* 0x28 */ OFFSET_PTR mpDrawInitData; + /* 0x0C */ OFFSET_PTR_V0 mpShapeInitData; + /* 0x10 */ OFFSET_PTR_V0 mpIndexTable; + /* 0x14 */ OFFSET_PTR_V0 mpNameTable; + /* 0x18 */ OFFSET_PTR_V0 mpVtxDescList; + /* 0x1C */ OFFSET_PTR_V0 mpMtxTable; + /* 0x20 */ OFFSET_PTR_V0 mpDisplayListData; + /* 0x24 */ OFFSET_PTR_V0 mpMtxInitData; + /* 0x28 */ OFFSET_PTR_V0 mpDrawInitData; }; // size 0x2C /** @@ -205,8 +205,8 @@ struct J3DShapeBlock : public J3DModelBlock { */ struct J3DTextureBlock : public J3DModelBlock { /* 0x08 */ BE(u16) mTextureNum; - /* 0x0C */ OFFSET_PTR mpTextureRes; - /* 0x10 */ OFFSET_PTR mpNameTable; + /* 0x0C */ OFFSET_PTR_V0 mpTextureRes; + /* 0x10 */ OFFSET_PTR_V0 mpNameTable; }; enum J3DModelLoaderFlagTypes { @@ -356,6 +356,6 @@ struct J3DMtxCalcJ3DSysInitSoftimage { } }; -#undef OFFSET_PTR +#undef OFFSET_PTR_V0 #endif /* J3DMODELLOADER_H */ diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h similarity index 79% rename from include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h index 2fec016614..f9a2347fdc 100644 --- a/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h @@ -1,6 +1,6 @@ #ifndef J3DMODELLOADERCALCSIZE_H #define J3DMODELLOADERCALCSIZE_H -#include +#include #endif /* J3DMODELLOADERCALCSIZE_H */ diff --git a/include/JSystem/J3DGraphLoader/J3DModelSaver.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelSaver.h similarity index 100% rename from include/JSystem/J3DGraphLoader/J3DModelSaver.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DModelSaver.h diff --git a/include/JSystem/J3DGraphLoader/J3DShapeFactory.h b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DShapeFactory.h similarity index 99% rename from include/JSystem/J3DGraphLoader/J3DShapeFactory.h rename to libs/JSystem/include/JSystem/J3DGraphLoader/J3DShapeFactory.h index cacba467be..22ebd1a19b 100644 --- a/include/JSystem/J3DGraphLoader/J3DShapeFactory.h +++ b/libs/JSystem/include/JSystem/J3DGraphLoader/J3DShapeFactory.h @@ -2,7 +2,7 @@ #define J3DSHAPEFACTORY_H #include "JSystem/J3DGraphLoader/J3DModelLoader.h" -#include +#include class J3DShape; class J3DShapeMtx; diff --git a/include/JSystem/J3DU/J3DUClipper.h b/libs/JSystem/include/JSystem/J3DU/J3DUClipper.h similarity index 97% rename from include/JSystem/J3DU/J3DUClipper.h rename to libs/JSystem/include/JSystem/J3DU/J3DUClipper.h index af5d655f12..0a3c9de1ea 100644 --- a/include/JSystem/J3DU/J3DUClipper.h +++ b/libs/JSystem/include/JSystem/J3DU/J3DUClipper.h @@ -1,7 +1,7 @@ #ifndef J3DUCLIPPER_H #define J3DUCLIPPER_H -#include +#include /** * @ingroup jsystem-j3d diff --git a/include/JSystem/J3DU/J3DUD.h b/libs/JSystem/include/JSystem/J3DU/J3DUD.h similarity index 90% rename from include/JSystem/J3DU/J3DUD.h rename to libs/JSystem/include/JSystem/J3DU/J3DUD.h index 1386f1c6c8..48b501944c 100644 --- a/include/JSystem/J3DU/J3DUD.h +++ b/libs/JSystem/include/JSystem/J3DU/J3DUD.h @@ -1,7 +1,7 @@ #ifndef J3DUD_H #define J3DUD_H -#include "dolphin/types.h" +#include #ifndef __MWERKS__ #include #endif diff --git a/include/JSystem/J3DU/J3DUDL.h b/libs/JSystem/include/JSystem/J3DU/J3DUDL.h similarity index 100% rename from include/JSystem/J3DU/J3DUDL.h rename to libs/JSystem/include/JSystem/J3DU/J3DUDL.h diff --git a/include/JSystem/J3DU/J3DUFur.h b/libs/JSystem/include/JSystem/J3DU/J3DUFur.h similarity index 100% rename from include/JSystem/J3DU/J3DUFur.h rename to libs/JSystem/include/JSystem/J3DU/J3DUFur.h diff --git a/include/JSystem/J3DU/J3DUMotion.h b/libs/JSystem/include/JSystem/J3DU/J3DUMotion.h similarity index 100% rename from include/JSystem/J3DU/J3DUMotion.h rename to libs/JSystem/include/JSystem/J3DU/J3DUMotion.h diff --git a/include/JSystem/J3DU/J3DUShadow.h b/libs/JSystem/include/JSystem/J3DU/J3DUShadow.h similarity index 100% rename from include/JSystem/J3DU/J3DUShadow.h rename to libs/JSystem/include/JSystem/J3DU/J3DUShadow.h diff --git a/include/JSystem/JAHNodeLib/JAHSoundPlayerNode.h b/libs/JSystem/include/JSystem/JAHNodeLib/JAHSoundPlayerNode.h similarity index 100% rename from include/JSystem/JAHNodeLib/JAHSoundPlayerNode.h rename to libs/JSystem/include/JSystem/JAHNodeLib/JAHSoundPlayerNode.h diff --git a/include/JSystem/JAHostIO/JAHFrameNode.h b/libs/JSystem/include/JSystem/JAHostIO/JAHFrameNode.h similarity index 96% rename from include/JSystem/JAHostIO/JAHFrameNode.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHFrameNode.h index ed9830e8b3..1b4ad74043 100644 --- a/include/JSystem/JAHostIO/JAHFrameNode.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHFrameNode.h @@ -1,7 +1,7 @@ #ifndef JAHFRAMENODE_H #define JAHFRAMENODE_H -#include +#include #include "JSystem/JAHostIO/JAHioNode.h" class JAHVirtualNode; diff --git a/include/JSystem/JAHostIO/JAHPubDefine.h b/libs/JSystem/include/JSystem/JAHostIO/JAHPubDefine.h similarity index 100% rename from include/JSystem/JAHostIO/JAHPubDefine.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHPubDefine.h diff --git a/include/JSystem/JAHostIO/JAHUTableEdit.h b/libs/JSystem/include/JSystem/JAHostIO/JAHUTableEdit.h similarity index 100% rename from include/JSystem/JAHostIO/JAHUTableEdit.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHUTableEdit.h diff --git a/include/JSystem/JAHostIO/JAHVirtualNode.h b/libs/JSystem/include/JSystem/JAHostIO/JAHVirtualNode.h similarity index 100% rename from include/JSystem/JAHostIO/JAHVirtualNode.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHVirtualNode.h diff --git a/include/JSystem/JAHostIO/JAHioMessage.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h similarity index 97% rename from include/JSystem/JAHostIO/JAHioMessage.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h index 766456bc10..558882bfa3 100644 --- a/include/JSystem/JAHostIO/JAHioMessage.h +++ b/libs/JSystem/include/JSystem/JAHostIO/JAHioMessage.h @@ -1,7 +1,7 @@ #ifndef JAHIOMESSAGE_H #define JAHIOMESSAGE_H -#include +#include class JAHioNode; class JORMContext; diff --git a/include/JSystem/JAHostIO/JAHioMgr.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioMgr.h similarity index 100% rename from include/JSystem/JAHostIO/JAHioMgr.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHioMgr.h diff --git a/include/JSystem/JAHostIO/JAHioNode.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioNode.h similarity index 100% rename from include/JSystem/JAHostIO/JAHioNode.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHioNode.h diff --git a/include/JSystem/JAHostIO/JAHioUtil.h b/libs/JSystem/include/JSystem/JAHostIO/JAHioUtil.h similarity index 100% rename from include/JSystem/JAHostIO/JAHioUtil.h rename to libs/JSystem/include/JSystem/JAHostIO/JAHioUtil.h diff --git a/include/JSystem/JAWExtSystem/JAWExtSystem.h b/libs/JSystem/include/JSystem/JAWExtSystem/JAWExtSystem.h similarity index 100% rename from include/JSystem/JAWExtSystem/JAWExtSystem.h rename to libs/JSystem/include/JSystem/JAWExtSystem/JAWExtSystem.h diff --git a/include/JSystem/JAWExtSystem/JAWGraphContext.h b/libs/JSystem/include/JSystem/JAWExtSystem/JAWGraphContext.h similarity index 100% rename from include/JSystem/JAWExtSystem/JAWGraphContext.h rename to libs/JSystem/include/JSystem/JAWExtSystem/JAWGraphContext.h diff --git a/include/JSystem/JAWExtSystem/JAWSystem.h b/libs/JSystem/include/JSystem/JAWExtSystem/JAWSystem.h similarity index 100% rename from include/JSystem/JAWExtSystem/JAWSystem.h rename to libs/JSystem/include/JSystem/JAWExtSystem/JAWSystem.h diff --git a/include/JSystem/JAWExtSystem/JAWWindow.h b/libs/JSystem/include/JSystem/JAWExtSystem/JAWWindow.h similarity index 100% rename from include/JSystem/JAWExtSystem/JAWWindow.h rename to libs/JSystem/include/JSystem/JAWExtSystem/JAWWindow.h diff --git a/include/JSystem/JAWExtSystem/JAWWindow3D.h b/libs/JSystem/include/JSystem/JAWExtSystem/JAWWindow3D.h similarity index 100% rename from include/JSystem/JAWExtSystem/JAWWindow3D.h rename to libs/JSystem/include/JSystem/JAWExtSystem/JAWWindow3D.h diff --git a/include/JSystem/JAWWinLib/JAWBankView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWBankView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWBankView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWBankView.h diff --git a/include/JSystem/JAWWinLib/JAWChView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWChView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWChView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWChView.h diff --git a/include/JSystem/JAWWinLib/JAWEntrySeView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWEntrySeView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWEntrySeView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWEntrySeView.h diff --git a/include/JSystem/JAWWinLib/JAWHioBankEdit.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWHioBankEdit.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWHioBankEdit.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWHioBankEdit.h diff --git a/include/JSystem/JAWWinLib/JAWHioReceiver.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWHioReceiver.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWHioReceiver.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWHioReceiver.h diff --git a/include/JSystem/JAWWinLib/JAWPlaySeView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWPlaySeView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWPlaySeView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWPlaySeView.h diff --git a/include/JSystem/JAWWinLib/JAWPlayerChView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWPlayerChView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWPlayerChView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWPlayerChView.h diff --git a/include/JSystem/JAWWinLib/JAWReportView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWReportView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWReportView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWReportView.h diff --git a/include/JSystem/JAWWinLib/JAWSysMemView.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWSysMemView.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWSysMemView.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWSysMemView.h diff --git a/include/JSystem/JAWWinLib/JAWVolume.h b/libs/JSystem/include/JSystem/JAWWinLib/JAWVolume.h similarity index 100% rename from include/JSystem/JAWWinLib/JAWVolume.h rename to libs/JSystem/include/JSystem/JAWWinLib/JAWVolume.h diff --git a/include/JSystem/JAudio2/JAIAudible.h b/libs/JSystem/include/JSystem/JAudio2/JAIAudible.h similarity index 100% rename from include/JSystem/JAudio2/JAIAudible.h rename to libs/JSystem/include/JSystem/JAudio2/JAIAudible.h diff --git a/include/JSystem/JAudio2/JAIAudience.h b/libs/JSystem/include/JSystem/JAudio2/JAIAudience.h similarity index 100% rename from include/JSystem/JAudio2/JAIAudience.h rename to libs/JSystem/include/JSystem/JAudio2/JAIAudience.h diff --git a/include/JSystem/JAudio2/JAISe.h b/libs/JSystem/include/JSystem/JAudio2/JAISe.h similarity index 100% rename from include/JSystem/JAudio2/JAISe.h rename to libs/JSystem/include/JSystem/JAudio2/JAISe.h diff --git a/include/JSystem/JAudio2/JAISeMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAISeMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAISeMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAISeMgr.h diff --git a/include/JSystem/JAudio2/JAISeq.h b/libs/JSystem/include/JSystem/JAudio2/JAISeq.h similarity index 100% rename from include/JSystem/JAudio2/JAISeq.h rename to libs/JSystem/include/JSystem/JAudio2/JAISeq.h diff --git a/include/JSystem/JAudio2/JAISeqDataMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAISeqDataMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAISeqDataMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAISeqDataMgr.h diff --git a/include/JSystem/JAudio2/JAISeqMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAISeqMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAISeqMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAISeqMgr.h diff --git a/include/JSystem/JAudio2/JAISound.h b/libs/JSystem/include/JSystem/JAudio2/JAISound.h similarity index 100% rename from include/JSystem/JAudio2/JAISound.h rename to libs/JSystem/include/JSystem/JAudio2/JAISound.h diff --git a/include/JSystem/JAudio2/JAISoundChild.h b/libs/JSystem/include/JSystem/JAudio2/JAISoundChild.h similarity index 100% rename from include/JSystem/JAudio2/JAISoundChild.h rename to libs/JSystem/include/JSystem/JAudio2/JAISoundChild.h diff --git a/include/JSystem/JAudio2/JAISoundHandles.h b/libs/JSystem/include/JSystem/JAudio2/JAISoundHandles.h similarity index 100% rename from include/JSystem/JAudio2/JAISoundHandles.h rename to libs/JSystem/include/JSystem/JAudio2/JAISoundHandles.h diff --git a/include/JSystem/JAudio2/JAISoundInfo.h b/libs/JSystem/include/JSystem/JAudio2/JAISoundInfo.h similarity index 100% rename from include/JSystem/JAudio2/JAISoundInfo.h rename to libs/JSystem/include/JSystem/JAudio2/JAISoundInfo.h diff --git a/include/JSystem/JAudio2/JAISoundParams.h b/libs/JSystem/include/JSystem/JAudio2/JAISoundParams.h similarity index 100% rename from include/JSystem/JAudio2/JAISoundParams.h rename to libs/JSystem/include/JSystem/JAudio2/JAISoundParams.h diff --git a/include/JSystem/JAudio2/JAISoundStarter.h b/libs/JSystem/include/JSystem/JAudio2/JAISoundStarter.h similarity index 100% rename from include/JSystem/JAudio2/JAISoundStarter.h rename to libs/JSystem/include/JSystem/JAudio2/JAISoundStarter.h diff --git a/include/JSystem/JAudio2/JAIStream.h b/libs/JSystem/include/JSystem/JAudio2/JAIStream.h similarity index 100% rename from include/JSystem/JAudio2/JAIStream.h rename to libs/JSystem/include/JSystem/JAudio2/JAIStream.h diff --git a/include/JSystem/JAudio2/JAIStreamDataMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAIStreamDataMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAIStreamDataMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAIStreamDataMgr.h diff --git a/include/JSystem/JAudio2/JAIStreamMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAIStreamMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAIStreamMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAIStreamMgr.h diff --git a/include/JSystem/JAudio2/JASAiCtrl.h b/libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h similarity index 98% rename from include/JSystem/JAudio2/JASAiCtrl.h rename to libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h index cebae770f8..5bba1b94ee 100644 --- a/include/JSystem/JAudio2/JASAiCtrl.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAiCtrl.h @@ -1,7 +1,7 @@ #ifndef JASAICTRL_H #define JASAICTRL_H -#include +#include enum JASOutputRate { OUTPUT_RATE_0, diff --git a/include/JSystem/JAudio2/JASAramStream.h b/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h similarity index 99% rename from include/JSystem/JAudio2/JASAramStream.h rename to libs/JSystem/include/JSystem/JAudio2/JASAramStream.h index 385b47f627..17d4c6f521 100644 --- a/include/JSystem/JAudio2/JASAramStream.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAramStream.h @@ -3,7 +3,7 @@ #include "JSystem/JAudio2/JASTaskThread.h" #include "JSystem/JUtility/JUTAssert.h" -#include +#include class JASChannel; diff --git a/include/JSystem/JAudio2/JASAudioReseter.h b/libs/JSystem/include/JSystem/JAudio2/JASAudioReseter.h similarity index 94% rename from include/JSystem/JAudio2/JASAudioReseter.h rename to libs/JSystem/include/JSystem/JAudio2/JASAudioReseter.h index 2c699b0eb0..9b5065df89 100644 --- a/include/JSystem/JAudio2/JASAudioReseter.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAudioReseter.h @@ -1,7 +1,7 @@ #ifndef JASAUDIORESETER_H #define JASAUDIORESETER_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASAudioThread.h b/libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h similarity index 86% rename from include/JSystem/JAudio2/JASAudioThread.h rename to libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h index 8ad61106b3..6be7d07000 100644 --- a/include/JSystem/JAudio2/JASAudioThread.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASAudioThread.h @@ -31,6 +31,12 @@ struct JASAudioThread : public JKRThread, public JASGlobalInstance mPointOffset; /* 0x0C */ TOffset field_0xc; - /* 0x10 */ f32 mScale; - /* 0x14 */ f32 field_0x14; + /* 0x10 */ BE(f32) mScale; + /* 0x14 */ BE(f32) field_0x14; }; struct TVmap { /* 0x00 */ u8 field_0x0[4]; - /* 0x04 */ u32 field_0x4; - /* 0x08 */ f32 field_0x8; - /* 0x0C */ f32 field_0xc; + /* 0x04 */ BE(u32) field_0x4; + /* 0x08 */ BE(f32) field_0x8; + /* 0x0C */ BE(f32) field_0xc; }; struct TKeymap { @@ -89,27 +89,27 @@ namespace JASBNKParser { struct TInst { /* 0x00 */ u8 field_0x0[8]; - /* 0x08 */ f32 mVolume; - /* 0x0C */ f32 mPitch; + /* 0x08 */ BE(f32) mVolume; + /* 0x0C */ BE(f32) mPitch; /* 0x10 */ TOffset mOscOffset[2]; /* 0x18 */ u8 field_0x18[0x10]; - /* 0x28 */ u32 mKeyRegionCount; + /* 0x28 */ BE(u32) mKeyRegionCount; /* 0x2C */ TOffset mKeymapOffset[0]; }; struct TPmap { - /* 0x00 */ f32 mVolume; - /* 0x04 */ f32 mPitch; + /* 0x00 */ BE(f32) mVolume; + /* 0x04 */ BE(f32) mPitch; /* 0x08 */ u8 field_0x8[0xc]; /* 0x14 */ TOffset mVmapOffset; }; struct TPerc { - /* 0x000 */ u32 mMagic; + /* 0x000 */ BE(u32) mMagic; /* 0x000 */ u8 field_0x0[0x84]; /* 0x088 */ TOffset mPmapOffset[0x80]; /* 0x288 */ s8 mPan[0x80]; - /* 0x308 */ u16 mRelease[0x80]; + /* 0x308 */ BE(u16) mRelease[0x80]; }; struct TOffsetData { @@ -133,7 +133,7 @@ namespace JASBNKParser { JASBasicBank* createBasicBank(void const*, JKRHeap*); inline u32 getBankNumber(const void* param_0) { - u32* ptr = (u32*)param_0; + BE(u32)* ptr = (BE(u32)*)param_0; return ptr[2]; } diff --git a/include/JSystem/JAudio2/JASBank.h b/libs/JSystem/include/JSystem/JAudio2/JASBank.h similarity index 97% rename from include/JSystem/JAudio2/JASBank.h rename to libs/JSystem/include/JSystem/JAudio2/JASBank.h index 1a99601f3d..516eaa161b 100644 --- a/include/JSystem/JAudio2/JASBank.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASBank.h @@ -1,7 +1,7 @@ #ifndef JASBANK_H #define JASBANK_H -#include +#include class JASChannel; struct JASInstParam; diff --git a/include/JSystem/JAudio2/JASBankList.h b/libs/JSystem/include/JSystem/JAudio2/JASBankList.h similarity index 89% rename from include/JSystem/JAudio2/JASBankList.h rename to libs/JSystem/include/JSystem/JAudio2/JASBankList.h index 6d3fd44088..39ecb01935 100644 --- a/include/JSystem/JAudio2/JASBankList.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASBankList.h @@ -1,7 +1,7 @@ #ifndef JASBANKLIST_H #define JASBANKLIST_H -#include +#include class JASBank; diff --git a/include/JSystem/JAudio2/JASBankTable.h b/libs/JSystem/include/JSystem/JAudio2/JASBankTable.h similarity index 100% rename from include/JSystem/JAudio2/JASBankTable.h rename to libs/JSystem/include/JSystem/JAudio2/JASBankTable.h diff --git a/include/JSystem/JAudio2/JASBasicBank.h b/libs/JSystem/include/JSystem/JAudio2/JASBasicBank.h similarity index 100% rename from include/JSystem/JAudio2/JASBasicBank.h rename to libs/JSystem/include/JSystem/JAudio2/JASBasicBank.h diff --git a/include/JSystem/JAudio2/JASBasicInst.h b/libs/JSystem/include/JSystem/JAudio2/JASBasicInst.h similarity index 100% rename from include/JSystem/JAudio2/JASBasicInst.h rename to libs/JSystem/include/JSystem/JAudio2/JASBasicInst.h diff --git a/include/JSystem/JAudio2/JASBasicWaveBank.h b/libs/JSystem/include/JSystem/JAudio2/JASBasicWaveBank.h similarity index 97% rename from include/JSystem/JAudio2/JASBasicWaveBank.h rename to libs/JSystem/include/JSystem/JAudio2/JASBasicWaveBank.h index 73a6b9fdd4..849e63dbcf 100644 --- a/include/JSystem/JAudio2/JASBasicWaveBank.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASBasicWaveBank.h @@ -11,7 +11,7 @@ struct JASBasicWaveBank : public JASWaveBank { struct TWaveHandle : public JASWaveHandle { TWaveHandle() { mHeap = NULL; } - virtual int getWavePtr() const; + virtual intptr_t getWavePtr() const; virtual const JASWaveInfo* getWaveInfo() const { return &field_0x4; } bool compareHeap(JASHeap* heap) const { return mHeap == heap;} diff --git a/include/JSystem/JAudio2/JASCalc.h b/libs/JSystem/include/JSystem/JAudio2/JASCalc.h similarity index 97% rename from include/JSystem/JAudio2/JASCalc.h rename to libs/JSystem/include/JSystem/JAudio2/JASCalc.h index 7e22ec1240..bb8054675f 100644 --- a/include/JSystem/JAudio2/JASCalc.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASCalc.h @@ -1,7 +1,7 @@ #ifndef JASCALC_H #define JASCALC_H -#include +#include #include /** diff --git a/include/JSystem/JAudio2/JASCallback.h b/libs/JSystem/include/JSystem/JAudio2/JASCallback.h similarity index 95% rename from include/JSystem/JAudio2/JASCallback.h rename to libs/JSystem/include/JSystem/JAudio2/JASCallback.h index f1dddc7492..4850f8d369 100644 --- a/include/JSystem/JAudio2/JASCallback.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASCallback.h @@ -1,7 +1,7 @@ #ifndef JASCALLBACK_H #define JASCALLBACK_H -#include +#include typedef s32 JASCallback(void*); diff --git a/include/JSystem/JAudio2/JASChannel.h b/libs/JSystem/include/JSystem/JAudio2/JASChannel.h similarity index 99% rename from include/JSystem/JAudio2/JASChannel.h rename to libs/JSystem/include/JSystem/JAudio2/JASChannel.h index 8c80268d46..042e3343cd 100644 --- a/include/JSystem/JAudio2/JASChannel.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASChannel.h @@ -6,7 +6,7 @@ #include "JSystem/JAudio2/JASOscillator.h" #include "JSystem/JAudio2/JASSoundParams.h" #include "JSystem/JAudio2/JASWaveInfo.h" -#include +#include struct JASDSPChannel; @@ -156,7 +156,7 @@ public: u32 field_0x0; JASWaveInfo field_0x4; } field_0xdc; - int field_0x104; + intptr_t field_0x104; static OSMessageQueue sBankDisposeMsgQ; static OSMessage sBankDisposeMsg[16]; diff --git a/include/JSystem/JAudio2/JASCmdStack.h b/libs/JSystem/include/JSystem/JAudio2/JASCmdStack.h similarity index 100% rename from include/JSystem/JAudio2/JASCmdStack.h rename to libs/JSystem/include/JSystem/JAudio2/JASCmdStack.h diff --git a/include/JSystem/JAudio2/JASCriticalSection.h b/libs/JSystem/include/JSystem/JAudio2/JASCriticalSection.h similarity index 93% rename from include/JSystem/JAudio2/JASCriticalSection.h rename to libs/JSystem/include/JSystem/JAudio2/JASCriticalSection.h index 44f5f21f4a..53faae80fe 100644 --- a/include/JSystem/JAudio2/JASCriticalSection.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASCriticalSection.h @@ -1,7 +1,7 @@ #ifndef JASCRITICALSECTION_H #define JASCRITICALSECTION_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASDSPChannel.h b/libs/JSystem/include/JSystem/JAudio2/JASDSPChannel.h similarity index 100% rename from include/JSystem/JAudio2/JASDSPChannel.h rename to libs/JSystem/include/JSystem/JAudio2/JASDSPChannel.h diff --git a/include/JSystem/JAudio2/JASDSPInterface.h b/libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h similarity index 99% rename from include/JSystem/JAudio2/JASDSPInterface.h rename to libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h index 0642fdc018..a653431bee 100644 --- a/include/JSystem/JAudio2/JASDSPInterface.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASDSPInterface.h @@ -1,7 +1,7 @@ #ifndef JASDSPINTERFACE_H #define JASDSPINTERFACE_H -#include +#include struct JASWaveInfo; diff --git a/include/JSystem/JAudio2/JASDriverIF.h b/libs/JSystem/include/JSystem/JAudio2/JASDriverIF.h similarity index 100% rename from include/JSystem/JAudio2/JASDriverIF.h rename to libs/JSystem/include/JSystem/JAudio2/JASDriverIF.h diff --git a/include/JSystem/JAudio2/JASDrumSet.h b/libs/JSystem/include/JSystem/JAudio2/JASDrumSet.h similarity index 100% rename from include/JSystem/JAudio2/JASDrumSet.h rename to libs/JSystem/include/JSystem/JAudio2/JASDrumSet.h diff --git a/include/JSystem/JAudio2/JASDvdThread.h b/libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h similarity index 92% rename from include/JSystem/JAudio2/JASDvdThread.h rename to libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h index 7fbe4e188f..553dffb7ca 100644 --- a/include/JSystem/JAudio2/JASDvdThread.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASDvdThread.h @@ -1,7 +1,7 @@ #ifndef JASDVDTHREAD_H #define JASDVDTHREAD_H -#include +#include class JASTaskThread; diff --git a/include/JSystem/JAudio2/JASGadget.h b/libs/JSystem/include/JSystem/JAudio2/JASGadget.h similarity index 100% rename from include/JSystem/JAudio2/JASGadget.h rename to libs/JSystem/include/JSystem/JAudio2/JASGadget.h diff --git a/include/JSystem/JAudio2/JASHeapCtrl.h b/libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h similarity index 99% rename from include/JSystem/JAudio2/JASHeapCtrl.h rename to libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h index 196c79edd5..c3bc1a3702 100644 --- a/include/JSystem/JAudio2/JASHeapCtrl.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASHeapCtrl.h @@ -4,8 +4,8 @@ #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JSupport/JSUList.h" #include "JSystem/JUtility/JUTAssert.h" -#include -#include +#include +#include struct JASDisposer; class JKRHeap; diff --git a/include/JSystem/JAudio2/JASLfo.h b/libs/JSystem/include/JSystem/JAudio2/JASLfo.h similarity index 96% rename from include/JSystem/JAudio2/JASLfo.h rename to libs/JSystem/include/JSystem/JAudio2/JASLfo.h index ac76c9924a..adc27a8325 100644 --- a/include/JSystem/JAudio2/JASLfo.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASLfo.h @@ -1,7 +1,7 @@ #ifndef JASLFO_H #define JASLFO_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASMutex.h b/libs/JSystem/include/JSystem/JAudio2/JASMutex.h similarity index 92% rename from include/JSystem/JAudio2/JASMutex.h rename to libs/JSystem/include/JSystem/JAudio2/JASMutex.h index 3155f462c2..e6805d6029 100644 --- a/include/JSystem/JAudio2/JASMutex.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASMutex.h @@ -1,7 +1,7 @@ #ifndef JASMUTEX_H #define JASMUTEX_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASOscillator.h b/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h similarity index 93% rename from include/JSystem/JAudio2/JASOscillator.h rename to libs/JSystem/include/JSystem/JAudio2/JASOscillator.h index 8b47f37acb..746d462e12 100644 --- a/include/JSystem/JAudio2/JASOscillator.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASOscillator.h @@ -1,7 +1,8 @@ #ifndef JASOSCILLATOR_H #define JASOSCILLATOR_H -#include +#include +#include "dusk/endian.h" /** * @ingroup jsystem-jaudio @@ -9,9 +10,9 @@ */ struct JASOscillator { struct Point { - /* 0x0 */ s16 _0; - /* 0x2 */ s16 _2; - /* 0x4 */ s16 _4; + /* 0x0 */ BE(s16) _0; + /* 0x2 */ BE(s16) _2; + /* 0x4 */ BE(s16) _4; }; struct EffectParams { diff --git a/include/JSystem/JAudio2/JASProbe.h b/libs/JSystem/include/JSystem/JAudio2/JASProbe.h similarity index 94% rename from include/JSystem/JAudio2/JASProbe.h rename to libs/JSystem/include/JSystem/JAudio2/JASProbe.h index a431f991f5..03337adce7 100644 --- a/include/JSystem/JAudio2/JASProbe.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASProbe.h @@ -1,7 +1,7 @@ #ifndef JASPROBE_H #define JASPROBE_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASRegisterParam.h b/libs/JSystem/include/JSystem/JAudio2/JASRegisterParam.h similarity index 93% rename from include/JSystem/JAudio2/JASRegisterParam.h rename to libs/JSystem/include/JSystem/JAudio2/JASRegisterParam.h index f02e3a1839..cd350d257b 100644 --- a/include/JSystem/JAudio2/JASRegisterParam.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASRegisterParam.h @@ -1,7 +1,7 @@ #ifndef JASREGISTERPARAM_H #define JASREGISTERPARAM_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASReport.h b/libs/JSystem/include/JSystem/JAudio2/JASReport.h similarity index 100% rename from include/JSystem/JAudio2/JASReport.h rename to libs/JSystem/include/JSystem/JAudio2/JASReport.h diff --git a/include/JSystem/JAudio2/JASResArcLoader.h b/libs/JSystem/include/JSystem/JAudio2/JASResArcLoader.h similarity index 98% rename from include/JSystem/JAudio2/JASResArcLoader.h rename to libs/JSystem/include/JSystem/JAudio2/JASResArcLoader.h index bcaf1fb06f..966b1199e7 100644 --- a/include/JSystem/JAudio2/JASResArcLoader.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASResArcLoader.h @@ -2,7 +2,7 @@ #define JASRESARCLOADER_H #include "JSystem/JKernel/JKRArchive.h" -#include +#include namespace JASResArcLoader { size_t getResSize(JKRArchive const*, u16); diff --git a/include/JSystem/JAudio2/JASSeqCtrl.h b/libs/JSystem/include/JSystem/JAudio2/JASSeqCtrl.h similarity index 100% rename from include/JSystem/JAudio2/JASSeqCtrl.h rename to libs/JSystem/include/JSystem/JAudio2/JASSeqCtrl.h diff --git a/include/JSystem/JAudio2/JASSeqParser.h b/libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h similarity index 99% rename from include/JSystem/JAudio2/JASSeqParser.h rename to libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h index e8f425de84..096cbadd98 100644 --- a/include/JSystem/JAudio2/JASSeqParser.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASSeqParser.h @@ -1,7 +1,7 @@ #ifndef JASSEQPARSER_H #define JASSEQPARSER_H -#include +#include struct JASTrack; diff --git a/include/JSystem/JAudio2/JASSeqReader.h b/libs/JSystem/include/JSystem/JAudio2/JASSeqReader.h similarity index 98% rename from include/JSystem/JAudio2/JASSeqReader.h rename to libs/JSystem/include/JSystem/JAudio2/JASSeqReader.h index 2fed6253fe..9dce7f56f7 100644 --- a/include/JSystem/JAudio2/JASSeqReader.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASSeqReader.h @@ -1,7 +1,7 @@ #ifndef JASSEQREADER_H #define JASSEQREADER_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASSimpleWaveBank.h b/libs/JSystem/include/JSystem/JAudio2/JASSimpleWaveBank.h similarity index 95% rename from include/JSystem/JAudio2/JASSimpleWaveBank.h rename to libs/JSystem/include/JSystem/JAudio2/JASSimpleWaveBank.h index 7860117d87..4fbeee32b9 100644 --- a/include/JSystem/JAudio2/JASSimpleWaveBank.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASSimpleWaveBank.h @@ -7,7 +7,7 @@ struct JASSimpleWaveBank : JASWaveBank, JASWaveArc { struct TWaveHandle : JASWaveHandle { - int getWavePtr() const; + intptr_t getWavePtr() const; TWaveHandle(); const JASWaveInfo* getWaveInfo() const; diff --git a/include/JSystem/JAudio2/JASSoundParams.h b/libs/JSystem/include/JSystem/JAudio2/JASSoundParams.h similarity index 98% rename from include/JSystem/JAudio2/JASSoundParams.h rename to libs/JSystem/include/JSystem/JAudio2/JASSoundParams.h index a7314da2f0..122e5b684d 100644 --- a/include/JSystem/JAudio2/JASSoundParams.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASSoundParams.h @@ -1,7 +1,7 @@ #ifndef JASSOUNDPARAMS_H #define JASSOUNDPARAMS_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASTaskThread.h b/libs/JSystem/include/JSystem/JAudio2/JASTaskThread.h similarity index 100% rename from include/JSystem/JAudio2/JASTaskThread.h rename to libs/JSystem/include/JSystem/JAudio2/JASTaskThread.h diff --git a/include/JSystem/JAudio2/JASTrack.h b/libs/JSystem/include/JSystem/JAudio2/JASTrack.h similarity index 97% rename from include/JSystem/JAudio2/JASTrack.h rename to libs/JSystem/include/JSystem/JAudio2/JASTrack.h index 06a54ebec8..796bb6afd7 100644 --- a/include/JSystem/JAudio2/JASTrack.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASTrack.h @@ -17,6 +17,12 @@ namespace JASDsp { extern const u32 FILTER_MODE_IIR; }; +#if !BIT_64 +const int JASTrackNodeOffset = 0x240; +#else +const int JASTrackNodeOffset = 0x310; +#endif + /** * @ingroup jsystem-jaudio * @@ -48,7 +54,7 @@ struct JASTrack : public JASPoolAllocObject_MultiThreaded { /* 0x4c */ JASTrack* mTrack; }; - struct TList : JGadget::TLinkList { + struct TList : JGadget::TLinkList { TList() : mCallbackRegistered(false) {} void append(JASTrack*); void seqMain(); @@ -265,4 +271,8 @@ struct JASTrack : public JASPoolAllocObject_MultiThreaded { /* 0x240 */ JGadget::TLinkListNode field_0x240; }; +#if TARGET_PC +static_assert(offsetof(JASTrack, field_0x240) == JASTrackNodeOffset); +#endif + #endif /* JASTRACK_H */ diff --git a/include/JSystem/JAudio2/JASTrackPort.h b/libs/JSystem/include/JSystem/JAudio2/JASTrackPort.h similarity index 95% rename from include/JSystem/JAudio2/JASTrackPort.h rename to libs/JSystem/include/JSystem/JAudio2/JASTrackPort.h index 536f85eada..393a701c27 100644 --- a/include/JSystem/JAudio2/JASTrackPort.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASTrackPort.h @@ -1,7 +1,7 @@ #ifndef JASTRACKPORT_H #define JASTRACKPORT_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASVoiceBank.h b/libs/JSystem/include/JSystem/JAudio2/JASVoiceBank.h similarity index 100% rename from include/JSystem/JAudio2/JASVoiceBank.h rename to libs/JSystem/include/JSystem/JAudio2/JASVoiceBank.h diff --git a/include/JSystem/JAudio2/JASWSParser.h b/libs/JSystem/include/JSystem/JAudio2/JASWSParser.h similarity index 78% rename from include/JSystem/JAudio2/JASWSParser.h rename to libs/JSystem/include/JSystem/JAudio2/JASWSParser.h index 1dc68674cf..020158c096 100644 --- a/include/JSystem/JAudio2/JASWSParser.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASWSParser.h @@ -22,26 +22,26 @@ public: } private: - /* 0x0 */ u32 mOffset; + /* 0x0 */ BE(u32) mOffset; }; struct TCtrlWave { - /* 0x0 */ u32 _00; + /* 0x0 */ BE(u32) _00; }; struct TWave { /* 0x00 */ u8 _00; /* 0x01 */ u8 _01; /* 0x02 */ u8 _02; - /* 0x04 */ f32 _04; - /* 0x08 */ u32 mOffset; - /* 0x0C */ u32 _0C; - /* 0x10 */ u32 _10; - /* 0x14 */ u32 _14; - /* 0x18 */ u32 _18; - /* 0x1C */ u32 _1C; - /* 0x20 */ s16 _20; - /* 0x22 */ s16 _22; + /* 0x04 */ BE(f32) _04; + /* 0x08 */ BE(u32) mOffset; + /* 0x0C */ BE(u32) _0C; + /* 0x10 */ BE(u32) _10; + /* 0x14 */ BE(u32) _14; + /* 0x18 */ BE(u32) _18; + /* 0x1C */ BE(u32) _1C; + /* 0x20 */ BE(s16) _20; + /* 0x22 */ BE(s16) _22; }; struct TWaveArchive { @@ -56,7 +56,7 @@ public: struct TCtrl { /* 0x0 */ u8 _00[4]; - /* 0x4 */ u32 mWaveCount; + /* 0x4 */ BE(u32) mWaveCount; /* 0x8 */ TOffset mCtrlWaveOffsets[0]; }; @@ -67,14 +67,14 @@ public: struct TCtrlGroup { /* 0x0 */ u8 _00[8]; - /* 0x8 */ u32 mGroupCount; + /* 0x8 */ BE(u32) mGroupCount; /* 0xC */ TOffset mCtrlSceneOffsets[0]; }; /** @fabricated */ struct THeader { /* 0x00 */ u8 _00[0xC]; - /* 0x0C */ u32 mWaveTableSize; + /* 0x0C */ BE(u32) mWaveTableSize; /* 0x10 */ TOffset mArchiveBankOffset; /* 0x14 */ TOffset mCtrlGroupOffset; }; diff --git a/include/JSystem/JAudio2/JASWaveArcLoader.h b/libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h similarity index 98% rename from include/JSystem/JAudio2/JASWaveArcLoader.h rename to libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h index a3e930ebf1..593e69f1fd 100644 --- a/include/JSystem/JAudio2/JASWaveArcLoader.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASWaveArcLoader.h @@ -2,7 +2,7 @@ #define JASWAVEARCLOADER_H #include "JSystem/JAudio2/JASHeapCtrl.h" -#include +#include class JKRHeap; class JKRSolidHeap; diff --git a/include/JSystem/JAudio2/JASWaveInfo.h b/libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h similarity index 93% rename from include/JSystem/JAudio2/JASWaveInfo.h rename to libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h index 1ed6996bae..cbff6d3ac2 100644 --- a/include/JSystem/JAudio2/JASWaveInfo.h +++ b/libs/JSystem/include/JSystem/JAudio2/JASWaveInfo.h @@ -1,7 +1,7 @@ #ifndef JASWAVEINFO_H #define JASWAVEINFO_H -#include +#include class JASWaveArc; @@ -39,7 +39,7 @@ class JASWaveHandle { public: virtual ~JASWaveHandle() {} virtual const JASWaveInfo* getWaveInfo() const = 0; - virtual int getWavePtr() const = 0; + virtual intptr_t getWavePtr() const = 0; }; /** diff --git a/include/JSystem/JAudio2/JAUAudibleParam.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h similarity index 96% rename from include/JSystem/JAudio2/JAUAudibleParam.h rename to libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h index 0fd3058f82..89b016cb0a 100644 --- a/include/JSystem/JAudio2/JAUAudibleParam.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUAudibleParam.h @@ -1,7 +1,7 @@ #ifndef JAUAUDIBLEPARAM_H #define JAUAUDIBLEPARAM_H -#include +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JAUAudience.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudience.h similarity index 100% rename from include/JSystem/JAudio2/JAUAudience.h rename to libs/JSystem/include/JSystem/JAudio2/JAUAudience.h diff --git a/include/JSystem/JAudio2/JAUAudioArcInterpreter.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h similarity index 93% rename from include/JSystem/JAudio2/JAUAudioArcInterpreter.h rename to libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h index 7516848350..c36ad44b22 100644 --- a/include/JSystem/JAudio2/JAUAudioArcInterpreter.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcInterpreter.h @@ -1,7 +1,8 @@ #ifndef JAUAUDIOARCINTERPRETER_H #define JAUAUDIOARCINTERPRETER_H -#include +#include +#include "dusk/endian.h" /** * @ingroup jsystem-jaudio @@ -33,7 +34,7 @@ public: } u32 readU32_() { - u32 temp = *(u32*)mReadPtr; + u32 temp = *(BE(u32)*)mReadPtr; mReadPtr += 4; return temp; } diff --git a/include/JSystem/JAudio2/JAUAudioArcLoader.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudioArcLoader.h similarity index 100% rename from include/JSystem/JAudio2/JAUAudioArcLoader.h rename to libs/JSystem/include/JSystem/JAudio2/JAUAudioArcLoader.h diff --git a/include/JSystem/JAudio2/JAUAudioMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAUAudioMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAUAudioMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAUAudioMgr.h diff --git a/include/JSystem/JAudio2/JAUBankTable.h b/libs/JSystem/include/JSystem/JAudio2/JAUBankTable.h similarity index 100% rename from include/JSystem/JAudio2/JAUBankTable.h rename to libs/JSystem/include/JSystem/JAudio2/JAUBankTable.h diff --git a/include/JSystem/JAudio2/JAUClusterSound.h b/libs/JSystem/include/JSystem/JAudio2/JAUClusterSound.h similarity index 100% rename from include/JSystem/JAudio2/JAUClusterSound.h rename to libs/JSystem/include/JSystem/JAudio2/JAUClusterSound.h diff --git a/include/JSystem/JAudio2/JAUInitializer.h b/libs/JSystem/include/JSystem/JAudio2/JAUInitializer.h similarity index 97% rename from include/JSystem/JAudio2/JAUInitializer.h rename to libs/JSystem/include/JSystem/JAudio2/JAUInitializer.h index 77f28218dc..8b5090c580 100644 --- a/include/JSystem/JAudio2/JAUInitializer.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUInitializer.h @@ -1,7 +1,7 @@ #ifndef JAUINITIALIZER_H #define JAUINITIALIZER_H -#include +#include class JKRSolidHeap; diff --git a/include/JSystem/JAudio2/JAUSectionHeap.h b/libs/JSystem/include/JSystem/JAudio2/JAUSectionHeap.h similarity index 98% rename from include/JSystem/JAudio2/JAUSectionHeap.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSectionHeap.h index e02b7df164..a7db6dc153 100644 --- a/include/JSystem/JAudio2/JAUSectionHeap.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUSectionHeap.h @@ -40,8 +40,8 @@ public: /* 0x88 */ const void* mBstnDst; /* 0x8C */ JSUList field_0x8c; /* 0x98 */ s32 field_0x98; - /* 0x9C */ int field_0x9c; - /* 0xA0 */ int field_0xa0; + /* 0x9C */ int mBankMemoryUsage; + /* 0xA0 */ int mWaveBankMemoryUsage; }; JAUSection(JAUSectionHeap*, u32, s32); diff --git a/include/JSystem/JAudio2/JAUSeqCollection.h b/libs/JSystem/include/JSystem/JAudio2/JAUSeqCollection.h similarity index 91% rename from include/JSystem/JAudio2/JAUSeqCollection.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSeqCollection.h index 37c5afc6d3..1812976e2f 100644 --- a/include/JSystem/JAudio2/JAUSeqCollection.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUSeqCollection.h @@ -13,9 +13,9 @@ struct JAISeqDataRegion; struct JAUSeqCollectionData { s8 field_0x0; s8 field_0x1; - u16 field_0x2; - u32 field_0x4; - u32 field_0x8; + BE(u16) field_0x2; + BE(u32) field_0x4; + BE(u32) field_0x8; }; /** @@ -32,7 +32,7 @@ public: bool isValid() const { return field_0x8; } /* 0x00 */ u16 field_0x0; - /* 0x04 */ const u32* field_0x4; + /* 0x04 */ const BE(u32)* field_0x4; /* 0x08 */ const JAUSeqCollectionData* field_0x8; /* 0x0C */ int field_0xc; }; diff --git a/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAUSeqDataBlockMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSeqDataBlockMgr.h diff --git a/include/JSystem/JAudio2/JAUSoundAnimator.h b/libs/JSystem/include/JSystem/JAudio2/JAUSoundAnimator.h similarity index 100% rename from include/JSystem/JAudio2/JAUSoundAnimator.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSoundAnimator.h diff --git a/include/JSystem/JAudio2/JAUSoundInfo.h b/libs/JSystem/include/JSystem/JAudio2/JAUSoundInfo.h similarity index 100% rename from include/JSystem/JAudio2/JAUSoundInfo.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSoundInfo.h diff --git a/include/JSystem/JAudio2/JAUSoundObject.h b/libs/JSystem/include/JSystem/JAudio2/JAUSoundObject.h similarity index 100% rename from include/JSystem/JAudio2/JAUSoundObject.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSoundObject.h diff --git a/include/JSystem/JAudio2/JAUSoundTable.h b/libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h similarity index 90% rename from include/JSystem/JAudio2/JAUSoundTable.h rename to libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h index e2dceca7b1..0226a917f7 100644 --- a/include/JSystem/JAudio2/JAUSoundTable.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUSoundTable.h @@ -3,6 +3,7 @@ #include "JSystem/JAudio2/JAISound.h" #include "JSystem/JAudio2/JASGadget.h" +#include "dusk/endian.h" /** * @ingroup jsystem-jaudio @@ -36,10 +37,10 @@ struct JAUSoundTable_ { field_0x0 = param_0; // magic number is not in debug rom. I'm not sure what this comparison is (maybe some sort of '' number?) // I also do not know how it is different between JAUSoundTable and JAUSoundNameTable - if (*(u32*)field_0x0 + 0xbdad0000 != Root::magicNumber()) { + if (*(BE(u32)*)field_0x0 + 0xbdad0000 != Root::magicNumber()) { field_0x0 = NULL; } else { - field_0x4 = (Root*)((u8*)field_0x0 + *((u32*)field_0x0 + 3)); + field_0x4 = (Root*)((u8*)field_0x0 + *((BE(u32)*)field_0x0 + 3)); } } @@ -83,8 +84,8 @@ struct JAUSoundTable_ { */ struct JAUSoundTableRoot { static inline u32 magicNumber() { return 0x5420; } - u32 mSectionNumber; - u32 mSectionOffsets[0]; + BE(u32) mSectionNumber; + BE(u32) mSectionOffsets[0]; }; /** @@ -102,8 +103,8 @@ struct JAUSoundTableSection { return mGroupOffsets[index]; } - u32 mNumGroups; - u32 mGroupOffsets[0]; + BE(u32) mNumGroups; + BE(u32) mGroupOffsets[0]; }; /** @@ -128,11 +129,11 @@ struct JAUSoundTableGroup { if (index >= mNumItems) { return 0; } - return *(u32*)(mTypeIds + index * 4) & 0xffffff; + return *(BE(u32)*)(mTypeIds + index * 4) & 0xffffff; } - u32 mNumItems; - u32 field_0x4; + BE(u32) mNumItems; + BE(u32) field_0x4; u8 mTypeIds[0]; }; @@ -169,8 +170,8 @@ struct JAUSoundTable : public JASGlobalInstance { */ struct JAUSoundNameTableRoot { static inline u32 magicNumber() { return 0x544e; } - u32 mSectionNumber; - u32 mSectionOffsets[0]; + BE(u32) mSectionNumber; + BE(u32) mSectionOffsets[0]; }; /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JAUStreamAramMgr.h b/libs/JSystem/include/JSystem/JAudio2/JAUStreamAramMgr.h similarity index 100% rename from include/JSystem/JAudio2/JAUStreamAramMgr.h rename to libs/JSystem/include/JSystem/JAudio2/JAUStreamAramMgr.h diff --git a/include/JSystem/JAudio2/JAUStreamFileTable.h b/libs/JSystem/include/JSystem/JAudio2/JAUStreamFileTable.h similarity index 90% rename from include/JSystem/JAudio2/JAUStreamFileTable.h rename to libs/JSystem/include/JSystem/JAudio2/JAUStreamFileTable.h index 5e7e894940..65eef3f8b9 100644 --- a/include/JSystem/JAudio2/JAUStreamFileTable.h +++ b/libs/JSystem/include/JSystem/JAudio2/JAUStreamFileTable.h @@ -5,8 +5,8 @@ struct BinaryStreamFileTable { /* 0x0 */ u8 mIdentifier[4]; - /* 0x4 */ u32 mNumFiles; - /* 0x8 */ int mFilePathOffsets[]; + /* 0x4 */ BE(u32) mNumFiles; + /* 0x8 */ BE(int) mFilePathOffsets[]; }; /** diff --git a/include/JSystem/JAudio2/dspproc.h b/libs/JSystem/include/JSystem/JAudio2/dspproc.h similarity index 92% rename from include/JSystem/JAudio2/dspproc.h rename to libs/JSystem/include/JSystem/JAudio2/dspproc.h index 09266bbf81..868080031a 100644 --- a/include/JSystem/JAudio2/dspproc.h +++ b/libs/JSystem/include/JSystem/JAudio2/dspproc.h @@ -1,7 +1,7 @@ #ifndef DSPPROC_H #define DSPPROC_H -#include +#include void DSPReleaseHalt2(u32 msg); void DsetupTable(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4); diff --git a/include/JSystem/JAudio2/dsptask.h b/libs/JSystem/include/JSystem/JAudio2/dsptask.h similarity index 87% rename from include/JSystem/JAudio2/dsptask.h rename to libs/JSystem/include/JSystem/JAudio2/dsptask.h index b331a6c867..8042d1884b 100644 --- a/include/JSystem/JAudio2/dsptask.h +++ b/libs/JSystem/include/JSystem/JAudio2/dsptask.h @@ -1,7 +1,7 @@ #ifndef DSPTASK_H #define DSPTASK_H -#include +#include void DspBoot(void (*)(void*)); void DspFinishWork(u16 param_0); diff --git a/include/JSystem/JAudio2/osdsp.h b/libs/JSystem/include/JSystem/JAudio2/osdsp.h similarity index 85% rename from include/JSystem/JAudio2/osdsp.h rename to libs/JSystem/include/JSystem/JAudio2/osdsp.h index 7c3c91d0a3..8a929c4652 100644 --- a/include/JSystem/JAudio2/osdsp.h +++ b/libs/JSystem/include/JSystem/JAudio2/osdsp.h @@ -1,7 +1,7 @@ #ifndef OSDSP_H #define OSDSP_H -#include +#include extern "C" DSPTaskInfo* DSPAddTask(DSPTaskInfo*); void DSPAddPriorTask(STRUCT_DSP_TASK*); diff --git a/include/JSystem/JAudio2/osdsp_task.h b/libs/JSystem/include/JSystem/JAudio2/osdsp_task.h similarity index 86% rename from include/JSystem/JAudio2/osdsp_task.h rename to libs/JSystem/include/JSystem/JAudio2/osdsp_task.h index 6c662b50a3..4c74f290f1 100644 --- a/include/JSystem/JAudio2/osdsp_task.h +++ b/libs/JSystem/include/JSystem/JAudio2/osdsp_task.h @@ -1,7 +1,7 @@ #ifndef OSDSP_TASK_H #define OSDSP_TASK_H -#include +#include extern DSPTaskInfo* DSP_prior_task; diff --git a/include/JSystem/JFramework/JFWDisplay.h b/libs/JSystem/include/JSystem/JFramework/JFWDisplay.h similarity index 93% rename from include/JSystem/JFramework/JFWDisplay.h rename to libs/JSystem/include/JSystem/JFramework/JFWDisplay.h index b451f584bf..28967cc0a2 100644 --- a/include/JSystem/JFramework/JFWDisplay.h +++ b/libs/JSystem/include/JSystem/JFramework/JFWDisplay.h @@ -5,10 +5,8 @@ #include "JSystem/JUtility/JUTDirectPrint.h" #include "JSystem/JUtility/JUTFader.h" #include "JSystem/JUtility/JUTXfb.h" -#include +#include -typedef struct _GXColor GXColor; -typedef struct _GXRenderModeObj GXRenderModeObj; class JKRHeap; typedef void (*JFWDisplayUnkFunc)(void); @@ -49,7 +47,7 @@ public: void ctor_subroutine(bool); JFWDisplay(JKRHeap*, JUTXfb::EXfbNumber, bool); - static JFWDisplay* createManager(_GXRenderModeObj const*, JKRHeap*, + static JFWDisplay* createManager(GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber, bool); void prepareCopyDisp(); void drawendXfb_single(); @@ -61,9 +59,9 @@ public: void waitBlanking(int); void threadSleep(s64); void clearEfb_init(); - void clearEfb(int, int, int, int, _GXColor); + void clearEfb(int, int, int, int, GXColor); void clearEfb(); - void clearEfb(_GXColor); + void clearEfb(GXColor); void calcCombinationRatio(); virtual void beginRender(); diff --git a/include/JSystem/JFramework/JFWSystem.h b/libs/JSystem/include/JSystem/JFramework/JFWSystem.h similarity index 96% rename from include/JSystem/JFramework/JFWSystem.h rename to libs/JSystem/include/JSystem/JFramework/JFWSystem.h index cf6ac86b69..bb4dfa01cd 100644 --- a/include/JSystem/JFramework/JFWSystem.h +++ b/libs/JSystem/include/JSystem/JFramework/JFWSystem.h @@ -1,10 +1,9 @@ #ifndef JFWSYSTEM_H #define JFWSYSTEM_H -#include +#include #include "JSystem/JUtility/JUTAssert.h" -typedef struct _GXRenderModeObj GXRenderModeObj; class JKRExpHeap; class JKRThread; class JUTConsole; @@ -37,6 +36,7 @@ struct JFWSystem { static JUTConsole* getSystemConsole() { return systemConsole; } static JKRExpHeap* getSystemHeap() { return systemHeap; } + static JKRExpHeap* getRootHeap() { return rootHeap; } static JUTResFont* getSystemFont() { return systemFont; } static void setMaxStdHeap(int max) { diff --git a/include/JSystem/JGadget/binary.h b/libs/JSystem/include/JSystem/JGadget/binary.h similarity index 100% rename from include/JSystem/JGadget/binary.h rename to libs/JSystem/include/JSystem/JGadget/binary.h diff --git a/include/JSystem/JGadget/define.h b/libs/JSystem/include/JSystem/JGadget/define.h similarity index 98% rename from include/JSystem/JGadget/define.h rename to libs/JSystem/include/JSystem/JGadget/define.h index 3a1548e364..fa808985d8 100644 --- a/include/JSystem/JGadget/define.h +++ b/libs/JSystem/include/JSystem/JGadget/define.h @@ -1,7 +1,7 @@ #ifndef JGADGET_DEFINE_H #define JGADGET_DEFINE_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/JSystem/JGadget/linklist.h b/libs/JSystem/include/JSystem/JGadget/linklist.h similarity index 100% rename from include/JSystem/JGadget/linklist.h rename to libs/JSystem/include/JSystem/JGadget/linklist.h diff --git a/include/JSystem/JGadget/pointer.h b/libs/JSystem/include/JSystem/JGadget/pointer.h similarity index 100% rename from include/JSystem/JGadget/pointer.h rename to libs/JSystem/include/JSystem/JGadget/pointer.h diff --git a/include/JSystem/JGadget/search.h b/libs/JSystem/include/JSystem/JGadget/search.h similarity index 99% rename from include/JSystem/JGadget/search.h rename to libs/JSystem/include/JSystem/JGadget/search.h index 8ba98b79f1..c097d90c5b 100644 --- a/include/JSystem/JGadget/search.h +++ b/libs/JSystem/include/JSystem/JGadget/search.h @@ -1,7 +1,7 @@ #ifndef JGADGET_SEARCH_H #define JGADGET_SEARCH_H -#include +#include #include #include #include diff --git a/include/JSystem/JGadget/std-list.h b/libs/JSystem/include/JSystem/JGadget/std-list.h similarity index 100% rename from include/JSystem/JGadget/std-list.h rename to libs/JSystem/include/JSystem/JGadget/std-list.h diff --git a/include/JSystem/JGadget/std-memory.h b/libs/JSystem/include/JSystem/JGadget/std-memory.h similarity index 100% rename from include/JSystem/JGadget/std-memory.h rename to libs/JSystem/include/JSystem/JGadget/std-memory.h diff --git a/include/JSystem/JGadget/std-stream.h b/libs/JSystem/include/JSystem/JGadget/std-stream.h similarity index 100% rename from include/JSystem/JGadget/std-stream.h rename to libs/JSystem/include/JSystem/JGadget/std-stream.h diff --git a/include/JSystem/JGadget/std-streambuf.h b/libs/JSystem/include/JSystem/JGadget/std-streambuf.h similarity index 98% rename from include/JSystem/JGadget/std-streambuf.h rename to libs/JSystem/include/JSystem/JGadget/std-streambuf.h index dae56d317c..7f50621108 100644 --- a/include/JSystem/JGadget/std-streambuf.h +++ b/libs/JSystem/include/JSystem/JGadget/std-streambuf.h @@ -1,7 +1,7 @@ #ifndef JGADGET_STD_STREAMBUF_H #define JGADGET_STD_STREAMBUF_H -#include +#include #include namespace JGadget { diff --git a/include/JSystem/JGadget/std-vector.h b/libs/JSystem/include/JSystem/JGadget/std-vector.h similarity index 100% rename from include/JSystem/JGadget/std-vector.h rename to libs/JSystem/include/JSystem/JGadget/std-vector.h diff --git a/include/JSystem/JGadget/vector.h b/libs/JSystem/include/JSystem/JGadget/vector.h similarity index 100% rename from include/JSystem/JGadget/vector.h rename to libs/JSystem/include/JSystem/JGadget/vector.h diff --git a/include/JSystem/JGeometry.h b/libs/JSystem/include/JSystem/JGeometry.h similarity index 99% rename from include/JSystem/JGeometry.h rename to libs/JSystem/include/JSystem/JGeometry.h index 6177e366e2..5fd6484424 100644 --- a/include/JSystem/JGeometry.h +++ b/libs/JSystem/include/JSystem/JGeometry.h @@ -1,7 +1,7 @@ #ifndef JGEOMETRY_H #define JGEOMETRY_H -#include +#include #include #include "JSystem/JMath/JMath.h" diff --git a/include/JSystem/JHostIO/JHIComm.h b/libs/JSystem/include/JSystem/JHostIO/JHIComm.h similarity index 100% rename from include/JSystem/JHostIO/JHIComm.h rename to libs/JSystem/include/JSystem/JHostIO/JHIComm.h diff --git a/include/JSystem/JHostIO/JHICommonMem.h b/libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h similarity index 98% rename from include/JSystem/JHostIO/JHICommonMem.h rename to libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h index b0a08fa02e..3d8c452c72 100644 --- a/include/JSystem/JHostIO/JHICommonMem.h +++ b/libs/JSystem/include/JSystem/JHostIO/JHICommonMem.h @@ -1,7 +1,7 @@ #ifndef JHICOMMONMEM_H #define JHICOMMONMEM_H -#include +#include #include "dusk/endian.h" inline u32 JHIhtonl(u32 v) { diff --git a/include/JSystem/JHostIO/JHIMccBuf.h b/libs/JSystem/include/JSystem/JHostIO/JHIMccBuf.h similarity index 100% rename from include/JSystem/JHostIO/JHIMccBuf.h rename to libs/JSystem/include/JSystem/JHostIO/JHIMccBuf.h diff --git a/include/JSystem/JHostIO/JHIRMcc.h b/libs/JSystem/include/JSystem/JHostIO/JHIRMcc.h similarity index 77% rename from include/JSystem/JHostIO/JHIRMcc.h rename to libs/JSystem/include/JSystem/JHostIO/JHIRMcc.h index 9e8c00ca39..adcc95043f 100644 --- a/include/JSystem/JHostIO/JHIRMcc.h +++ b/libs/JSystem/include/JSystem/JHostIO/JHIRMcc.h @@ -1,7 +1,11 @@ #ifndef JHIRMCC_H #define JHIRMCC_H -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif struct JHIMccContext; diff --git a/include/JSystem/JHostIO/JHIhioASync.h b/libs/JSystem/include/JSystem/JHostIO/JHIhioASync.h similarity index 88% rename from include/JSystem/JHostIO/JHIhioASync.h rename to libs/JSystem/include/JSystem/JHostIO/JHIhioASync.h index fa9d90ef71..438da0235f 100644 --- a/include/JSystem/JHostIO/JHIhioASync.h +++ b/libs/JSystem/include/JSystem/JHostIO/JHIhioASync.h @@ -1,7 +1,7 @@ #ifndef JHIHIOASYNC_H #define JHIHIOASYNC_H -#include +#include struct JHIContext; diff --git a/include/JSystem/JHostIO/JOREntry.h b/libs/JSystem/include/JSystem/JHostIO/JOREntry.h similarity index 99% rename from include/JSystem/JHostIO/JOREntry.h rename to libs/JSystem/include/JSystem/JHostIO/JOREntry.h index da1ec2e68c..b4ab15a7bf 100644 --- a/include/JSystem/JHostIO/JOREntry.h +++ b/libs/JSystem/include/JSystem/JHostIO/JOREntry.h @@ -2,7 +2,7 @@ #define JORENTRY_H #include "JSystem/JHostIO/JHIComm.h" -#include +#include template class JHIpvector { diff --git a/include/JSystem/JHostIO/JORFile.h b/libs/JSystem/include/JSystem/JHostIO/JORFile.h similarity index 100% rename from include/JSystem/JHostIO/JORFile.h rename to libs/JSystem/include/JSystem/JHostIO/JORFile.h diff --git a/include/JSystem/JHostIO/JORHostInfo.h b/libs/JSystem/include/JSystem/JHostIO/JORHostInfo.h similarity index 94% rename from include/JSystem/JHostIO/JORHostInfo.h rename to libs/JSystem/include/JSystem/JHostIO/JORHostInfo.h index 965b00ef93..54ccd0ebf6 100644 --- a/include/JSystem/JHostIO/JORHostInfo.h +++ b/libs/JSystem/include/JSystem/JHostIO/JORHostInfo.h @@ -1,7 +1,11 @@ #ifndef JORHOSTINFO_H #define JORHOSTINFO_H -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #define HOSTINFO_REQ_COMPUTER_NAME 0 #define HOSTINFO_REQ_USERNAME 1 diff --git a/include/JSystem/JHostIO/JORMContext.h b/libs/JSystem/include/JSystem/JHostIO/JORMContext.h similarity index 99% rename from include/JSystem/JHostIO/JORMContext.h rename to libs/JSystem/include/JSystem/JHostIO/JORMContext.h index 551c2410f2..f80e34e7e8 100644 --- a/include/JSystem/JHostIO/JORMContext.h +++ b/libs/JSystem/include/JSystem/JHostIO/JORMContext.h @@ -1,14 +1,12 @@ #ifndef JORMCONTEXT_H #define JORMCONTEXT_H -#include - -#ifdef _MSVC_LANG -#include +#ifdef __REVOLUTION_SDK__ +#include #else -#include +#include #endif - +#include #include #include "JSystem/JHostIO/JORReflexible.h" #include "JSystem/JSupport/JSUMemoryStream.h" diff --git a/include/JSystem/JHostIO/JORReflexible.h b/libs/JSystem/include/JSystem/JHostIO/JORReflexible.h similarity index 98% rename from include/JSystem/JHostIO/JORReflexible.h rename to libs/JSystem/include/JSystem/JHostIO/JORReflexible.h index 9426611d02..6d65137e22 100644 --- a/include/JSystem/JHostIO/JORReflexible.h +++ b/libs/JSystem/include/JSystem/JHostIO/JORReflexible.h @@ -1,7 +1,7 @@ #ifndef JORREFLEXIBLE_H #define JORREFLEXIBLE_H -#include +#include class JORReflexible; diff --git a/include/JSystem/JHostIO/JORServer.h b/libs/JSystem/include/JSystem/JHostIO/JORServer.h similarity index 94% rename from include/JSystem/JHostIO/JORServer.h rename to libs/JSystem/include/JSystem/JHostIO/JORServer.h index d92e588117..53f3283f6c 100644 --- a/include/JSystem/JHostIO/JORServer.h +++ b/libs/JSystem/include/JSystem/JHostIO/JORServer.h @@ -9,6 +9,7 @@ #include "JSystem/JUtility/JUTAssert.h" u32 JORMessageBox(const char* message, const char* title, u32 style); +int JORShellExecute(const char* param_0, const char* param_1, const char* param_2, const char* param_3, int param_4); struct JOREventCallbackListNode { JOREventCallbackListNode(u32, u32, bool); @@ -29,8 +30,12 @@ struct JOREventCallbackListNode { /* 0x04 */ JGadget::TLinkListNode m_node; /* 0x0C */ u32 field_0xc; /* 0x10 */ u32 field_0x10; + + static const int NodeOffset; }; +inline const int JOREventCallbackListNode::NodeOffset = -(int)offsetof(JOREventCallbackListNode, m_node); + class JORFile; class JORDir; class JORHostInfo_String; @@ -39,7 +44,7 @@ class JORHostInfo_CalendarTime; class JORServer : public JHITag { public: typedef void (*EventFunc)(u32,char *); - typedef JGadget::TLinkList CallbackLinkList; + typedef JGadget::TLinkList CallbackLinkList; enum ECommand { ECommand_GetRootObj = 1, diff --git a/include/JSystem/JKernel/JKRAram.h b/libs/JSystem/include/JSystem/JKernel/JKRAram.h similarity index 100% rename from include/JSystem/JKernel/JKRAram.h rename to libs/JSystem/include/JSystem/JKernel/JKRAram.h diff --git a/include/JSystem/JKernel/JKRAramArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRAramArchive.h similarity index 100% rename from include/JSystem/JKernel/JKRAramArchive.h rename to libs/JSystem/include/JSystem/JKernel/JKRAramArchive.h diff --git a/include/JSystem/JKernel/JKRAramBlock.h b/libs/JSystem/include/JSystem/JKernel/JKRAramBlock.h similarity index 100% rename from include/JSystem/JKernel/JKRAramBlock.h rename to libs/JSystem/include/JSystem/JKernel/JKRAramBlock.h diff --git a/include/JSystem/JKernel/JKRAramHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h similarity index 98% rename from include/JSystem/JKernel/JKRAramHeap.h rename to libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h index 034a90c3eb..87a6e819a8 100644 --- a/include/JSystem/JKernel/JKRAramHeap.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRAramHeap.h @@ -3,7 +3,7 @@ #include "JSystem/JKernel/JKRAramBlock.h" #include "JSystem/JKernel/JKRDisposer.h" -#include +#include /** * @ingroup jsystem-jkernel diff --git a/include/JSystem/JKernel/JKRAramPiece.h b/libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h similarity index 96% rename from include/JSystem/JKernel/JKRAramPiece.h rename to libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h index 130f81203b..51eeef27e9 100644 --- a/include/JSystem/JKernel/JKRAramPiece.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRAramPiece.h @@ -2,9 +2,13 @@ #define JKRARAMPIECE_H #include "JSystem/JSupport/JSUList.h" +#ifdef __REVOLUTION_SDK__ +#include +#include +#else #include #include -#include +#endif class JKRAramBlock; class JKRDecompCommand; diff --git a/include/JSystem/JKernel/JKRAramStream.h b/libs/JSystem/include/JSystem/JKernel/JKRAramStream.h similarity index 100% rename from include/JSystem/JKernel/JKRAramStream.h rename to libs/JSystem/include/JSystem/JKernel/JKRAramStream.h diff --git a/include/JSystem/JKernel/JKRArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRArchive.h similarity index 100% rename from include/JSystem/JKernel/JKRArchive.h rename to libs/JSystem/include/JSystem/JKernel/JKRArchive.h diff --git a/include/JSystem/JKernel/JKRAssertHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRAssertHeap.h similarity index 100% rename from include/JSystem/JKernel/JKRAssertHeap.h rename to libs/JSystem/include/JSystem/JKernel/JKRAssertHeap.h diff --git a/include/JSystem/JKernel/JKRCompArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRCompArchive.h similarity index 100% rename from include/JSystem/JKernel/JKRCompArchive.h rename to libs/JSystem/include/JSystem/JKernel/JKRCompArchive.h diff --git a/include/JSystem/JKernel/JKRCompression.h b/libs/JSystem/include/JSystem/JKernel/JKRCompression.h similarity index 100% rename from include/JSystem/JKernel/JKRCompression.h rename to libs/JSystem/include/JSystem/JKernel/JKRCompression.h diff --git a/include/JSystem/JKernel/JKRDecomp.h b/libs/JSystem/include/JSystem/JKernel/JKRDecomp.h similarity index 100% rename from include/JSystem/JKernel/JKRDecomp.h rename to libs/JSystem/include/JSystem/JKernel/JKRDecomp.h diff --git a/include/JSystem/JKernel/JKRDisposer.h b/libs/JSystem/include/JSystem/JKernel/JKRDisposer.h similarity index 100% rename from include/JSystem/JKernel/JKRDisposer.h rename to libs/JSystem/include/JSystem/JKernel/JKRDisposer.h diff --git a/include/JSystem/JKernel/JKRDvdAramRipper.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdAramRipper.h similarity index 100% rename from include/JSystem/JKernel/JKRDvdAramRipper.h rename to libs/JSystem/include/JSystem/JKernel/JKRDvdAramRipper.h diff --git a/include/JSystem/JKernel/JKRDvdArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdArchive.h similarity index 100% rename from include/JSystem/JKernel/JKRDvdArchive.h rename to libs/JSystem/include/JSystem/JKernel/JKRDvdArchive.h diff --git a/include/JSystem/JKernel/JKRDvdFile.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h similarity index 96% rename from include/JSystem/JKernel/JKRDvdFile.h rename to libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h index b06d4e76d5..f32c8c6778 100644 --- a/include/JSystem/JKernel/JKRDvdFile.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRDvdFile.h @@ -2,9 +2,9 @@ #define JKRDVDFILE_H #include "JSystem/JKernel/JKRFile.h" -#include -#include -#include +#include +#include +#include struct OSThread; diff --git a/include/JSystem/JKernel/JKRDvdRipper.h b/libs/JSystem/include/JSystem/JKernel/JKRDvdRipper.h similarity index 100% rename from include/JSystem/JKernel/JKRDvdRipper.h rename to libs/JSystem/include/JSystem/JKernel/JKRDvdRipper.h diff --git a/include/JSystem/JKernel/JKRExpHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRExpHeap.h similarity index 100% rename from include/JSystem/JKernel/JKRExpHeap.h rename to libs/JSystem/include/JSystem/JKernel/JKRExpHeap.h diff --git a/include/JSystem/JKernel/JKRFile.h b/libs/JSystem/include/JSystem/JKernel/JKRFile.h similarity index 100% rename from include/JSystem/JKernel/JKRFile.h rename to libs/JSystem/include/JSystem/JKernel/JKRFile.h diff --git a/include/JSystem/JKernel/JKRFileCache.h b/libs/JSystem/include/JSystem/JKernel/JKRFileCache.h similarity index 100% rename from include/JSystem/JKernel/JKRFileCache.h rename to libs/JSystem/include/JSystem/JKernel/JKRFileCache.h diff --git a/include/JSystem/JKernel/JKRFileFinder.h b/libs/JSystem/include/JSystem/JKernel/JKRFileFinder.h similarity index 98% rename from include/JSystem/JKernel/JKRFileFinder.h rename to libs/JSystem/include/JSystem/JKernel/JKRFileFinder.h index 195fd9685e..1c9339cde0 100644 --- a/include/JSystem/JKernel/JKRFileFinder.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRFileFinder.h @@ -1,7 +1,7 @@ #ifndef JKRFILEFINDER_H #define JKRFILEFINDER_H -#include +#include /** * @ingroup jsystem-jkernel diff --git a/include/JSystem/JKernel/JKRFileLoader.h b/libs/JSystem/include/JSystem/JKernel/JKRFileLoader.h similarity index 100% rename from include/JSystem/JKernel/JKRFileLoader.h rename to libs/JSystem/include/JSystem/JKernel/JKRFileLoader.h diff --git a/include/JSystem/JKernel/JKRHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRHeap.h similarity index 97% rename from include/JSystem/JKernel/JKRHeap.h rename to libs/JSystem/include/JSystem/JKernel/JKRHeap.h index 3f3f44083e..763718a585 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRHeap.h @@ -2,7 +2,7 @@ #define JKRHEAP_H #include "JSystem/JKernel/JKRDisposer.h" -#include +#include #include "global.h" #include #include @@ -141,6 +141,10 @@ protected: /* 0x68 */ bool mErrorFlag; /* 0x69 */ bool mInitFlag; +#if TARGET_PC + char mName[32]; +#endif + public: static bool initArena(char** memory, u32* size, int maxHeaps); static bool initArena2(char** memory, u32* size, int maxHeaps); @@ -209,6 +213,15 @@ public: #endif static JKRErrorHandler mErrorHandler; + +#if TARGET_PC + void setName(const char* name); + const char* getName() const; + +#define JKRHEAP_NAME(heap, name) (heap)->setName(name) +#else +#define JKRHEAP_NAME(heap, name) +#endif }; #ifndef TARGET_PC diff --git a/include/JSystem/JKernel/JKRMemArchive.h b/libs/JSystem/include/JSystem/JKernel/JKRMemArchive.h similarity index 100% rename from include/JSystem/JKernel/JKRMemArchive.h rename to libs/JSystem/include/JSystem/JKernel/JKRMemArchive.h diff --git a/include/JSystem/JKernel/JKRSolidHeap.h b/libs/JSystem/include/JSystem/JKernel/JKRSolidHeap.h similarity index 100% rename from include/JSystem/JKernel/JKRSolidHeap.h rename to libs/JSystem/include/JSystem/JKernel/JKRSolidHeap.h diff --git a/include/JSystem/JKernel/JKRThread.h b/libs/JSystem/include/JSystem/JKernel/JKRThread.h similarity index 99% rename from include/JSystem/JKernel/JKRThread.h rename to libs/JSystem/include/JSystem/JKernel/JKRThread.h index 027d6640e4..b58dc6232d 100644 --- a/include/JSystem/JKernel/JKRThread.h +++ b/libs/JSystem/include/JSystem/JKernel/JKRThread.h @@ -2,8 +2,8 @@ #define JKRTHREAD_H #include "JSystem/JKernel/JKRHeap.h" -#include -#include +#include +#include /** * @ingroup jsystem-jkernel diff --git a/include/JSystem/JKernel/SArc.h b/libs/JSystem/include/JSystem/JKernel/SArc.h similarity index 100% rename from include/JSystem/JKernel/SArc.h rename to libs/JSystem/include/JSystem/JKernel/SArc.h diff --git a/include/JSystem/JMath/JMATrigonometric.h b/libs/JSystem/include/JSystem/JMath/JMATrigonometric.h similarity index 99% rename from include/JSystem/JMath/JMATrigonometric.h rename to libs/JSystem/include/JSystem/JMath/JMATrigonometric.h index f764be5b6b..e51296ba3b 100644 --- a/include/JSystem/JMath/JMATrigonometric.h +++ b/libs/JSystem/include/JSystem/JMath/JMATrigonometric.h @@ -1,7 +1,7 @@ #ifndef JMATRIGONOMETRIC_H #define JMATRIGONOMETRIC_H -#include +#include #include #include diff --git a/include/JSystem/JMath/JMath.h b/libs/JSystem/include/JSystem/JMath/JMath.h similarity index 99% rename from include/JSystem/JMath/JMath.h rename to libs/JSystem/include/JSystem/JMath/JMath.h index 1bd1322063..8c7f2ffad1 100644 --- a/include/JSystem/JMath/JMath.h +++ b/libs/JSystem/include/JSystem/JMath/JMath.h @@ -1,7 +1,7 @@ #ifndef JMATH_H #define JMATH_H -#include "dolphin/mtx.h" +#include #include typedef f32 Mtx33[3][3]; diff --git a/include/JSystem/JMath/random.h b/libs/JSystem/include/JSystem/JMath/random.h similarity index 97% rename from include/JSystem/JMath/random.h rename to libs/JSystem/include/JSystem/JMath/random.h index 29b542d00d..5ea54ce704 100644 --- a/include/JSystem/JMath/random.h +++ b/libs/JSystem/include/JSystem/JMath/random.h @@ -1,7 +1,7 @@ #ifndef RANDOM_H #define RANDOM_H -#include +#include namespace JMath { diff --git a/include/JSystem/JMessage/JMessage.h b/libs/JSystem/include/JSystem/JMessage/JMessage.h similarity index 61% rename from include/JSystem/JMessage/JMessage.h rename to libs/JSystem/include/JSystem/JMessage/JMessage.h index b4144ddf00..0b3d1c64c8 100644 --- a/include/JSystem/JMessage/JMessage.h +++ b/libs/JSystem/include/JSystem/JMessage/JMessage.h @@ -1,31 +1,36 @@ #ifndef JMESSAGE_H #define JMESSAGE_H -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif +#include "dusk/endian.h" // Struct definitions might be wrong typedef struct bmg_header_t { /* 0x00 */ char magic[8]; // "MESGbmg1" - /* 0x08 */ u32 size; // total size of file not including FLW1/FLI1 sections - /* 0x0C */ u32 n_sections; // number of sections + /* 0x08 */ BE(u32) size; // total size of file not including FLW1/FLI1 sections + /* 0x0C */ BE(u32) n_sections; // number of sections /* 0x10 */ u8 encoding; // text encoding /* 0x11 */ u8 padding[0x20 - 0x11]; // padding } bmg_header_t; typedef struct bmg_section_t { - /* 0x0 */ u32 magic; // four character magic string - /* 0x4 */ u32 size; // total size of the section + /* 0x0 */ BE(u32) magic; // four character magic string + /* 0x4 */ BE(u32) size; // total size of the section } bmg_section_t; typedef struct inf1_entry_t { - /* 0x0 */ u32 string_offset; // offset into DAT1 section entries, pointing to where message text starts + /* 0x0 */ BE(u32) string_offset; // offset into DAT1 section entries, pointing to where message text starts /* 0x4 */ // attributes // attribute data. size fills up the rest of defined INF1 "entry_size" } inf1_entry_t; typedef struct inf1_section_t { /* 0x00 */ bmg_section_t header; // section header - /* 0x08 */ u16 entry_num; // number of entries in this section - /* 0x0A */ u16 entry_size; // size of an entry + /* 0x08 */ BE(u16) entry_num; // number of entries in this section + /* 0x0A */ BE(u16) entry_size; // size of an entry /* 0x0C */ u8 padding[4]; // padding } inf1_section_t; diff --git a/include/JSystem/JMessage/control.h b/libs/JSystem/include/JSystem/JMessage/control.h similarity index 100% rename from include/JSystem/JMessage/control.h rename to libs/JSystem/include/JSystem/JMessage/control.h diff --git a/include/JSystem/JMessage/data.h b/libs/JSystem/include/JSystem/JMessage/data.h similarity index 100% rename from include/JSystem/JMessage/data.h rename to libs/JSystem/include/JSystem/JMessage/data.h diff --git a/include/JSystem/JMessage/locale.h b/libs/JSystem/include/JSystem/JMessage/locale.h similarity index 88% rename from include/JSystem/JMessage/locale.h rename to libs/JSystem/include/JSystem/JMessage/locale.h index c5dc58512a..76c4313f1a 100644 --- a/include/JSystem/JMessage/locale.h +++ b/libs/JSystem/include/JSystem/JMessage/locale.h @@ -1,7 +1,11 @@ #ifndef JMESSAGE_LOCALE_H #define JMESSAGE_LOCALE_H -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif namespace JMessage { diff --git a/include/JSystem/JMessage/processor.h b/libs/JSystem/include/JSystem/JMessage/processor.h similarity index 100% rename from include/JSystem/JMessage/processor.h rename to libs/JSystem/include/JSystem/JMessage/processor.h diff --git a/include/JSystem/JMessage/resource.h b/libs/JSystem/include/JSystem/JMessage/resource.h similarity index 100% rename from include/JSystem/JMessage/resource.h rename to libs/JSystem/include/JSystem/JMessage/resource.h diff --git a/include/JSystem/JParticle/JPABaseShape.h b/libs/JSystem/include/JSystem/JParticle/JPABaseShape.h similarity index 88% rename from include/JSystem/JParticle/JPABaseShape.h rename to libs/JSystem/include/JSystem/JParticle/JPABaseShape.h index 9bab6d815a..d348859ebe 100644 --- a/include/JSystem/JParticle/JPABaseShape.h +++ b/libs/JSystem/include/JSystem/JParticle/JPABaseShape.h @@ -1,7 +1,7 @@ #ifndef JPABASESHAPE_H #define JPABASESHAPE_H -#include +#include struct JPAEmitterWorkData; class JPABaseParticle; @@ -14,14 +14,14 @@ class JKRHeap; struct JPABaseShapeData { // Common header. /* 0x00 */ u8 mMagic[4]; - /* 0x04 */ u32 mSize; + /* 0x04 */ BE(u32) mSize; - /* 0x08 */ u32 mFlags; - /* 0x0C */ s16 mClrPrmAnmOffset; - /* 0x0E */ s16 mClrEnvAnmOffset; - /* 0x10 */ f32 mBaseSizeX; - /* 0x14 */ f32 mBaseSizeY; - /* 0x18 */ u16 mBlendModeCfg; + /* 0x08 */ BE(u32) mFlags; + /* 0x0C */ BE(s16) mClrPrmAnmOffset; + /* 0x0E */ BE(s16) mClrEnvAnmOffset; + /* 0x10 */ BE(f32) mBaseSizeX; + /* 0x14 */ BE(f32) mBaseSizeY; + /* 0x18 */ BE(u16) mBlendModeCfg; /* 0x1A */ u8 mAlphaCompareCfg; /* 0x1B */ u8 mAlphaRef0; /* 0x1C */ u8 mAlphaRef1; @@ -32,7 +32,7 @@ struct JPABaseShapeData { /* 0x21 */ u8 mClrFlg; /* 0x22 */ u8 prmAnmKeyNum; /* 0x23 */ u8 envAnmKeyNum; - /* 0x24 */ s16 mClrAnmFrmMax; + /* 0x24 */ BE(s16) mClrAnmFrmMax; /* 0x26 */ GXColor mClrPrm; /* 0x2A */ GXColor mClrEnv; /* 0x2E */ u8 mAnmRndm; @@ -114,16 +114,16 @@ public: s32 getTexLoopOfst(u8 param_1) const { return getTexLoopOfstMask() & param_1; } u8 getLoopOfstValue() const { return pBsd->mAnmRndm; } - f32 getIncTransX() const { return ((f32*)mpTexCrdMtxAnmTbl)[5]; } - f32 getInitTransX() const { return ((f32*)mpTexCrdMtxAnmTbl)[0]; } - f32 getIncTransY() const { return ((f32*)mpTexCrdMtxAnmTbl)[6]; } - f32 getInitTransY() const { return ((f32*)mpTexCrdMtxAnmTbl)[1]; } - f32 getIncScaleX() const { return ((f32*)mpTexCrdMtxAnmTbl)[7]; } - f32 getInitScaleX() const { return ((f32*)mpTexCrdMtxAnmTbl)[2]; } - f32 getIncScaleY() const { return ((f32*)mpTexCrdMtxAnmTbl)[8]; } - f32 getInitScaleY() const { return ((f32*)mpTexCrdMtxAnmTbl)[3]; } - f32 getIncRot() const { return ((f32*)mpTexCrdMtxAnmTbl)[9]; } - f32 getInitRot() const { return ((f32*)mpTexCrdMtxAnmTbl)[4]; } + f32 getIncTransX() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[5]; } + f32 getInitTransX() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[0]; } + f32 getIncTransY() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[6]; } + f32 getInitTransY() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[1]; } + f32 getIncScaleX() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[7]; } + f32 getInitScaleX() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[2]; } + f32 getIncScaleY() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[8]; } + f32 getInitScaleY() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[3]; } + f32 getIncRot() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[9]; } + f32 getInitRot() const { return ((BE(f32)*)mpTexCrdMtxAnmTbl)[4]; } u8 getTexAnmKeyNum() const { return pBsd->texAnmKeyNum; } public: @@ -139,7 +139,7 @@ public: * */ struct JPAClrAnmKeyData { - /* 0x0 */ s16 index; + /* 0x0 */ BE(s16) index; /* 0x2 */ GXColor color; }; diff --git a/include/JSystem/JParticle/JPAChildShape.h b/libs/JSystem/include/JSystem/JParticle/JPAChildShape.h similarity index 82% rename from include/JSystem/JParticle/JPAChildShape.h rename to libs/JSystem/include/JSystem/JParticle/JPAChildShape.h index ff22d2d69e..ee0516ef99 100644 --- a/include/JSystem/JParticle/JPAChildShape.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAChildShape.h @@ -1,7 +1,7 @@ #ifndef JPACHILDSHAPE_H #define JPACHILDSHAPE_H -#include +#include struct JPAEmitterWorkData; class JPABaseParticle; @@ -13,27 +13,27 @@ class JPABaseParticle; struct JPAChildShapeData { // Common header. /* 0x00 */ u8 mMagic[4]; - /* 0x04 */ u32 mSize; + /* 0x04 */ BE(u32) mSize; - /* 0x08 */ u32 mFlags; - /* 0x0C */ f32 mPosRndm; - /* 0x10 */ f32 mBaseVel; - /* 0x14 */ f32 mBaseVelRndm; - /* 0x18 */ f32 mVelInfRate; - /* 0x1C */ f32 mGravity; - /* 0x20 */ f32 mScaleX; - /* 0x24 */ f32 mScaleY; - /* 0x28 */ f32 mInheritScale; - /* 0x2C */ f32 mInheritAlpha; - /* 0x30 */ f32 mInheritRGB; + /* 0x08 */ BE(u32) mFlags; + /* 0x0C */ BE(f32) mPosRndm; + /* 0x10 */ BE(f32) mBaseVel; + /* 0x14 */ BE(f32) mBaseVelRndm; + /* 0x18 */ BE(f32) mVelInfRate; + /* 0x1C */ BE(f32) mGravity; + /* 0x20 */ BE(f32) mScaleX; + /* 0x24 */ BE(f32) mScaleY; + /* 0x28 */ BE(f32) mInheritScale; + /* 0x2C */ BE(f32) mInheritAlpha; + /* 0x30 */ BE(f32) mInheritRGB; /* 0x34 */ GXColor mPrmClr; /* 0x38 */ GXColor mEnvClr; - /* 0x3C */ f32 mTiming; - /* 0x40 */ s16 mLife; - /* 0x42 */ s16 mRate; + /* 0x3C */ BE(f32) mTiming; + /* 0x40 */ BE(s16) mLife; + /* 0x42 */ BE(s16) mRate; /* 0x44 */ u8 mStep; /* 0x45 */ u8 mTexIdx; - /* 0x46 */ s16 mRotSpeed; + /* 0x46 */ BE(s16) mRotSpeed; }; // Size: 0x48 /** diff --git a/include/JSystem/JParticle/JPADrawInfo.h b/libs/JSystem/include/JSystem/JParticle/JPADrawInfo.h similarity index 96% rename from include/JSystem/JParticle/JPADrawInfo.h rename to libs/JSystem/include/JSystem/JParticle/JPADrawInfo.h index d98448f5f4..c9a62bfd6f 100644 --- a/include/JSystem/JParticle/JPADrawInfo.h +++ b/libs/JSystem/include/JSystem/JParticle/JPADrawInfo.h @@ -1,7 +1,7 @@ #ifndef JPADRAWINFO_H #define JPADRAWINFO_H -#include +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPADynamicsBlock.h b/libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h similarity index 74% rename from include/JSystem/JParticle/JPADynamicsBlock.h rename to libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h index 5b89192498..c69ddc07cb 100644 --- a/include/JSystem/JParticle/JPADynamicsBlock.h +++ b/libs/JSystem/include/JSystem/JParticle/JPADynamicsBlock.h @@ -3,7 +3,8 @@ #include "JSystem/JGeometry.h" -#include +#include +#include "dusk/endian.h" struct JPAEmitterWorkData; @@ -14,32 +15,32 @@ struct JPAEmitterWorkData; struct JPADynamicsBlockData { // Common header. /* 0x00 */ u8 mMagic[4]; - /* 0x04 */ u32 mSize; + /* 0x04 */ BE(u32) mSize; - /* 0x08 */ u32 mFlags; - /* 0x0C */ u32 mResUserWork; - /* 0x10 */ JGeometry::TVec3 mEmitterScl; - /* 0x1C */ JGeometry::TVec3 mEmitterTrs; - /* 0x28 */ JGeometry::TVec3 mEmitterDir; - /* 0x34 */ f32 mInitialVelOmni; - /* 0x38 */ f32 mInitialVelAxis; - /* 0x3C */ f32 mInitialVelRndm; - /* 0x40 */ f32 mInitialVelDir; - /* 0x44 */ f32 mSpread; - /* 0x48 */ f32 mInitialVelRatio; - /* 0x4C */ f32 mRate; - /* 0x50 */ f32 mRateRndm; - /* 0x54 */ f32 mLifeTimeRndm; - /* 0x58 */ f32 mVolumeSweep; - /* 0x5C */ f32 mVolumeMinRad; - /* 0x60 */ f32 mAirResist; - /* 0x64 */ f32 mMoment; - /* 0x68 */ JGeometry::TVec3 mEmitterRot; - /* 0x6E */ s16 mMaxFrame; - /* 0x70 */ s16 mStartFrame; - /* 0x72 */ s16 mLifeTime; - /* 0x74 */ u16 mVolumeSize; - /* 0x76 */ u16 mDivNumber; + /* 0x08 */ BE(u32) mFlags; + /* 0x0C */ BE(u32) mResUserWork; + /* 0x10 */ JGeometry::TVec3 mEmitterScl; + /* 0x1C */ JGeometry::TVec3 mEmitterTrs; + /* 0x28 */ JGeometry::TVec3 mEmitterDir; + /* 0x34 */ BE(f32) mInitialVelOmni; + /* 0x38 */ BE(f32) mInitialVelAxis; + /* 0x3C */ BE(f32) mInitialVelRndm; + /* 0x40 */ BE(f32) mInitialVelDir; + /* 0x44 */ BE(f32) mSpread; + /* 0x48 */ BE(f32) mInitialVelRatio; + /* 0x4C */ BE(f32) mRate; + /* 0x50 */ BE(f32) mRateRndm; + /* 0x54 */ BE(f32) mLifeTimeRndm; + /* 0x58 */ BE(f32) mVolumeSweep; + /* 0x5C */ BE(f32) mVolumeMinRad; + /* 0x60 */ BE(f32) mAirResist; + /* 0x64 */ BE(f32) mMoment; + /* 0x68 */ JGeometry::TVec3 mEmitterRot; + /* 0x6E */ BE(s16) mMaxFrame; + /* 0x70 */ BE(s16) mStartFrame; + /* 0x72 */ BE(s16) mLifeTime; + /* 0x74 */ BE(u16) mVolumeSize; + /* 0x76 */ BE(u16) mDivNumber; /* 0x78 */ u8 mRateStep; }; // Size: 0x7C diff --git a/include/JSystem/JParticle/JPAEmitter.h b/libs/JSystem/include/JSystem/JParticle/JPAEmitter.h similarity index 99% rename from include/JSystem/JParticle/JPAEmitter.h rename to libs/JSystem/include/JSystem/JParticle/JPAEmitter.h index 691096babe..99013105e0 100644 --- a/include/JSystem/JParticle/JPAEmitter.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAEmitter.h @@ -1,7 +1,7 @@ #ifndef JPAEMITTER_H #define JPAEMITTER_H -#include +#include #include #include "JSystem/JParticle/JPAResource.h" #include "JSystem/JParticle/JPAList.h" @@ -142,7 +142,7 @@ public: void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; } u8 getGlobalAlpha() const { return mGlobalPrmClr.a; } void getGlobalPrmColor(GXColor& color) { color = mGlobalPrmClr; } - void getGlobalPrmColor(_GXColor* color) const { *color = mGlobalPrmClr; } + void getGlobalPrmColor(GXColor* color) const { *color = mGlobalPrmClr; } void setGlobalPrmColor(u8 r, u8 g, u8 b) { mGlobalPrmClr.r = r; mGlobalPrmClr.g = g; mGlobalPrmClr.b = b; } void setGlobalEnvColor(u8 r, u8 g, u8 b) { mGlobalEnvClr.r = r; mGlobalEnvClr.g = g; mGlobalEnvClr.b = b; } void setVolumeSize(u16 size) { mVolumeSize = size; } diff --git a/include/JSystem/JParticle/JPAEmitterManager.h b/libs/JSystem/include/JSystem/JParticle/JPAEmitterManager.h similarity index 94% rename from include/JSystem/JParticle/JPAEmitterManager.h rename to libs/JSystem/include/JSystem/JParticle/JPAEmitterManager.h index 4508ef9cec..b10c4a69a0 100644 --- a/include/JSystem/JParticle/JPAEmitterManager.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAEmitterManager.h @@ -1,7 +1,7 @@ #ifndef JPAEMITTERMANAGER_H #define JPAEMITTERMANAGER_H -#include +#include #include "JSystem/JParticle/JPAList.h" #include "JSystem/JParticle/JPADrawInfo.h" #include "JSystem/JSupport/JSUList.h" @@ -39,6 +39,7 @@ public: return pResMgrAry[res_mgr_id]; } int getEmitterNumber() const { return emtrNum - mFreeEmtrList.getNumLinks(); } + int getParticleNumber() const { return ptclNum - mPtclPool.getNum(); } public: /* 0x00 */ JSUList* pEmtrUseList; diff --git a/include/JSystem/JParticle/JPAExTexShape.h b/libs/JSystem/include/JSystem/JParticle/JPAExTexShape.h similarity index 80% rename from include/JSystem/JParticle/JPAExTexShape.h rename to libs/JSystem/include/JSystem/JParticle/JPAExTexShape.h index 8a0c345c10..95a480e5a1 100644 --- a/include/JSystem/JParticle/JPAExTexShape.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAExTexShape.h @@ -1,7 +1,7 @@ #ifndef JPAEXTEXSHAPE_H #define JPAEXTEXSHAPE_H -#include +#include struct JPAEmitterWorkData; @@ -12,10 +12,10 @@ struct JPAEmitterWorkData; struct JPAExTexShapeData { // Common header. /* 0x00 */ u8 mMagic[4]; - /* 0x04 */ u32 mSize; + /* 0x04 */ BE(u32) mSize; - /* 0x08 */ u32 mFlags; - /* 0x0C */ f32 mIndTexMtx[2][3]; + /* 0x08 */ BE(u32) mFlags; + /* 0x0C */ BE(f32) mIndTexMtx[2][3]; /* 0x24 */ s8 mExpScale; /* 0x25 */ s8 mIndTexIdx; /* 0x26 */ s8 mSecTexIdx; @@ -29,7 +29,7 @@ class JPAExTexShape { public: JPAExTexShape(u8 const*); - const f32* getIndTexMtx() const { return &mpData->mIndTexMtx[0][0]; } + const BE(f32)* getIndTexMtx() const { return &mpData->mIndTexMtx[0][0]; } s8 getExpScale() const { return mpData->mExpScale; } u8 getIndTexIdx() const { return mpData->mIndTexIdx; } u8 getSecTexIdx() const { return mpData->mSecTexIdx; } diff --git a/include/JSystem/JParticle/JPAExtraShape.h b/libs/JSystem/include/JSystem/JParticle/JPAExtraShape.h similarity index 79% rename from include/JSystem/JParticle/JPAExtraShape.h rename to libs/JSystem/include/JSystem/JParticle/JPAExtraShape.h index 613413711c..ea387bc4ed 100644 --- a/include/JSystem/JParticle/JPAExtraShape.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAExtraShape.h @@ -1,7 +1,7 @@ #ifndef JPAEXTRASHAPE_H #define JPAEXTRASHAPE_H -#include +#include struct JPAEmitterWorkData; class JPABaseParticle; @@ -13,31 +13,31 @@ class JPABaseParticle; struct JPAExtraShapeData { // Common header. /* 0x00 */ u8 mMagic[4]; - /* 0x04 */ u32 mSize; + /* 0x04 */ BE(u32) mSize; - /* 0x08 */ u32 mFlags; - /* 0x0C */ f32 mScaleInTiming; - /* 0x10 */ f32 mScaleOutTiming; - /* 0x14 */ f32 mScaleInValueX; - /* 0x18 */ f32 mScaleOutValueX; - /* 0x1C */ f32 mScaleInValueY; - /* 0x20 */ f32 mScaleOutValueY; - /* 0x24 */ f32 mScaleOutRandom; - /* 0x28 */ s16 mScaleAnmCycleX; - /* 0x2A */ s16 mScaleAnmCycleY; - /* 0x2C */ f32 mAlphaInTiming; - /* 0x30 */ f32 mAlphaOutTiming; - /* 0x34 */ f32 mAlphaInValue; - /* 0x38 */ f32 mAlphaBaseValue; - /* 0x3C */ f32 mAlphaOutValue; - /* 0x40 */ f32 mAlphaWaveFrequency; - /* 0x44 */ f32 mAlphaWaveRandom; - /* 0x48 */ f32 mAlphaWaveAmplitude; - /* 0x4C */ f32 mRotateAngle; - /* 0x50 */ f32 mRotateAngleRandom; - /* 0x54 */ f32 mRotateSpeed; - /* 0x58 */ f32 mRotateSpeedRandom; - /* 0x5C */ f32 mRotateDirection; + /* 0x08 */ BE(u32) mFlags; + /* 0x0C */ BE(f32) mScaleInTiming; + /* 0x10 */ BE(f32) mScaleOutTiming; + /* 0x14 */ BE(f32) mScaleInValueX; + /* 0x18 */ BE(f32) mScaleOutValueX; + /* 0x1C */ BE(f32) mScaleInValueY; + /* 0x20 */ BE(f32) mScaleOutValueY; + /* 0x24 */ BE(f32) mScaleOutRandom; + /* 0x28 */ BE(s16) mScaleAnmCycleX; + /* 0x2A */ BE(s16) mScaleAnmCycleY; + /* 0x2C */ BE(f32) mAlphaInTiming; + /* 0x30 */ BE(f32) mAlphaOutTiming; + /* 0x34 */ BE(f32) mAlphaInValue; + /* 0x38 */ BE(f32) mAlphaBaseValue; + /* 0x3C */ BE(f32) mAlphaOutValue; + /* 0x40 */ BE(f32) mAlphaWaveFrequency; + /* 0x44 */ BE(f32) mAlphaWaveRandom; + /* 0x48 */ BE(f32) mAlphaWaveAmplitude; + /* 0x4C */ BE(f32) mRotateAngle; + /* 0x50 */ BE(f32) mRotateAngleRandom; + /* 0x54 */ BE(f32) mRotateSpeed; + /* 0x58 */ BE(f32) mRotateSpeedRandom; + /* 0x5C */ BE(f32) mRotateDirection; }; // Size: 0x60 /** diff --git a/include/JSystem/JParticle/JPAFieldBlock.h b/libs/JSystem/include/JSystem/JParticle/JPAFieldBlock.h similarity index 92% rename from include/JSystem/JParticle/JPAFieldBlock.h rename to libs/JSystem/include/JSystem/JParticle/JPAFieldBlock.h index a43488c781..ded3c940cd 100644 --- a/include/JSystem/JParticle/JPAFieldBlock.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAFieldBlock.h @@ -2,7 +2,7 @@ #define JPAFIELDBLOCK_H #include "JSystem/JGeometry.h" -#include +#include class JKRHeap; struct JPAEmitterWorkData; @@ -103,17 +103,17 @@ public: class JPAFieldBlockData { public: /* 0x00 */ u8 mMagic[4]; - /* 0x04 */ u32 mSize; - /* 0x08 */ u32 mFlags; - /* 0x0C */ JGeometry::TVec3 mPos; - /* 0x18 */ JGeometry::TVec3 mDir; - /* 0x24 */ f32 mMag; - /* 0x28 */ f32 mMagRndm; - /* 0x2C */ f32 mVal1; - /* 0x30 */ f32 mFadeInTime; - /* 0x34 */ f32 mFadeOutTime; - /* 0x38 */ f32 mEnTime; - /* 0x3C */ f32 mDisTime; + /* 0x04 */ BE(u32) mSize; + /* 0x08 */ BE(u32) mFlags; + /* 0x0C */ JGeometry::TVec3 mPos; + /* 0x18 */ JGeometry::TVec3 mDir; + /* 0x24 */ BE(f32) mMag; + /* 0x28 */ BE(f32) mMagRndm; + /* 0x2C */ BE(f32) mVal1; + /* 0x30 */ BE(f32) mFadeInTime; + /* 0x34 */ BE(f32) mFadeOutTime; + /* 0x38 */ BE(f32) mEnTime; + /* 0x3C */ BE(f32) mDisTime; /* 0x40 */ u8 mCycle; }; diff --git a/include/JSystem/JParticle/JPAKeyBlock.h b/libs/JSystem/include/JSystem/JParticle/JPAKeyBlock.h similarity index 77% rename from include/JSystem/JParticle/JPAKeyBlock.h rename to libs/JSystem/include/JSystem/JParticle/JPAKeyBlock.h index 07c1f57171..cc41aa71c4 100644 --- a/include/JSystem/JParticle/JPAKeyBlock.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAKeyBlock.h @@ -1,7 +1,7 @@ #ifndef JPAKEYBLOCK_H #define JPAKEYBLOCK_H -#include +#include /** * @ingroup jsystem-jparticle @@ -14,10 +14,10 @@ struct JPAKeyBlock { u8 getID() const { return mDataStart[8]; } u8 getKeyNum() const { return mDataStart[9]; } BOOL isLoop() const { return mDataStart[11]; } - const f32* getKeyData() const { return field_0x4; } + const BE(f32)* getKeyData() const { return field_0x4; } const u8* mDataStart; - const f32* field_0x4; + const BE(f32)* field_0x4; }; diff --git a/include/JSystem/JParticle/JPAList.h b/libs/JSystem/include/JSystem/JParticle/JPAList.h similarity index 99% rename from include/JSystem/JParticle/JPAList.h rename to libs/JSystem/include/JSystem/JParticle/JPAList.h index 6f201b73b8..3ea0bc4967 100644 --- a/include/JSystem/JParticle/JPAList.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAList.h @@ -1,7 +1,7 @@ #ifndef JPALIST_H #define JPALIST_H -#include +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAMath.h b/libs/JSystem/include/JSystem/JParticle/JPAMath.h similarity index 86% rename from include/JSystem/JParticle/JPAMath.h rename to libs/JSystem/include/JSystem/JParticle/JPAMath.h index e48758c4d8..66e55e0370 100644 --- a/include/JSystem/JParticle/JPAMath.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAMath.h @@ -1,7 +1,7 @@ #ifndef JPAMATH_H #define JPAMATH_H -#include +#include #include "JSystem/JGeometry.h" void JPAGetDirMtx(JGeometry::TVec3 const& param_0, f32 (*param_1)[4]); @@ -9,7 +9,7 @@ void JPAGetYZRotateMtx(s16 angleY, s16 angleZ, f32 (*param_2)[4]); void JPAGetXYZRotateMtx(s16 x, s16 y, s16 z, Mtx dst); void JPASetRMtxTVecfromMtx(f32 const (*param_0)[4], f32 (*param_1)[4], JGeometry::TVec3* param_2); -f32 JPACalcKeyAnmValue(f32 param_0, u16 param_1, f32 const* param_2); +f32 JPACalcKeyAnmValue(f32 param_0, u16 param_1, BE(f32) const* param_2); void JPASetRMtxSTVecfromMtx(f32 const (*param_0)[4], f32 (*param_1)[4], JGeometry::TVec3* param_2, JGeometry::TVec3* param_3); diff --git a/include/JSystem/JParticle/JPAParticle.h b/libs/JSystem/include/JSystem/JParticle/JPAParticle.h similarity index 99% rename from include/JSystem/JParticle/JPAParticle.h rename to libs/JSystem/include/JSystem/JParticle/JPAParticle.h index 64d682cfa2..842f293286 100644 --- a/include/JSystem/JParticle/JPAParticle.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAParticle.h @@ -1,7 +1,7 @@ #ifndef JPAPARTICLE_H #define JPAPARTICLE_H -#include +#include #include "JSystem/JGeometry.h" class JKRHeap; diff --git a/include/JSystem/JParticle/JPARandom.h b/libs/JSystem/include/JSystem/JParticle/JPARandom.h similarity index 96% rename from include/JSystem/JParticle/JPARandom.h rename to libs/JSystem/include/JSystem/JParticle/JPARandom.h index 551e6f6934..be4420cad8 100644 --- a/include/JSystem/JParticle/JPARandom.h +++ b/libs/JSystem/include/JSystem/JParticle/JPARandom.h @@ -1,7 +1,7 @@ #ifndef JPARANDOM_H #define JPARANDOM_H -#include +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAResource.h b/libs/JSystem/include/JSystem/JParticle/JPAResource.h similarity index 96% rename from include/JSystem/JParticle/JPAResource.h rename to libs/JSystem/include/JSystem/JParticle/JPAResource.h index 0088c497c2..ebf2127033 100644 --- a/include/JSystem/JParticle/JPAResource.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAResource.h @@ -1,7 +1,8 @@ #ifndef JPARESOURCE_H #define JPARESOURCE_H -#include +#include +#include "dusk/endian.h" class JKRHeap; struct JPAEmitterWorkData; @@ -64,7 +65,7 @@ public: /* 0x2C */ JPADynamicsBlock* pDyn; /* 0x30 */ JPAFieldBlock** ppFld; /* 0x34 */ JPAKeyBlock** ppKey; - /* 0x38 */ u16 const* mpTDB1; + /* 0x38 */ BE(u16) const* mpTDB1; /* 0x3C */ u16 mUsrIdx; /* 0x3E */ u8 fldNum; /* 0x3F */ u8 keyNum; diff --git a/include/JSystem/JParticle/JPAResourceLoader.h b/libs/JSystem/include/JSystem/JParticle/JPAResourceLoader.h similarity index 90% rename from include/JSystem/JParticle/JPAResourceLoader.h rename to libs/JSystem/include/JSystem/JParticle/JPAResourceLoader.h index 7e411a8497..c49d1d8464 100644 --- a/include/JSystem/JParticle/JPAResourceLoader.h +++ b/libs/JSystem/include/JSystem/JParticle/JPAResourceLoader.h @@ -1,7 +1,7 @@ #ifndef JPARESOURCELOADER_H #define JPARESOURCELOADER_H -#include +#include class JPAResourceManager; diff --git a/include/JSystem/JParticle/JPAResourceManager.h b/libs/JSystem/include/JSystem/JParticle/JPAResourceManager.h similarity index 100% rename from include/JSystem/JParticle/JPAResourceManager.h rename to libs/JSystem/include/JSystem/JParticle/JPAResourceManager.h diff --git a/include/JSystem/JParticle/JPATexture.h b/libs/JSystem/include/JSystem/JParticle/JPATexture.h similarity index 100% rename from include/JSystem/JParticle/JPATexture.h rename to libs/JSystem/include/JSystem/JParticle/JPATexture.h diff --git a/include/JSystem/JStage/JSGActor.h b/libs/JSystem/include/JSystem/JStage/JSGActor.h similarity index 100% rename from include/JSystem/JStage/JSGActor.h rename to libs/JSystem/include/JSystem/JStage/JSGActor.h diff --git a/include/JSystem/JStage/JSGAmbientLight.h b/libs/JSystem/include/JSystem/JStage/JSGAmbientLight.h similarity index 94% rename from include/JSystem/JStage/JSGAmbientLight.h rename to libs/JSystem/include/JSystem/JStage/JSGAmbientLight.h index 049ce7a479..a9e6f842a4 100644 --- a/include/JSystem/JStage/JSGAmbientLight.h +++ b/libs/JSystem/include/JSystem/JStage/JSGAmbientLight.h @@ -2,7 +2,7 @@ #define JSGAMBIENTLIGHT_H #include "JSystem/JStage/JSGObject.h" -#include +#include namespace JStage { diff --git a/include/JSystem/JStage/JSGCamera.h b/libs/JSystem/include/JSystem/JStage/JSGCamera.h similarity index 100% rename from include/JSystem/JStage/JSGCamera.h rename to libs/JSystem/include/JSystem/JStage/JSGCamera.h diff --git a/include/JSystem/JStage/JSGFog.h b/libs/JSystem/include/JSystem/JStage/JSGFog.h similarity index 96% rename from include/JSystem/JStage/JSGFog.h rename to libs/JSystem/include/JSystem/JStage/JSGFog.h index 1109da9a17..342b7049a1 100644 --- a/include/JSystem/JStage/JSGFog.h +++ b/libs/JSystem/include/JSystem/JStage/JSGFog.h @@ -2,7 +2,7 @@ #define JSGFOG_H #include "JSystem/JStage/JSGObject.h" -#include +#include namespace JStage { diff --git a/include/JSystem/JStage/JSGLight.h b/libs/JSystem/include/JSystem/JStage/JSGLight.h similarity index 97% rename from include/JSystem/JStage/JSGLight.h rename to libs/JSystem/include/JSystem/JStage/JSGLight.h index 3400f806d5..f1f274771c 100644 --- a/include/JSystem/JStage/JSGLight.h +++ b/libs/JSystem/include/JSystem/JStage/JSGLight.h @@ -2,7 +2,7 @@ #define JSGLIGHT_H #include "JSystem/JStage/JSGObject.h" -#include +#include namespace JStage { enum TELight { diff --git a/include/JSystem/JStage/JSGObject.h b/libs/JSystem/include/JSystem/JStage/JSGObject.h similarity index 97% rename from include/JSystem/JStage/JSGObject.h rename to libs/JSystem/include/JSystem/JStage/JSGObject.h index cdf1849a48..2080fbe439 100644 --- a/include/JSystem/JStage/JSGObject.h +++ b/libs/JSystem/include/JSystem/JStage/JSGObject.h @@ -1,7 +1,7 @@ #ifndef JSGOBJECT_H #define JSGOBJECT_H -#include +#include namespace JStage { /** diff --git a/include/JSystem/JStage/JSGSystem.h b/libs/JSystem/include/JSystem/JStage/JSGSystem.h similarity index 100% rename from include/JSystem/JStage/JSGSystem.h rename to libs/JSystem/include/JSystem/JStage/JSGSystem.h diff --git a/include/JSystem/JStudio/JStudio/ctb-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/ctb-data.h similarity index 100% rename from include/JSystem/JStudio/JStudio/ctb-data.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/ctb-data.h diff --git a/include/JSystem/JStudio/JStudio/ctb.h b/libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h similarity index 95% rename from include/JSystem/JStudio/JStudio/ctb.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h index fb1312b870..1d5b2f5751 100644 --- a/include/JSystem/JStudio/JStudio/ctb.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/ctb.h @@ -20,8 +20,12 @@ struct TObject : public object::TObject_ID { /* 0x08 vtable */ /* 0x0C */ JGadget::TLinkListNode ocObject_; /* 0x14 */ const void* pData_; + + static const int NodeOffset; }; +inline const int TObject::NodeOffset = -(int)offsetof(TObject, ocObject_); + struct data { struct THeaderData { u32 signature; @@ -137,7 +141,7 @@ struct TControl { void setFactory(TFactory* factory) { pFactory_ = factory; } /* 0x4 */ TFactory* pFactory_; - /* 0x8 */ JGadget::TLinkList ocObject_; + /* 0x8 */ JGadget::TLinkList ocObject_; }; struct TParse : public JGadget::binary::TParse_header_block { diff --git a/include/JSystem/JStudio/JStudio/functionvalue.h b/libs/JSystem/include/JSystem/JStudio/JStudio/functionvalue.h similarity index 100% rename from include/JSystem/JStudio/JStudio/functionvalue.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/functionvalue.h diff --git a/include/JSystem/JStudio/JStudio/fvb-data-parse.h b/libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data-parse.h similarity index 100% rename from include/JSystem/JStudio/JStudio/fvb-data-parse.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data-parse.h diff --git a/include/JSystem/JStudio/JStudio/fvb-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data.h similarity index 100% rename from include/JSystem/JStudio/JStudio/fvb-data.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/fvb-data.h diff --git a/include/JSystem/JStudio/JStudio/fvb.h b/libs/JSystem/include/JSystem/JStudio/JStudio/fvb.h similarity index 95% rename from include/JSystem/JStudio/JStudio/fvb.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/fvb.h index 8c9aa30d8a..fad21e5021 100644 --- a/include/JSystem/JStudio/JStudio/fvb.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/fvb.h @@ -41,11 +41,15 @@ public: TFunctionValue* const referFunctionValue() { return pfv_; } + static const int NodeOffset; + protected: /* 0x0C */ JGadget::TLinkListNode mNode; /* 0x14 */ TFunctionValue* pfv_; }; +inline const int TObject::NodeOffset = -(int)offsetof(TObject, mNode); + class TFactory { public: TFactory() {} @@ -72,7 +76,7 @@ public: private: /* 0x4 */ TFactory* pFactory; - /* 0x8 */ JGadget::TLinkList ocObject_; + /* 0x8 */ JGadget::TLinkList ocObject_; }; // Size: 0x14 class TObject_composite : public TObject { diff --git a/include/JSystem/JStudio/JStudio/jstudio-control.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-control.h similarity index 97% rename from include/JSystem/JStudio/JStudio/jstudio-control.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-control.h index 3dd1bdb285..37622dfd1e 100644 --- a/include/JSystem/JStudio/JStudio/jstudio-control.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-control.h @@ -4,8 +4,8 @@ #include "JSystem/JStudio/JStudio/fvb.h" #include "JSystem/JStudio/JStudio/stb.h" #include "JSystem/JStudio/JStudio/ctb.h" -#include -#include +#include +#include namespace JStudio { struct TObject; @@ -25,8 +25,12 @@ struct TCreateObject { } /* 0x4 */ JGadget::TLinkListNode mNode; + + static const int NodeOffset; }; // Size: 0xC +inline const int TCreateObject::NodeOffset = -(int)offsetof(TCreateObject, mNode); + struct TFactory : public stb::TFactory { TFactory() {} @@ -35,7 +39,7 @@ struct TFactory : public stb::TFactory { void appendCreateObject(JStudio::TCreateObject*); - /* 0x04 */ JGadget::TLinkList mList; + /* 0x04 */ JGadget::TLinkList mList; /* 0x10 */ fvb::TFactory fvb_Factory; /* 0x14 */ ctb::TFactory ctb_Factory; }; diff --git a/include/JSystem/JStudio/JStudio/jstudio-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-data.h similarity index 100% rename from include/JSystem/JStudio/JStudio/jstudio-data.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-data.h diff --git a/include/JSystem/JStudio/JStudio/jstudio-math.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h similarity index 98% rename from include/JSystem/JStudio/JStudio/jstudio-math.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h index 0c09c680bd..a23eed44e9 100644 --- a/include/JSystem/JStudio/JStudio/jstudio-math.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-math.h @@ -1,7 +1,7 @@ #ifndef JSTUDIO_MATH_H #define JSTUDIO_MATH_H -#include +#include #include #define m_PI_D 3.141592653589793 diff --git a/include/JSystem/JStudio/JStudio/jstudio-object.h b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h similarity index 99% rename from include/JSystem/JStudio/JStudio/jstudio-object.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h index 9f743d6360..72e24770bb 100644 --- a/include/JSystem/JStudio/JStudio/jstudio-object.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/jstudio-object.h @@ -6,8 +6,6 @@ #include #include -typedef struct _GXColor GXColor; - namespace JStudio { namespace data { enum TEOperationData { diff --git a/include/JSystem/JStudio/JStudio/object-id.h b/libs/JSystem/include/JSystem/JStudio/JStudio/object-id.h similarity index 97% rename from include/JSystem/JStudio/JStudio/object-id.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/object-id.h index 9aaebe9039..23ef72c952 100644 --- a/include/JSystem/JStudio/JStudio/object-id.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/object-id.h @@ -1,7 +1,7 @@ #ifndef OBJECT_ID_H #define OBJECT_ID_H -#include +#include namespace JStudio { namespace object { diff --git a/include/JSystem/JStudio/JStudio/stb-data-parse.h b/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data-parse.h similarity index 100% rename from include/JSystem/JStudio/JStudio/stb-data-parse.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/stb-data-parse.h diff --git a/include/JSystem/JStudio/JStudio/stb-data.h b/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h similarity index 98% rename from include/JSystem/JStudio/JStudio/stb-data.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h index 2cd1a29804..f66cd5f6f6 100644 --- a/include/JSystem/JStudio/JStudio/stb-data.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/stb-data.h @@ -1,7 +1,7 @@ #ifndef STB_DATA_H #define STB_DATA_H -#include +#include namespace JStudio { namespace stb { diff --git a/include/JSystem/JStudio/JStudio/stb.h b/libs/JSystem/include/JSystem/JStudio/JStudio/stb.h similarity index 97% rename from include/JSystem/JStudio/JStudio/stb.h rename to libs/JSystem/include/JSystem/JStudio/JStudio/stb.h index b17bb57a8c..dfb489c8ec 100644 --- a/include/JSystem/JStudio/JStudio/stb.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudio/stb.h @@ -4,7 +4,7 @@ #include "JSystem/JGadget/linklist.h" #include "JSystem/JStudio/JStudio/object-id.h" #include "JSystem/JStudio/JStudio/stb-data-parse.h" -#include +#include #include namespace JStudio { @@ -119,8 +119,12 @@ public: // private: // public for the fakematch in JStudio_JStage::TAdaptor_acto /* 0x28 */ const void* pSequence_next; /* 0x2C */ u32 u32Wait_; /* 0x30 */ TEStatus mStatus; + + static const int NodeOffset; }; +inline const int TObject::NodeOffset = -(int)offsetof(TObject, ocObject_); + class TFactory { public: TFactory() {} @@ -164,7 +168,7 @@ private: /* 0x04 */ u32 _4; /* 0x08 */ u32 _8; /* 0x0C */ TFactory* pFactory; - /* 0x10 */ JGadget::TLinkList ocObject_; + /* 0x10 */ JGadget::TLinkList ocObject_; /* 0x1C */ u32 mStatus; /* 0x20 */ TObject_control mObject_control; /* 0x54 */ s32 _54; diff --git a/include/JSystem/JStudio/JStudioCameraEditor/control.h b/libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/control.h similarity index 98% rename from include/JSystem/JStudio/JStudioCameraEditor/control.h rename to libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/control.h index 4feda48915..1891f5fe8a 100644 --- a/include/JSystem/JStudio/JStudioCameraEditor/control.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/control.h @@ -18,10 +18,10 @@ namespace JStudioCameraEditor { struct TControl : public JORReflexible, public JOREventCallbackListNode { struct TSWValueWidth_ { - TSWValueWidth_(uint, uint); + TSWValueWidth_(u32, u32); - /* 0x0 */ uint field_0x0; - /* 0x4 */ uint field_0x4; + /* 0x0 */ u32 field_0x0; + /* 0x4 */ u32 field_0x4; }; struct TOptionSet_ : public csb::TValueSet { diff --git a/include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h b/libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h similarity index 100% rename from include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h rename to libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h diff --git a/include/JSystem/JStudio/JStudioCameraEditor/csb.h b/libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/csb.h similarity index 97% rename from include/JSystem/JStudio/JStudioCameraEditor/csb.h rename to libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/csb.h index de1a42421c..5e6e5bcb62 100644 --- a/include/JSystem/JStudio/JStudioCameraEditor/csb.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/csb.h @@ -1,7 +1,7 @@ #ifndef JSTUDIOCAMERAEDITOR_CSB_H #define JSTUDIOCAMERAEDITOR_CSB_H -#include +#include #include "JSystem/JGadget/linklist.h" #include "JSystem/JGadget/std-vector.h" #include "JSystem/JStudio/JStudio/functionvalue.h" @@ -31,7 +31,7 @@ namespace JStudioCameraEditor { void getVector_position_relativeTargetPosition(Vec*) const; void setVector_targetPosition_relativePosition(const Vec&); void addValue(data::TEValue, f32); - void set(const TValueSet&, uint); + void set(const TValueSet&, u32); bool isApplied(data::TEValue) const; /* 0x00 */ f32 fValue_[8]; diff --git a/include/JSystem/JStudio/JStudioCameraEditor/sequence.h b/libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/sequence.h similarity index 100% rename from include/JSystem/JStudio/JStudioCameraEditor/sequence.h rename to libs/JSystem/include/JSystem/JStudio/JStudioCameraEditor/sequence.h diff --git a/include/JSystem/JStudio/JStudioToolLibrary/anchor.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/anchor.h similarity index 100% rename from include/JSystem/JStudio/JStudioToolLibrary/anchor.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/anchor.h diff --git a/include/JSystem/JStudio/JStudioToolLibrary/console.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/console.h similarity index 88% rename from include/JSystem/JStudio/JStudioToolLibrary/console.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/console.h index cddd9a77e7..b2ed9d6c7c 100644 --- a/include/JSystem/JStudio/JStudioToolLibrary/console.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/console.h @@ -22,24 +22,24 @@ namespace JStudioToolLibrary { void control_enable(u32, bool); void control_setStyle(u32, u32); void control_generateRadioButton(JORMContext*, u32, const char*, const char*, int); - void control_generateSelectList(JORMContext*, u32, const char*, uint, const char*, int); + void control_generateSelectList(JORMContext*, u32, const char*, u32, const char*, int); void control_generateLabel(JORMContext*, u32, const char*); void control_getRadioButton(const JORValPrpEvent*); void control_isCheckBox(const JORValPrpEvent*); void control_getSelectList(const JORValPrpEvent*); void control_generateEditBox_float(JORMContext*, u32, const char*, const f32&); - void control_generateEditBox_uint(JORMContext*, u32, const char*, const uint&); + void control_generateEditBox_uint(JORMContext*, u32, const char*, const u32&); void control_generateTitle(JORMContext*, const char*) const; void control_generateSeparator(JORMContext*, const char*); void control_setCheckBox(u32, bool); void control_generateRadioButton_style(JORMContext*, u32, u32, const char*, const char**, int); void control_setRadioButton(u32, int); - void control_generateSelectList_style(JORMContext*, u32, u32, const char*, uint, const char**, int); + void control_generateSelectList_style(JORMContext*, u32, u32, const char*, u32, const char**, int); void control_setSelectList(u32, int); void control_generateLabel_style(JORMContext*, u32, u32, const char*); void control_generateEditBox_style(JORMContext*, u32, u32, const char*, const char*); void control_generateEditBox_style_int(JORMContext*, u32, u32, const char*, const int&); - void control_generateEditBox_style_uint(JORMContext*, u32, u32, const char*, const uint&); + void control_generateEditBox_style_uint(JORMContext*, u32, u32, const char*, const u32&); void control_generateEditBox_style_float(JORMContext*, u32, u32, const char*, const f32&); void control_generateEditBox_style_RGBA(JORMContext*, u32, u32, const char*, JUtility::TColor); void control_generateEditBox_int(JORMContext*, u32, const char*, const int&); @@ -47,11 +47,11 @@ namespace JStudioToolLibrary { void control_setEditBox_f(u32, const char*, ...); void control_setEditBox_f_va(u32, const char*, va_list); void control_setEditBox_int(u32, const int&); - void control_setEditBox_uint(u32, const uint&); + void control_setEditBox_uint(u32, const u32&); void control_setEditBox_float(u32, const f32&); void control_setEditBox_RGBA(u32, const JUtility::TColor&); void control_replyEditBox_int(const JORStrValPrpEvent*, int*); - void control_replyEditBox_uint(const JORStrValPrpEvent*, uint*); + void control_replyEditBox_uint(const JORStrValPrpEvent*, u32*); void control_replyEditBox_float(const JORStrValPrpEvent*, f32*); void control_replyEditBox_float_not(const JORStrValPrpEvent*, f32*, const f32&); void control_replyEditBox_float_greaterEqual(const JORStrValPrpEvent*, f32*, const f32&); @@ -59,23 +59,23 @@ namespace JStudioToolLibrary { void control_forceEditBox(u32, const char*, const char*); void control_replyEditBox_float_range(const JORStrValPrpEvent*, f32*, const f32&, const f32&); - void control_replyEditBox_uint_range(const JORStrValPrpEvent*, uint*, const uint&, const uint&); + void control_replyEditBox_uint_range(const JORStrValPrpEvent*, u32*, const u32&, const u32&); bool parseValue_int(const char*, int*); - bool parseValue_uint(const char*, uint*); + bool parseValue_uint(const char*, u32*); bool parseValue_float(const char*, f32*); bool parseValue_double(const char*, double*); bool parseValue_RGBA(const char*, JUtility::TColor*); bool parseValueList_float(const char*, char, f32*, f32*); - int openMessageBox(uint, const char*); - int openMessageBox_f(uint, const char*, ...); - int openMessageBox_f_va(uint, const char*, va_list); + int openMessageBox(u32, const char*); + int openMessageBox_f(u32, const char*, ...); + int openMessageBox_f_va(u32, const char*, va_list); bool openBrowser(const char*); void toValue_style_(u32); void getValueString_int(char*, u32, int); - void getValueString_uint(char*, u32, uint); + void getValueString_uint(char*, u32, u32); void getValueString_float(char*, u32, f32); void getValueString_RGBA(char*, u32, const JUtility::TColor&); diff --git a/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h similarity index 98% rename from include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h index f83a388481..0828396329 100644 --- a/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h @@ -14,7 +14,7 @@ namespace JStudioToolLibrary { enum TEPreview {}; - TControlSet_preview(TConsole*, u32, uint, TAdaptor*); + TControlSet_preview(TConsole*, u32, u32, TAdaptor*); void preview_start(); void preview_stop(); diff --git a/include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h similarity index 100% rename from include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h diff --git a/include/JSystem/JStudio/JStudioToolLibrary/controlset.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset.h similarity index 100% rename from include/JSystem/JStudio/JStudioToolLibrary/controlset.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/controlset.h diff --git a/include/JSystem/JStudio/JStudioToolLibrary/interface.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/interface.h similarity index 100% rename from include/JSystem/JStudio/JStudioToolLibrary/interface.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/interface.h diff --git a/include/JSystem/JStudio/JStudioToolLibrary/scroll.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/scroll.h similarity index 100% rename from include/JSystem/JStudio/JStudioToolLibrary/scroll.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/scroll.h diff --git a/include/JSystem/JStudio/JStudioToolLibrary/visual.h b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/visual.h similarity index 96% rename from include/JSystem/JStudio/JStudioToolLibrary/visual.h rename to libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/visual.h index 438f71592c..98e0e77d7a 100644 --- a/include/JSystem/JStudio/JStudioToolLibrary/visual.h +++ b/libs/JSystem/include/JSystem/JStudio/JStudioToolLibrary/visual.h @@ -62,11 +62,11 @@ namespace JStudioToolLibrary { void drawAxis_color(); void setGXState_position1x8_color1x8(); void drawAxis_color_arrow(); - void drawGrid_xyz(uint); + void drawGrid_xyz(u32); void setGXState_position3s16(); - void drawGrid_xy(uint); - void drawGrid_xz(uint); - void drawGrid_yz(uint); + void drawGrid_xy(u32); + void drawGrid_xz(u32); + void drawGrid_yz(u32); /* 0x0 */ f32 fLineWidth_; /* 0x4 */ GXColor oColor_; diff --git a/include/JSystem/JStudio/JStudio_JAudio2/control.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/control.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JAudio2/control.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/control.h diff --git a/include/JSystem/JStudio/JStudio_JAudio2/object-sound.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/object-sound.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JAudio2/object-sound.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JAudio2/object-sound.h diff --git a/include/JSystem/JStudio/JStudio_JParticle/control.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JParticle/control.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JParticle/control.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JParticle/control.h diff --git a/include/JSystem/JStudio/JStudio_JParticle/object-particle.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JParticle/object-particle.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JParticle/object-particle.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JParticle/object-particle.h diff --git a/include/JSystem/JStudio/JStudio_JPreviewer/control.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JPreviewer/control.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JPreviewer/control.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JPreviewer/control.h diff --git a/include/JSystem/JStudio/JStudio_JStage/control.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/control.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/control.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/control.h diff --git a/include/JSystem/JStudio/JStudio_JStage/object-actor.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-actor.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/object-actor.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-actor.h diff --git a/include/JSystem/JStudio/JStudio_JStage/object-ambientlight.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-ambientlight.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/object-ambientlight.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-ambientlight.h diff --git a/include/JSystem/JStudio/JStudio_JStage/object-camera.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-camera.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/object-camera.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-camera.h diff --git a/include/JSystem/JStudio/JStudio_JStage/object-fog.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-fog.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/object-fog.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-fog.h diff --git a/include/JSystem/JStudio/JStudio_JStage/object-light.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-light.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/object-light.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object-light.h diff --git a/include/JSystem/JStudio/JStudio_JStage/object.h b/libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object.h similarity index 100% rename from include/JSystem/JStudio/JStudio_JStage/object.h rename to libs/JSystem/include/JSystem/JStudio/JStudio_JStage/object.h diff --git a/include/JSystem/JSupport/JSUFileStream.h b/libs/JSystem/include/JSystem/JSupport/JSUFileStream.h similarity index 100% rename from include/JSystem/JSupport/JSUFileStream.h rename to libs/JSystem/include/JSystem/JSupport/JSUFileStream.h diff --git a/include/JSystem/JSupport/JSUInputStream.h b/libs/JSystem/include/JSystem/JSupport/JSUInputStream.h similarity index 86% rename from include/JSystem/JSupport/JSUInputStream.h rename to libs/JSystem/include/JSystem/JSupport/JSUInputStream.h index afde440837..a1957a22ad 100644 --- a/include/JSystem/JSupport/JSUInputStream.h +++ b/libs/JSystem/include/JSystem/JSupport/JSUInputStream.h @@ -2,6 +2,7 @@ #define JSUINPUTSTREAM_H #include "JSystem/JSupport/JSUIosBase.h" +#include "dusk/endian.h" /** * @ingroup jsystem-jsupport @@ -17,31 +18,31 @@ public: /* vt[5] */ virtual u32 readData(void*, s32) = 0; u32 readU32() { - u32 val; + BE val; this->read(&val, sizeof(val)); return val; } u32 read32b() { - u32 val; + BE val; this->read(&val, sizeof(val)); return val; } s32 readS32() { - s32 val; + BE val; this->read(&val, sizeof(val)); return val; } s16 readS16() { - s16 val; + BE val; this->read(&val, sizeof(val)); return val; } u16 readU16() { - u16 val; + BE val; this->read(&val, sizeof(val)); return val; } @@ -59,18 +60,20 @@ public: } u16 read16b() { - u16 val; + BE val; this->read(&val, sizeof(val)); return val; } JSUInputStream& operator>>(u32& dest) { read(&dest, 4); + be_swap(dest); return *this; } JSUInputStream& operator>>(u16& dest) { read(&dest, 2); + be_swap(dest); return *this; } @@ -81,6 +84,7 @@ public: JSUInputStream& operator>>(s16& dest) { read(&dest, 2); + be_swap(dest); return *this; } @@ -98,7 +102,9 @@ public: } s32 read(u32& param_0) { - return read(¶m_0, 4); + auto ret = read(¶m_0, 4); + be_swap(param_0); + return ret; } // TODO: return value probably wrong diff --git a/include/JSystem/JSupport/JSUIosBase.h b/libs/JSystem/include/JSystem/JSupport/JSUIosBase.h similarity index 95% rename from include/JSystem/JSupport/JSUIosBase.h rename to libs/JSystem/include/JSystem/JSupport/JSUIosBase.h index 64ad4dba05..395ce57745 100644 --- a/include/JSystem/JSupport/JSUIosBase.h +++ b/libs/JSystem/include/JSystem/JSupport/JSUIosBase.h @@ -1,7 +1,7 @@ #ifndef JSUIOSBASE_H_ #define JSUIOSBASE_H_ -#include +#include enum JSUStreamSeekFrom { JSUStreamSeekFrom_SET = 0, // absolute diff --git a/include/JSystem/JSupport/JSUList.h b/libs/JSystem/include/JSystem/JSupport/JSUList.h similarity index 99% rename from include/JSystem/JSupport/JSUList.h rename to libs/JSystem/include/JSystem/JSupport/JSUList.h index 30a28b57cf..3021a3a879 100644 --- a/include/JSystem/JSupport/JSUList.h +++ b/libs/JSystem/include/JSystem/JSupport/JSUList.h @@ -1,7 +1,7 @@ #ifndef JSULIST_H #define JSULIST_H -#include +#include template class JSUList; diff --git a/include/JSystem/JSupport/JSUMemoryStream.h b/libs/JSystem/include/JSystem/JSupport/JSUMemoryStream.h similarity index 100% rename from include/JSystem/JSupport/JSUMemoryStream.h rename to libs/JSystem/include/JSystem/JSupport/JSUMemoryStream.h diff --git a/include/JSystem/JSupport/JSUOutputStream.h b/libs/JSystem/include/JSystem/JSupport/JSUOutputStream.h similarity index 100% rename from include/JSystem/JSupport/JSUOutputStream.h rename to libs/JSystem/include/JSystem/JSupport/JSUOutputStream.h diff --git a/include/JSystem/JSupport/JSURandomInputStream.h b/libs/JSystem/include/JSystem/JSupport/JSURandomInputStream.h similarity index 100% rename from include/JSystem/JSupport/JSURandomInputStream.h rename to libs/JSystem/include/JSystem/JSupport/JSURandomInputStream.h diff --git a/include/JSystem/JSupport/JSURandomOutputStream.h b/libs/JSystem/include/JSystem/JSupport/JSURandomOutputStream.h similarity index 100% rename from include/JSystem/JSupport/JSURandomOutputStream.h rename to libs/JSystem/include/JSystem/JSupport/JSURandomOutputStream.h diff --git a/include/JSystem/JSupport/JSupport.h b/libs/JSystem/include/JSystem/JSupport/JSupport.h similarity index 91% rename from include/JSystem/JSupport/JSupport.h rename to libs/JSystem/include/JSystem/JSupport/JSupport.h index c982af6103..a9caccef08 100644 --- a/include/JSystem/JSupport/JSupport.h +++ b/libs/JSystem/include/JSystem/JSupport/JSupport.h @@ -1,7 +1,11 @@ #ifndef JSUPPORT_H #define JSUPPORT_H -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #include /** diff --git a/include/JSystem/JSystem.h b/libs/JSystem/include/JSystem/JSystem.h similarity index 90% rename from include/JSystem/JSystem.h rename to libs/JSystem/include/JSystem/JSystem.h index 2b2f1143d0..7b50fbc78f 100644 --- a/include/JSystem/JSystem.h +++ b/libs/JSystem/include/JSystem/JSystem.h @@ -7,4 +7,6 @@ #include "JSystem/JSystem.pch" // IWYU pragma: export #endif +#include "os_report.h" + #endif // JSYSTEM_H diff --git a/include/JSystem/JSystem.pch b/libs/JSystem/include/JSystem/JSystem.pch similarity index 100% rename from include/JSystem/JSystem.pch rename to libs/JSystem/include/JSystem/JSystem.pch diff --git a/include/JSystem/JUtility/JUTAssert.h b/libs/JSystem/include/JSystem/JUtility/JUTAssert.h similarity index 99% rename from include/JSystem/JUtility/JUTAssert.h rename to libs/JSystem/include/JSystem/JUtility/JUTAssert.h index 03306a8f8a..5ace3218bb 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTAssert.h @@ -1,7 +1,7 @@ #ifndef JUTASSERT_H #define JUTASSERT_H -#include +#include #if DEBUG #if __MWERKS__ diff --git a/include/JSystem/JUtility/JUTCacheFont.h b/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h similarity index 98% rename from include/JSystem/JUtility/JUTCacheFont.h rename to libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h index 8698901afb..9d09e3419f 100644 --- a/include/JSystem/JUtility/JUTCacheFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTCacheFont.h @@ -55,7 +55,7 @@ public: void prepend(JUTCacheFont::TGlyphCacheInfo*); virtual ~JUTCacheFont(); - virtual void loadImage(int, _GXTexMapID); + virtual void loadImage(int, GXTexMapID); virtual void setBlock(); void setPagingType(EPagingType type) { mPagingType = type; } diff --git a/include/JSystem/JUtility/JUTConsole.h b/libs/JSystem/include/JSystem/JUtility/JUTConsole.h similarity index 100% rename from include/JSystem/JUtility/JUTConsole.h rename to libs/JSystem/include/JSystem/JUtility/JUTConsole.h diff --git a/include/JSystem/JUtility/JUTDbPrint.h b/libs/JSystem/include/JSystem/JUtility/JUTDbPrint.h similarity index 100% rename from include/JSystem/JUtility/JUTDbPrint.h rename to libs/JSystem/include/JSystem/JUtility/JUTDbPrint.h diff --git a/include/JSystem/JUtility/JUTDirectFile.h b/libs/JSystem/include/JSystem/JUtility/JUTDirectFile.h similarity index 95% rename from include/JSystem/JUtility/JUTDirectFile.h rename to libs/JSystem/include/JSystem/JUtility/JUTDirectFile.h index caebf09dd1..f6b14fad3f 100644 --- a/include/JSystem/JUtility/JUTDirectFile.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTDirectFile.h @@ -1,7 +1,7 @@ #ifndef JUTDIRECTFILE_H #define JUTDIRECTFILE_H -#include +#include #define JUTDF_BUFSIZE (0x800) diff --git a/include/JSystem/JUtility/JUTDirectPrint.h b/libs/JSystem/include/JSystem/JUtility/JUTDirectPrint.h similarity index 100% rename from include/JSystem/JUtility/JUTDirectPrint.h rename to libs/JSystem/include/JSystem/JUtility/JUTDirectPrint.h diff --git a/include/JSystem/JUtility/JUTException.h b/libs/JSystem/include/JSystem/JUtility/JUTException.h similarity index 95% rename from include/JSystem/JUtility/JUTException.h rename to libs/JSystem/include/JSystem/JUtility/JUTException.h index 522551dd63..698a02ed44 100644 --- a/include/JSystem/JUtility/JUTException.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTException.h @@ -4,11 +4,10 @@ #include "JSystem/JKernel/JKRThread.h" #include "JSystem/JUtility/JUTGamePad.h" #include -#include -#include +#include +#include #include "global.h" -typedef struct _GXRenderModeObj GXRenderModeObj; typedef struct OSContext OSContext; class JUTDirectPrint; @@ -18,10 +17,10 @@ class JUTDirectPrint; */ class JUTExternalFB { public: - JUTExternalFB(_GXRenderModeObj*, GXGamma, void*, u32); + JUTExternalFB(GXRenderModeObj*, GXGamma, void*, u32); private: - /* 0x00 */ _GXRenderModeObj* mRenderMode; + /* 0x00 */ GXRenderModeObj* mRenderMode; /* 0x04 */ u32 mSize; /* 0x08 */ u32 field_0x08; /* 0x0C */ u16 field_0x0C; diff --git a/include/JSystem/JUtility/JUTFader.h b/libs/JSystem/include/JSystem/JUtility/JUTFader.h similarity index 100% rename from include/JSystem/JUtility/JUTFader.h rename to libs/JSystem/include/JSystem/JUtility/JUTFader.h diff --git a/include/JSystem/JUtility/JUTFont.h b/libs/JSystem/include/JSystem/JUtility/JUTFont.h similarity index 100% rename from include/JSystem/JUtility/JUTFont.h rename to libs/JSystem/include/JSystem/JUtility/JUTFont.h diff --git a/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h b/libs/JSystem/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h similarity index 80% rename from include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h rename to libs/JSystem/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h index da5d500653..d26d0287dd 100644 --- a/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h @@ -1,6 +1,6 @@ #ifndef JUTFONTDATA_ASCFONT_FIX12_H #define JUTFONTDATA_ASCFONT_FIX12_H -#include +#include #endif /* JUTFONTDATA_ASCFONT_FIX12_H */ diff --git a/include/JSystem/JUtility/JUTGamePad.h b/libs/JSystem/include/JSystem/JUtility/JUTGamePad.h similarity index 99% rename from include/JSystem/JUtility/JUTGamePad.h rename to libs/JSystem/include/JSystem/JUtility/JUTGamePad.h index 919ad23877..bf939f0831 100644 --- a/include/JSystem/JUtility/JUTGamePad.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTGamePad.h @@ -3,7 +3,11 @@ #include "JSystem/JKernel/JKRDisposer.h" #include "JSystem/JUtility/JUTAssert.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif typedef void (*callbackFn)(int, void*); diff --git a/include/JSystem/JUtility/JUTGraphFifo.h b/libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h similarity index 97% rename from include/JSystem/JUtility/JUTGraphFifo.h rename to libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h index 97ae67541e..1680d00178 100644 --- a/include/JSystem/JUtility/JUTGraphFifo.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTGraphFifo.h @@ -1,7 +1,7 @@ #ifndef JUTGRAPHFIFO_H #define JUTGRAPHFIFO_H -#include +#include /** * @ingroup jsystem-jutility diff --git a/include/JSystem/JUtility/JUTNameTab.h b/libs/JSystem/include/JSystem/JUtility/JUTNameTab.h similarity index 85% rename from include/JSystem/JUtility/JUTNameTab.h rename to libs/JSystem/include/JSystem/JUtility/JUTNameTab.h index 0aa772a40d..6affae8ecb 100644 --- a/include/JSystem/JUtility/JUTNameTab.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTNameTab.h @@ -1,18 +1,19 @@ #ifndef JUTNAMETAB_H #define JUTNAMETAB_H -#include +#include +#include "dusk/endian.h" /** * @ingroup jsystem-jutility * */ struct ResNTAB { - u16 mEntryNum; - u16 mPad0; + BE(u16) mEntryNum; + BE(u16) mPad0; struct Entry { - u16 mKeyCode; - u16 mOffs; + BE(u16) mKeyCode; + BE(u16) mOffs; } mEntries[1]; inline const char* getName(u32 index) const { diff --git a/include/JSystem/JUtility/JUTPalette.h b/libs/JSystem/include/JSystem/JUtility/JUTPalette.h similarity index 98% rename from include/JSystem/JUtility/JUTPalette.h rename to libs/JSystem/include/JSystem/JUtility/JUTPalette.h index 95de8a995a..017d511d50 100644 --- a/include/JSystem/JUtility/JUTPalette.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTPalette.h @@ -1,7 +1,7 @@ #ifndef JUTPALETTE_H #define JUTPALETTE_H -#include +#include #include "dusk/endian.h" diff --git a/include/JSystem/JUtility/JUTProcBar.h b/libs/JSystem/include/JSystem/JUtility/JUTProcBar.h similarity index 99% rename from include/JSystem/JUtility/JUTProcBar.h rename to libs/JSystem/include/JSystem/JUtility/JUTProcBar.h index ac9811f8fd..c491641218 100644 --- a/include/JSystem/JUtility/JUTProcBar.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTProcBar.h @@ -2,7 +2,7 @@ #define JUTPROCBAR_H #include "JSystem/JUtility/TColor.h" -#include +#include class JKRHeap; diff --git a/include/JSystem/JUtility/JUTReport.h b/libs/JSystem/include/JSystem/JUtility/JUTReport.h similarity index 100% rename from include/JSystem/JUtility/JUTReport.h rename to libs/JSystem/include/JSystem/JUtility/JUTReport.h diff --git a/include/JSystem/JUtility/JUTResFont.h b/libs/JSystem/include/JSystem/JUtility/JUTResFont.h similarity index 95% rename from include/JSystem/JUtility/JUTResFont.h rename to libs/JSystem/include/JSystem/JUtility/JUTResFont.h index 7b6ec796da..65973b89ad 100644 --- a/include/JSystem/JUtility/JUTResFont.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTResFont.h @@ -38,7 +38,7 @@ public: virtual int getFontType() const; virtual ResFONT* getResFont() const; virtual bool isLeadByte(int) const; - virtual void loadImage(int, _GXTexMapID); + virtual void loadImage(int, GXTexMapID); virtual void setBlock(); JUTResFont(ResFONT const*, JKRHeap*); @@ -48,7 +48,7 @@ public: bool initiate(ResFONT const*, JKRHeap*); bool protected_initiate(ResFONT const*, JKRHeap*); void countBlock(); - void loadFont(int, _GXTexMapID, JUTFont::TWidth*); + void loadFont(int, GXTexMapID, JUTFont::TWidth*); int getFontCode(int) const; int convertSjis(int, BE(u16)*) const; diff --git a/include/JSystem/JUtility/JUTResource.h b/libs/JSystem/include/JSystem/JUtility/JUTResource.h similarity index 96% rename from include/JSystem/JUtility/JUTResource.h rename to libs/JSystem/include/JSystem/JUtility/JUTResource.h index 4a4b8e6c8c..f54dd8b1bb 100644 --- a/include/JSystem/JUtility/JUTResource.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTResource.h @@ -1,7 +1,7 @@ #ifndef JUTRESOURCE_H #define JUTRESOURCE_H -#include +#include class JKRArchive; class JSUInputStream; diff --git a/include/JSystem/JUtility/JUTTexture.h b/libs/JSystem/include/JSystem/JUtility/JUTTexture.h similarity index 90% rename from include/JSystem/JUtility/JUTTexture.h rename to libs/JSystem/include/JSystem/JUtility/JUTTexture.h index 370129fcc8..fbda4296e5 100644 --- a/include/JSystem/JUtility/JUTTexture.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTTexture.h @@ -1,7 +1,7 @@ #ifndef JUTTEXTURE_H #define JUTTEXTURE_H -#include +#include #include #include "dusk/endian.h" @@ -19,14 +19,14 @@ class JUTPalette; struct ResTIMG { /* 0x00 */ u8 format; /* 0x01 */ u8 alphaEnabled; - /* 0x02 */ u16 width; - /* 0x04 */ u16 height; + /* 0x02 */ BE(u16) width; + /* 0x04 */ BE(u16) height; /* 0x06 */ u8 wrapS; /* 0x07 */ u8 wrapT; /* 0x08 */ u8 indexTexture; /* 0x09 */ u8 colorFormat; - /* 0x0A */ u16 numColors; - /* 0x0C */ u32 paletteOffset; + /* 0x0A */ BE(u16) numColors; + /* 0x0C */ BE(u32) paletteOffset; /* 0x10 */ u8 mipmapEnabled; /* 0x11 */ u8 doEdgeLOD; /* 0x12 */ u8 biasClamp; @@ -37,8 +37,8 @@ struct ResTIMG { /* 0x17 */ s8 maxLOD; /* 0x18 */ u8 mipmapCount; /* 0x19 */ u8 unknown; - /* 0x1A */ s16 LODBias; - /* 0x1C */ u32 imageOffset; + /* 0x1A */ BE(s16) LODBias; + /* 0x1C */ BE(u32) imageOffset; }; // Size: 0x20 /** @@ -72,8 +72,8 @@ public: const ResTIMG* getTexInfo() const { return mTexInfo; } s32 getFormat() const { return mTexInfo->format; } s32 getTransparency() const { return mTexInfo->alphaEnabled; } - s32 getWidth() const { return RES_U16(mTexInfo->width); } - s32 getHeight() const { return RES_U16(mTexInfo->height); } + s32 getWidth() const { return mTexInfo->width; } + s32 getHeight() const { return mTexInfo->height; } void setCaptureFlag(bool flag) { mFlags &= 2 | flag; } bool getCaptureFlag() const { return mFlags & 1; } bool getEmbPaletteDelFlag() const { return mFlags & 2; } diff --git a/include/JSystem/JUtility/JUTVideo.h b/libs/JSystem/include/JSystem/JUtility/JUTVideo.h similarity index 95% rename from include/JSystem/JUtility/JUTVideo.h rename to libs/JSystem/include/JSystem/JUtility/JUTVideo.h index 3c3eeeadaa..6a988b6337 100644 --- a/include/JSystem/JUtility/JUTVideo.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTVideo.h @@ -1,9 +1,9 @@ #ifndef JUTVIDEO_H #define JUTVIDEO_H -#include -#include -#include +#include +#include +#include typedef u8 (*Pattern)[2]; @@ -54,7 +54,7 @@ private: static OSTick sVideoInterval; private: - /* 0x04 */ _GXRenderModeObj* mRenderObj; + /* 0x04 */ GXRenderModeObj* mRenderObj; /* 0x08 */ u32 field_0x8; /* 0x0C */ u32 mRetraceCount; /* 0x10 */ u32 field_0x10; diff --git a/include/JSystem/JUtility/JUTXfb.h b/libs/JSystem/include/JSystem/JUtility/JUTXfb.h similarity index 94% rename from include/JSystem/JUtility/JUTXfb.h rename to libs/JSystem/include/JSystem/JUtility/JUTXfb.h index c4bf605b9c..acc48739fc 100644 --- a/include/JSystem/JUtility/JUTXfb.h +++ b/libs/JSystem/include/JSystem/JUtility/JUTXfb.h @@ -3,7 +3,6 @@ #include "JSystem/JUtility/JUTVideo.h" -typedef struct _GXRenderModeObj GXRenderModeObj; class JKRHeap; /** @@ -21,7 +20,7 @@ public: void clearIndex(); void common_init(int); - JUTXfb(_GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber); + JUTXfb(GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber); ~JUTXfb(); void delXfb(int); static JUTXfb* createManager(JKRHeap*, JUTXfb::EXfbNumber); diff --git a/include/JSystem/JUtility/TColor.h b/libs/JSystem/include/JSystem/JUtility/TColor.h similarity index 96% rename from include/JSystem/JUtility/TColor.h rename to libs/JSystem/include/JSystem/JUtility/TColor.h index 0f2a684289..fdeadec5d4 100644 --- a/include/JSystem/JUtility/TColor.h +++ b/libs/JSystem/include/JSystem/JUtility/TColor.h @@ -1,7 +1,7 @@ #ifndef TCOLOR_H #define TCOLOR_H -#include +#include namespace JUtility { diff --git a/include/JSystem/TPosition3.h b/libs/JSystem/include/JSystem/TPosition3.h similarity index 98% rename from include/JSystem/TPosition3.h rename to libs/JSystem/include/JSystem/TPosition3.h index 7a8094e45e..0e973c9c50 100644 --- a/include/JSystem/TPosition3.h +++ b/libs/JSystem/include/JSystem/TPosition3.h @@ -1,7 +1,7 @@ #ifndef TPOSITION3_H #define TPOSITION3_H -#include +#include #include "JSystem/JMath/JMath.h" #include "JSystem/JGeometry.h" diff --git a/src/JSystem/J2DGraph/J2DAnimation.cpp b/libs/JSystem/src/J2DGraph/J2DAnimation.cpp similarity index 98% rename from src/JSystem/J2DGraph/J2DAnimation.cpp rename to libs/JSystem/src/J2DGraph/J2DAnimation.cpp index 9a0405c4d9..92233d7af1 100644 --- a/src/JSystem/J2DGraph/J2DAnimation.cpp +++ b/libs/JSystem/src/J2DGraph/J2DAnimation.cpp @@ -6,7 +6,7 @@ #include "JSystem/J3DGraphBase/J3DTransform.h" #include "JSystem/JUtility/JUTPalette.h" #include "JSystem/JUtility/JUTResource.h" -#include +#include template f32 J2DGetKeyFrameInterpolation(f32 param_0, J3DAnmKeyTableBase* param_1, T* param_2) { @@ -264,7 +264,7 @@ void J2DAnmColor::searchUpdateMaterialID(J2DScreen* pScreen) { } } -void J2DAnmColorFull::getColor(u16 param_0, _GXColor* pColor) const { +void J2DAnmColorFull::getColor(u16 param_0, GXColor* pColor) const { J3D_PANIC(432, param_0 < mUpdateMaterialNum, "Error : range over."); J3D_PANIC(433, pColor, "Error : null pointer."); J3DAnmColorFullTable* info = &mInfoTable[param_0]; @@ -302,7 +302,7 @@ void J2DAnmColorFull::getColor(u16 param_0, _GXColor* pColor) const { } } -void J2DAnmColorKey::getColor(u16 param_0, _GXColor* pColor) const { +void J2DAnmColorKey::getColor(u16 param_0, GXColor* pColor) const { J3D_PANIC(490, param_0 < mUpdateMaterialNum, "Error : range over."); J3D_PANIC(491, pColor, "Error : null pointer."); J3DAnmColorKeyTable* info = &mInfoTable[param_0]; @@ -381,7 +381,7 @@ void J2DAnmColorKey::getColor(u16 param_0, _GXColor* pColor) const { } } -void J2DAnmVtxColorFull::getColor(u8 param_0, u16 param_1, _GXColor* pColor) const { +void J2DAnmVtxColorFull::getColor(u8 param_0, u16 param_1, GXColor* pColor) const { J3D_PANIC(597, pColor, "Error : null pointer."); J3DAnmColorFullTable* info = &mInfoTable[param_0][param_1]; u16 maxFrame = info->mRMaxFrame; @@ -418,7 +418,7 @@ void J2DAnmVtxColorFull::getColor(u8 param_0, u16 param_1, _GXColor* pColor) con } } -void J2DAnmVtxColorKey::getColor(u8 param_0, u16 param_1, _GXColor* pColor) const { +void J2DAnmVtxColorKey::getColor(u8 param_0, u16 param_1, GXColor* pColor) const { J3D_PANIC(658, pColor, "Error : null pointer."); J3DAnmColorKeyTable* info = &mInfoTable[param_0][param_1]; f32 val; diff --git a/src/JSystem/J2DGraph/J2DAnmLoader.cpp b/libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp similarity index 96% rename from src/JSystem/J2DGraph/J2DAnmLoader.cpp rename to libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp index 46c6764684..176f4e24ec 100644 --- a/src/JSystem/J2DGraph/J2DAnmLoader.cpp +++ b/libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp @@ -6,6 +6,7 @@ #include "JSystem/J2DGraph/J2DAnmLoader.h" #include "JSystem/JSupport/JSupport.h" +#include "os_report.h" J2DAnmBase* J2DAnmLoaderDataBase::load(void const* p_data) { const J3DAnmDataHeader* hdr = (const J3DAnmDataHeader*)p_data; @@ -174,21 +175,44 @@ void J2DAnmKeyLoader_v15::readAnmTransform(J3DAnmTransformKeyData const* p_data) setAnmTransform(p_anm, p_data); } +#if TARGET_LITTLE_ENDIAN +static void ByteSwapTransformKeyData( + J2DAnmTransformKey& target, + const J3DAnmTransformKeyData& source) { + + for (int i = 0; i < source.mSCount; i += 1) { + be_swap(target.mScaleValues[i]); + } + + for (int i = 0; i < source.mRCount; i += 1) { + be_swap(target.mRotationValues[i]); + } + + for (int i = 0; i < source.mTCount; i += 1) { + be_swap(target.mTranslateValues[i]); + } +} +#endif + void J2DAnmKeyLoader_v15::setAnmTransform(J2DAnmTransformKey* p_anm, J3DAnmTransformKeyData const* p_data) { J3D_PANIC(439, p_anm, "Error : null pointer."); J3D_PANIC(440, p_data, "Error : null pointer."); - p_anm->field_0x22 = p_data->field_0xc; + p_anm->field_0x22 = p_data->mJointAnimationTableCount; p_anm->mFrameMax = p_data->mFrameMax; - p_anm->field_0x4 = p_data->field_0x8; - p_anm->field_0x24 = p_data->field_0x9; + p_anm->field_0x4 = p_data->mLoopMode; + p_anm->field_0x24 = p_data->mRotationDecimal; p_anm->mFrame = 0; p_anm->mInfoTable = - JSUConvertOffsetToPtr(p_data, p_data->mTableOffset); - p_anm->mScaleValues = JSUConvertOffsetToPtr(p_data, p_data->field_0x18); - p_anm->mRotationValues = JSUConvertOffsetToPtr(p_data, p_data->field_0x1c); + JSUConvertOffsetToPtr(p_data, p_data->mJointAnimationTableOffs); + p_anm->mScaleValues = JSUConvertOffsetToPtr(p_data, p_data->mSTableOffs); + p_anm->mRotationValues = JSUConvertOffsetToPtr(p_data, p_data->mRTableOffs); p_anm->mTranslateValues = - JSUConvertOffsetToPtr(p_data, p_data->field_0x20); + JSUConvertOffsetToPtr(p_data, p_data->mTTableOffs); + +#if TARGET_LITTLE_ENDIAN + ByteSwapTransformKeyData(*p_anm, *p_data); +#endif } void J2DAnmKeyLoader_v15::readAnmTextureSRT(J3DAnmTextureSRTKeyData const* p_data) { diff --git a/src/JSystem/J2DGraph/J2DGrafContext.cpp b/libs/JSystem/src/J2DGraph/J2DGrafContext.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DGrafContext.cpp rename to libs/JSystem/src/J2DGraph/J2DGrafContext.cpp index 9f676cd7e5..3ac3e5d197 100644 --- a/src/JSystem/J2DGraph/J2DGrafContext.cpp +++ b/libs/JSystem/src/J2DGraph/J2DGrafContext.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/J2DGraph/J2DGrafContext.h" -#include +#include J2DGrafContext::J2DGrafContext(f32 x, f32 y, f32 width, f32 height) : mBounds(x, y, x + width, y + height), mScissorBounds(x, y, x + width, y + height) { diff --git a/src/JSystem/J2DGraph/J2DManage.cpp b/libs/JSystem/src/J2DGraph/J2DManage.cpp similarity index 100% rename from src/JSystem/J2DGraph/J2DManage.cpp rename to libs/JSystem/src/J2DGraph/J2DManage.cpp diff --git a/src/JSystem/J2DGraph/J2DMatBlock.cpp b/libs/JSystem/src/J2DGraph/J2DMatBlock.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DMatBlock.cpp rename to libs/JSystem/src/J2DGraph/J2DMatBlock.cpp index 9bb4f87572..1bf28751ac 100644 --- a/src/JSystem/J2DGraph/J2DMatBlock.cpp +++ b/libs/JSystem/src/J2DGraph/J2DMatBlock.cpp @@ -5,7 +5,7 @@ #include "JSystem/JUtility/JUTPalette.h" #include "JSystem/JUtility/JUTResFont.h" #include "JSystem/JUtility/JUTTexture.h" -#include +#include void J2DColorBlock::initialize() { for (int i = 0; i < 2; i++) { diff --git a/src/JSystem/J2DGraph/J2DMaterial.cpp b/libs/JSystem/src/J2DGraph/J2DMaterial.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DMaterial.cpp rename to libs/JSystem/src/J2DGraph/J2DMaterial.cpp index 57cccf8255..10381ade24 100644 --- a/src/JSystem/J2DGraph/J2DMaterial.cpp +++ b/libs/JSystem/src/J2DGraph/J2DMaterial.cpp @@ -5,6 +5,7 @@ #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JUtility/JUTPalette.h" #include "JSystem/JUtility/JUTTexture.h" +#include "os_report.h" J2DMaterial::J2DMaterial() { field_0x4 = 0; diff --git a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp b/libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp similarity index 62% rename from src/JSystem/J2DGraph/J2DMaterialFactory.cpp rename to libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp index fdb604f01b..f0aae92990 100644 --- a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp +++ b/libs/JSystem/src/J2DGraph/J2DMaterialFactory.cpp @@ -6,45 +6,45 @@ #include "JSystem/JSupport/JSupport.h" #include "JSystem/JUtility/JUTResource.h" #include -#include +#include J2DMaterialFactory::J2DMaterialFactory(J2DMaterialBlock const& param_0) { - field_0x0 = param_0.field_0x8; - field_0x4 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0xc); - field_0x8 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x10); + mMaterialNum = param_0.field_0x8; + mpMaterialInitData = JSUConvertOffsetToPtr(¶m_0, param_0.field_0xc); + mpMaterialID = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x10); if (param_0.field_0x18 && param_0.field_0x18 - param_0.field_0x14 > 4) { - field_0xc = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x18); + mpIndInitData = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x18); } else { - field_0xc = NULL; + mpIndInitData = NULL; } - field_0x30 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x1c); - field_0x10 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x20); - field_0x14 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x24); - field_0x18 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x28); - field_0x1c = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x2c); - field_0x20 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x30); - field_0x24 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x34); - field_0x28 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x38); - field_0x2c = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x3c); - field_0x34 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x40); - field_0x38 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x44); - field_0x3c = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x48); - field_0x40 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x4c); - field_0x44 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x50); - field_0x48 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x54); - field_0x4c = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x58); - field_0x50 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x5c); - field_0x54 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x60); - field_0x58 = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x64); + mpCullMode = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x1c); + mpMatColor = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x20); + mpColorChanNum = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x24); + mpColorChanInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x28); + mpTexGenNum = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x2c); + mpTexCoordInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x30); + mpTexMtxInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x34); + mpTexNo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x38); + mpFontNo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x3c); + mpTevOrderInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x40); + mpTevColor = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x44); + mpTevKColor = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x48); + mpTevStageNum = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x4c); + mpTevStageInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x50); + mpTevSwapModeInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x54); + mpTevSwapModeTableInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x58); + mpAlphaCompInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x5c); + mpBlendInfo = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x60); + mpDither = JSUConvertOffsetToPtr(¶m_0, param_0.field_0x64); } u32 J2DMaterialFactory::countStages(int param_0) const { - J2DMaterialInitData* iVar5 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar5 = &mpMaterialInitData[mpMaterialID[param_0]]; u32 uVar4 = 0; u32 uVar3 = 0; if (iVar5->field_0x4 != 0xff) { - uVar3 = field_0x40[iVar5->field_0x4]; + uVar3 = mpTevStageNum[iVar5->field_0x4]; } for (int i = 0; i < 8; i++) { if (iVar5->field_0x38[i] != 0xffff) { @@ -121,11 +121,11 @@ J2DMaterial* J2DMaterialFactory::create(J2DMaterial* param_0, int index, u32 par param_0->getTevBlock()->setTevOrder(i, newTevOrder(index, i)); } for (u8 i = 0; i < local_370; i++) { - J2DMaterialInitData* local_38c = &field_0x4[field_0x8[index]]; + J2DMaterialInitData* local_38c = &mpMaterialInitData[mpMaterialID[index]]; param_0->getTevBlock()->setTevStage(i, newTevStage(index, i)); if (local_38c->field_0xba[i] != 0xffff) { - param_0->getTevBlock()->getTevStage(i)->setTexSel(field_0x48[local_38c->field_0xba[i]].mTexSel); - param_0->getTevBlock()->getTevStage(i)->setRasSel(field_0x48[local_38c->field_0xba[i]].mRasSel); + param_0->getTevBlock()->getTevStage(i)->setTexSel(mpTevSwapModeInfo[local_38c->field_0xba[i]].mTexSel); + param_0->getTevBlock()->getTevStage(i)->setRasSel(mpTevSwapModeInfo[local_38c->field_0xba[i]].mRasSel); } } for (u8 i = 0; i < 4; i++) { @@ -151,14 +151,14 @@ J2DMaterial* J2DMaterialFactory::create(J2DMaterial* param_0, int index, u32 par for (u8 i = 0; i < 8; i++) { param_0->getTexGenBlock()->setTexMtx(i, newTexMtx(index, i)); } - J2DMaterialInitData* local_394 = &field_0x4[field_0x8[index]]; + J2DMaterialInitData* local_394 = &mpMaterialInitData[mpMaterialID[index]]; for (u8 i = 0; i < local_370; i++) { param_0->getTevBlock()->setTevKColorSel(i, local_394->field_0x52[i]); } for (u8 i = 0; i < local_370; i++) { param_0->getTevBlock()->setTevKAlphaSel(i, local_394->field_0x62[i]); } - if (field_0xc != NULL || local_378 != 0) { + if (mpIndInitData != NULL || local_378 != 0) { u8 local_410 = newIndTexStageNum(index); param_0->mIndBlock->setIndTexStageNum(local_410); for (u8 i = 0; i < local_410; i++) { @@ -183,52 +183,52 @@ JUtility::TColor J2DMaterialFactory::newMatColor(int param_0, int param_1) const #else JUtility::TColor local_20 = GXColor{0xff,0xff,0xff,0xff}; #endif - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x8[param_1] != 0xffff) { - return field_0x10[iVar2->field_0x8[param_1]]; + return mpMatColor[iVar2->field_0x8[param_1]]; } return local_20; } u8 J2DMaterialFactory::newColorChanNum(int param_0) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x2 != 0xff) { - return field_0x14[iVar2->field_0x2]; + return mpColorChanNum[iVar2->field_0x2]; } return 0; } J2DColorChan J2DMaterialFactory::newColorChan(int param_0, int param_1) const { int r29 = 0; - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0xc[param_1] != 0xffff) { - return J2DColorChan(field_0x18[iVar2->field_0xc[param_1]]); + return J2DColorChan(mpColorChanInfo[iVar2->field_0xc[param_1]]); } return J2DColorChan(); } u32 J2DMaterialFactory::newTexGenNum(int param_0) const { int r30 = 0; - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x3 != 0xff) { - return field_0x1c[iVar2->field_0x3]; + return mpTexGenNum[iVar2->field_0x3]; } return 0; } J2DTexCoord J2DMaterialFactory::newTexCoord(int param_0, int param_1) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x14[param_1] != 0xffff) { - return J2DTexCoord(field_0x20[iVar2->field_0x14[param_1]]); + return J2DTexCoord(mpTexCoordInfo[iVar2->field_0x14[param_1]]); } return J2DTexCoord(); } J2DTexMtx* J2DMaterialFactory::newTexMtx(int param_0, int param_1) const { J2DTexMtx* rv = NULL; - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x24[param_1] != 0xffff) { - rv = new J2DTexMtx(field_0x24[iVar2->field_0x24[param_1]]); + rv = new J2DTexMtx(mpTexMtxInfo[iVar2->field_0x24[param_1]]); rv->calc(); } return rv; @@ -236,33 +236,33 @@ J2DTexMtx* J2DMaterialFactory::newTexMtx(int param_0, int param_1) const { u8 J2DMaterialFactory::newCullMode(int param_0) const { int r30 = 0; - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x1 != 0xff) { - return field_0x30[iVar2->field_0x1]; + return mpCullMode[iVar2->field_0x1]; } return 0xff; } u16 J2DMaterialFactory::newTexNo(int param_0, int param_1) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x38[param_1] != 0xffff) { - return field_0x28[iVar2->field_0x38[param_1]]; + return mpTexNo[iVar2->field_0x38[param_1]]; } return 0xFFFF; } u16 J2DMaterialFactory::newFontNo(int param_0) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x48 != 0xffff) { - return field_0x2c[iVar2->field_0x48]; + return mpFontNo[iVar2->field_0x48]; } return 0xFFFF; } J2DTevOrder J2DMaterialFactory::newTevOrder(int param_0, int param_1) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x72[param_1] != 0xffff) { - return J2DTevOrder(field_0x34[iVar2->field_0x72[param_1]]); + return J2DTevOrder(mpTevOrderInfo[iVar2->field_0x72[param_1]]); } return J2DTevOrder(); } @@ -270,10 +270,10 @@ J2DTevOrder J2DMaterialFactory::newTevOrder(int param_0, int param_1) const { J2DGXColorS10 J2DMaterialFactory::newTevColor(int param_0, int param_1) const { GXColorS10 color = {0, 0, 0, 0}; J2DGXColorS10 rv = color; - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x92[param_1] != 0xffff) { - return (GXColorS10) field_0x38[iVar2->field_0x92[param_1]]; + return (GXColorS10) mpTevColor[iVar2->field_0x92[param_1]]; } return rv; @@ -281,42 +281,42 @@ J2DGXColorS10 J2DMaterialFactory::newTevColor(int param_0, int param_1) const { JUtility::TColor J2DMaterialFactory::newTevKColor(int param_0, int param_1) const { JUtility::TColor local_20 = COMPOUND_LITERAL(GXColor){0xFF, 0xFF, 0xFF, 0xFF}; - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x4a[param_1] != 0xffff) { - return field_0x3c[iVar2->field_0x4a[param_1]]; + return mpTevKColor[iVar2->field_0x4a[param_1]]; } return local_20; } u8 J2DMaterialFactory::newTevStageNum(int param_0) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x4 != 0xff) { - return field_0x40[iVar2->field_0x4]; + return mpTevStageNum[iVar2->field_0x4]; } return 0xFF; } J2DTevStage J2DMaterialFactory::newTevStage(int param_0, int param_1) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x9a[param_1] != 0xffff) { - return J2DTevStage(field_0x44[iVar2->field_0x9a[param_1]]); + return J2DTevStage(mpTevStageInfo[iVar2->field_0x9a[param_1]]); } return J2DTevStage(); } J2DTevSwapModeTable J2DMaterialFactory::newTevSwapModeTable(int param_0, int param_1) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0xda[param_1] != 0xffff) { - return J2DTevSwapModeTable(field_0x4c[iVar2->field_0xda[param_1]]); + return J2DTevSwapModeTable(mpTevSwapModeTableInfo[iVar2->field_0xda[param_1]]); } return J2DTevSwapModeTable(j2dDefaultTevSwapModeTable); } u8 J2DMaterialFactory::newIndTexStageNum(int param_0) const { u8 r31 = 0; - if (field_0xc != NULL) { - if (field_0xc[param_0].field_0x0 == 1) { - return field_0xc[param_0].field_0x1; + if (mpIndInitData != NULL) { + if (mpIndInitData[param_0].field_0x0 == 1) { + return mpIndInitData[param_0].field_0x1; } } return r31; @@ -324,9 +324,9 @@ u8 J2DMaterialFactory::newIndTexStageNum(int param_0) const { J2DIndTexOrder J2DMaterialFactory::newIndTexOrder(int param_0, int param_1) const { J2DIndTexOrder rv; - if (field_0xc != NULL) { - if (field_0xc[param_0].field_0x0 == 1) { - return J2DIndTexOrder(field_0xc[param_0].field_0x4[param_1]); + if (mpIndInitData != NULL) { + if (mpIndInitData[param_0].field_0x0 == 1) { + return J2DIndTexOrder(mpIndInitData[param_0].field_0x4[param_1]); } } return rv; @@ -334,9 +334,9 @@ J2DIndTexOrder J2DMaterialFactory::newIndTexOrder(int param_0, int param_1) cons J2DIndTexMtx J2DMaterialFactory::newIndTexMtx(int param_0, int param_1) const { J2DIndTexMtx rv; - if (field_0xc != NULL) { - if (field_0xc[param_0].field_0x0 == 1) { - return J2DIndTexMtx(field_0xc[param_0].field_0xc[param_1]); + if (mpIndInitData != NULL) { + if (mpIndInitData[param_0].field_0x0 == 1) { + return J2DIndTexMtx(mpIndInitData[param_0].field_0xc[param_1]); } } return rv; @@ -344,9 +344,9 @@ J2DIndTexMtx J2DMaterialFactory::newIndTexMtx(int param_0, int param_1) const { J2DIndTevStage J2DMaterialFactory::newIndTevStage(int param_0, int param_1) const { J2DIndTevStage rv; - if (field_0xc != NULL) { - if (field_0xc[param_0].field_0x0 == 1) { - return J2DIndTevStage(field_0xc[param_0].field_0x68[param_1]); + if (mpIndInitData != NULL) { + if (mpIndInitData[param_0].field_0x0 == 1) { + return J2DIndTevStage(mpIndInitData[param_0].field_0x68[param_1]); } } return rv; @@ -354,34 +354,34 @@ J2DIndTevStage J2DMaterialFactory::newIndTevStage(int param_0, int param_1) cons J2DIndTexCoordScale J2DMaterialFactory::newIndTexCoordScale(int param_0, int param_1) const { J2DIndTexCoordScale rv; - if (field_0xc != NULL) { - if (field_0xc[param_0].field_0x0 == 1) { - return J2DIndTexCoordScale(field_0xc[param_0].field_0x60[param_1]); + if (mpIndInitData != NULL) { + if (mpIndInitData[param_0].field_0x0 == 1) { + return J2DIndTexCoordScale(mpIndInitData[param_0].field_0x60[param_1]); } } return rv; } J2DAlphaComp J2DMaterialFactory::newAlphaComp(int param_0) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0xe2 != 0xffff) { - return J2DAlphaComp(field_0x50[iVar2->field_0xe2]); + return J2DAlphaComp(mpAlphaCompInfo[iVar2->field_0xe2]); } return J2DAlphaComp(); } J2DBlend J2DMaterialFactory::newBlend(int param_0) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0xe4 != 0xffff) { - return J2DBlend(field_0x54[iVar2->field_0xe4]); + return J2DBlend(mpBlendInfo[iVar2->field_0xe4]); } return J2DBlend(j2dDefaultBlendInfo); } u8 J2DMaterialFactory::newDither(int param_0) const { - J2DMaterialInitData* iVar2 = &field_0x4[field_0x8[param_0]]; + J2DMaterialInitData* iVar2 = &mpMaterialInitData[mpMaterialID[param_0]]; if (iVar2->field_0x5 != 0xff) { - return field_0x58[iVar2->field_0x5]; + return mpDither[iVar2->field_0x5]; } return 0; } diff --git a/src/JSystem/J2DGraph/J2DOrthoGraph.cpp b/libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DOrthoGraph.cpp rename to libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp index 5cd6778572..1830911802 100644 --- a/src/JSystem/J2DGraph/J2DOrthoGraph.cpp +++ b/libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/J2DGraph/J2DOrthoGraph.h" -#include +#include J2DOrthoGraph::J2DOrthoGraph() : J2DGrafContext(0, 0, 0, 0) { this->setLookat(); diff --git a/src/JSystem/J2DGraph/J2DPane.cpp b/libs/JSystem/src/J2DGraph/J2DPane.cpp similarity index 97% rename from src/JSystem/J2DGraph/J2DPane.cpp rename to libs/JSystem/src/J2DGraph/J2DPane.cpp index 8bdc2325c8..c54530a98b 100644 --- a/src/JSystem/J2DGraph/J2DPane.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPane.cpp @@ -631,23 +631,23 @@ J2DPane* J2DPane::getParentPane() { /* name unknown */ struct J2DPaneInfo { - /* 0x00 */ u32 mKind; - /* 0x04 */ u32 mSize; - /* 0x08 */ u16 field_0x8; - /* 0x0A */ u16 field_0xa; + /* 0x00 */ BE(u32) mKind; + /* 0x04 */ BE(u32) mSize; + /* 0x08 */ BE(u16) field_0x8; + /* 0x0A */ BE(u16) field_0xa; /* 0x0B */ u8 mVisible; /* 0x0C */ u8 mBasePosition; - /* 0x10 */ u64 mInfoTag; - /* 0x18 */ u64 mUserInfoTag; - /* 0x20 */ f32 mRotOffsetX; - /* 0x24 */ f32 mRotOffsetY; - /* 0x28 */ f32 mScaleX; - /* 0x2C */ f32 mScaleY; - /* 0x30 */ f32 mRotateX; - /* 0x34 */ f32 mRotateY; - /* 0x38 */ f32 mRotateZ; - /* 0x3C */ f32 mTranslateX; - /* 0x40 */ f32 mTranslateY; + /* 0x10 */ BE(u64) mInfoTag; + /* 0x18 */ BE(u64) mUserInfoTag; + /* 0x20 */ BE(f32) mRotOffsetX; + /* 0x24 */ BE(f32) mRotOffsetY; + /* 0x28 */ BE(f32) mScaleX; + /* 0x2C */ BE(f32) mScaleY; + /* 0x30 */ BE(f32) mRotateX; + /* 0x34 */ BE(f32) mRotateY; + /* 0x38 */ BE(f32) mRotateZ; + /* 0x3C */ BE(f32) mTranslateX; + /* 0x40 */ BE(f32) mTranslateY; }; // Size: 0x48 void J2DPane::makePaneExStream(J2DPane* p_parent, JSURandomInputStream* p_stream) { diff --git a/src/JSystem/J2DGraph/J2DPicture.cpp b/libs/JSystem/src/J2DGraph/J2DPicture.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DPicture.cpp rename to libs/JSystem/src/J2DGraph/J2DPicture.cpp index 65ce621e40..530d6ad3f4 100644 --- a/src/JSystem/J2DGraph/J2DPicture.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPicture.cpp @@ -7,7 +7,7 @@ #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JUtility/JUTResource.h" #include "JSystem/JSupport/JSURandomInputStream.h" -#include +#include J2DPicture::J2DPicture() : mPalette(NULL) { for (u32 i = 0; i < 2; i++) { @@ -45,7 +45,8 @@ J2DPicture::J2DPicture(J2DPane* p_pane, JSURandomInputStream* p_stream, J2DMater u16 matNum = picInfo.field_0x4; for (int i = 0; i < 4; i++) { - field_0x10a[i] = picInfo.field_0x10[i]; + field_0x10a[i].x = picInfo.field_0x10[i].x; + field_0x10a[i].y = picInfo.field_0x10[i].y; mCornerColor[i] = picInfo.mCornerColor[i]; } diff --git a/src/JSystem/J2DGraph/J2DPictureEx.cpp b/libs/JSystem/src/J2DGraph/J2DPictureEx.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DPictureEx.cpp rename to libs/JSystem/src/J2DGraph/J2DPictureEx.cpp index bf2ea7168a..64ef5298f7 100644 --- a/src/JSystem/J2DGraph/J2DPictureEx.cpp +++ b/libs/JSystem/src/J2DGraph/J2DPictureEx.cpp @@ -5,7 +5,7 @@ #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/JSupport/JSURandomInputStream.h" #include "JSystem/JUtility/JUTTexture.h" -#include +#include void J2DPictureEx::initiate(ResTIMG const* param_0, ResTLUT const* param_1) { u32 texGenNum = mMaterial->getTexGenBlock()->getTexGenNum(); @@ -21,11 +21,11 @@ J2DPictureEx::J2DPictureEx(J2DPane* param_0, JSURandomInputStream* param_1, u32 field_0x194 = 0; field_0x198 = 0; s32 origPosition = param_1->getPosition(); - u32 local_68[2]; + BE(u32) local_68[2]; param_1->read(local_68, 8); mKind = local_68[0]; s32 iVar2 = param_1->getPosition(); - u32 auStack_70[2]; + BE(u32) auStack_70[2]; param_1->peek(auStack_70, 8); makePaneExStream(param_0, param_1); param_1->seek(iVar2 + auStack_70[1], JSUStreamSeekFrom_SET); @@ -36,7 +36,8 @@ J2DPictureEx::J2DPictureEx(J2DPane* param_0, JSURandomInputStream* param_1, u32 for (int i = 0; i < 4; i++) { field_0x158[i] = aJStack_60.field_0x8[i]; - field_0x10a[i] = aJStack_60.field_0x10[i]; + field_0x10a[i].x = aJStack_60.field_0x10[i].x; + field_0x10a[i].y = aJStack_60.field_0x10[i].y; mCornerColor[i] = JUtility::TColor(aJStack_60.mCornerColor[i]); } @@ -576,7 +577,7 @@ void J2DPictureEx::drawOut(JGeometry::TBox2 const& param_0, GXSetVtxDesc(GX_VA_TEX0, GX_NONE); } -void J2DPictureEx::load(_GXTexMapID param_0, u8 param_1) { +void J2DPictureEx::load(GXTexMapID param_0, u8 param_1) { if (mMaterial == NULL) { return; } diff --git a/src/JSystem/J2DGraph/J2DPrint.cpp b/libs/JSystem/src/J2DGraph/J2DPrint.cpp similarity index 100% rename from src/JSystem/J2DGraph/J2DPrint.cpp rename to libs/JSystem/src/J2DGraph/J2DPrint.cpp diff --git a/src/JSystem/J2DGraph/J2DScreen.cpp b/libs/JSystem/src/J2DGraph/J2DScreen.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DScreen.cpp rename to libs/JSystem/src/J2DGraph/J2DScreen.cpp index 37c9aef084..622f3c2fb0 100644 --- a/src/JSystem/J2DGraph/J2DScreen.cpp +++ b/libs/JSystem/src/J2DGraph/J2DScreen.cpp @@ -9,7 +9,7 @@ #include "JSystem/JKernel/JKRArchive.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JSupport/JSUMemoryStream.h" -#include +#include J2DScreen::J2DScreen() : J2DPane(NULL, true, 'root', JGeometry::TBox2(JGeometry::TVec2(0, 0), JGeometry::TVec2(640, 480))), mColor() { @@ -368,9 +368,9 @@ bool J2DScreen::createMaterial(JSURandomInputStream* p_stream, u32 param_1, JKRA char* ptr = (char*)sec_s; u16 size = lastOffset; while (ptr[size] != 0) { - size++; + size++; } - size++; + size++; u8* nametab = new u8[size]; if (nametab == NULL) { diff --git a/src/JSystem/J2DGraph/J2DTevs.cpp b/libs/JSystem/src/J2DGraph/J2DTevs.cpp similarity index 98% rename from src/JSystem/J2DGraph/J2DTevs.cpp rename to libs/JSystem/src/J2DGraph/J2DTevs.cpp index bc06be7b8b..8daf82872c 100644 --- a/src/JSystem/J2DGraph/J2DTevs.cpp +++ b/libs/JSystem/src/J2DGraph/J2DTevs.cpp @@ -11,7 +11,7 @@ #else #include #endif -#include +#include void J2DTexMtx::load(u32 mtxIdx) { GXLoadTexMtxImm(mTexMtx, mtxIdx * 3 + GX_TEXMTX0, (GXTexMtxType)mInfo.mTexMtxType); @@ -118,8 +118,8 @@ J2DTexCoordInfo const j2dDefaultTexCoordInfo[8] = { {GX_TG_MTX2x4, GX_TG_TEX6, GX_IDENTITY, 0}, {GX_TG_MTX2x4, GX_TG_TEX7, GX_IDENTITY, 0}, }; -J2DTexMtxInfo const j2dDefaultTexMtxInfo = {1, 1, 255, 255, 0.5f, 0.5f, - 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f}; +J2DTexMtxInfo const j2dDefaultTexMtxInfo = {1, 1, 255, 255, {0.5f, 0.5f, + 0.0f}, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f}; J2DIndTexMtxInfo const j2dDefaultIndTexMtxInfo = {{0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, 1}; diff --git a/src/JSystem/J2DGraph/J2DTextBox.cpp b/libs/JSystem/src/J2DGraph/J2DTextBox.cpp similarity index 100% rename from src/JSystem/J2DGraph/J2DTextBox.cpp rename to libs/JSystem/src/J2DGraph/J2DTextBox.cpp diff --git a/src/JSystem/J2DGraph/J2DTextBoxEx.cpp b/libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp similarity index 100% rename from src/JSystem/J2DGraph/J2DTextBoxEx.cpp rename to libs/JSystem/src/J2DGraph/J2DTextBoxEx.cpp diff --git a/src/JSystem/J2DGraph/J2DWindow.cpp b/libs/JSystem/src/J2DGraph/J2DWindow.cpp similarity index 99% rename from src/JSystem/J2DGraph/J2DWindow.cpp rename to libs/JSystem/src/J2DGraph/J2DWindow.cpp index 7907afc8c9..b6d341d507 100644 --- a/src/JSystem/J2DGraph/J2DWindow.cpp +++ b/libs/JSystem/src/J2DGraph/J2DWindow.cpp @@ -24,17 +24,17 @@ J2DWindow::J2DWindow(J2DPane* param_0, JSURandomInputStream* param_1, JKRArchive struct J2DWindowData { u8 field_0x0[0x10]; - u16 field_0x10[4]; + BE(u16) field_0x10[4]; u8 field_0x18; u8 field_0x19; - u16 field_0x1a; - u16 field_0x1c; - u16 field_0x1e; - u16 field_0x20; - u16 field_0x22; - u16 field_0x24; + BE(u16) field_0x1a; + BE(u16) field_0x1c; + BE(u16) field_0x1e; + BE(u16) field_0x20; + BE(u16) field_0x22; + BE(u16) field_0x24; u8 field_0x26[0xa]; - u32 field_0x30[4]; + BE(u32) field_0x30[4]; }; J2DWindow::J2DWindow(J2DPane* param_0, JSURandomInputStream* param_1, J2DMaterial* param_2) : diff --git a/src/JSystem/J2DGraph/J2DWindowEx.cpp b/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp similarity index 98% rename from src/JSystem/J2DGraph/J2DWindowEx.cpp rename to libs/JSystem/src/J2DGraph/J2DWindowEx.cpp index 6b1b6748d2..87bb4ef0a2 100644 --- a/src/JSystem/J2DGraph/J2DWindowEx.cpp +++ b/libs/JSystem/src/J2DGraph/J2DWindowEx.cpp @@ -3,21 +3,22 @@ #include "JSystem/J2DGraph/J2DWindowEx.h" #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JSupport/JSURandomInputStream.h" +#include "dusk/endian.h" struct J2DWindowExDef { - u32 field_0x0[4]; - u16 field_0x10[4]; + BE(u32) field_0x0[4]; + BE(u16) field_0x10[4]; u8 field_0x18; u8 field_0x19; - u16 field_0x1A; - u16 field_0x1C; - u16 field_0x1E; - u16 field_0x20; - u16 field_0x22; - u16 field_0x24; - u16 field_0x26; - u16 field_0x28[4]; - u32 field_0x30[4]; + BE(u16) field_0x1A; + BE(u16) field_0x1C; + BE(u16) field_0x1E; + BE(u16) field_0x20; + BE(u16) field_0x22; + BE(u16) field_0x24; + BE(u16) field_0x26; + BE(u16) field_0x28[4]; + BE(u32) field_0x30[4]; }; STATIC_ASSERT(sizeof(J2DWindowExDef) == 0x40); @@ -631,7 +632,7 @@ void J2DWindowEx::setAlpha(u8 param_0) { } } -void J2DWindowEx::setCullBack(_GXCullMode param_0) { +void J2DWindowEx::setCullBack(GXCullMode param_0) { mCullMode = param_0; for (int i = 0; i < 4; i++) { @@ -844,7 +845,7 @@ void J2DWindowEx::draw(f32 param_0, f32 param_1, f32 param_2, f32 param_3) { } void J2DWindowEx::setCullBack(bool param_0) { - _GXCullMode mode; + GXCullMode mode; if (param_0) { mode = GX_CULL_BACK; } else { diff --git a/src/JSystem/J3DGraphAnimator/J3DAnimation.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DAnimation.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DAnimation.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DCluster.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp similarity index 99% rename from src/JSystem/J3DGraphAnimator/J3DCluster.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp index 3e0daccddd..8144ea04a5 100644 --- a/src/JSystem/J3DGraphAnimator/J3DCluster.cpp +++ b/libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/J3DGraphAnimator/J3DModel.h" #include "JSystem/JMath/JMATrigonometric.h" -#include +#include #include "JSystem/JSupport/JSupport.h" diff --git a/src/JSystem/J3DGraphAnimator/J3DJoint.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DJoint.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DJointTree.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DJointTree.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DMaterialAnm.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DMaterialAnm.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DMaterialAttach.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DModel.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DModel.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DModel.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DModelData.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DModelData.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DMtxBuffer.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DMtxBuffer.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DShapeTable.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DShapeTable.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp diff --git a/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp b/libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp similarity index 100% rename from src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp rename to libs/JSystem/src/J3DGraphAnimator/J3DSkinDeform.cpp diff --git a/src/JSystem/J3DGraphBase/J3DDrawBuffer.cpp b/libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DDrawBuffer.cpp rename to libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp diff --git a/src/JSystem/J3DGraphBase/J3DGD.cpp b/libs/JSystem/src/J3DGraphBase/J3DGD.cpp similarity index 99% rename from src/JSystem/J3DGraphBase/J3DGD.cpp rename to libs/JSystem/src/J3DGraphBase/J3DGD.cpp index de18c40798..6071837637 100644 --- a/src/JSystem/J3DGraphBase/J3DGD.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DGD.cpp @@ -349,7 +349,11 @@ void J3DGDSetTexImgAttr(GXTexMapID id, u16 width, u16 height, GXTexFmt format) { } void J3DGDSetTexImgPtr(GXTexMapID id, void* image_ptr) { +#if TARGET_PC + puts("J3DGDSetTexImgPtr is a stub"); +#else J3DGDWriteBPCmd(BP_IMAGE_PTR(OSCachedToPhysical(image_ptr) >> 5, J3DGDTexImage3Ids[id])); +#endif } void J3DGDSetTexImgPtrRaw(GXTexMapID id, u32 image_ptr_raw) { @@ -367,6 +371,10 @@ void J3DGDLoadTlut(void* tlut_ptr, u32 tmem_addr, GXTlutSize size) { J3DGDWriteBPCmd(0xFEFFFF00); J3DGDWriteBPCmd(0xF000000); +#if TARGET_PC + puts("J3DGDLoadTlut is a stub"); + return; +#endif J3DGDWriteBPCmd(BP_LOAD_TLUT0(OSCachedToPhysical(tlut_ptr) >> 5, 0x64)); J3DGDWriteBPCmd(BP_LOAD_TLUT1((tmem_addr - 0x80000) >> 9, size, 0x65)); J3DGDWriteBPCmd(0xFEFFFF00); diff --git a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp b/libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DMatBlock.cpp rename to libs/JSystem/src/J3DGraphBase/J3DMatBlock.cpp diff --git a/src/JSystem/J3DGraphBase/J3DMaterial.cpp b/libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DMaterial.cpp rename to libs/JSystem/src/J3DGraphBase/J3DMaterial.cpp diff --git a/src/JSystem/J3DGraphBase/J3DPacket.cpp b/libs/JSystem/src/J3DGraphBase/J3DPacket.cpp similarity index 99% rename from src/JSystem/J3DGraphBase/J3DPacket.cpp rename to libs/JSystem/src/J3DGraphBase/J3DPacket.cpp index 5eb6e77392..71ddc165fc 100644 --- a/src/JSystem/J3DGraphBase/J3DPacket.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DPacket.cpp @@ -6,7 +6,7 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/J3DGraphBase/J3DShapeMtx.h" #include "JSystem/JKernel/JKRHeap.h" -#include +#include #include #include "global.h" diff --git a/src/JSystem/J3DGraphBase/J3DShape.cpp b/libs/JSystem/src/J3DGraphBase/J3DShape.cpp similarity index 98% rename from src/JSystem/J3DGraphBase/J3DShape.cpp rename to libs/JSystem/src/J3DGraphBase/J3DShape.cpp index befdf34a90..d365dc47ba 100644 --- a/src/JSystem/J3DGraphBase/J3DShape.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DShape.cpp @@ -6,8 +6,10 @@ #include "JSystem/J3DGraphBase/J3DFifo.h" #include "JSystem/J3DGraphBase/J3DPacket.h" #include "JSystem/J3DGraphBase/J3DVertex.h" +#include "JSystem/J3DGraphBase/J3DFifo.h" +#include -void J3DGDSetVtxAttrFmtv(_GXVtxFmt, GXVtxAttrFmtList const*, bool); +void J3DGDSetVtxAttrFmtv(GXVtxFmt, GXVtxAttrFmtList const*, bool); void J3DFifoLoadPosMtxImm(Mtx, u32); void J3DFifoLoadNrmMtxImm(Mtx, u32); diff --git a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp b/libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp similarity index 95% rename from src/JSystem/J3DGraphBase/J3DShapeDraw.cpp rename to libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp index 94d4534a82..f05d907e32 100644 --- a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DShapeDraw.cpp @@ -4,7 +4,7 @@ #include "JSystem/JKernel/JKRHeap.h" #include #include -#include +#include u32 J3DShapeDraw::countVertex(u32 stride) { u32 count = 0; @@ -15,7 +15,7 @@ u32 J3DShapeDraw::countVertex(u32 stride) { dl++; if (cmd != GX_TRIANGLEFAN && cmd != GX_TRIANGLESTRIP) break; - int vtxNum = *((u16*)(dl)); + int vtxNum = be16(*((u16*)(dl))); dl += 2; count += vtxNum; dl = (u8*)dl + stride * vtxNum; @@ -48,7 +48,7 @@ void J3DShapeDraw::addTexMtxIndexInDL(u32 stride, u32 attrOffs, u32 valueBase) { *(u16*)newDL = vtxNum; newDL += 2; - for (int i = 0; i < vtxNum; i++) { + for (int i = 0; i < be16(vtxNum); i++) { u8* oldDLVtx = &oldDL[stride * i]; u8 pnmtxidx = *oldDLVtx; memcpy(newDL, oldDLVtx, (int)attrOffs); diff --git a/src/JSystem/J3DGraphBase/J3DShapeMtx.cpp b/libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp similarity index 93% rename from src/JSystem/J3DGraphBase/J3DShapeMtx.cpp rename to libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp index 03d8404755..eda9a1404f 100644 --- a/src/JSystem/J3DGraphBase/J3DShapeMtx.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DShapeMtx.cpp @@ -192,7 +192,7 @@ void J3DDifferedTexMtx::loadExecute(f32 const (*param_0)[4]) { mtx = &tex_mtx_obj->getMtx(i); } } - GXLoadTexMtxImm(*mtx, i * 3 + 0x40, GX_MTX3x4); + GXLoadTexMtxImm(*mtx, i * 3 + GX_PTTEXMTX0, GX_MTX3x4); } } } else { @@ -282,7 +282,7 @@ void J3DDifferedTexMtx::loadExecute(f32 const (*param_0)[4]) { break; } } - GXLoadTexMtxImm(*mtx, i * 3 + 30, (GXTexMtxType)tex_mtx_info_1->mProjection); + GXLoadTexMtxImm(*mtx, i * 3 + GX_TEXMTX0, (GXTexMtxType)tex_mtx_info_1->mProjection); } } } @@ -362,31 +362,31 @@ void J3DShapeMtxConcatView::load() const { void J3DShapeMtxConcatView::loadNrmMtx(int param_0, u16 param_1, MtxP param_2) const { if (sCurrentScaleFlag[param_1] == 1) { if (sTexMtxLoadType == 0x2000) { - J3DFifoLoadNrmMtxToTexMtx(param_2, 0x1e); + J3DFifoLoadNrmMtxToTexMtx(param_2, GX_TEXMTX0); } if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm(param_2, 0); + J3DFifoLoadNrmMtxImm(param_2, GX_PNMTX0); } else { Mtx33 mtx; BE(Vec)* scale = j3dSys.getNBTScale(); J3DPSMtx33CopyFrom34(param_2, mtx); J3DScaleNrmMtx33(mtx, *scale); - J3DFifoLoadNrmMtxImm3x3(mtx, 0); + J3DFifoLoadNrmMtxImm3x3(mtx, GX_PNMTX0); } } else { Mtx33 mtx; J3DPSCalcInverseTranspose(param_2, mtx); if (sTexMtxLoadType == 0x2000) { - J3DFifoLoadNrmMtxToTexMtx3x3(mtx, 0x1e); + J3DFifoLoadNrmMtxToTexMtx3x3(mtx, GX_TEXMTX0); } if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm3x3(mtx, 0); + J3DFifoLoadNrmMtxImm3x3(mtx, GX_PNMTX0); } else { BE(Vec)* scale = j3dSys.getNBTScale(); J3DScaleNrmMtx33(mtx, *scale); - J3DFifoLoadNrmMtxImm3x3(mtx, 0); + J3DFifoLoadNrmMtxImm3x3(mtx, GX_PNMTX0); } } } @@ -458,27 +458,27 @@ void J3DShapeMtxMultiConcatView::loadNrmMtx(int param_0, u16 param_1, MtxP param Mtx33 mtx1, mtx2; if (sCurrentScaleFlag[param_1] == 1) { if (sTexMtxLoadType == 0x2000) { - J3DFifoLoadNrmMtxToTexMtx(param_2, param_0 * 3 + 0x1e); + J3DFifoLoadNrmMtxToTexMtx(param_2, param_0 * 3 + GX_TEXMTX0); } if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm(param_2, param_0 * 3); + J3DFifoLoadNrmMtxImm(param_2, param_0 * 3 + GX_PNMTX0); } else { BE(Vec)* nbt_scale = j3dSys.getNBTScale(); J3DPSMtx33CopyFrom34(param_2, mtx1); J3DScaleNrmMtx33(mtx1, *nbt_scale); - J3DFifoLoadNrmMtxImm3x3(mtx1, 0); + J3DFifoLoadNrmMtxImm3x3(mtx1, GX_PNMTX0); } } else { J3DPSCalcInverseTranspose(param_2, mtx2); if (sTexMtxLoadType == 0x2000) { - J3DFifoLoadNrmMtxToTexMtx3x3(mtx2, param_0 * 3 + 0x1e); + J3DFifoLoadNrmMtxToTexMtx3x3(mtx2, param_0 * 3 + GX_TEXMTX0); } if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm3x3(mtx2, param_0 * 3); + J3DFifoLoadNrmMtxImm3x3(mtx2, param_0 * 3 + GX_PNMTX0); } else { BE(Vec)* nbt_scale = j3dSys.getNBTScale(); J3DScaleNrmMtx33(mtx2, *nbt_scale); - J3DFifoLoadNrmMtxImm3x3(mtx2, param_0 * 3); + J3DFifoLoadNrmMtxImm3x3(mtx2, param_0 * 3 + GX_PNMTX0); } } } @@ -494,7 +494,7 @@ void J3DShapeMtxBBoardConcatView::load() const { } J3DCalcBBoardMtx(mtx); - J3DFifoLoadPosMtxImm(mtx, 0); + J3DFifoLoadPosMtxImm(mtx, GX_PNMTX0); mtx[0][0] = 1.0f / mtx[0][0]; mtx[1][1] = 1.0f / mtx[1][1]; @@ -505,11 +505,11 @@ void J3DShapeMtxBBoardConcatView::load() const { if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm(mtx, 0); + J3DFifoLoadNrmMtxImm(mtx, GX_PNMTX0); } else { BE(Vec)* nbt_scale = j3dSys.getNBTScale(); J3DScaleNrmMtx(mtx, *nbt_scale); - J3DFifoLoadNrmMtxImm(mtx, 0); + J3DFifoLoadNrmMtxImm(mtx, GX_PNMTX0); } } @@ -525,24 +525,24 @@ void J3DShapeMtxYBBoardConcatView::load() const { } J3DCalcYBBoardMtx(mtx1); - J3DFifoLoadPosMtxImm(mtx1, 0); + J3DFifoLoadPosMtxImm(mtx1, GX_PNMTX0); if (sCurrentScaleFlag[mUseMtxIndex] == 1) { if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm(mtx1, 0); + J3DFifoLoadNrmMtxImm(mtx1, GX_PNMTX0); } else { BE(Vec)* nbt_scale = j3dSys.getNBTScale(); J3DScaleNrmMtx(mtx1, *nbt_scale); - J3DFifoLoadNrmMtxImm(mtx1, 0); + J3DFifoLoadNrmMtxImm(mtx1, GX_PNMTX0); } } else { J3DPSCalcInverseTranspose(mtx1, mtx2); if (!sNBTFlag) { - J3DFifoLoadNrmMtxImm3x3(mtx2, 0); + J3DFifoLoadNrmMtxImm3x3(mtx2, GX_PNMTX0); } else { BE(Vec)* nbt_scale = j3dSys.getNBTScale(); J3DScaleNrmMtx33(mtx2, *nbt_scale); - J3DFifoLoadNrmMtxImm3x3(mtx2, 0); + J3DFifoLoadNrmMtxImm3x3(mtx2, GX_PNMTX0); } } } diff --git a/src/JSystem/J3DGraphBase/J3DStruct.cpp b/libs/JSystem/src/J3DGraphBase/J3DStruct.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DStruct.cpp rename to libs/JSystem/src/J3DGraphBase/J3DStruct.cpp diff --git a/src/JSystem/J3DGraphBase/J3DSys.cpp b/libs/JSystem/src/J3DGraphBase/J3DSys.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DSys.cpp rename to libs/JSystem/src/J3DGraphBase/J3DSys.cpp diff --git a/src/JSystem/J3DGraphBase/J3DTevs.cpp b/libs/JSystem/src/J3DGraphBase/J3DTevs.cpp similarity index 98% rename from src/JSystem/J3DGraphBase/J3DTevs.cpp rename to libs/JSystem/src/J3DGraphBase/J3DTevs.cpp index d71aa20255..0c712dac81 100644 --- a/src/JSystem/J3DGraphBase/J3DTevs.cpp +++ b/libs/JSystem/src/J3DGraphBase/J3DTevs.cpp @@ -362,7 +362,11 @@ J3DFogInfo const j3dDefaultFogInfo = { }; J3DNBTScaleInfo const j3dDefaultNBTScaleInfo = { +#if TARGET_PC + 0x00, {1.0f, 1.0f, 1.0f}, +#else 0x00, 1.0f, 1.0f, 1.0f, +#endif }; static u8 j3dTexCoordTable[7623]; @@ -444,7 +448,7 @@ void makeTevSwapTable() { void J3DTexMtx::loadTexMtx(u32 param_0) const { GDOverflowCheck(0x35); - J3DGDLoadTexMtxImm((MtxP)mMtx, param_0 * 3 + 30, (_GXTexMtxType)mTexMtxInfo.mProjection); + J3DGDLoadTexMtxImm((MtxP)mMtx, param_0 * 3 + 30, (GXTexMtxType)mTexMtxInfo.mProjection); } void J3DTexMtx::loadPostTexMtx(u32 param_0) const { @@ -452,7 +456,7 @@ void J3DTexMtx::loadPostTexMtx(u32 param_0) const { J3DGDLoadPostTexMtxImm((MtxP)mMtx, param_0 * 3 + 0x40); } -static void J3DGDLoadTexMtxImm(f32 (*param_1)[4], u32 param_2, _GXTexMtxType param_3) { +static void J3DGDLoadTexMtxImm(f32 (*param_1)[4], u32 param_2, GXTexMtxType param_3) { u16 addr = param_2 << 2; u8 len = param_3 == GX_MTX2x4 ? 8 : 12; J3DGDWriteXFCmdHdr(addr, len); diff --git a/src/JSystem/J3DGraphBase/J3DTexture.cpp b/libs/JSystem/src/J3DGraphBase/J3DTexture.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DTexture.cpp rename to libs/JSystem/src/J3DGraphBase/J3DTexture.cpp diff --git a/src/JSystem/J3DGraphBase/J3DTransform.cpp b/libs/JSystem/src/J3DGraphBase/J3DTransform.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DTransform.cpp rename to libs/JSystem/src/J3DGraphBase/J3DTransform.cpp diff --git a/src/JSystem/J3DGraphBase/J3DVertex.cpp b/libs/JSystem/src/J3DGraphBase/J3DVertex.cpp similarity index 100% rename from src/JSystem/J3DGraphBase/J3DVertex.cpp rename to libs/JSystem/src/J3DGraphBase/J3DVertex.cpp diff --git a/src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp b/libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp similarity index 97% rename from src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp index a1170e64c0..4576815eb7 100644 --- a/src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp +++ b/libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp @@ -7,7 +7,7 @@ #include "JSystem/J3DGraphLoader/J3DAnmLoader.h" #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/JSupport/JSupport.h" -#include +#include J3DAnmBase* J3DAnmLoaderDataBase::load(const void* i_data, J3DAnmLoaderDataBaseFlag flag) { const JUTDataFileHeader* header = (const JUTDataFileHeader*)i_data; @@ -476,22 +476,44 @@ void J3DAnmKeyLoader_v15::readAnmTransform(const J3DAnmTransformKeyData* param_1 setAnmTransform(anm, param_1); } +#if TARGET_LITTLE_ENDIAN +static void ByteSwapTransformKeyData( + J3DAnmTransformKey& target, + const J3DAnmTransformKeyData& source) { + + for (int i = 0; i < source.mSCount; i += 1) { + be_swap(target.mScaleData[i]); + } + + for (int i = 0; i < source.mRCount; i += 1) { + be_swap(target.mRotData[i]); + } + + for (int i = 0; i < source.mTCount; i += 1) { + be_swap(target.mTransData[i]); + } +} +#endif + void J3DAnmKeyLoader_v15::setAnmTransform(J3DAnmTransformKey* param_1, const J3DAnmTransformKeyData* param_2) { J3D_ASSERT_NULLPTR(944, param_1); J3D_ASSERT_NULLPTR(945, param_2); - param_1->field_0x1e = param_2->field_0xc; + param_1->field_0x1e = param_2->mJointAnimationTableCount; param_1->mFrameMax = param_2->mFrameMax; - param_1->mAttribute = param_2->field_0x8; - param_1->mDecShift = param_2->field_0x9; + param_1->mAttribute = param_2->mLoopMode; + param_1->mDecShift = param_2->mRotationDecimal; param_1->mFrame = 0.0f; param_1->mAnmTable = - JSUConvertOffsetToPtr(param_2, param_2->mTableOffset); - param_1->mScaleData = JSUConvertOffsetToPtr(param_2, param_2->field_0x18); - param_1->mRotData = JSUConvertOffsetToPtr(param_2, param_2->field_0x1c); - param_1->mTransData = JSUConvertOffsetToPtr(param_2, param_2->field_0x20); -} + JSUConvertOffsetToPtr(param_2, param_2->mJointAnimationTableOffs); + param_1->mScaleData = JSUConvertOffsetToPtr(param_2, param_2->mSTableOffs); + param_1->mRotData = JSUConvertOffsetToPtr(param_2, param_2->mRTableOffs); + param_1->mTransData = JSUConvertOffsetToPtr(param_2, param_2->mTTableOffs); +#if TARGET_LITTLE_ENDIAN + ByteSwapTransformKeyData(*param_1, *param_2); +#endif +} void J3DAnmKeyLoader_v15::readAnmTextureSRT(const J3DAnmTextureSRTKeyData* param_1) { J3DAnmTextureSRTKey* anm = (J3DAnmTextureSRTKey*)mAnm; diff --git a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp b/libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp similarity index 99% rename from src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp index df8a808deb..b222f447d7 100644 --- a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp +++ b/libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphAnimator/J3DSkinDeform.h" #include "JSystem/JSupport/JSupport.h" #include "JSystem/JKernel/JKRHeap.h" -#include +#include #include void* J3DClusterLoaderDataBase::load(const void* i_data) { diff --git a/src/JSystem/J3DGraphLoader/J3DJointFactory.cpp b/libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp similarity index 67% rename from src/JSystem/J3DGraphLoader/J3DJointFactory.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp index dafc4ce417..c385b400e1 100644 --- a/src/JSystem/J3DGraphLoader/J3DJointFactory.cpp +++ b/libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp @@ -8,6 +8,22 @@ J3DJointFactory::J3DJointFactory(J3DJointBlock const& block) { mJointInitData = JSUConvertOffsetToPtr(&block, (uintptr_t)block.mpJointInitData); mIndexTable = JSUConvertOffsetToPtr(&block, (uintptr_t)block.mpIndexTable); + +#if TARGET_LITTLE_ENDIAN + for (int i = 0; i < block.mJointNum; i++) { + auto& index = mIndexTable[i]; + be_swap(index); + + auto initData = &mJointInitData[index]; + be_swap(initData->mKind); + be_swap(initData->mTransformInfo.mScale); + be_swap(initData->mTransformInfo.mRotation); + be_swap(initData->mTransformInfo.mTranslate); + be_swap(initData->mRadius); + be_swap(initData->mMin); + be_swap(initData->mMax); + } +#endif } J3DJoint* J3DJointFactory::create(int no) { diff --git a/src/JSystem/J3DGraphLoader/J3DMaterialFactory.cpp b/libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp similarity index 100% rename from src/JSystem/J3DGraphLoader/J3DMaterialFactory.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp diff --git a/src/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp b/libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp similarity index 100% rename from src/JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp diff --git a/src/JSystem/J3DGraphLoader/J3DModelLoader.cpp b/libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp similarity index 99% rename from src/JSystem/J3DGraphLoader/J3DModelLoader.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp index 75f24fc801..749009f275 100644 --- a/src/JSystem/J3DGraphLoader/J3DModelLoader.cpp +++ b/libs/JSystem/src/J3DGraphLoader/J3DModelLoader.cpp @@ -281,7 +281,7 @@ void J3DModelLoader::readInformation(J3DModelInfoBlock const* i_block, u32 i_fla mpModelData->setHierarchy(JSUConvertOffsetToPtr(i_block, i_block->mpHierarchy)); } -static _GXCompType getFmtType(_GXVtxAttrFmtList* i_fmtList, _GXAttr i_attr) { +static GXCompType getFmtType(GXVtxAttrFmtList* i_fmtList, GXAttr i_attr) { for (; i_fmtList->attr != GX_VA_NULL; i_fmtList++) { if (i_fmtList->attr == i_attr) { return i_fmtList->type; diff --git a/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp b/libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp similarity index 99% rename from src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp index f1ed201fc8..e332b491fc 100644 --- a/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp +++ b/libs/JSystem/src/J3DGraphLoader/J3DModelLoaderCalcSize.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphAnimator/J3DJoint.h" #include "JSystem/J3DGraphAnimator/J3DModelData.h" #include "JSystem/JSupport/JSupport.h" -#include +#include #include "global.h" u16 J3DModelLoader::countMaterialNum(const void* stream) { diff --git a/src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp b/libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp similarity index 99% rename from src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp rename to libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp index 8e679daf7a..4b357cd8e6 100644 --- a/src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp +++ b/libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp @@ -5,7 +5,7 @@ #include "JSystem/J3DGraphBase/J3DShapeMtx.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JSupport/JSupport.h" -#include +#include #include "global.h" #include diff --git a/src/JSystem/J3DU/J3DUClipper.cpp b/libs/JSystem/src/J3DU/J3DUClipper.cpp similarity index 100% rename from src/JSystem/J3DU/J3DUClipper.cpp rename to libs/JSystem/src/J3DU/J3DUClipper.cpp diff --git a/src/JSystem/J3DU/J3DUDL.cpp b/libs/JSystem/src/J3DU/J3DUDL.cpp similarity index 100% rename from src/JSystem/J3DU/J3DUDL.cpp rename to libs/JSystem/src/J3DU/J3DUDL.cpp diff --git a/src/JSystem/J3DU/J3DUFur.cpp b/libs/JSystem/src/J3DU/J3DUFur.cpp similarity index 100% rename from src/JSystem/J3DU/J3DUFur.cpp rename to libs/JSystem/src/J3DU/J3DUFur.cpp diff --git a/src/JSystem/J3DU/J3DUMotion.cpp b/libs/JSystem/src/J3DU/J3DUMotion.cpp similarity index 100% rename from src/JSystem/J3DU/J3DUMotion.cpp rename to libs/JSystem/src/J3DU/J3DUMotion.cpp diff --git a/src/JSystem/J3DU/J3DUShadow.cpp b/libs/JSystem/src/J3DU/J3DUShadow.cpp similarity index 100% rename from src/JSystem/J3DU/J3DUShadow.cpp rename to libs/JSystem/src/J3DU/J3DUShadow.cpp diff --git a/src/JSystem/JAHostIO/JAHioMessage.cpp b/libs/JSystem/src/JAHostIO/JAHioMessage.cpp similarity index 100% rename from src/JSystem/JAHostIO/JAHioMessage.cpp rename to libs/JSystem/src/JAHostIO/JAHioMessage.cpp diff --git a/src/JSystem/JAHostIO/JAHioMgr.cpp b/libs/JSystem/src/JAHostIO/JAHioMgr.cpp similarity index 100% rename from src/JSystem/JAHostIO/JAHioMgr.cpp rename to libs/JSystem/src/JAHostIO/JAHioMgr.cpp diff --git a/src/JSystem/JAHostIO/JAHioNode.cpp b/libs/JSystem/src/JAHostIO/JAHioNode.cpp similarity index 100% rename from src/JSystem/JAHostIO/JAHioNode.cpp rename to libs/JSystem/src/JAHostIO/JAHioNode.cpp diff --git a/src/JSystem/JAHostIO/JAHioUtil.cpp b/libs/JSystem/src/JAHostIO/JAHioUtil.cpp similarity index 100% rename from src/JSystem/JAHostIO/JAHioUtil.cpp rename to libs/JSystem/src/JAHostIO/JAHioUtil.cpp diff --git a/src/JSystem/JAWExtSystem/JAWExtSystem.cpp b/libs/JSystem/src/JAWExtSystem/JAWExtSystem.cpp similarity index 100% rename from src/JSystem/JAWExtSystem/JAWExtSystem.cpp rename to libs/JSystem/src/JAWExtSystem/JAWExtSystem.cpp diff --git a/src/JSystem/JAWExtSystem/JAWGraphContext.cpp b/libs/JSystem/src/JAWExtSystem/JAWGraphContext.cpp similarity index 100% rename from src/JSystem/JAWExtSystem/JAWGraphContext.cpp rename to libs/JSystem/src/JAWExtSystem/JAWGraphContext.cpp diff --git a/src/JSystem/JAWExtSystem/JAWSystem.cpp b/libs/JSystem/src/JAWExtSystem/JAWSystem.cpp similarity index 100% rename from src/JSystem/JAWExtSystem/JAWSystem.cpp rename to libs/JSystem/src/JAWExtSystem/JAWSystem.cpp diff --git a/src/JSystem/JAWExtSystem/JAWWindow.cpp b/libs/JSystem/src/JAWExtSystem/JAWWindow.cpp similarity index 100% rename from src/JSystem/JAWExtSystem/JAWWindow.cpp rename to libs/JSystem/src/JAWExtSystem/JAWWindow.cpp diff --git a/src/JSystem/JAWExtSystem/JAWWindow3D.cpp b/libs/JSystem/src/JAWExtSystem/JAWWindow3D.cpp similarity index 100% rename from src/JSystem/JAWExtSystem/JAWWindow3D.cpp rename to libs/JSystem/src/JAWExtSystem/JAWWindow3D.cpp diff --git a/src/JSystem/JAudio2/JAIAudible.cpp b/libs/JSystem/src/JAudio2/JAIAudible.cpp similarity index 100% rename from src/JSystem/JAudio2/JAIAudible.cpp rename to libs/JSystem/src/JAudio2/JAIAudible.cpp diff --git a/src/JSystem/JAudio2/JAIAudience.cpp b/libs/JSystem/src/JAudio2/JAIAudience.cpp similarity index 100% rename from src/JSystem/JAudio2/JAIAudience.cpp rename to libs/JSystem/src/JAudio2/JAIAudience.cpp diff --git a/src/JSystem/JAudio2/JAISe.cpp b/libs/JSystem/src/JAudio2/JAISe.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISe.cpp rename to libs/JSystem/src/JAudio2/JAISe.cpp diff --git a/src/JSystem/JAudio2/JAISeMgr.cpp b/libs/JSystem/src/JAudio2/JAISeMgr.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISeMgr.cpp rename to libs/JSystem/src/JAudio2/JAISeMgr.cpp diff --git a/src/JSystem/JAudio2/JAISeq.cpp b/libs/JSystem/src/JAudio2/JAISeq.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISeq.cpp rename to libs/JSystem/src/JAudio2/JAISeq.cpp diff --git a/src/JSystem/JAudio2/JAISeqDataMgr.cpp b/libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISeqDataMgr.cpp rename to libs/JSystem/src/JAudio2/JAISeqDataMgr.cpp diff --git a/src/JSystem/JAudio2/JAISeqMgr.cpp b/libs/JSystem/src/JAudio2/JAISeqMgr.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISeqMgr.cpp rename to libs/JSystem/src/JAudio2/JAISeqMgr.cpp diff --git a/src/JSystem/JAudio2/JAISound.cpp b/libs/JSystem/src/JAudio2/JAISound.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISound.cpp rename to libs/JSystem/src/JAudio2/JAISound.cpp diff --git a/src/JSystem/JAudio2/JAISoundChild.cpp b/libs/JSystem/src/JAudio2/JAISoundChild.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISoundChild.cpp rename to libs/JSystem/src/JAudio2/JAISoundChild.cpp diff --git a/src/JSystem/JAudio2/JAISoundHandles.cpp b/libs/JSystem/src/JAudio2/JAISoundHandles.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISoundHandles.cpp rename to libs/JSystem/src/JAudio2/JAISoundHandles.cpp diff --git a/src/JSystem/JAudio2/JAISoundInfo.cpp b/libs/JSystem/src/JAudio2/JAISoundInfo.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISoundInfo.cpp rename to libs/JSystem/src/JAudio2/JAISoundInfo.cpp diff --git a/src/JSystem/JAudio2/JAISoundParams.cpp b/libs/JSystem/src/JAudio2/JAISoundParams.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISoundParams.cpp rename to libs/JSystem/src/JAudio2/JAISoundParams.cpp diff --git a/src/JSystem/JAudio2/JAISoundStarter.cpp b/libs/JSystem/src/JAudio2/JAISoundStarter.cpp similarity index 100% rename from src/JSystem/JAudio2/JAISoundStarter.cpp rename to libs/JSystem/src/JAudio2/JAISoundStarter.cpp diff --git a/src/JSystem/JAudio2/JAIStream.cpp b/libs/JSystem/src/JAudio2/JAIStream.cpp similarity index 100% rename from src/JSystem/JAudio2/JAIStream.cpp rename to libs/JSystem/src/JAudio2/JAIStream.cpp diff --git a/src/JSystem/JAudio2/JAIStreamDataMgr.cpp b/libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp similarity index 100% rename from src/JSystem/JAudio2/JAIStreamDataMgr.cpp rename to libs/JSystem/src/JAudio2/JAIStreamDataMgr.cpp diff --git a/src/JSystem/JAudio2/JAIStreamMgr.cpp b/libs/JSystem/src/JAudio2/JAIStreamMgr.cpp similarity index 100% rename from src/JSystem/JAudio2/JAIStreamMgr.cpp rename to libs/JSystem/src/JAudio2/JAIStreamMgr.cpp diff --git a/src/JSystem/JAudio2/JASAiCtrl.cpp b/libs/JSystem/src/JAudio2/JASAiCtrl.cpp similarity index 99% rename from src/JSystem/JAudio2/JASAiCtrl.cpp rename to libs/JSystem/src/JAudio2/JASAiCtrl.cpp index f9f9ee97be..29eae172ed 100644 --- a/src/JSystem/JAudio2/JASAiCtrl.cpp +++ b/libs/JSystem/src/JAudio2/JASAiCtrl.cpp @@ -14,8 +14,8 @@ #include "JSystem/JAudio2/JASLfo.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "JSystem/JUtility/JUTAssert.h" -#include -#include +#include +#include #include s16* JASDriver::sDmaDacBuffer[3]; diff --git a/src/JSystem/JAudio2/JASAramStream.cpp b/libs/JSystem/src/JAudio2/JASAramStream.cpp similarity index 100% rename from src/JSystem/JAudio2/JASAramStream.cpp rename to libs/JSystem/src/JAudio2/JASAramStream.cpp diff --git a/src/JSystem/JAudio2/JASAudioReseter.cpp b/libs/JSystem/src/JAudio2/JASAudioReseter.cpp similarity index 98% rename from src/JSystem/JAudio2/JASAudioReseter.cpp rename to libs/JSystem/src/JAudio2/JASAudioReseter.cpp index 9ef9f57b31..4d4f3517c1 100644 --- a/src/JSystem/JAudio2/JASAudioReseter.cpp +++ b/libs/JSystem/src/JAudio2/JASAudioReseter.cpp @@ -5,7 +5,7 @@ #include "JSystem/JAudio2/JASCriticalSection.h" #include "JSystem/JAudio2/JASDriverIF.h" #include "JSystem/JAudio2/JASDSPChannel.h" -#include +#include JASAudioReseter::JASAudioReseter() { field_0x0 = 0; diff --git a/src/JSystem/JAudio2/JASAudioThread.cpp b/libs/JSystem/src/JAudio2/JASAudioThread.cpp similarity index 88% rename from src/JSystem/JAudio2/JASAudioThread.cpp rename to libs/JSystem/src/JAudio2/JASAudioThread.cpp index 0277f00804..42fc277fea 100644 --- a/src/JSystem/JAudio2/JASAudioThread.cpp +++ b/libs/JSystem/src/JAudio2/JASAudioThread.cpp @@ -9,7 +9,7 @@ #include "JSystem/JAudio2/JASProbe.h" #include "JSystem/JAudio2/JASReport.h" #include "JSystem/JKernel/JKRSolidHeap.h" -#include +#include #include JASAudioThread::JASAudioThread(int stackSize, int msgCount, u32 threadPriority) @@ -21,7 +21,18 @@ JASAudioThread::JASAudioThread(int stackSize, int msgCount, u32 threadPriority) OSInitThreadQueue(&sThreadQueue); } +#if TARGET_PC +bool JASAudioThread::sThreadInitComplete = false; +OSMutex JASAudioThread::sThreadInitCompleteMutex; +OSCond JASAudioThread::sThreadInitCompleteCond; +#endif + void JASAudioThread::create(s32 threadPriority) { +#if TARGET_PC + OSInitMutex(&sThreadInitCompleteMutex); + OSInitCond(&sThreadInitCompleteCond); +#endif + #if PLATFORM_GCN const int size = 0x1400; #else @@ -68,6 +79,13 @@ void* JASAudioThread::run() { JASPoolAllocObject_MultiThreaded::newMemPool(0x48); JASDriver::startDMA(); +#if TARGET_PC + OSLockMutex(&sThreadInitCompleteMutex); + sThreadInitComplete = true; + OSUnlockMutex(&sThreadInitCompleteMutex); + OSSignalCond(&sThreadInitCompleteCond); +#endif + OSMessage msg; while (true) { msg = waitMessageBlock(); diff --git a/src/JSystem/JAudio2/JASBNKParser.cpp b/libs/JSystem/src/JAudio2/JASBNKParser.cpp similarity index 95% rename from src/JSystem/JAudio2/JASBNKParser.cpp rename to libs/JSystem/src/JAudio2/JASBNKParser.cpp index c19daf5fe1..9c99d7ef85 100644 --- a/src/JSystem/JAudio2/JASBNKParser.cpp +++ b/libs/JSystem/src/JAudio2/JASBNKParser.cpp @@ -71,7 +71,7 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h u8* envt = new (heap, 2) u8[envt_chunk->mSize]; JASCalc::bcopy(envt_chunk->mData, envt, envt_chunk->mSize); - u32* ptr = &osc_chunk->mCount; + BE(u32)* ptr = &osc_chunk->mCount; u32 count = *ptr++; JASOscillator::Data* osc_data = new (heap, 0) JASOscillator::Data[count]; for (int i = 0; i < count; i++, ptr += sizeof(TOsc) >> 2) { @@ -91,7 +91,7 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h bank->newInstTable(list_chunk->count, heap); for (int i = 0; i < list_chunk->count; i++) { if (list_chunk->mOffsets[i] != 0) { - u32* data = (u32*)((intptr_t)stream + list_chunk->mOffsets[i]); + BE(u32)* data = (BE(u32)*)((intptr_t)stream + list_chunk->mOffsets[i]); switch (*data++) { case 'Inst': { JASBasicInst* instp = new (heap, 0) JASBasicInst(); @@ -112,15 +112,15 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h keymap->setHighKey(*data >> 0x18); u32 fVar4 = data[1]; keymap->field_0x4 = JSULoHalf(data[3]); - keymap->field_0x8 = *(f32*)&data[4]; - keymap->field_0xc = *(f32*)&data[5]; + keymap->field_0x8 = *(BE(f32)*)&data[4]; + keymap->field_0xc = *(BE(f32)*)&data[5]; data += 2; for (int k = 0; k < fVar4; k++) { data += 4; } } - instp->setVolume(*(f32*)&data[0]); - instp->setPitch(*(f32*)&data[1]); + instp->setVolume(*(BE(f32)*)&data[0]); + instp->setPitch(*(BE(f32)*)&data[1]); bank->setInst(i, instp); break; } @@ -139,21 +139,21 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h JUT_ASSERT(277, percp); u32 type = data[0]; JUT_ASSERT(282, type == 'Pmap'); - u32* ptr = (u32*)((intptr_t)stream + offset); + BE(u32)* ptr = (BE(u32)*)((intptr_t)stream + offset); TPercData* perc_data = (TPercData*)(ptr + 1); percp->setVolume(perc_data->mVolume); percp->setPitch(perc_data->mPitch); percp->setPan((f32)perc_data->mPan / 127.0f); percp->setRelease(perc_data->mRelease); - ptr = (u32*)&perc_data->field_0xc; + ptr = (BE(u32)*)&perc_data->field_0xc; u32 count2 = *ptr++; for (int k = 0; k < count2; k++) { ptr++; } u32 pVar6 = ptr[0]; percp->field_0xe = JSULoHalf(ptr[2]); - percp->field_0x10 = *(f32*)&ptr[3]; - percp->field_0x14 = *(f32*)&ptr[4]; + percp->field_0x10 = *(BE(f32)*)&ptr[3]; + percp->field_0x14 = *(BE(f32)*)&ptr[4]; for (int k = 0; k < pVar6; k++) {} drump->setPerc(j, percp); } diff --git a/src/JSystem/JAudio2/JASBank.cpp b/libs/JSystem/src/JAudio2/JASBank.cpp similarity index 98% rename from src/JSystem/JAudio2/JASBank.cpp rename to libs/JSystem/src/JAudio2/JASBank.cpp index b307619694..d8d97f3e5d 100644 --- a/src/JSystem/JAudio2/JASBank.cpp +++ b/libs/JSystem/src/JAudio2/JASBank.cpp @@ -32,7 +32,7 @@ JASChannel* JASBank::noteOn(JASBank const* param_0, int param_1, u8 param_2, u8 if (!waveInfo) { return NULL; } - int wavePtr = waveHandle->getWavePtr(); + intptr_t wavePtr = waveHandle->getWavePtr(); if (!wavePtr) { return NULL; } diff --git a/src/JSystem/JAudio2/JASBasicBank.cpp b/libs/JSystem/src/JAudio2/JASBasicBank.cpp similarity index 100% rename from src/JSystem/JAudio2/JASBasicBank.cpp rename to libs/JSystem/src/JAudio2/JASBasicBank.cpp diff --git a/src/JSystem/JAudio2/JASBasicInst.cpp b/libs/JSystem/src/JAudio2/JASBasicInst.cpp similarity index 100% rename from src/JSystem/JAudio2/JASBasicInst.cpp rename to libs/JSystem/src/JAudio2/JASBasicInst.cpp diff --git a/src/JSystem/JAudio2/JASBasicWaveBank.cpp b/libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp similarity index 98% rename from src/JSystem/JAudio2/JASBasicWaveBank.cpp rename to libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp index a6134046be..56991eef2f 100644 --- a/src/JSystem/JAudio2/JASBasicWaveBank.cpp +++ b/libs/JSystem/src/JAudio2/JASBasicWaveBank.cpp @@ -125,7 +125,7 @@ u32 JASBasicWaveBank::TWaveGroup::getWaveID(int index) const { return mCtrlWaveArray[index].field_0x0; } -int JASBasicWaveBank::TWaveHandle::getWavePtr() const { +intptr_t JASBasicWaveBank::TWaveHandle::getWavePtr() const { JUT_ASSERT(313, mHeap); void* base = mHeap->getBase(); if (base == 0) { diff --git a/src/JSystem/JAudio2/JASCalc.cpp b/libs/JSystem/src/JAudio2/JASCalc.cpp similarity index 100% rename from src/JSystem/JAudio2/JASCalc.cpp rename to libs/JSystem/src/JAudio2/JASCalc.cpp diff --git a/src/JSystem/JAudio2/JASCallback.cpp b/libs/JSystem/src/JAudio2/JASCallback.cpp similarity index 100% rename from src/JSystem/JAudio2/JASCallback.cpp rename to libs/JSystem/src/JAudio2/JASCallback.cpp diff --git a/src/JSystem/JAudio2/JASChannel.cpp b/libs/JSystem/src/JAudio2/JASChannel.cpp similarity index 100% rename from src/JSystem/JAudio2/JASChannel.cpp rename to libs/JSystem/src/JAudio2/JASChannel.cpp diff --git a/src/JSystem/JAudio2/JASCmdStack.cpp b/libs/JSystem/src/JAudio2/JASCmdStack.cpp similarity index 98% rename from src/JSystem/JAudio2/JASCmdStack.cpp rename to libs/JSystem/src/JAudio2/JASCmdStack.cpp index 22b5a340e1..beaeee492e 100644 --- a/src/JSystem/JAudio2/JASCmdStack.cpp +++ b/libs/JSystem/src/JAudio2/JASCmdStack.cpp @@ -6,7 +6,7 @@ #include "JSystem/JAudio2/JASCmdStack.h" #include "JSystem/JAudio2/JASCriticalSection.h" -#include +#include JASPortCmd::TPortHead JASPortCmd::sCommandListOnce; diff --git a/src/JSystem/JAudio2/JASDSPChannel.cpp b/libs/JSystem/src/JAudio2/JASDSPChannel.cpp similarity index 100% rename from src/JSystem/JAudio2/JASDSPChannel.cpp rename to libs/JSystem/src/JAudio2/JASDSPChannel.cpp diff --git a/src/JSystem/JAudio2/JASDSPInterface.cpp b/libs/JSystem/src/JAudio2/JASDSPInterface.cpp similarity index 99% rename from src/JSystem/JAudio2/JASDSPInterface.cpp rename to libs/JSystem/src/JAudio2/JASDSPInterface.cpp index 9b6bbc069f..39c9c486e2 100644 --- a/src/JSystem/JAudio2/JASDSPInterface.cpp +++ b/libs/JSystem/src/JAudio2/JASDSPInterface.cpp @@ -9,7 +9,7 @@ #include "JSystem/JAudio2/osdsp_task.h" #include "JSystem/JAudio2/JASCriticalSection.h" #include "JSystem/JKernel/JKRSolidHeap.h" -#include +#include JASDsp::TChannel* JASDsp::CH_BUF; diff --git a/src/JSystem/JAudio2/JASDriverIF.cpp b/libs/JSystem/src/JAudio2/JASDriverIF.cpp similarity index 98% rename from src/JSystem/JAudio2/JASDriverIF.cpp rename to libs/JSystem/src/JAudio2/JASDriverIF.cpp index 083a969413..2c9f305b61 100644 --- a/src/JSystem/JAudio2/JASDriverIF.cpp +++ b/libs/JSystem/src/JAudio2/JASDriverIF.cpp @@ -3,7 +3,7 @@ #include "JSystem/JAudio2/JASDriverIF.h" #include "JSystem/JAudio2/JASAiCtrl.h" #include "JSystem/JAudio2/JASDSPInterface.h" -#include +#include void JASDriver::setDSPLevel(f32 param_0) { JASDsp::setDSPMixerLevel(param_0); diff --git a/src/JSystem/JAudio2/JASDrumSet.cpp b/libs/JSystem/src/JAudio2/JASDrumSet.cpp similarity index 100% rename from src/JSystem/JAudio2/JASDrumSet.cpp rename to libs/JSystem/src/JAudio2/JASDrumSet.cpp diff --git a/src/JSystem/JAudio2/JASDvdThread.cpp b/libs/JSystem/src/JAudio2/JASDvdThread.cpp similarity index 100% rename from src/JSystem/JAudio2/JASDvdThread.cpp rename to libs/JSystem/src/JAudio2/JASDvdThread.cpp diff --git a/src/JSystem/JAudio2/JASHeapCtrl.cpp b/libs/JSystem/src/JAudio2/JASHeapCtrl.cpp similarity index 98% rename from src/JSystem/JAudio2/JASHeapCtrl.cpp rename to libs/JSystem/src/JAudio2/JASHeapCtrl.cpp index f53676185e..65d19c03a9 100644 --- a/src/JSystem/JAudio2/JASHeapCtrl.cpp +++ b/libs/JSystem/src/JAudio2/JASHeapCtrl.cpp @@ -6,7 +6,12 @@ #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "JSystem/JUtility/JUTAssert.h" + +#ifdef __REVOLUTION_SDK__ +#include +#else #include +#endif JASHeap::JASHeap(JASDisposer* disposer) : mTree(this) { mDisposer = disposer; @@ -294,8 +299,10 @@ JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* JASKernel::sComma void JASKernel::setupRootHeap(JKRSolidHeap* heap, u32 size) { JUT_ASSERT(784, heap); sSystemHeap = JKRExpHeap::create(size, heap, false); + JKRHEAP_NAME(sSystemHeap, "JASKernel::sSystemHeap"); JUT_ASSERT(787, sSystemHeap); sCommandHeap = new (heap, 0) JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>(); + JKRHEAP_NAME(sSystemHeap, "JASKernel::sCommandHeap"); JUT_ASSERT(790, sCommandHeap); JASDram = heap; } diff --git a/src/JSystem/JAudio2/JASLfo.cpp b/libs/JSystem/src/JAudio2/JASLfo.cpp similarity index 100% rename from src/JSystem/JAudio2/JASLfo.cpp rename to libs/JSystem/src/JAudio2/JASLfo.cpp diff --git a/src/JSystem/JAudio2/JASOscillator.cpp b/libs/JSystem/src/JAudio2/JASOscillator.cpp similarity index 98% rename from src/JSystem/JAudio2/JASOscillator.cpp rename to libs/JSystem/src/JAudio2/JASOscillator.cpp index e67f997619..4073af7424 100644 --- a/src/JSystem/JAudio2/JASOscillator.cpp +++ b/libs/JSystem/src/JAudio2/JASOscillator.cpp @@ -109,7 +109,7 @@ void JASOscillator::update() { _08 = _10; _14++; _0C = _08; - const s16* ps = &psVar1[_14]._0; + const BE(s16)* ps = &psVar1[_14]._0; s16 r26 = ps[0]; switch(r26) { case 0xf: diff --git a/src/JSystem/JAudio2/JASProbe.cpp b/libs/JSystem/src/JAudio2/JASProbe.cpp similarity index 100% rename from src/JSystem/JAudio2/JASProbe.cpp rename to libs/JSystem/src/JAudio2/JASProbe.cpp diff --git a/src/JSystem/JAudio2/JASRegisterParam.cpp b/libs/JSystem/src/JAudio2/JASRegisterParam.cpp similarity index 100% rename from src/JSystem/JAudio2/JASRegisterParam.cpp rename to libs/JSystem/src/JAudio2/JASRegisterParam.cpp diff --git a/src/JSystem/JAudio2/JASReport.cpp b/libs/JSystem/src/JAudio2/JASReport.cpp similarity index 100% rename from src/JSystem/JAudio2/JASReport.cpp rename to libs/JSystem/src/JAudio2/JASReport.cpp diff --git a/src/JSystem/JAudio2/JASResArcLoader.cpp b/libs/JSystem/src/JAudio2/JASResArcLoader.cpp similarity index 100% rename from src/JSystem/JAudio2/JASResArcLoader.cpp rename to libs/JSystem/src/JAudio2/JASResArcLoader.cpp diff --git a/src/JSystem/JAudio2/JASSeqCtrl.cpp b/libs/JSystem/src/JAudio2/JASSeqCtrl.cpp similarity index 100% rename from src/JSystem/JAudio2/JASSeqCtrl.cpp rename to libs/JSystem/src/JAudio2/JASSeqCtrl.cpp diff --git a/src/JSystem/JAudio2/JASSeqParser.cpp b/libs/JSystem/src/JAudio2/JASSeqParser.cpp similarity index 100% rename from src/JSystem/JAudio2/JASSeqParser.cpp rename to libs/JSystem/src/JAudio2/JASSeqParser.cpp diff --git a/src/JSystem/JAudio2/JASSeqReader.cpp b/libs/JSystem/src/JAudio2/JASSeqReader.cpp similarity index 100% rename from src/JSystem/JAudio2/JASSeqReader.cpp rename to libs/JSystem/src/JAudio2/JASSeqReader.cpp diff --git a/src/JSystem/JAudio2/JASSimpleWaveBank.cpp b/libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp similarity index 95% rename from src/JSystem/JAudio2/JASSimpleWaveBank.cpp rename to libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp index c599a0e857..4918be0227 100644 --- a/src/JSystem/JAudio2/JASSimpleWaveBank.cpp +++ b/libs/JSystem/src/JAudio2/JASSimpleWaveBank.cpp @@ -39,7 +39,7 @@ JASWaveArc* JASSimpleWaveBank::getWaveArc(u32 no) { return this; } -int JASSimpleWaveBank::TWaveHandle::getWavePtr() const { +intptr_t JASSimpleWaveBank::TWaveHandle::getWavePtr() const { void* base = mHeap->getBase(); if (base == NULL) { return 0; diff --git a/src/JSystem/JAudio2/JASSoundParams.cpp b/libs/JSystem/src/JAudio2/JASSoundParams.cpp similarity index 100% rename from src/JSystem/JAudio2/JASSoundParams.cpp rename to libs/JSystem/src/JAudio2/JASSoundParams.cpp diff --git a/src/JSystem/JAudio2/JASTaskThread.cpp b/libs/JSystem/src/JAudio2/JASTaskThread.cpp similarity index 100% rename from src/JSystem/JAudio2/JASTaskThread.cpp rename to libs/JSystem/src/JAudio2/JASTaskThread.cpp diff --git a/src/JSystem/JAudio2/JASTrack.cpp b/libs/JSystem/src/JAudio2/JASTrack.cpp similarity index 100% rename from src/JSystem/JAudio2/JASTrack.cpp rename to libs/JSystem/src/JAudio2/JASTrack.cpp diff --git a/src/JSystem/JAudio2/JASTrackPort.cpp b/libs/JSystem/src/JAudio2/JASTrackPort.cpp similarity index 100% rename from src/JSystem/JAudio2/JASTrackPort.cpp rename to libs/JSystem/src/JAudio2/JASTrackPort.cpp diff --git a/src/JSystem/JAudio2/JASVoiceBank.cpp b/libs/JSystem/src/JAudio2/JASVoiceBank.cpp similarity index 100% rename from src/JSystem/JAudio2/JASVoiceBank.cpp rename to libs/JSystem/src/JAudio2/JASVoiceBank.cpp diff --git a/src/JSystem/JAudio2/JASWSParser.cpp b/libs/JSystem/src/JAudio2/JASWSParser.cpp similarity index 100% rename from src/JSystem/JAudio2/JASWSParser.cpp rename to libs/JSystem/src/JAudio2/JASWSParser.cpp diff --git a/src/JSystem/JAudio2/JASWaveArcLoader.cpp b/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp similarity index 99% rename from src/JSystem/JAudio2/JASWaveArcLoader.cpp rename to libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp index 277933fdb6..ad1a1e2a76 100644 --- a/src/JSystem/JAudio2/JASWaveArcLoader.cpp +++ b/libs/JSystem/src/JAudio2/JASWaveArcLoader.cpp @@ -6,7 +6,7 @@ #include "JSystem/JAudio2/JASMutex.h" #include "JSystem/JKernel/JKRDvdAramRipper.h" #include -#include +#include #include JASHeap* JASWaveArcLoader::sAramHeap; diff --git a/src/JSystem/JAudio2/JAUAudience.cpp b/libs/JSystem/src/JAudio2/JAUAudience.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUAudience.cpp rename to libs/JSystem/src/JAudio2/JAUAudience.cpp diff --git a/src/JSystem/JAudio2/JAUAudioArcInterpreter.cpp b/libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUAudioArcInterpreter.cpp rename to libs/JSystem/src/JAudio2/JAUAudioArcInterpreter.cpp diff --git a/src/JSystem/JAudio2/JAUAudioArcLoader.cpp b/libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUAudioArcLoader.cpp rename to libs/JSystem/src/JAudio2/JAUAudioArcLoader.cpp diff --git a/src/JSystem/JAudio2/JAUAudioMgr.cpp b/libs/JSystem/src/JAudio2/JAUAudioMgr.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUAudioMgr.cpp rename to libs/JSystem/src/JAudio2/JAUAudioMgr.cpp diff --git a/src/JSystem/JAudio2/JAUBankTable.cpp b/libs/JSystem/src/JAudio2/JAUBankTable.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUBankTable.cpp rename to libs/JSystem/src/JAudio2/JAUBankTable.cpp diff --git a/src/JSystem/JAudio2/JAUClusterSound.cpp b/libs/JSystem/src/JAudio2/JAUClusterSound.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUClusterSound.cpp rename to libs/JSystem/src/JAudio2/JAUClusterSound.cpp diff --git a/src/JSystem/JAudio2/JAUInitializer.cpp b/libs/JSystem/src/JAudio2/JAUInitializer.cpp similarity index 98% rename from src/JSystem/JAudio2/JAUInitializer.cpp rename to libs/JSystem/src/JAudio2/JAUInitializer.cpp index cbcd7ba62b..3800170f77 100644 --- a/src/JSystem/JAudio2/JAUInitializer.cpp +++ b/libs/JSystem/src/JAudio2/JAUInitializer.cpp @@ -20,7 +20,11 @@ JAU_JASInitializer::JAU_JASInitializer() { audioMemSize_ = 0; dvdThreadId_ = -1; audioThreadId_ = -1; +#if TARGET_PC + heapSize_ = 0x4000; +#else heapSize_ = 0x1000; +#endif dvdThreadPriority_ = 3; audioThreadPriority_ = 2; field_0x1c = 0x80; diff --git a/src/JSystem/JAudio2/JAUSectionHeap.cpp b/libs/JSystem/src/JAudio2/JAUSectionHeap.cpp similarity index 94% rename from src/JSystem/JAudio2/JAUSectionHeap.cpp rename to libs/JSystem/src/JAudio2/JAUSectionHeap.cpp index eb1f211070..b0c127187d 100644 --- a/src/JSystem/JAudio2/JAUSectionHeap.cpp +++ b/libs/JSystem/src/JAudio2/JAUSectionHeap.cpp @@ -14,7 +14,7 @@ #include "JSystem/JAudio2/JAUSoundTable.h" #include "JSystem/JAudio2/JAUStreamFileTable.h" #include "JSystem/JKernel/JKRSolidHeap.h" -#include +#include #include namespace { @@ -33,32 +33,32 @@ namespace { JAUStreamFileTable stack_14; stack_14.init(param_0); if (!stack_14.isValid()) { - field_0x4 = 0; - field_0x8 = NULL; + mNumStreamFiles = 0; + mStreamFileDVDEntryNums = NULL; return; } - field_0x4 = stack_14.getNumFiles(); - field_0x8 = new s32[field_0x4]; - if (!field_0x8) { - field_0x4 = 0; + mNumStreamFiles = stack_14.getNumFiles(); + mStreamFileDVDEntryNums = new s32[mNumStreamFiles]; + if (!mStreamFileDVDEntryNums) { + mNumStreamFiles = 0; return; } - for (u32 i = 0; i < field_0x4; i++) { - field_0x8[i] = DVDConvertPathToEntrynum(stack_14.getFilePath(i)); + for (u32 i = 0; i < mNumStreamFiles; i++) { + mStreamFileDVDEntryNums[i] = DVDConvertPathToEntrynum(stack_14.getFilePath(i)); } } virtual s32 getStreamFileEntry(JAISoundID id) { u32 short_id = id.id_.info.waveID; - if (short_id >= field_0x4) { + if (short_id >= mNumStreamFiles) { return -1; } - return field_0x8[short_id]; + return mStreamFileDVDEntryNums[short_id]; } - bool isValid() { return field_0x4; } + bool isValid() { return mNumStreamFiles; } - u32 field_0x4; - s32* field_0x8; + u32 mNumStreamFiles; + s32* mStreamFileDVDEntryNums; }; } @@ -76,8 +76,8 @@ JAUSection::TSectionData::TSectionData() { mBstDst = NULL; mBstnDst = NULL; field_0x80 = NULL; - field_0xa0 = 0; - field_0x9c = 0; + mWaveBankMemoryUsage = 0; + mBankMemoryUsage = 0; } void JAUSection::TSectionData::resetRegisteredBankTables() { @@ -294,13 +294,13 @@ JASWaveBank* JAUSection::newWaveBank(u32 bank_no, void const* param_1) { JUT_ASSERT(529, isBuilding()); { TPushCurrentHeap push(getHeap_()); - s32 r27 = getHeap_()->getFreeSize(); + s32 previousFree = getHeap_()->getFreeSize(); JASWaveBank* waveBank = JASWSParser::createWaveBank(param_1, getHeap_()); if (waveBank) { JUT_ASSERT(536, sectionHeap_->getWaveBankTable().getWaveBank( bank_no ) == NULL); sectionHeap_->getWaveBankTable().registWaveBank(bank_no, waveBank); data_.registeredWaveBankTables.set(bank_no, true); - data_.field_0xa0 += r27 - getHeap_()->getFreeSize(); + data_.mWaveBankMemoryUsage += previousFree - getHeap_()->getFreeSize(); return waveBank; } } @@ -332,7 +332,7 @@ JASBank* JAUSection::newBank(void const* param_0, u32 param_1) { { TPushCurrentHeap push(getHeap_()); u32 bank_no = JASBNKParser::getBankNumber(param_0); - s32 r25 = getHeap_()->getFreeSize(); + s32 previousFree = getHeap_()->getFreeSize(); JASBank* bank = JASBNKParser::createBank(param_0, getHeap_()); if (bank) { if (buildingBankTable_) { @@ -344,7 +344,7 @@ JASBank* JAUSection::newBank(void const* param_0, u32 param_1) { data_.registeredBankTables.set(bank_no, true); } bank->assignWaveBank(waveBank); - data_.field_0x9c += r25 - getHeap_()->getFreeSize(); + data_.mBankMemoryUsage += previousFree - getHeap_()->getFreeSize(); return bank; } } diff --git a/src/JSystem/JAudio2/JAUSeqCollection.cpp b/libs/JSystem/src/JAudio2/JAUSeqCollection.cpp similarity index 97% rename from src/JSystem/JAudio2/JAUSeqCollection.cpp rename to libs/JSystem/src/JAudio2/JAUSeqCollection.cpp index 074862e521..1301cbc4fd 100644 --- a/src/JSystem/JAudio2/JAUSeqCollection.cpp +++ b/libs/JSystem/src/JAudio2/JAUSeqCollection.cpp @@ -25,7 +25,7 @@ bool JAUSeqCollection::getSeqData(int param_0, int param_1, JAISeqData* param_2) return false; } u32 r29 = field_0x4[param_0]; - u32* puVar2 = (u32*)((u8*)field_0x8 + r29); + BE(u32)* puVar2 = (BE(u32)*)((u8*)field_0x8 + r29); if (param_1 >= puVar2[0]) { return false; } diff --git a/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp b/libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp similarity index 99% rename from src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp rename to libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp index 6b31c78a29..2fafe9a4bc 100644 --- a/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp +++ b/libs/JSystem/src/JAudio2/JAUSeqDataBlockMgr.cpp @@ -7,7 +7,7 @@ #include "JSystem/JAudio2/JAUSeqDataBlockMgr.h" #include "JSystem/JAudio2/JAUSoundInfo.h" #include "JSystem/JAudio2/JASResArcLoader.h" -#include +#include JAUSeqDataBlock::JAUSeqDataBlock() : field_0x0(this) {} diff --git a/src/JSystem/JAudio2/JAUSoundAnimator.cpp b/libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUSoundAnimator.cpp rename to libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp diff --git a/src/JSystem/JAudio2/JAUSoundObject.cpp b/libs/JSystem/src/JAudio2/JAUSoundObject.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUSoundObject.cpp rename to libs/JSystem/src/JAudio2/JAUSoundObject.cpp diff --git a/src/JSystem/JAudio2/JAUSoundTable.cpp b/libs/JSystem/src/JAudio2/JAUSoundTable.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUSoundTable.cpp rename to libs/JSystem/src/JAudio2/JAUSoundTable.cpp diff --git a/src/JSystem/JAudio2/JAUStreamFileTable.cpp b/libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp similarity index 100% rename from src/JSystem/JAudio2/JAUStreamFileTable.cpp rename to libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp diff --git a/src/JSystem/JAudio2/dspproc.cpp b/libs/JSystem/src/JAudio2/dspproc.cpp similarity index 98% rename from src/JSystem/JAudio2/dspproc.cpp rename to libs/JSystem/src/JAudio2/dspproc.cpp index 8d4dd26dfe..a9c08e37ff 100644 --- a/src/JSystem/JAudio2/dspproc.cpp +++ b/libs/JSystem/src/JAudio2/dspproc.cpp @@ -3,6 +3,7 @@ #include "JSystem/JAudio2/dspproc.h" #include "JSystem/JAudio2/dsptask.h" #include "JSystem/JAudio2/JASDSPInterface.h" +#include "os_report.h" void DSPReleaseHalt2(u32 msg) { u32 msgs[2]; diff --git a/src/JSystem/JAudio2/dsptask.cpp b/libs/JSystem/src/JAudio2/dsptask.cpp similarity index 99% rename from src/JSystem/JAudio2/dsptask.cpp rename to libs/JSystem/src/JAudio2/dsptask.cpp index bbdf47d64a..86d6323333 100644 --- a/src/JSystem/JAudio2/dsptask.cpp +++ b/libs/JSystem/src/JAudio2/dsptask.cpp @@ -3,6 +3,7 @@ #include "JSystem/JAudio2/dsptask.h" #include "JSystem/JAudio2/osdsp.h" #include "global.h" +#include "os_report.h" static void DspInitWork(); static void DspHandShake(void* param_0); diff --git a/src/JSystem/JAudio2/osdsp.cpp b/libs/JSystem/src/JAudio2/osdsp.cpp similarity index 94% rename from src/JSystem/JAudio2/osdsp.cpp rename to libs/JSystem/src/JAudio2/osdsp.cpp index f147b6e81b..a5641a7e6d 100644 --- a/src/JSystem/JAudio2/osdsp.cpp +++ b/libs/JSystem/src/JAudio2/osdsp.cpp @@ -2,8 +2,8 @@ #include "JSystem/JAudio2/osdsp.h" #include "JSystem/JAudio2/osdsp_task.h" -#include -#include +#include +#include extern "C" void __DSP_insert_task(DSPTaskInfo*); extern "C" void __DSP_boot_task(DSPTaskInfo*); diff --git a/src/JSystem/JAudio2/osdsp_task.cpp b/libs/JSystem/src/JAudio2/osdsp_task.cpp similarity index 98% rename from src/JSystem/JAudio2/osdsp_task.cpp rename to libs/JSystem/src/JAudio2/osdsp_task.cpp index 4643d93af8..d9f4973880 100644 --- a/src/JSystem/JAudio2/osdsp_task.cpp +++ b/libs/JSystem/src/JAudio2/osdsp_task.cpp @@ -2,8 +2,8 @@ #include "JSystem/JAudio2/osdsp_task.h" #include "JSystem/JAudio2/dspproc.h" -#include -#include +#include +#include extern DSPTaskInfo* __DSP_first_task; extern DSPTaskInfo* __DSP_curr_task; diff --git a/src/JSystem/JFramework/JFWDisplay.cpp b/libs/JSystem/src/JFramework/JFWDisplay.cpp similarity index 98% rename from src/JSystem/JFramework/JFWDisplay.cpp rename to libs/JSystem/src/JFramework/JFWDisplay.cpp index 652474d15d..4041009ee7 100644 --- a/src/JSystem/JFramework/JFWDisplay.cpp +++ b/libs/JSystem/src/JFramework/JFWDisplay.cpp @@ -9,6 +9,8 @@ #include "JSystem/JUtility/JUTConsole.h" #include "JSystem/JUtility/JUTDbPrint.h" #include "JSystem/JUtility/JUTProcBar.h" +#include +#include #include "global.h" #include "aurora/aurora.h" @@ -53,7 +55,7 @@ JFWDisplay::~JFWDisplay() { JFWDisplay* JFWDisplay::sManager; -JFWDisplay* JFWDisplay::createManager(_GXRenderModeObj const* p_rObj, JKRHeap* p_heap, +JFWDisplay* JFWDisplay::createManager(GXRenderModeObj const* p_rObj, JKRHeap* p_heap, JUTXfb::EXfbNumber xfb_num, bool enableAlpha) { JUT_CONFIRM(173, sManager == NULL); if (p_rObj != NULL) { @@ -344,8 +346,8 @@ void JFWDisplay::waitBlanking(int param_0) { } static void waitForTick(u32 p1, u16 p2) { - - + + if (p1 != 0) { static OSTime nextTick = OSGetTime(); @@ -367,7 +369,7 @@ static void waitForTick(u32 p1, u16 p2) { } } while (((intptr_t)msg - (intptr_t)nextCount) < 0); nextCount = (intptr_t)msg + uVar1; - } + } } JSUList JFWAlarm::sList(false); @@ -427,6 +429,10 @@ void JFWDisplay::clearEfb(GXColor color) { } void JFWDisplay::clearEfb(int param_0, int param_1, int param_2, int param_3, GXColor color) { +#if TARGET_PC + puts("clearEfb not implemented"); + return; +#endif u16 width; u16 height; Mtx44 mtx; diff --git a/src/JSystem/JFramework/JFWSystem.cpp b/libs/JSystem/src/JFramework/JFWSystem.cpp similarity index 97% rename from src/JSystem/JFramework/JFWSystem.cpp rename to libs/JSystem/src/JFramework/JFWSystem.cpp index c41f7ffc8f..e240b8d19c 100644 --- a/src/JSystem/JFramework/JFWSystem.cpp +++ b/libs/JSystem/src/JFramework/JFWSystem.cpp @@ -45,7 +45,9 @@ void JFWSystem::firstInit() { OSInit(); DVDInit(); rootHeap = JKRExpHeap::createRoot(CSetUpParam::maxStdHeaps, false); + JKRHEAP_NAME(rootHeap, "Root"); systemHeap = JKRExpHeap::create(CSetUpParam::sysHeapSize, rootHeap, false); + JKRHEAP_NAME(systemHeap, "System"); } JKRThread* JFWSystem::mainThread; diff --git a/src/JSystem/JGadget/binary.cpp b/libs/JSystem/src/JGadget/binary.cpp similarity index 100% rename from src/JSystem/JGadget/binary.cpp rename to libs/JSystem/src/JGadget/binary.cpp diff --git a/src/JSystem/JGadget/define.cpp b/libs/JSystem/src/JGadget/define.cpp similarity index 100% rename from src/JSystem/JGadget/define.cpp rename to libs/JSystem/src/JGadget/define.cpp diff --git a/src/JSystem/JGadget/dolphin-stream-JORFile.cpp b/libs/JSystem/src/JGadget/dolphin-stream-JORFile.cpp similarity index 100% rename from src/JSystem/JGadget/dolphin-stream-JORFile.cpp rename to libs/JSystem/src/JGadget/dolphin-stream-JORFile.cpp diff --git a/src/JSystem/JGadget/linklist.cpp b/libs/JSystem/src/JGadget/linklist.cpp similarity index 100% rename from src/JSystem/JGadget/linklist.cpp rename to libs/JSystem/src/JGadget/linklist.cpp diff --git a/src/JSystem/JGadget/search.cpp b/libs/JSystem/src/JGadget/search.cpp similarity index 100% rename from src/JSystem/JGadget/search.cpp rename to libs/JSystem/src/JGadget/search.cpp diff --git a/src/JSystem/JGadget/std-list.cpp b/libs/JSystem/src/JGadget/std-list.cpp similarity index 100% rename from src/JSystem/JGadget/std-list.cpp rename to libs/JSystem/src/JGadget/std-list.cpp diff --git a/src/JSystem/JGadget/std-stream.cpp b/libs/JSystem/src/JGadget/std-stream.cpp similarity index 100% rename from src/JSystem/JGadget/std-stream.cpp rename to libs/JSystem/src/JGadget/std-stream.cpp diff --git a/src/JSystem/JGadget/std-streambuf.cpp b/libs/JSystem/src/JGadget/std-streambuf.cpp similarity index 100% rename from src/JSystem/JGadget/std-streambuf.cpp rename to libs/JSystem/src/JGadget/std-streambuf.cpp diff --git a/src/JSystem/JGadget/std-string.cpp b/libs/JSystem/src/JGadget/std-string.cpp similarity index 100% rename from src/JSystem/JGadget/std-string.cpp rename to libs/JSystem/src/JGadget/std-string.cpp diff --git a/src/JSystem/JGadget/std-vector.cpp b/libs/JSystem/src/JGadget/std-vector.cpp similarity index 100% rename from src/JSystem/JGadget/std-vector.cpp rename to libs/JSystem/src/JGadget/std-vector.cpp diff --git a/src/JSystem/JGadget/textreader.cpp b/libs/JSystem/src/JGadget/textreader.cpp similarity index 100% rename from src/JSystem/JGadget/textreader.cpp rename to libs/JSystem/src/JGadget/textreader.cpp diff --git a/src/JSystem/JGadget/xml-scanner.cpp b/libs/JSystem/src/JGadget/xml-scanner.cpp similarity index 100% rename from src/JSystem/JGadget/xml-scanner.cpp rename to libs/JSystem/src/JGadget/xml-scanner.cpp diff --git a/src/JSystem/JHostIO/JHIComm.cpp b/libs/JSystem/src/JHostIO/JHIComm.cpp similarity index 100% rename from src/JSystem/JHostIO/JHIComm.cpp rename to libs/JSystem/src/JHostIO/JHIComm.cpp diff --git a/src/JSystem/JHostIO/JHICommonMem.cpp b/libs/JSystem/src/JHostIO/JHICommonMem.cpp similarity index 100% rename from src/JSystem/JHostIO/JHICommonMem.cpp rename to libs/JSystem/src/JHostIO/JHICommonMem.cpp diff --git a/src/JSystem/JHostIO/JHIMccBuf.cpp b/libs/JSystem/src/JHostIO/JHIMccBuf.cpp similarity index 99% rename from src/JSystem/JHostIO/JHIMccBuf.cpp rename to libs/JSystem/src/JHostIO/JHIMccBuf.cpp index f013947e26..93bc7edf56 100644 --- a/src/JSystem/JHostIO/JHIMccBuf.cpp +++ b/libs/JSystem/src/JHostIO/JHIMccBuf.cpp @@ -3,7 +3,11 @@ #include "JSystem/JHostIO/JHIMccBuf.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JHostIO/JHIRMcc.h" +#if TARGET_PC +#include +#else #include +#endif #include void JHIReport(const char* fmt, ...) {} diff --git a/src/JSystem/JHostIO/JHIMemBuf.cpp b/libs/JSystem/src/JHostIO/JHIMemBuf.cpp similarity index 94% rename from src/JSystem/JHostIO/JHIMemBuf.cpp rename to libs/JSystem/src/JHostIO/JHIMemBuf.cpp index 7f02ca32b8..4fec9ad532 100644 --- a/src/JSystem/JHostIO/JHIMemBuf.cpp +++ b/libs/JSystem/src/JHostIO/JHIMemBuf.cpp @@ -2,7 +2,11 @@ #include "JSystem/JHostIO/JHICommonMem.h" #include "JSystem/JKernel/JKRHeap.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif int JHIMemBuf::create() { int rt = 1; diff --git a/src/JSystem/JHostIO/JHIRMcc.cpp b/libs/JSystem/src/JHostIO/JHIRMcc.cpp similarity index 98% rename from src/JSystem/JHostIO/JHIRMcc.cpp rename to libs/JSystem/src/JHostIO/JHIRMcc.cpp index b22a19d365..32590961f1 100644 --- a/src/JSystem/JHostIO/JHIRMcc.cpp +++ b/libs/JSystem/src/JHostIO/JHIRMcc.cpp @@ -1,7 +1,11 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JHostIO/JHIMccBuf.h" +#if TARGET_PC +#include +#else #include +#endif HIO2DeviceType gExiDevice = HIO2_DEVICE_INVALID; u8 data_8074bd04 = 1; diff --git a/src/JSystem/JHostIO/JHIhioASync.cpp b/libs/JSystem/src/JHostIO/JHIhioASync.cpp similarity index 98% rename from src/JSystem/JHostIO/JHIhioASync.cpp rename to libs/JSystem/src/JHostIO/JHIhioASync.cpp index 0dc75b4e76..bc8c5b9e2c 100644 --- a/src/JSystem/JHostIO/JHIhioASync.cpp +++ b/libs/JSystem/src/JHostIO/JHIhioASync.cpp @@ -2,7 +2,11 @@ #include "JSystem/JHostIO/JHIMccBuf.h" #include "JSystem/JHostIO/JHIRMcc.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #include "global.h" u32 gsEnableHostio; diff --git a/src/JSystem/JHostIO/JOREntry.cpp b/libs/JSystem/src/JHostIO/JOREntry.cpp similarity index 100% rename from src/JSystem/JHostIO/JOREntry.cpp rename to libs/JSystem/src/JHostIO/JOREntry.cpp diff --git a/src/JSystem/JHostIO/JORFile.cpp b/libs/JSystem/src/JHostIO/JORFile.cpp similarity index 98% rename from src/JSystem/JHostIO/JORFile.cpp rename to libs/JSystem/src/JHostIO/JORFile.cpp index 10dfa2af9a..f689f06534 100644 --- a/src/JSystem/JHostIO/JORFile.cpp +++ b/libs/JSystem/src/JHostIO/JORFile.cpp @@ -2,7 +2,11 @@ #include "JSystem/JHostIO/JORFile.h" #include "JSystem/JHostIO/JORServer.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif JORFile::JORFile() : mHandle(0), diff --git a/src/JSystem/JHostIO/JORHostInfo.cpp b/libs/JSystem/src/JHostIO/JORHostInfo.cpp similarity index 100% rename from src/JSystem/JHostIO/JORHostInfo.cpp rename to libs/JSystem/src/JHostIO/JORHostInfo.cpp diff --git a/src/JSystem/JHostIO/JORMessageBox.cpp b/libs/JSystem/src/JHostIO/JORMessageBox.cpp similarity index 100% rename from src/JSystem/JHostIO/JORMessageBox.cpp rename to libs/JSystem/src/JHostIO/JORMessageBox.cpp diff --git a/src/JSystem/JHostIO/JORServer.cpp b/libs/JSystem/src/JHostIO/JORServer.cpp similarity index 100% rename from src/JSystem/JHostIO/JORServer.cpp rename to libs/JSystem/src/JHostIO/JORServer.cpp diff --git a/src/JSystem/JHostIO/JORShellExecute.cpp b/libs/JSystem/src/JHostIO/JORShellExecute.cpp similarity index 100% rename from src/JSystem/JHostIO/JORShellExecute.cpp rename to libs/JSystem/src/JHostIO/JORShellExecute.cpp diff --git a/src/JSystem/JKernel/JKRAram.cpp b/libs/JSystem/src/JKernel/JKRAram.cpp similarity index 99% rename from src/JSystem/JKernel/JKRAram.cpp rename to libs/JSystem/src/JKernel/JKRAram.cpp index bbc49ff7eb..59a2a7848e 100644 --- a/src/JSystem/JKernel/JKRAram.cpp +++ b/libs/JSystem/src/JKernel/JKRAram.cpp @@ -6,8 +6,13 @@ #include "JSystem/JKernel/JKRDecomp.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JUtility/JUTException.h" +#ifdef __REVOLUTION_SDK__ +#include +#include +#else #include #include +#endif #include #if PLATFORM_GCN diff --git a/src/JSystem/JKernel/JKRAramArchive.cpp b/libs/JSystem/src/JKernel/JKRAramArchive.cpp similarity index 99% rename from src/JSystem/JKernel/JKRAramArchive.cpp rename to libs/JSystem/src/JKernel/JKRAramArchive.cpp index 5ed1bc181c..e318f41a64 100644 --- a/src/JSystem/JKernel/JKRAramArchive.cpp +++ b/libs/JSystem/src/JKernel/JKRAramArchive.cpp @@ -9,6 +9,7 @@ #include "JSystem/JUtility/JUTException.h" #include #include +#include "os_report.h" JKRAramArchive::JKRAramArchive() {} diff --git a/src/JSystem/JKernel/JKRAramBlock.cpp b/libs/JSystem/src/JKernel/JKRAramBlock.cpp similarity index 100% rename from src/JSystem/JKernel/JKRAramBlock.cpp rename to libs/JSystem/src/JKernel/JKRAramBlock.cpp diff --git a/src/JSystem/JKernel/JKRAramHeap.cpp b/libs/JSystem/src/JKernel/JKRAramHeap.cpp similarity index 99% rename from src/JSystem/JKernel/JKRAramHeap.cpp rename to libs/JSystem/src/JKernel/JKRAramHeap.cpp index a1ea01f816..051a5a5c01 100644 --- a/src/JSystem/JKernel/JKRAramHeap.cpp +++ b/libs/JSystem/src/JKernel/JKRAramHeap.cpp @@ -4,6 +4,7 @@ #include "JSystem/JKernel/JKRHeap.h" #include "global.h" #include +#include "os_report.h" JSUList JKRAramHeap::sAramList; diff --git a/src/JSystem/JKernel/JKRAramPiece.cpp b/libs/JSystem/src/JKernel/JKRAramPiece.cpp similarity index 99% rename from src/JSystem/JKernel/JKRAramPiece.cpp rename to libs/JSystem/src/JKernel/JKRAramPiece.cpp index d0b55ba07b..fd23501e97 100644 --- a/src/JSystem/JKernel/JKRAramPiece.cpp +++ b/libs/JSystem/src/JKernel/JKRAramPiece.cpp @@ -4,7 +4,7 @@ #include "JSystem/JKernel/JKRAram.h" #include "JSystem/JKernel/JKRDecomp.h" #include "JSystem/JUtility/JUTException.h" -#include +#include JKRAMCommand* JKRAramPiece::prepareCommand(int direction, uintptr_t src, uintptr_t dst, u32 length, JKRAramBlock* block, diff --git a/src/JSystem/JKernel/JKRAramStream.cpp b/libs/JSystem/src/JKernel/JKRAramStream.cpp similarity index 100% rename from src/JSystem/JKernel/JKRAramStream.cpp rename to libs/JSystem/src/JKernel/JKRAramStream.cpp diff --git a/src/JSystem/JKernel/JKRArchivePri.cpp b/libs/JSystem/src/JKernel/JKRArchivePri.cpp similarity index 100% rename from src/JSystem/JKernel/JKRArchivePri.cpp rename to libs/JSystem/src/JKernel/JKRArchivePri.cpp diff --git a/src/JSystem/JKernel/JKRArchivePub.cpp b/libs/JSystem/src/JKernel/JKRArchivePub.cpp similarity index 100% rename from src/JSystem/JKernel/JKRArchivePub.cpp rename to libs/JSystem/src/JKernel/JKRArchivePub.cpp diff --git a/src/JSystem/JKernel/JKRAssertHeap.cpp b/libs/JSystem/src/JKernel/JKRAssertHeap.cpp similarity index 100% rename from src/JSystem/JKernel/JKRAssertHeap.cpp rename to libs/JSystem/src/JKernel/JKRAssertHeap.cpp diff --git a/src/JSystem/JKernel/JKRCompArchive.cpp b/libs/JSystem/src/JKernel/JKRCompArchive.cpp similarity index 100% rename from src/JSystem/JKernel/JKRCompArchive.cpp rename to libs/JSystem/src/JKernel/JKRCompArchive.cpp diff --git a/src/JSystem/JKernel/JKRDecomp.cpp b/libs/JSystem/src/JKernel/JKRDecomp.cpp similarity index 100% rename from src/JSystem/JKernel/JKRDecomp.cpp rename to libs/JSystem/src/JKernel/JKRDecomp.cpp diff --git a/src/JSystem/JKernel/JKRDisposer.cpp b/libs/JSystem/src/JKernel/JKRDisposer.cpp similarity index 100% rename from src/JSystem/JKernel/JKRDisposer.cpp rename to libs/JSystem/src/JKernel/JKRDisposer.cpp diff --git a/src/JSystem/JKernel/JKRDvdAramRipper.cpp b/libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp similarity index 99% rename from src/JSystem/JKernel/JKRDvdAramRipper.cpp rename to libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp index 2ab9b6497b..6829dcede0 100644 --- a/src/JSystem/JKernel/JKRDvdAramRipper.cpp +++ b/libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp @@ -7,9 +7,9 @@ #include "JSystem/JKernel/JKRDecomp.h" #include "JSystem/JKernel/JKRDvdFile.h" #include "JSystem/JSupport/JSUFileStream.h" -#include -#include -#include +#include +#include +#include #include "global.h" #include diff --git a/src/JSystem/JKernel/JKRDvdArchive.cpp b/libs/JSystem/src/JKernel/JKRDvdArchive.cpp similarity index 99% rename from src/JSystem/JKernel/JKRDvdArchive.cpp rename to libs/JSystem/src/JKernel/JKRDvdArchive.cpp index 77f0553844..67fca69658 100644 --- a/src/JSystem/JKernel/JKRDvdArchive.cpp +++ b/libs/JSystem/src/JKernel/JKRDvdArchive.cpp @@ -10,6 +10,7 @@ #include #include "global.h" #include +#include "os_report.h" JKRDvdArchive::JKRDvdArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection) : JKRArchive(entryNum, MOUNT_DVD) { diff --git a/src/JSystem/JKernel/JKRDvdFile.cpp b/libs/JSystem/src/JKernel/JKRDvdFile.cpp similarity index 100% rename from src/JSystem/JKernel/JKRDvdFile.cpp rename to libs/JSystem/src/JKernel/JKRDvdFile.cpp diff --git a/src/JSystem/JKernel/JKRDvdRipper.cpp b/libs/JSystem/src/JKernel/JKRDvdRipper.cpp similarity index 99% rename from src/JSystem/JKernel/JKRDvdRipper.cpp rename to libs/JSystem/src/JKernel/JKRDvdRipper.cpp index caa3b0ef88..ae644ee9e1 100644 --- a/src/JSystem/JKernel/JKRDvdRipper.cpp +++ b/libs/JSystem/src/JKernel/JKRDvdRipper.cpp @@ -9,8 +9,8 @@ #include "JSystem/JKernel/JKRDecomp.h" #include "JSystem/JUtility/JUTException.h" #include -#include -#include +#include +#include #include static int JKRDecompressFromDVD(JKRDvdFile*, void*, u32, u32, u32, u32, u32*); diff --git a/src/JSystem/JKernel/JKRExpHeap.cpp b/libs/JSystem/src/JKernel/JKRExpHeap.cpp similarity index 100% rename from src/JSystem/JKernel/JKRExpHeap.cpp rename to libs/JSystem/src/JKernel/JKRExpHeap.cpp diff --git a/src/JSystem/JKernel/JKRFile.cpp b/libs/JSystem/src/JKernel/JKRFile.cpp similarity index 93% rename from src/JSystem/JKernel/JKRFile.cpp rename to libs/JSystem/src/JKernel/JKRFile.cpp index b267e93235..9aed6945fd 100644 --- a/src/JSystem/JKernel/JKRFile.cpp +++ b/libs/JSystem/src/JKernel/JKRFile.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JKernel/JKRFile.h" -#include +#include void JKRFile::read(void* data, s32 length, s32 offset) { JUT_ASSERT(32, ( length & 0x1f ) == 0); diff --git a/src/JSystem/JKernel/JKRFileCache.cpp b/libs/JSystem/src/JKernel/JKRFileCache.cpp similarity index 100% rename from src/JSystem/JKernel/JKRFileCache.cpp rename to libs/JSystem/src/JKernel/JKRFileCache.cpp diff --git a/src/JSystem/JKernel/JKRFileFinder.cpp b/libs/JSystem/src/JKernel/JKRFileFinder.cpp similarity index 100% rename from src/JSystem/JKernel/JKRFileFinder.cpp rename to libs/JSystem/src/JKernel/JKRFileFinder.cpp diff --git a/src/JSystem/JKernel/JKRFileLoader.cpp b/libs/JSystem/src/JKernel/JKRFileLoader.cpp similarity index 100% rename from src/JSystem/JKernel/JKRFileLoader.cpp rename to libs/JSystem/src/JKernel/JKRFileLoader.cpp diff --git a/src/JSystem/JKernel/JKRHeap.cpp b/libs/JSystem/src/JKernel/JKRHeap.cpp similarity index 98% rename from src/JSystem/JKernel/JKRHeap.cpp rename to libs/JSystem/src/JKernel/JKRHeap.cpp index 3364bfc492..87473072c4 100644 --- a/src/JSystem/JKernel/JKRHeap.cpp +++ b/libs/JSystem/src/JKernel/JKRHeap.cpp @@ -6,6 +6,11 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JKernel/JKRHeap.h" + +#if TARGET_PC +#include +#endif + #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTException.h" #ifdef __MWERKS__ @@ -17,6 +22,7 @@ #endif #include #include +#include "os_report.h" #if DEBUG u8 JKRValue_DEBUGFILL_NOTUSE = 0xFD; @@ -83,6 +89,10 @@ JKRHeap::JKRHeap(void* data, u32 size, JKRHeap* parent, bool errorFlag) mDebugFill = sDefaultFillFlag; mCheckMemoryFilled = data_80451380; mInitFlag = false; + +#if TARGET_PC + memset(mName, 0, sizeof(mName)); +#endif } JKRHeap::~JKRHeap() { @@ -668,4 +678,12 @@ void JKRHeap::setCurrentHeap(JKRHeap* heap) { JKRHeap* JKRHeap::getCurrentHeap() { return sCurrentHeap; } + +void JKRHeap::setName(const char* name) { + size_t len = strlen(name); + memcpy(mName, name, std::max(len, sizeof(mName)-1)); +} +const char* JKRHeap::getName() const { + return mName; +} #endif diff --git a/src/JSystem/JKernel/JKRMemArchive.cpp b/libs/JSystem/src/JKernel/JKRMemArchive.cpp similarity index 99% rename from src/JSystem/JKernel/JKRMemArchive.cpp rename to libs/JSystem/src/JKernel/JKRMemArchive.cpp index 028139746c..d3b17d8a63 100644 --- a/src/JSystem/JKernel/JKRMemArchive.cpp +++ b/libs/JSystem/src/JKernel/JKRMemArchive.cpp @@ -8,6 +8,7 @@ #include #include "global.h" #include +#include "os_report.h" JKRMemArchive::JKRMemArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection) : JKRArchive(entryNum, MOUNT_MEM) { diff --git a/src/JSystem/JKernel/JKRSolidHeap.cpp b/libs/JSystem/src/JKernel/JKRSolidHeap.cpp similarity index 100% rename from src/JSystem/JKernel/JKRSolidHeap.cpp rename to libs/JSystem/src/JKernel/JKRSolidHeap.cpp diff --git a/src/JSystem/JKernel/JKRThread.cpp b/libs/JSystem/src/JKernel/JKRThread.cpp similarity index 100% rename from src/JSystem/JKernel/JKRThread.cpp rename to libs/JSystem/src/JKernel/JKRThread.cpp diff --git a/src/JSystem/JMath/JMATrigonometric.cpp b/libs/JSystem/src/JMath/JMATrigonometric.cpp similarity index 100% rename from src/JSystem/JMath/JMATrigonometric.cpp rename to libs/JSystem/src/JMath/JMATrigonometric.cpp diff --git a/src/JSystem/JMath/JMath.cpp b/libs/JSystem/src/JMath/JMath.cpp similarity index 97% rename from src/JSystem/JMath/JMath.cpp rename to libs/JSystem/src/JMath/JMath.cpp index 3d39ea6f1f..3fa3b9aa28 100644 --- a/src/JSystem/JMath/JMath.cpp +++ b/libs/JSystem/src/JMath/JMath.cpp @@ -37,9 +37,9 @@ void JMAQuatLerp(__REGISTER const Quaternion* p, __REGISTER const Quaternion* q, ps_sum0 dp, dp, dp, dp } -#else +#else // clang-format on dp = p->x * q->x + p->y * q->y + p->z * q->z + p->w * q->w; -#endif // clang-format on +#endif f32 local_78 = dp; if (local_78 < 0.0) { int unused; @@ -77,6 +77,8 @@ void JMAFastVECNormalize(__REGISTER const Vec* src, __REGISTER Vec* dst) { dst->y = src->y * length; dst->z = src->z * length; #endif // clang-format on + + OSPanic(__FILE__, __LINE__, "UNIMPLEMENTED"); } void JMAVECScaleAdd(__REGISTER const Vec* vec1, __REGISTER const Vec* vec2, __REGISTER Vec* dst, @@ -101,6 +103,8 @@ void JMAVECScaleAdd(__REGISTER const Vec* vec1, __REGISTER const Vec* vec2, __RE dst->y = vec1->y * scale + vec2->y; dst->z = vec1->z * scale + vec2->z; #endif // clang-format on + + OSPanic(__FILE__, __LINE__, "UNIMPLEMENTED"); } void JMAMTXApplyScale(__REGISTER const Mtx src, __REGISTER Mtx dst, __REGISTER f32 xScale, diff --git a/src/JSystem/JMath/random.cpp b/libs/JSystem/src/JMath/random.cpp similarity index 100% rename from src/JSystem/JMath/random.cpp rename to libs/JSystem/src/JMath/random.cpp diff --git a/src/JSystem/JMessage/control.cpp b/libs/JSystem/src/JMessage/control.cpp similarity index 100% rename from src/JSystem/JMessage/control.cpp rename to libs/JSystem/src/JMessage/control.cpp diff --git a/src/JSystem/JMessage/data.cpp b/libs/JSystem/src/JMessage/data.cpp similarity index 100% rename from src/JSystem/JMessage/data.cpp rename to libs/JSystem/src/JMessage/data.cpp diff --git a/src/JSystem/JMessage/locale.cpp b/libs/JSystem/src/JMessage/locale.cpp similarity index 100% rename from src/JSystem/JMessage/locale.cpp rename to libs/JSystem/src/JMessage/locale.cpp diff --git a/src/JSystem/JMessage/processor.cpp b/libs/JSystem/src/JMessage/processor.cpp similarity index 100% rename from src/JSystem/JMessage/processor.cpp rename to libs/JSystem/src/JMessage/processor.cpp diff --git a/src/JSystem/JMessage/resource.cpp b/libs/JSystem/src/JMessage/resource.cpp similarity index 100% rename from src/JSystem/JMessage/resource.cpp rename to libs/JSystem/src/JMessage/resource.cpp diff --git a/src/JSystem/JParticle/JPABaseShape.cpp b/libs/JSystem/src/JParticle/JPABaseShape.cpp similarity index 99% rename from src/JSystem/JParticle/JPABaseShape.cpp rename to libs/JSystem/src/JParticle/JPABaseShape.cpp index 54991d2560..fffcf05cad 100644 --- a/src/JSystem/JParticle/JPABaseShape.cpp +++ b/libs/JSystem/src/JParticle/JPABaseShape.cpp @@ -6,8 +6,8 @@ #include "JSystem/JParticle/JPAEmitter.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JMath/JMATrigonometric.h" -#include -#include +#include +#include void JPASetPointSize(JPAEmitterWorkData* work) { GXSetPointSize((u8)(25.0f * work->mGlobalPtclScl.x), GX_TO_ONE); diff --git a/src/JSystem/JParticle/JPAChildShape.cpp b/libs/JSystem/src/JParticle/JPAChildShape.cpp similarity index 96% rename from src/JSystem/JParticle/JPAChildShape.cpp rename to libs/JSystem/src/JParticle/JPAChildShape.cpp index 4c2a0403b5..e360070022 100644 --- a/src/JSystem/JParticle/JPAChildShape.cpp +++ b/libs/JSystem/src/JParticle/JPAChildShape.cpp @@ -3,8 +3,8 @@ #include "JSystem/JParticle/JPAChildShape.h" #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAEmitter.h" -#include -#include +#include +#include void JPARegistChildPrmEnv(JPAEmitterWorkData* work) { JPAChildShape* csp = work->mpRes->getCsp(); diff --git a/src/JSystem/JParticle/JPADynamicsBlock.cpp b/libs/JSystem/src/JParticle/JPADynamicsBlock.cpp similarity index 100% rename from src/JSystem/JParticle/JPADynamicsBlock.cpp rename to libs/JSystem/src/JParticle/JPADynamicsBlock.cpp diff --git a/src/JSystem/JParticle/JPAEmitter.cpp b/libs/JSystem/src/JParticle/JPAEmitter.cpp similarity index 99% rename from src/JSystem/JParticle/JPAEmitter.cpp rename to libs/JSystem/src/JParticle/JPAEmitter.cpp index 5e7ccbc6dd..aa168a44a4 100644 --- a/src/JSystem/JParticle/JPAEmitter.cpp +++ b/libs/JSystem/src/JParticle/JPAEmitter.cpp @@ -5,7 +5,7 @@ #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JParticle/JPABaseShape.h" -#include +#include JPAEmitterCallBack::~JPAEmitterCallBack() { } diff --git a/src/JSystem/JParticle/JPAEmitterManager.cpp b/libs/JSystem/src/JParticle/JPAEmitterManager.cpp similarity index 99% rename from src/JSystem/JParticle/JPAEmitterManager.cpp rename to libs/JSystem/src/JParticle/JPAEmitterManager.cpp index 5af5785055..bd24df12d3 100644 --- a/src/JSystem/JParticle/JPAEmitterManager.cpp +++ b/libs/JSystem/src/JParticle/JPAEmitterManager.cpp @@ -6,7 +6,7 @@ #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JUtility/JUTAssert.h" -#include +#include JPAEmitterManager::JPAEmitterManager(u32 i_ptclNum, u32 i_emtrNum, JKRHeap* pHeap, u8 i_gidMax, u8 i_ridMax) { diff --git a/src/JSystem/JParticle/JPAExTexShape.cpp b/libs/JSystem/src/JParticle/JPAExTexShape.cpp similarity index 97% rename from src/JSystem/JParticle/JPAExTexShape.cpp rename to libs/JSystem/src/JParticle/JPAExTexShape.cpp index 0cf01703b9..bb9510050e 100644 --- a/src/JSystem/JParticle/JPAExTexShape.cpp +++ b/libs/JSystem/src/JParticle/JPAExTexShape.cpp @@ -3,7 +3,7 @@ #include "JSystem/JParticle/JPAExTexShape.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JParticle/JPAEmitter.h" -#include +#include void JPALoadExTex(JPAEmitterWorkData* work) { JPAExTexShape* ets = work->mpRes->getEts(); diff --git a/src/JSystem/JParticle/JPAExtraShape.cpp b/libs/JSystem/src/JParticle/JPAExtraShape.cpp similarity index 99% rename from src/JSystem/JParticle/JPAExtraShape.cpp rename to libs/JSystem/src/JParticle/JPAExtraShape.cpp index 43244dbce6..9fb84c36b6 100644 --- a/src/JSystem/JParticle/JPAExtraShape.cpp +++ b/libs/JSystem/src/JParticle/JPAExtraShape.cpp @@ -4,7 +4,7 @@ #include "JSystem/JMath/JMATrigonometric.h" #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAEmitter.h" -#include +#include void JPACalcScaleX(JPAEmitterWorkData* work, JPABaseParticle* ptcl) { JPAExtraShape* esp = work->mpRes->getEsp(); diff --git a/src/JSystem/JParticle/JPAFieldBlock.cpp b/libs/JSystem/src/JParticle/JPAFieldBlock.cpp similarity index 100% rename from src/JSystem/JParticle/JPAFieldBlock.cpp rename to libs/JSystem/src/JParticle/JPAFieldBlock.cpp diff --git a/src/JSystem/JParticle/JPAKeyBlock.cpp b/libs/JSystem/src/JParticle/JPAKeyBlock.cpp similarity index 87% rename from src/JSystem/JParticle/JPAKeyBlock.cpp rename to libs/JSystem/src/JParticle/JPAKeyBlock.cpp index 82b7d81d56..035ede1d28 100644 --- a/src/JSystem/JParticle/JPAKeyBlock.cpp +++ b/libs/JSystem/src/JParticle/JPAKeyBlock.cpp @@ -5,7 +5,7 @@ JPAKeyBlock::JPAKeyBlock(const u8* data) : mDataStart(data) - , field_0x4(reinterpret_cast(&data[0xC])) + , field_0x4(reinterpret_cast(&data[0xC])) { } diff --git a/src/JSystem/JParticle/JPAMath.cpp b/libs/JSystem/src/JParticle/JPAMath.cpp similarity index 98% rename from src/JSystem/JParticle/JPAMath.cpp rename to libs/JSystem/src/JParticle/JPAMath.cpp index cd559572b5..93c4e00865 100644 --- a/src/JSystem/JParticle/JPAMath.cpp +++ b/libs/JSystem/src/JParticle/JPAMath.cpp @@ -112,7 +112,7 @@ void JPASetRMtxSTVecfromMtx(f32 const (*param_0)[4], f32 (*param_1)[4], param_3->set(param_0[0][3], param_0[1][3], param_0[2][3]); } -f32 JPACalcKeyAnmValue(f32 param_0, u16 param_1, f32 const* param_2) { +f32 JPACalcKeyAnmValue(f32 param_0, u16 param_1, BE(f32) const* param_2) { if (param_0 < param_2[0]) { return param_2[1]; } diff --git a/src/JSystem/JParticle/JPAParticle.cpp b/libs/JSystem/src/JParticle/JPAParticle.cpp similarity index 100% rename from src/JSystem/JParticle/JPAParticle.cpp rename to libs/JSystem/src/JParticle/JPAParticle.cpp diff --git a/src/JSystem/JParticle/JPAResource.cpp b/libs/JSystem/src/JParticle/JPAResource.cpp similarity index 97% rename from src/JSystem/JParticle/JPAResource.cpp rename to libs/JSystem/src/JParticle/JPAResource.cpp index efba3f323f..ee4658998c 100644 --- a/src/JSystem/JParticle/JPAResource.cpp +++ b/libs/JSystem/src/JParticle/JPAResource.cpp @@ -11,7 +11,7 @@ #include "JSystem/JParticle/JPAKeyBlock.h" #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAResourceManager.h" -#include +#include #include "global.h" JPAResource::JPAResource() { @@ -102,7 +102,10 @@ void JPAResource::init(JKRHeap* heap) { if (mpCalcEmitterFuncListNum != 0) { mpCalcEmitterFuncList = - (EmitterFunc*)JKRAllocFromHeap(heap, mpCalcEmitterFuncListNum * 4, 4); + (EmitterFunc*)JKRAllocFromHeap( + heap, + mpCalcEmitterFuncListNum * sizeof(EmitterFunc), + alignof(EmitterFunc)); } func_no = 0; @@ -200,7 +203,7 @@ void JPAResource::init(JKRHeap* heap) { if (mpCalcParticleFuncListNum != 0) { mpCalcParticleFuncList = - (ParticleFunc*)JKRAllocFromHeap(heap, mpCalcParticleFuncListNum * 4, 4); + (ParticleFunc*)JKRAllocFromHeap(heap, mpCalcParticleFuncListNum * sizeof(ParticleFunc), alignof(ParticleFunc)); } func_no = 0; @@ -320,7 +323,7 @@ void JPAResource::init(JKRHeap* heap) { if (mpCalcParticleChildFuncListNum != 0) { mpCalcParticleChildFuncList = - (ParticleFunc*)JKRAllocFromHeap(heap, mpCalcParticleChildFuncListNum * 4, 4); + (ParticleFunc*)JKRAllocFromHeap(heap, mpCalcParticleChildFuncListNum * sizeof(ParticleFunc), alignof(ParticleFunc)); } func_no = 0; @@ -365,7 +368,7 @@ void JPAResource::init(JKRHeap* heap) { if (mpDrawEmitterFuncListNum != 0) { mpDrawEmitterFuncList = - (EmitterFunc*)JKRAllocFromHeap(heap, mpDrawEmitterFuncListNum * 4, 4); + (EmitterFunc*)JKRAllocFromHeap(heap, mpDrawEmitterFuncListNum * sizeof(EmitterFunc), alignof(EmitterFunc)); } func_no = 0; @@ -468,7 +471,7 @@ void JPAResource::init(JKRHeap* heap) { if (mpDrawEmitterChildFuncListNum != 0) { mpDrawEmitterChildFuncList = - (EmitterFunc*)JKRAllocFromHeap(heap, mpDrawEmitterChildFuncListNum * 4, 4); + (EmitterFunc*)JKRAllocFromHeap(heap, mpDrawEmitterChildFuncListNum * sizeof(EmitterFunc), alignof(EmitterFunc)); } func_no = 0; @@ -518,7 +521,7 @@ void JPAResource::init(JKRHeap* heap) { if (mpDrawParticleFuncListNum != 0) { mpDrawParticleFuncList = - (ParticleFunc*)JKRAllocFromHeap(heap, mpDrawParticleFuncListNum * 4, 4); + (ParticleFunc*)JKRAllocFromHeap(heap, mpDrawParticleFuncListNum * sizeof(ParticleFunc), alignof(ParticleFunc)); } func_no = 0; @@ -628,7 +631,7 @@ void JPAResource::init(JKRHeap* heap) { if (mpDrawParticleChildFuncListNum != 0) { mpDrawParticleChildFuncList = - (ParticleFunc*)JKRAllocFromHeap(heap, mpDrawParticleChildFuncListNum * 4, 4); + (ParticleFunc*)JKRAllocFromHeap(heap, mpDrawParticleChildFuncListNum * sizeof(ParticleFunc), sizeof(EmitterFunc)); } func_no = 0; @@ -926,8 +929,8 @@ void JPAResource::setPTev() { int center_offset = pEsp != NULL ? (pEsp->getScaleCenterX() + 3 * pEsp->getScaleCenterY()) * 0xC : 0x30; int pos_offset = center_offset + base_plane_type * 0x6C; int crd_offset = (pBsp->getTilingS() + 2 * pBsp->getTilingT()) * 8; - GXSetArray(GX_VA_POS, jpa_pos + pos_offset, 3); - GXSetArray(GX_VA_TEX0, jpa_crd + crd_offset, 2); + GXSETARRAY(GX_VA_POS, jpa_pos + pos_offset, ARRAY_SIZEU(jpa_pos) - pos_offset, 3); + GXSETARRAY(GX_VA_TEX0, jpa_crd + crd_offset, ARRAY_SIZEU(jpa_crd) - crd_offset, 2); GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL); if (pEts != NULL) { @@ -969,8 +972,8 @@ void JPAResource::setCTev(JPAEmitterWorkData* work) { int base_plane_type = (pCsp->getType() == 3 || pCsp->getType() == 7) ? pCsp->getBasePlaneType() : 0; int pos_offset = 0x30 + base_plane_type * 0x6C; - GXSetArray(GX_VA_POS, jpa_pos + pos_offset, 3); - GXSetArray(GX_VA_TEX0, jpa_crd, 2); + GXSETARRAY(GX_VA_POS, jpa_pos + pos_offset, ARRAY_SIZEU(jpa_pos) - pos_offset, 3); + GXSETARRAY(GX_VA_TEX0, jpa_crd, ARRAY_SIZEU(jpa_crd), 2); GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP1, GX_COLOR_NULL); GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, 0x3C); GXSetTevDirect(GX_TEVSTAGE0); diff --git a/src/JSystem/JParticle/JPAResourceLoader.cpp b/libs/JSystem/src/JParticle/JPAResourceLoader.cpp similarity index 88% rename from src/JSystem/JParticle/JPAResourceLoader.cpp rename to libs/JSystem/src/JParticle/JPAResourceLoader.cpp index d0f3c8ebd4..bb772448cc 100644 --- a/src/JSystem/JParticle/JPAResourceLoader.cpp +++ b/libs/JSystem/src/JParticle/JPAResourceLoader.cpp @@ -11,6 +11,7 @@ #include "JSystem/JParticle/JPAKeyBlock.h" #include "JSystem/JParticle/JPAResource.h" #include "JSystem/JParticle/JPAResourceManager.h" +#include "os_report.h" static void dummy1() { JUT_WARN(0, "JPA : wrong version file %s\n"); @@ -18,7 +19,7 @@ static void dummy1() { } JPAResourceLoader::JPAResourceLoader(u8 const* data, JPAResourceManager* mgr) { - if (*(u32*)(data + 4) == '2-10') { + if (*(BE(u32)*)(data + 4) == '2-10') { load_jpc(data, mgr); } else { JUT_WARN(48, "JPA : wrong version file\n"); @@ -42,8 +43,8 @@ static void dummy2() { } struct JPAResourceHeader { - /* 0x0 */ u16 mUsrIdx; - /* 0x2 */ u16 mBlockNum; + /* 0x0 */ BE(u16) mUsrIdx; + /* 0x2 */ BE(u16) mBlockNum; /* 0x4 */ u8 mFieldBlockNum; /* 0x5 */ u8 mKeyBlockNum; /* 0x6 */ u8 mTDB1Num; @@ -51,14 +52,14 @@ struct JPAResourceHeader { void JPAResourceLoader::load_jpc(u8 const* data, JPAResourceManager* p_res_mgr) { JKRHeap* heap = p_res_mgr->mpHeap; - p_res_mgr->resMaxNum = *(u16*)(data + 8); - p_res_mgr->texMaxNum = *(u16*)(data + 0xA); + p_res_mgr->resMaxNum = *(BE(u16)*)(data + 8); + p_res_mgr->texMaxNum = *(BE(u16)*)(data + 0xA); p_res_mgr->pResAry = new (heap, 0) JPAResource*[p_res_mgr->resMaxNum]; p_res_mgr->pTexAry = new (heap, 0) JPATexture*[p_res_mgr->texMaxNum]; JUT_ASSERT(199, (p_res_mgr->pResAry != NULL) && (p_res_mgr->pTexAry != 0)); u32 offset = 0x10; - for (int i = 0; i < *(u16*)(data + 8); i++) { + for (int i = 0; i < *(BE(u16)*)(data + 8); i++) { JPAResourceHeader* header = (JPAResourceHeader*)(data + offset); JPAResource* p_res = new (heap, 0) JPAResource(); JUT_ASSERT(211, p_res != NULL); @@ -79,8 +80,8 @@ void JPAResourceLoader::load_jpc(u8 const* data, JPAResourceManager* p_res_mgr) u32 key_no = 0; for (int j = 0; j < header->mBlockNum; j++) { - u32 magic = *(u32*)(data + offset); - u32 size = *(u32*)(data + offset + 4); + u32 magic = *(BE(u32)*)(data + offset); + u32 size = *(BE(u32)*)(data + offset + 4); switch (magic) { case 'FLD1': p_res->ppFld[fld_no] = new (heap, 0) JPAFieldBlock(data + offset, heap); @@ -113,7 +114,7 @@ void JPAResourceLoader::load_jpc(u8 const* data, JPAResourceManager* p_res_mgr) JUT_ASSERT(270, p_res->pEts != NULL); break; case 'TDB1': - p_res->mpTDB1 = (const u16*)(data + offset + 8); + p_res->mpTDB1 = (const BE(u16)*)(data + offset + 8); break; default: JUT_WARN(275, "JPA : wrong type block in jpc file %d %x\n", header->mBlockNum, offset); @@ -126,9 +127,9 @@ void JPAResourceLoader::load_jpc(u8 const* data, JPAResourceManager* p_res_mgr) p_res_mgr->registRes(p_res); } - offset = *(u32*)(data + 0xC); - for (int i = 0; i < *(u16*)(data + 0xA); i++) { - u32 size = *(u32*)(data + offset + 4); + offset = *(BE(u32)*)(data + 0xC); + for (int i = 0; i < *(BE(u16)*)(data + 0xA); i++) { + u32 size = *(BE(u32)*)(data + offset + 4); JPATexture* p_tex = new (heap, 0) JPATexture(data + offset); JUT_ASSERT(298, p_tex != NULL); p_res_mgr->registTex(p_tex); diff --git a/src/JSystem/JParticle/JPAResourceManager.cpp b/libs/JSystem/src/JParticle/JPAResourceManager.cpp similarity index 100% rename from src/JSystem/JParticle/JPAResourceManager.cpp rename to libs/JSystem/src/JParticle/JPAResourceManager.cpp diff --git a/src/JSystem/JParticle/JPATexture.cpp b/libs/JSystem/src/JParticle/JPATexture.cpp similarity index 100% rename from src/JSystem/JParticle/JPATexture.cpp rename to libs/JSystem/src/JParticle/JPATexture.cpp diff --git a/src/JSystem/JStage/JSGActor.cpp b/libs/JSystem/src/JStage/JSGActor.cpp similarity index 100% rename from src/JSystem/JStage/JSGActor.cpp rename to libs/JSystem/src/JStage/JSGActor.cpp diff --git a/src/JSystem/JStage/JSGAmbientLight.cpp b/libs/JSystem/src/JStage/JSGAmbientLight.cpp similarity index 100% rename from src/JSystem/JStage/JSGAmbientLight.cpp rename to libs/JSystem/src/JStage/JSGAmbientLight.cpp diff --git a/src/JSystem/JStage/JSGCamera.cpp b/libs/JSystem/src/JStage/JSGCamera.cpp similarity index 100% rename from src/JSystem/JStage/JSGCamera.cpp rename to libs/JSystem/src/JStage/JSGCamera.cpp diff --git a/src/JSystem/JStage/JSGFog.cpp b/libs/JSystem/src/JStage/JSGFog.cpp similarity index 100% rename from src/JSystem/JStage/JSGFog.cpp rename to libs/JSystem/src/JStage/JSGFog.cpp diff --git a/src/JSystem/JStage/JSGLight.cpp b/libs/JSystem/src/JStage/JSGLight.cpp similarity index 100% rename from src/JSystem/JStage/JSGLight.cpp rename to libs/JSystem/src/JStage/JSGLight.cpp diff --git a/src/JSystem/JStage/JSGObject.cpp b/libs/JSystem/src/JStage/JSGObject.cpp similarity index 100% rename from src/JSystem/JStage/JSGObject.cpp rename to libs/JSystem/src/JStage/JSGObject.cpp diff --git a/src/JSystem/JStage/JSGSystem.cpp b/libs/JSystem/src/JStage/JSGSystem.cpp similarity index 100% rename from src/JSystem/JStage/JSGSystem.cpp rename to libs/JSystem/src/JStage/JSGSystem.cpp diff --git a/src/JSystem/JStudio/JStudio/ctb-data.cpp b/libs/JSystem/src/JStudio/JStudio/ctb-data.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/ctb-data.cpp rename to libs/JSystem/src/JStudio/JStudio/ctb-data.cpp diff --git a/src/JSystem/JStudio/JStudio/ctb.cpp b/libs/JSystem/src/JStudio/JStudio/ctb.cpp similarity index 90% rename from src/JSystem/JStudio/JStudio/ctb.cpp rename to libs/JSystem/src/JStudio/JStudio/ctb.cpp index 5a2c0c11cb..ac8dda9ebb 100644 --- a/src/JSystem/JStudio/JStudio/ctb.cpp +++ b/libs/JSystem/src/JStudio/JStudio/ctb.cpp @@ -45,9 +45,9 @@ void JStudio::ctb::TControl::destroyObject_all() { // NONMATCHING - TPRObject_ID_equal issues JStudio::ctb::TObject* JStudio::ctb::TControl::getObject(void const* param_0, u32 param_1) { - JGadget::TLinkList::iterator begin = ocObject_.begin(); - JGadget::TLinkList::iterator end = ocObject_.end(); - JGadget::TLinkList::iterator local_50 = std::find_if(begin, end, object::TPRObject_ID_equal(param_0, param_1)); + JGadget::TLinkList::iterator begin = ocObject_.begin(); + JGadget::TLinkList::iterator end = ocObject_.end(); + JGadget::TLinkList::iterator local_50 = std::find_if(begin, end, object::TPRObject_ID_equal(param_0, param_1)); if ((local_50 != end) != false) { return &*local_50; } @@ -58,7 +58,7 @@ JStudio::ctb::TObject* JStudio::ctb::TControl::getObject_index(u32 param_0) { if (param_0 >= ocObject_.size()) { return 0; } - JGadget::TLinkList::iterator aiStack_14 = ocObject_.begin(); + JGadget::TLinkList::iterator aiStack_14 = ocObject_.begin(); std::advance(aiStack_14, param_0); return &*aiStack_14; } diff --git a/src/JSystem/JStudio/JStudio/functionvalue.cpp b/libs/JSystem/src/JStudio/JStudio/functionvalue.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/functionvalue.cpp rename to libs/JSystem/src/JStudio/JStudio/functionvalue.cpp diff --git a/src/JSystem/JStudio/JStudio/fvb-data-parse.cpp b/libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/fvb-data-parse.cpp rename to libs/JSystem/src/JStudio/JStudio/fvb-data-parse.cpp diff --git a/src/JSystem/JStudio/JStudio/fvb-data.cpp b/libs/JSystem/src/JStudio/JStudio/fvb-data.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/fvb-data.cpp rename to libs/JSystem/src/JStudio/JStudio/fvb-data.cpp diff --git a/src/JSystem/JStudio/JStudio/fvb.cpp b/libs/JSystem/src/JStudio/JStudio/fvb.cpp similarity index 98% rename from src/JSystem/JStudio/JStudio/fvb.cpp rename to libs/JSystem/src/JStudio/JStudio/fvb.cpp index 1f8b68b4a2..8aedc819ba 100644 --- a/src/JSystem/JStudio/JStudio/fvb.cpp +++ b/libs/JSystem/src/JStudio/JStudio/fvb.cpp @@ -329,7 +329,7 @@ void TControl::destroyObject_all() { } TObject* TControl::getObject(void const* id, u32 idSize) { - typedef JGadget::TLinkList::iterator iterator; + typedef JGadget::TLinkList::iterator iterator; iterator begin = ocObject_.begin(); iterator end = ocObject_.end(); iterator it = std::find_if(begin, end, object::TPRObject_ID_equal(id, idSize)); @@ -341,7 +341,7 @@ TObject* TControl::getObject_index(u32 index) { return NULL; } - JGadget::TLinkList::iterator it = ocObject_.begin(); + JGadget::TLinkList::iterator it = ocObject_.begin(); std::advance(it, index); return &*it; } diff --git a/src/JSystem/JStudio/JStudio/jstudio-control.cpp b/libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp similarity index 99% rename from src/JSystem/JStudio/JStudio/jstudio-control.cpp rename to libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp index dd11fe431b..ff192835b3 100644 --- a/src/JSystem/JStudio/JStudio/jstudio-control.cpp +++ b/libs/JSystem/src/JStudio/JStudio/jstudio-control.cpp @@ -82,7 +82,7 @@ void JStudio::TFactory::appendCreateObject(JStudio::TCreateObject* param_0) { JStudio::TObject* JStudio::TFactory::create(JStudio::stb::data::TParse_TBlock_object const& rParse) { - JGadget::TContainerEnumerator > aTStack_368(mList); + JGadget::TContainerEnumerator > aTStack_368(mList); while(aTStack_368) { TCreateObject& piVar1 = *aTStack_368; JStudio::TObject* obj; diff --git a/src/JSystem/JStudio/JStudio/jstudio-data.cpp b/libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/jstudio-data.cpp rename to libs/JSystem/src/JStudio/JStudio/jstudio-data.cpp diff --git a/src/JSystem/JStudio/JStudio/jstudio-math.cpp b/libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/jstudio-math.cpp rename to libs/JSystem/src/JStudio/JStudio/jstudio-math.cpp diff --git a/src/JSystem/JStudio/JStudio/jstudio-object.cpp b/libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/jstudio-object.cpp rename to libs/JSystem/src/JStudio/JStudio/jstudio-object.cpp diff --git a/src/JSystem/JStudio/JStudio/object-id.cpp b/libs/JSystem/src/JStudio/JStudio/object-id.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/object-id.cpp rename to libs/JSystem/src/JStudio/JStudio/object-id.cpp diff --git a/src/JSystem/JStudio/JStudio/stb-data-parse.cpp b/libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp similarity index 98% rename from src/JSystem/JStudio/JStudio/stb-data-parse.cpp rename to libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp index ec263a18e5..242f9f9beb 100644 --- a/src/JSystem/JStudio/JStudio/stb-data-parse.cpp +++ b/libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp @@ -2,7 +2,7 @@ #include "JSystem/JStudio/JStudio/stb-data-parse.h" #include "JSystem/JUtility/JUTAssert.h" -#include +#include #include namespace JStudio { diff --git a/src/JSystem/JStudio/JStudio/stb-data.cpp b/libs/JSystem/src/JStudio/JStudio/stb-data.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio/stb-data.cpp rename to libs/JSystem/src/JStudio/JStudio/stb-data.cpp diff --git a/src/JSystem/JStudio/JStudio/stb.cpp b/libs/JSystem/src/JStudio/JStudio/stb.cpp similarity index 96% rename from src/JSystem/JStudio/JStudio/stb.cpp rename to libs/JSystem/src/JStudio/JStudio/stb.cpp index 424bc4e3fb..b26074e59d 100644 --- a/src/JSystem/JStudio/JStudio/stb.cpp +++ b/libs/JSystem/src/JStudio/JStudio/stb.cpp @@ -331,9 +331,9 @@ void TControl::destroyObject_all() { // NONMATCHING - TPRObject_ID_equal copy issue TObject* TControl::getObject(void const* param_0, u32 param_1) { - JGadget::TLinkList::iterator begin = ocObject_.begin(); - JGadget::TLinkList::iterator end = ocObject_.end(); - JGadget::TLinkList::iterator local_50 = std::find_if(begin, end, object::TPRObject_ID_equal(param_0, param_1)); + JGadget::TLinkList::iterator begin = ocObject_.begin(); + JGadget::TLinkList::iterator end = ocObject_.end(); + JGadget::TLinkList::iterator local_50 = std::find_if(begin, end, object::TPRObject_ID_equal(param_0, param_1)); if ((local_50 != end) != false) { return &*local_50; } @@ -343,7 +343,7 @@ TObject* TControl::getObject(void const* param_0, u32 param_1) { void TControl::reset() { resetStatus_(); mObject_control.reset(); - JGadget::TContainerEnumerator > aTStack_18(ocObject_); + JGadget::TContainerEnumerator > aTStack_18(ocObject_); while (aTStack_18) { (*aTStack_18).reset(); } @@ -354,7 +354,7 @@ bool TControl::forward(u32 param_0) { bool rv = mObject_control.forward(param_0); int uVar7 = 0xf; int uVar6 = 0; - JGadget::TContainerEnumerator > aTStack_38(ocObject_); + JGadget::TContainerEnumerator > aTStack_38(ocObject_); while (aTStack_38) { JStudio::stb::TObject& this_00 = *aTStack_38; rv = this_00.forward(param_0) || rv; diff --git a/src/JSystem/JStudio/JStudioCameraEditor/control.cpp b/libs/JSystem/src/JStudio/JStudioCameraEditor/control.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioCameraEditor/control.cpp rename to libs/JSystem/src/JStudio/JStudioCameraEditor/control.cpp diff --git a/src/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.cpp b/libs/JSystem/src/JStudio/JStudioCameraEditor/controlset-csb-valueset.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.cpp rename to libs/JSystem/src/JStudio/JStudioCameraEditor/controlset-csb-valueset.cpp diff --git a/src/JSystem/JStudio/JStudioCameraEditor/csb-data.cpp b/libs/JSystem/src/JStudio/JStudioCameraEditor/csb-data.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioCameraEditor/csb-data.cpp rename to libs/JSystem/src/JStudio/JStudioCameraEditor/csb-data.cpp diff --git a/src/JSystem/JStudio/JStudioCameraEditor/csb.cpp b/libs/JSystem/src/JStudio/JStudioCameraEditor/csb.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioCameraEditor/csb.cpp rename to libs/JSystem/src/JStudio/JStudioCameraEditor/csb.cpp diff --git a/src/JSystem/JStudio/JStudioCameraEditor/sequence.cpp b/libs/JSystem/src/JStudio/JStudioCameraEditor/sequence.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioCameraEditor/sequence.cpp rename to libs/JSystem/src/JStudio/JStudioCameraEditor/sequence.cpp diff --git a/src/JSystem/JStudio/JStudioPreviewer/control.cpp b/libs/JSystem/src/JStudio/JStudioPreviewer/control.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioPreviewer/control.cpp rename to libs/JSystem/src/JStudio/JStudioPreviewer/control.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/anchor.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/anchor.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/anchor.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/anchor.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/console.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/console.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/console.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/console.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/controlset-anchor.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/controlset-anchor.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/controlset-anchor.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/controlset-anchor.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/controlset-preview.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/controlset-preview.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/controlset-preview.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/controlset-preview.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/controlset.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/controlset.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/controlset.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/controlset.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/interface.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/interface.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/interface.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/interface.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/jstudio-controlset-transform.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/jstudio-controlset-transform.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/jstudio-controlset-transform.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/jstudio-controlset-transform.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/scroll.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/scroll.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/scroll.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/scroll.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/visual.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/visual.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/visual.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/visual.cpp diff --git a/src/JSystem/JStudio/JStudioToolLibrary/xml.cpp b/libs/JSystem/src/JStudio/JStudioToolLibrary/xml.cpp similarity index 100% rename from src/JSystem/JStudio/JStudioToolLibrary/xml.cpp rename to libs/JSystem/src/JStudio/JStudioToolLibrary/xml.cpp diff --git a/src/JSystem/JStudio/JStudio_JAudio2/control.cpp b/libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JAudio2/control.cpp rename to libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp diff --git a/src/JSystem/JStudio/JStudio_JAudio2/object-sound.cpp b/libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JAudio2/object-sound.cpp rename to libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp diff --git a/src/JSystem/JStudio/JStudio_JParticle/control.cpp b/libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JParticle/control.cpp rename to libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp diff --git a/src/JSystem/JStudio/JStudio_JParticle/object-particle.cpp b/libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JParticle/object-particle.cpp rename to libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/control.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/control.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/control.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/control.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/object-actor.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/object-actor.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/object-ambientlight.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/object-ambientlight.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/object-ambientlight.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/object-camera.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/object-camera.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/object-fog.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/object-fog.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/object-light.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/object-light.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp diff --git a/src/JSystem/JStudio/JStudio_JStage/object.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/object.cpp similarity index 100% rename from src/JSystem/JStudio/JStudio_JStage/object.cpp rename to libs/JSystem/src/JStudio/JStudio_JStage/object.cpp diff --git a/src/JSystem/JSupport/JSUFileStream.cpp b/libs/JSystem/src/JSupport/JSUFileStream.cpp similarity index 100% rename from src/JSystem/JSupport/JSUFileStream.cpp rename to libs/JSystem/src/JSupport/JSUFileStream.cpp diff --git a/src/JSystem/JSupport/JSUInputStream.cpp b/libs/JSystem/src/JSupport/JSUInputStream.cpp similarity index 94% rename from src/JSystem/JSupport/JSUInputStream.cpp rename to libs/JSystem/src/JSupport/JSUInputStream.cpp index cb5a2fdc09..30663eaa6a 100644 --- a/src/JSystem/JSupport/JSUInputStream.cpp +++ b/libs/JSystem/src/JSupport/JSUInputStream.cpp @@ -2,7 +2,12 @@ #include "JSystem/JSupport/JSUInputStream.h" #include "JSystem/JSupport/JSURandomInputStream.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif +#include "os_report.h" JSUInputStream::~JSUInputStream() { if (!isGood()) { @@ -25,6 +30,7 @@ char* JSUInputStream::read(char* str) { setState(IOS_STATE_1); return 0; } + be_swap(sp8); s32 len = readData(str, sp8); str[len] = 0; diff --git a/src/JSystem/JSupport/JSUList.cpp b/libs/JSystem/src/JSupport/JSUList.cpp similarity index 100% rename from src/JSystem/JSupport/JSUList.cpp rename to libs/JSystem/src/JSupport/JSUList.cpp diff --git a/src/JSystem/JSupport/JSUMemoryStream.cpp b/libs/JSystem/src/JSupport/JSUMemoryStream.cpp similarity index 100% rename from src/JSystem/JSupport/JSUMemoryStream.cpp rename to libs/JSystem/src/JSupport/JSUMemoryStream.cpp diff --git a/src/JSystem/JSupport/JSUOutputStream.cpp b/libs/JSystem/src/JSupport/JSUOutputStream.cpp similarity index 93% rename from src/JSystem/JSupport/JSUOutputStream.cpp rename to libs/JSystem/src/JSupport/JSUOutputStream.cpp index dec0976ad3..b254405e8b 100644 --- a/src/JSystem/JSupport/JSUOutputStream.cpp +++ b/libs/JSystem/src/JSupport/JSUOutputStream.cpp @@ -2,8 +2,13 @@ #include "JSystem/JSupport/JSUOutputStream.h" #include "JSystem/JSupport/JSURandomOutputStream.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #include +#include "os_report.h" JSUOutputStream::~JSUOutputStream() { if (!isGood()) { diff --git a/src/JSystem/JUtility/JUTAssert.cpp b/libs/JSystem/src/JUtility/JUTAssert.cpp similarity index 99% rename from src/JSystem/JUtility/JUTAssert.cpp rename to libs/JSystem/src/JUtility/JUTAssert.cpp index 89182e7709..3f54bf511d 100644 --- a/src/JSystem/JUtility/JUTAssert.cpp +++ b/libs/JSystem/src/JUtility/JUTAssert.cpp @@ -5,7 +5,7 @@ #include "JSystem/JUtility/JUTDbPrint.h" #include "JSystem/JUtility/JUTDirectPrint.h" #include -#include +#include namespace JUTAssertion { diff --git a/src/JSystem/JUtility/JUTCacheFont.cpp b/libs/JSystem/src/JUtility/JUTCacheFont.cpp similarity index 99% rename from src/JSystem/JUtility/JUTCacheFont.cpp rename to libs/JSystem/src/JUtility/JUTCacheFont.cpp index e6bcbf93e1..37ba023d04 100644 --- a/src/JSystem/JUtility/JUTCacheFont.cpp +++ b/libs/JSystem/src/JUtility/JUTCacheFont.cpp @@ -5,7 +5,7 @@ #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTConsole.h" #include "JSystem/JKernel/JKRAram.h" -#include +#include #include #include #include "angle_utils.h" @@ -364,7 +364,7 @@ void JUTCacheFont::getGlyphFromAram(JUTCacheFont::TGlyphCacheInfo* param_0, GX_ANISO_1); } -void JUTCacheFont::loadImage(int param_0, _GXTexMapID texMapId) { +void JUTCacheFont::loadImage(int param_0, GXTexMapID texMapId) { TCachePage* cachePage = loadCache_char_subroutine(¶m_0, false); if (cachePage != NULL) { mWidth = cachePage->field_0xc * (param_0 % (int)cachePage->field_0x16); diff --git a/src/JSystem/JUtility/JUTConsole.cpp b/libs/JSystem/src/JUtility/JUTConsole.cpp similarity index 99% rename from src/JSystem/JUtility/JUTConsole.cpp rename to libs/JSystem/src/JUtility/JUTConsole.cpp index bd76a0cb9f..4fb9e43547 100644 --- a/src/JSystem/JUtility/JUTConsole.cpp +++ b/libs/JSystem/src/JUtility/JUTConsole.cpp @@ -6,7 +6,7 @@ #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTDirectPrint.h" #include "JSystem/JUtility/JUTVideo.h" -#include +#include #include #include "global.h" diff --git a/src/JSystem/JUtility/JUTDbPrint.cpp b/libs/JSystem/src/JUtility/JUTDbPrint.cpp similarity index 100% rename from src/JSystem/JUtility/JUTDbPrint.cpp rename to libs/JSystem/src/JUtility/JUTDbPrint.cpp diff --git a/src/JSystem/JUtility/JUTDirectFile.cpp b/libs/JSystem/src/JUtility/JUTDirectFile.cpp similarity index 99% rename from src/JSystem/JUtility/JUTDirectFile.cpp rename to libs/JSystem/src/JUtility/JUTDirectFile.cpp index ce2c4354d5..52d124d74e 100644 --- a/src/JSystem/JUtility/JUTDirectFile.cpp +++ b/libs/JSystem/src/JUtility/JUTDirectFile.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JUtility/JUTDirectFile.h" -#include +#include #include "global.h" #include diff --git a/src/JSystem/JUtility/JUTDirectPrint.cpp b/libs/JSystem/src/JUtility/JUTDirectPrint.cpp similarity index 99% rename from src/JSystem/JUtility/JUTDirectPrint.cpp rename to libs/JSystem/src/JUtility/JUTDirectPrint.cpp index ccb1f5c2e0..b8d5345c1d 100644 --- a/src/JSystem/JUtility/JUTDirectPrint.cpp +++ b/libs/JSystem/src/JUtility/JUTDirectPrint.cpp @@ -2,7 +2,7 @@ #include "JSystem/JUtility/JUTDirectPrint.h" #include -#include +#include #include "global.h" #include "angle_utils.h" diff --git a/src/JSystem/JUtility/JUTException.cpp b/libs/JSystem/src/JUtility/JUTException.cpp similarity index 99% rename from src/JSystem/JUtility/JUTException.cpp rename to libs/JSystem/src/JUtility/JUTException.cpp index 01eeab7516..608b805977 100644 --- a/src/JSystem/JUtility/JUTException.cpp +++ b/libs/JSystem/src/JUtility/JUTException.cpp @@ -1,3 +1,5 @@ +#include + #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JUtility/JUTException.h" @@ -7,7 +9,11 @@ #include #include #include -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #include #include @@ -766,7 +772,7 @@ void JUTException::waitTime(s32 timeout_ms) { } void JUTException::createFB() { - _GXRenderModeObj* renderMode = &GXNtsc480Int; + GXRenderModeObj* renderMode = &GXNtsc480Int; void* end = (void*)OSGetArenaHi(); u32 size = ((u16)ALIGN_NEXT((u16)renderMode->fbWidth, 16) * renderMode->xfbHeight) * 2; @@ -994,7 +1000,7 @@ void JUTException::createConsole(void* console_buffer, u32 console_buffer_size) } } -JUTExternalFB::JUTExternalFB(_GXRenderModeObj* renderMode, GXGamma gamma, void* buffer, u32 size) { +JUTExternalFB::JUTExternalFB(GXRenderModeObj* renderMode, GXGamma gamma, void* buffer, u32 size) { mRenderMode = renderMode; mSize = size; field_0x0C = 1; diff --git a/src/JSystem/JUtility/JUTFader.cpp b/libs/JSystem/src/JUtility/JUTFader.cpp similarity index 100% rename from src/JSystem/JUtility/JUTFader.cpp rename to libs/JSystem/src/JUtility/JUTFader.cpp diff --git a/src/JSystem/JUtility/JUTFont.cpp b/libs/JSystem/src/JUtility/JUTFont.cpp similarity index 100% rename from src/JSystem/JUtility/JUTFont.cpp rename to libs/JSystem/src/JUtility/JUTFont.cpp diff --git a/src/JSystem/JUtility/JUTFontData_Ascfont_fix12.cpp b/libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp similarity index 99% rename from src/JSystem/JUtility/JUTFontData_Ascfont_fix12.cpp rename to libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp index f37bad6200..35979ebc9f 100644 --- a/src/JSystem/JUtility/JUTFontData_Ascfont_fix12.cpp +++ b/libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp @@ -1,7 +1,11 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JUtility/JUTResFont.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #include "global.h" u8 const JUTResFONT_Ascfont_fix12[] ATTRIBUTE_ALIGN(32) = { diff --git a/src/JSystem/JUtility/JUTGamePad.cpp b/libs/JSystem/src/JUtility/JUTGamePad.cpp similarity index 99% rename from src/JSystem/JUtility/JUTGamePad.cpp rename to libs/JSystem/src/JUtility/JUTGamePad.cpp index 71b5dbd24e..31b8d59f1a 100644 --- a/src/JSystem/JUtility/JUTGamePad.cpp +++ b/libs/JSystem/src/JUtility/JUTGamePad.cpp @@ -2,6 +2,7 @@ #include "JSystem/JUtility/JUTGamePad.h" #include +#include "os_report.h" u32 JUTGamePad::CRumble::sChannelMask[4] = { PAD_CHAN0_BIT, diff --git a/src/JSystem/JUtility/JUTGraphFifo.cpp b/libs/JSystem/src/JUtility/JUTGraphFifo.cpp similarity index 100% rename from src/JSystem/JUtility/JUTGraphFifo.cpp rename to libs/JSystem/src/JUtility/JUTGraphFifo.cpp diff --git a/src/JSystem/JUtility/JUTNameTab.cpp b/libs/JSystem/src/JUtility/JUTNameTab.cpp similarity index 100% rename from src/JSystem/JUtility/JUTNameTab.cpp rename to libs/JSystem/src/JUtility/JUTNameTab.cpp diff --git a/src/JSystem/JUtility/JUTPalette.cpp b/libs/JSystem/src/JUtility/JUTPalette.cpp similarity index 90% rename from src/JSystem/JUtility/JUTPalette.cpp rename to libs/JSystem/src/JUtility/JUTPalette.cpp index 6ac89c701f..d98bf98c2e 100644 --- a/src/JSystem/JUtility/JUTPalette.cpp +++ b/libs/JSystem/src/JUtility/JUTPalette.cpp @@ -1,8 +1,8 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JUtility/JUTPalette.h" -#include -#include +#include +#include void JUTPalette::storeTLUT(GXTlut param_0, ResTLUT* tlut) { if (tlut == NULL) { @@ -29,7 +29,11 @@ void JUTPalette::storeTLUT(GXTlut param_0, GXTlutFmt param_1, JUTTransparency pa bool JUTPalette::load() { bool check = mNumColors != 0; if (check) { +#if TARGET_PC + GXLoadTlut(&mTlutObj, (GXTlut)mTlutName); +#else GXLoadTlut(&mTlutObj, mTlutName); +#endif } return check; diff --git a/src/JSystem/JUtility/JUTProcBar.cpp b/libs/JSystem/src/JUtility/JUTProcBar.cpp similarity index 100% rename from src/JSystem/JUtility/JUTProcBar.cpp rename to libs/JSystem/src/JUtility/JUTProcBar.cpp diff --git a/src/JSystem/JUtility/JUTResFont.cpp b/libs/JSystem/src/JUtility/JUTResFont.cpp similarity index 99% rename from src/JSystem/JUtility/JUTResFont.cpp rename to libs/JSystem/src/JUtility/JUTResFont.cpp index 7f36bc6d08..9efd746392 100644 --- a/src/JSystem/JUtility/JUTResFont.cpp +++ b/libs/JSystem/src/JUtility/JUTResFont.cpp @@ -5,7 +5,7 @@ #include "JSystem/JSupport/JSupport.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTConsole.h" -#include +#include JUTResFont::JUTResFont() { initialize_state(); diff --git a/src/JSystem/JUtility/JUTResource.cpp b/libs/JSystem/src/JUtility/JUTResource.cpp similarity index 100% rename from src/JSystem/JUtility/JUTResource.cpp rename to libs/JSystem/src/JUtility/JUTResource.cpp diff --git a/src/JSystem/JUtility/JUTTexture.cpp b/libs/JSystem/src/JUtility/JUTTexture.cpp similarity index 88% rename from src/JSystem/JUtility/JUTTexture.cpp rename to libs/JSystem/src/JUtility/JUTTexture.cpp index 8a3c00997c..d0f08381e6 100644 --- a/src/JSystem/JUtility/JUTTexture.cpp +++ b/libs/JSystem/src/JUtility/JUTTexture.cpp @@ -2,7 +2,8 @@ #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JUtility/JUTPalette.h" -#include +#include +#include "os_report.h" JUTTexture::~JUTTexture() { if (getCaptureFlag()) { @@ -16,7 +17,7 @@ JUTTexture::~JUTTexture() { void JUTTexture::storeTIMG(ResTIMG const* param_0, u8 param_1) { if (param_0 && param_1 < 0x10) { mTexInfo = param_0; - u32 imgOffset = RES_U32(mTexInfo->imageOffset); + u32 imgOffset = mTexInfo->imageOffset; mTexData = (void*)((intptr_t)mTexInfo + imgOffset); if (mTexInfo->imageOffset == 0) { @@ -31,9 +32,9 @@ void JUTTexture::storeTIMG(ResTIMG const* param_0, u8 param_1) { mMagFilter = mTexInfo->magFilter; mMinLOD = (s8)mTexInfo->minLOD; mMaxLOD = (s8)mTexInfo->maxLOD; - mLODBias = RES_S16(mTexInfo->LODBias); + mLODBias = mTexInfo->LODBias; - u16 numColors = RES_U16(mTexInfo->numColors); + u16 numColors = mTexInfo->numColors; if (numColors == 0) { initTexObj(); @@ -45,7 +46,7 @@ void JUTTexture::storeTIMG(ResTIMG const* param_0, u8 param_1) { tlut = (GXTlut)param_1; } - u32 palOffset = RES_U32(mTexInfo->paletteOffset); + u32 palOffset = mTexInfo->paletteOffset; if (mEmbPalette == NULL || !getEmbPaletteDelFlag()) { mEmbPalette = new JUTPalette(tlut, (GXTlutFmt)mTexInfo->colorFormat, @@ -141,13 +142,13 @@ void JUTTexture::init() { void JUTTexture::initTexObj() { GXBool mipmapEnabled = mTexInfo->mipmapEnabled != 0 ? GX_TRUE : GX_FALSE; u8* image = ((u8*)mTexInfo); - u32 imgOffset = RES_U32(mTexInfo->imageOffset); + u32 imgOffset = mTexInfo->imageOffset; image += (imgOffset ? imgOffset : 0x20); - GXInitTexObj(&mTexObj, image, RES_U16(mTexInfo->width), RES_U16(mTexInfo->height), + GXInitTexObj(&mTexObj, image, mTexInfo->width, mTexInfo->height, (GXTexFmt)mTexInfo->format, (GXTexWrapMode)mWrapS, (GXTexWrapMode)mWrapT, mipmapEnabled); GXInitTexObjLOD(&mTexObj, (GXTexFilter)mMinFilter, (GXTexFilter)mMagFilter, mMinLOD / 8.0f, - mMaxLOD / 8.0f, RES_S16(mLODBias) / 100.0f, mTexInfo->biasClamp, + mMaxLOD / 8.0f, mLODBias / 100.0f, mTexInfo->biasClamp, mTexInfo->doEdgeLOD, (GXAnisotropy)mTexInfo->maxAnisotropy); } @@ -155,16 +156,16 @@ void JUTTexture::initTexObj(GXTlut param_0) { GXBool mipmapEnabled = mTexInfo->mipmapEnabled != 0 ? GX_TRUE : GX_FALSE; mTlutName = param_0; u8* image = ((u8*)mTexInfo); - u32 imgOffset = RES_U32(mTexInfo->imageOffset); // Swap! + u32 imgOffset = mTexInfo->imageOffset; printf("[DIAG] initTexObj: Offset=%u, W=%u, H=%u, Ptr=%p\n", imgOffset, mTexInfo->width, mTexInfo->height, mTexInfo); image += (imgOffset ? imgOffset : 0x20); - GXInitTexObjCI(&mTexObj, image, RES_U16(mTexInfo->width), RES_U16(mTexInfo->height), + GXInitTexObjCI(&mTexObj, image, mTexInfo->width, mTexInfo->height, (GXCITexFmt)mTexInfo->format, (GXTexWrapMode)mWrapS, (GXTexWrapMode)mWrapT, mipmapEnabled, param_0); GXInitTexObjLOD(&mTexObj, (GXTexFilter)mMinFilter, (GXTexFilter)mMagFilter, mMinLOD / 8.0f, - mMaxLOD / 8.0f, RES_S16(mLODBias) / 100.0f, mTexInfo->biasClamp, + mMaxLOD / 8.0f, mLODBias / 100.0f, mTexInfo->biasClamp, mTexInfo->doEdgeLOD, (GXAnisotropy)mTexInfo->maxAnisotropy); } diff --git a/src/JSystem/JUtility/JUTVideo.cpp b/libs/JSystem/src/JUtility/JUTVideo.cpp similarity index 97% rename from src/JSystem/JUtility/JUTVideo.cpp rename to libs/JSystem/src/JUtility/JUTVideo.cpp index 77d9be31b1..338a3b6f4d 100644 --- a/src/JSystem/JUtility/JUTVideo.cpp +++ b/libs/JSystem/src/JUtility/JUTVideo.cpp @@ -3,8 +3,8 @@ #include "JSystem/JUtility/JUTVideo.h" #include "JSystem/JUtility/JUTDirectPrint.h" #include "JSystem/JUtility/JUTXfb.h" -#include -#include +#include +#include JUTVideo* JUTVideo::sManager; @@ -14,7 +14,7 @@ OSTick JUTVideo::sVideoInterval; static bool data_80451544; -JUTVideo* JUTVideo::createManager(_GXRenderModeObj const* param_0) { +JUTVideo* JUTVideo::createManager(GXRenderModeObj const* param_0) { if (sManager == NULL) { sManager = new JUTVideo(param_0); } diff --git a/src/JSystem/JUtility/JUTXfb.cpp b/libs/JSystem/src/JUtility/JUTXfb.cpp similarity index 98% rename from src/JSystem/JUtility/JUTXfb.cpp rename to libs/JSystem/src/JUtility/JUTXfb.cpp index 8e2f0a9173..2ce6085bf9 100644 --- a/src/JSystem/JUtility/JUTXfb.cpp +++ b/libs/JSystem/src/JUtility/JUTXfb.cpp @@ -3,7 +3,7 @@ #include "JSystem/JUtility/JUTXfb.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JUtility/JUTAssert.h" -#include +#include void JUTXfb::clearIndex() { mDrawingXfbIndex = -1; diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/cstdint b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/cstdint similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/cstdint rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/cstdint diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/limits b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/limits similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/limits rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/limits diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/memory b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/memory similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/memory rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/memory diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/new b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/new similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/new rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/new diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/stdint.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/type_traits b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/type_traits similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/type_traits rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/type_traits diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility b/libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility rename to libs/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cctype diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/climits b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/climits similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/climits rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/climits diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath similarity index 98% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath index a9e6715c74..fa856b9b80 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath +++ b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath @@ -2,7 +2,7 @@ #define MSL_CMATH_H_ #include -//#include +#include #define NAN (*(float*) __float_nan) #define HUGE_VALF (*(float*) __float_huge) @@ -175,6 +175,10 @@ inline float abs(float x) { return ::fabsf(x); } +inline long abs(long x) { + return ::labs(x); +} + inline float fmod(float x, float y) { return ::fmod(x, y); } diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdarg b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdarg similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdarg rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdarg diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstddef b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstddef similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstddef rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstddef diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdio diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstdlib diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/locale b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/locale similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/locale rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/locale diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdarg b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdarg similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdarg rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdarg diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtold.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtold.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtold.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtold.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/va_list b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/va_list similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/va_list rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/va_list diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wcstoul.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wcstoul.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wcstoul.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wcstoul.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wctype_api.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wctype_api.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wctype_api.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wctype_api.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wmem.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wmem.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wmem.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wmem.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wscanf.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wscanf.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wscanf.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wscanf.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_api.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_api.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_api.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_api.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_double.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_double.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_double.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_double.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/secure_error.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/secure_error.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/secure_error.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/secure_error.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wcstoul.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wcstoul.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wcstoul.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wcstoul.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wmem.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wmem.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wmem.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wmem.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wprintf.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wprintf.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wprintf.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wprintf.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wscanf.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wscanf.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wscanf.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wscanf.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wstring.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wstring.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wstring.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wstring.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log10.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log10.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log10.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log10.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log10.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log10.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log10.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log10.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/math_sun.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/math_sun.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/math_sun.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/math_sun.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/abort_exit_ppc_eabi.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/abort_exit_ppc_eabi.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/abort_exit_ppc_eabi.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/abort_exit_ppc_eabi.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c similarity index 100% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c similarity index 97% rename from src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c rename to libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c index 3916d03315..e94e6773c7 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c +++ b/libs/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c @@ -1,5 +1,5 @@ #include "uart_console_io_gcn.h" -#include +#include int InitializeUART(size_t); int WriteUARTN(unsigned char*, size_t); diff --git a/src/PowerPC_EABI_Support/MetroTRK/trk.h b/libs/PowerPC_EABI_Support/MetroTRK/trk.h similarity index 99% rename from src/PowerPC_EABI_Support/MetroTRK/trk.h rename to libs/PowerPC_EABI_Support/MetroTRK/trk.h index a90cf24d75..a831892236 100644 --- a/src/PowerPC_EABI_Support/MetroTRK/trk.h +++ b/libs/PowerPC_EABI_Support/MetroTRK/trk.h @@ -1,7 +1,7 @@ #ifndef __METROTRK_TRK_H__ #define __METROTRK_TRK_H__ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h b/libs/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h similarity index 73% rename from src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h index 6ef61bc186..28a45130e2 100644 --- a/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h +++ b/libs/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h @@ -1,6 +1,6 @@ #ifndef CPLUSLIBPPC_H #define CPLUSLIBPPC_H -#include +#include #endif /* CPLUSLIBPPC_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h b/libs/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h b/libs/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h b/libs/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/MWCPlusLib.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h b/libs/PowerPC_EABI_Support/Runtime/Inc/NMWException.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/NMWException.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h b/libs/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h similarity index 79% rename from src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h index 63cc422514..ba17672d64 100644 --- a/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h +++ b/libs/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h @@ -1,6 +1,6 @@ #ifndef __INIT_CPP_EXCEPTIONS_H #define __INIT_CPP_EXCEPTIONS_H -#include +#include #endif /* __INIT_CPP_EXCEPTIONS_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h b/libs/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h b/libs/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h b/libs/PowerPC_EABI_Support/Runtime/Inc/ptmf.h similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/ptmf.h diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h b/libs/PowerPC_EABI_Support/Runtime/Inc/runtime.h similarity index 69% rename from src/PowerPC_EABI_Support/Runtime/Inc/runtime.h rename to libs/PowerPC_EABI_Support/Runtime/Inc/runtime.h index b70bc02086..5d2ba1cce4 100644 --- a/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h +++ b/libs/PowerPC_EABI_Support/Runtime/Inc/runtime.h @@ -1,6 +1,6 @@ #ifndef RUNTIME_H #define RUNTIME_H -#include +#include #endif /* RUNTIME_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp b/libs/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp rename to libs/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp diff --git a/src/PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c b/libs/PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c similarity index 96% rename from src/PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c rename to libs/PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c index 33b700446d..6e59889e96 100644 --- a/src/PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c +++ b/libs/PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c @@ -3,7 +3,7 @@ * Description: */ -#include +#include inline static void InitDefaultHeap(void) { void* arenaLo; diff --git a/src/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp b/libs/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp rename to libs/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp diff --git a/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp b/libs/PowerPC_EABI_Support/Runtime/Src/NMWException.cp similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp rename to libs/PowerPC_EABI_Support/Runtime/Src/NMWException.cp diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp b/libs/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp rename to libs/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c b/libs/PowerPC_EABI_Support/Runtime/Src/__mem.c similarity index 95% rename from src/PowerPC_EABI_Support/Runtime/Src/__mem.c rename to libs/PowerPC_EABI_Support/Runtime/Src/__mem.c index bdf3410251..84c77474c0 100644 --- a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c +++ b/libs/PowerPC_EABI_Support/Runtime/Src/__mem.c @@ -1,4 +1,8 @@ -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif __declspec(section ".init") void* memcpy(void* dst, const void* src, size_t n) { const unsigned char* s; diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c b/libs/PowerPC_EABI_Support/Runtime/Src/__va_arg.c similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c rename to libs/PowerPC_EABI_Support/Runtime/Src/__va_arg.c diff --git a/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c b/libs/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c rename to libs/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c diff --git a/src/PowerPC_EABI_Support/Runtime/Src/ptmf.c b/libs/PowerPC_EABI_Support/Runtime/Src/ptmf.c similarity index 100% rename from src/PowerPC_EABI_Support/Runtime/Src/ptmf.c rename to libs/PowerPC_EABI_Support/Runtime/Src/ptmf.c diff --git a/src/PowerPC_EABI_Support/Runtime/Src/runtime.c b/libs/PowerPC_EABI_Support/Runtime/Src/runtime.c similarity index 99% rename from src/PowerPC_EABI_Support/Runtime/Src/runtime.c rename to libs/PowerPC_EABI_Support/Runtime/Src/runtime.c index c06b108a4d..db6721f101 100644 --- a/src/PowerPC_EABI_Support/Runtime/Src/runtime.c +++ b/libs/PowerPC_EABI_Support/Runtime/Src/runtime.c @@ -1,4 +1,8 @@ -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #ifdef __cplusplus extern "C" { diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Export/mslsupp.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Export/mslsupp.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Export/mslsupp.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Export/mslsupp.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/UDP_Stubs.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c similarity index 99% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c index d881cbad20..13a30383ba 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c +++ b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c @@ -3,7 +3,11 @@ #include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h" #include "TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h" #include "TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h" +#ifdef __REVOLUTION_SDK__ +#include +#else #include +#endif #include "global.h" extern u32 _db_stack_addr; diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c similarity index 99% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c index 9bfd2e02fd..4bf7447b6b 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c +++ b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c @@ -2,7 +2,7 @@ #include "TRK_MINNOW_DOLPHIN/Os/dolphin/DDH_Stubs.h" #include "TRK_MINNOW_DOLPHIN/Os/dolphin/GDEV_Stubs.h" #include "TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h" -#include +#include #include "trk.h" void TRKInterruptHandler(); diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/targcont.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/targcont.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/targcont.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/targcont.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c similarity index 95% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c index 0a73fe5f10..f70141de34 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c +++ b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c @@ -4,7 +4,7 @@ */ #include "TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h" -// #include +// #include // void OSReport(char* fmt, ...) causes extra crclr instruction. // look into issue later diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/dispatch.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/dispatch.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/dispatch.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/dispatch.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/main_TRK.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/main_TRK.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/main_TRK.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/main_TRK.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mainloop.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mainloop.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mainloop.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mainloop.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msg.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msg.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msg.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msg.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msgbuf.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msgbuf.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msgbuf.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msgbuf.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mutex_TRK.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mutex_TRK.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mutex_TRK.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mutex_TRK.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubevent.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubevent.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubevent.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubevent.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubinit.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubinit.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubinit.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubinit.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/serpoll.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/serpoll.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/serpoll.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/serpoll.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/string_TRK.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/string_TRK.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/string_TRK.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/string_TRK.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/support.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/support.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/support.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/support.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/exception.s diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c similarity index 93% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c index 53db0e46ba..3b2c408715 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c +++ b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c @@ -3,7 +3,7 @@ * Description: */ -#include +#include asm void TRK_flush_cache(u32, int) { // clang-format off diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c b/libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c rename to libs/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c diff --git a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c similarity index 98% rename from src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c rename to libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c index 43c1dbe374..a5abd68cdb 100644 --- a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c +++ b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_DDH_GCN/main.c @@ -1,6 +1,6 @@ #include "TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h" #include "TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h" -#include +#include #define DDH_ERR_NOT_INITIALIZED -0x2711 #define DDH_ERR_ALREADY_INITIALIZED -0x2715 diff --git a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c similarity index 97% rename from src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c rename to libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c index 50e60d6ea9..6b99d18e01 100644 --- a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c +++ b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c @@ -1,8 +1,8 @@ #include "TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h" #include "TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h" #include "global.h" -#include -#include +#include +#include #define GDEV_BUF_SIZE (0x500) diff --git a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/CircleBuffer.c b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/CircleBuffer.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/CircleBuffer.c rename to libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/CircleBuffer.c diff --git a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/MWTrace.c b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/MWTrace.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/MWTrace.c rename to libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/MWTrace.c diff --git a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/MWCriticalSection_gc.c b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/MWCriticalSection_gc.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/MWCriticalSection_gc.c rename to libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/MWCriticalSection_gc.c diff --git a/src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/cc_gdev.c b/libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/cc_gdev.c similarity index 100% rename from src/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/cc_gdev.c rename to libs/TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/cc_gdev.c diff --git a/include/dolphin/G2D.h b/libs/dolphin/include/dolphin/G2D.h similarity index 100% rename from include/dolphin/G2D.h rename to libs/dolphin/include/dolphin/G2D.h diff --git a/include/dolphin/ai.h b/libs/dolphin/include/dolphin/ai.h similarity index 94% rename from include/dolphin/ai.h rename to libs/dolphin/include/dolphin/ai.h index a42a59da2f..84db3343b0 100644 --- a/include/dolphin/ai.h +++ b/libs/dolphin/include/dolphin/ai.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_AI_H_ #define _DOLPHIN_AI_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -51,4 +48,3 @@ void AIReset(void); #endif #endif -#endif diff --git a/include/dolphin/am.h b/libs/dolphin/include/dolphin/am.h similarity index 100% rename from include/dolphin/am.h rename to libs/dolphin/include/dolphin/am.h diff --git a/include/dolphin/amc/AmcExi2Comm.h b/libs/dolphin/include/dolphin/amc/AmcExi2Comm.h similarity index 100% rename from include/dolphin/amc/AmcExi2Comm.h rename to libs/dolphin/include/dolphin/amc/AmcExi2Comm.h diff --git a/include/dolphin/amc/AmcTypes.h b/libs/dolphin/include/dolphin/amc/AmcTypes.h similarity index 100% rename from include/dolphin/amc/AmcTypes.h rename to libs/dolphin/include/dolphin/amc/AmcTypes.h diff --git a/include/dolphin/ar.h b/libs/dolphin/include/dolphin/ar.h similarity index 96% rename from include/dolphin/ar.h rename to libs/dolphin/include/dolphin/ar.h index 46f163aef9..a1206b4ea4 100644 --- a/include/dolphin/ar.h +++ b/libs/dolphin/include/dolphin/ar.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_AR_H_ #define _DOLPHIN_AR_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -75,4 +72,3 @@ void __ARClearInterrupt(void); #endif #endif -#endif diff --git a/include/dolphin/ax.h b/libs/dolphin/include/dolphin/ax.h similarity index 99% rename from include/dolphin/ax.h rename to libs/dolphin/include/dolphin/ax.h index c43a3cb639..0148446ee8 100644 --- a/include/dolphin/ax.h +++ b/libs/dolphin/include/dolphin/ax.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_AX_H_ #define _DOLPHIN_AX_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -325,5 +322,4 @@ extern u16 axDspSlave[AX_DSP_SLAVE_LENGTH]; } #endif -#endif #endif // _DOLPHIN_AX_H_ diff --git a/include/dolphin/axart.h b/libs/dolphin/include/dolphin/axart.h similarity index 98% rename from include/dolphin/axart.h rename to libs/dolphin/include/dolphin/axart.h index 1f12409f8f..46c375f71c 100644 --- a/include/dolphin/axart.h +++ b/libs/dolphin/include/dolphin/axart.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_AXART_H_ #define _DOLPHIN_AXART_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -224,5 +221,4 @@ void AXARTLpf(AXART_LPF*, AXVPB*); } #endif -#endif #endif // _DOLPHIN_AXART_H_ diff --git a/include/dolphin/axfx.h b/libs/dolphin/include/dolphin/axfx.h similarity index 98% rename from include/dolphin/axfx.h rename to libs/dolphin/include/dolphin/axfx.h index 93b34d33b6..53933c858f 100644 --- a/include/dolphin/axfx.h +++ b/libs/dolphin/include/dolphin/axfx.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_AXFX_H_ #define _DOLPHIN_AXFX_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -196,5 +193,4 @@ void AXFXReverbStdCallback(AXFX_BUFFERUPDATE* bufferUpdate, AXFX_REVERBSTD* reve } #endif -#endif #endif // _DOLPHIN_AXFX_H_ diff --git a/include/dolphin/base/PPCArch.h b/libs/dolphin/include/dolphin/base/PPCArch.h similarity index 99% rename from include/dolphin/base/PPCArch.h rename to libs/dolphin/include/dolphin/base/PPCArch.h index bb9e2845ab..8bdd0dd976 100644 --- a/include/dolphin/base/PPCArch.h +++ b/libs/dolphin/include/dolphin/base/PPCArch.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_PPCARCH #define _DOLPHIN_PPCARCH -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -542,5 +539,4 @@ void PMInstructions(void); } #endif -#endif #endif // _DOLPHIN_PPCARCH diff --git a/include/dolphin/card.h b/libs/dolphin/include/dolphin/card.h similarity index 99% rename from include/dolphin/card.h rename to libs/dolphin/include/dolphin/card.h index 6487d88f43..6ed175b71c 100644 --- a/include/dolphin/card.h +++ b/libs/dolphin/include/dolphin/card.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_CARD_H_ #define _DOLPHIN_CARD_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -323,4 +320,3 @@ s32 CARDWrite(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset); #endif #endif -#endif diff --git a/include/dolphin/charPipeline/fileCache.h b/libs/dolphin/include/dolphin/charPipeline/fileCache.h similarity index 100% rename from include/dolphin/charPipeline/fileCache.h rename to libs/dolphin/include/dolphin/charPipeline/fileCache.h diff --git a/include/dolphin/charPipeline/structures.h b/libs/dolphin/include/dolphin/charPipeline/structures.h similarity index 100% rename from include/dolphin/charPipeline/structures.h rename to libs/dolphin/include/dolphin/charPipeline/structures.h diff --git a/include/dolphin/charPipeline/structures/HTable.h b/libs/dolphin/include/dolphin/charPipeline/structures/HTable.h similarity index 100% rename from include/dolphin/charPipeline/structures/HTable.h rename to libs/dolphin/include/dolphin/charPipeline/structures/HTable.h diff --git a/include/dolphin/charPipeline/structures/List.h b/libs/dolphin/include/dolphin/charPipeline/structures/List.h similarity index 100% rename from include/dolphin/charPipeline/structures/List.h rename to libs/dolphin/include/dolphin/charPipeline/structures/List.h diff --git a/include/dolphin/charPipeline/structures/Tree.h b/libs/dolphin/include/dolphin/charPipeline/structures/Tree.h similarity index 100% rename from include/dolphin/charPipeline/structures/Tree.h rename to libs/dolphin/include/dolphin/charPipeline/structures/Tree.h diff --git a/include/dolphin/charPipeline/structures/dolphinString.h b/libs/dolphin/include/dolphin/charPipeline/structures/dolphinString.h similarity index 100% rename from include/dolphin/charPipeline/structures/dolphinString.h rename to libs/dolphin/include/dolphin/charPipeline/structures/dolphinString.h diff --git a/include/dolphin/charPipeline/texPalette.h b/libs/dolphin/include/dolphin/charPipeline/texPalette.h similarity index 100% rename from include/dolphin/charPipeline/texPalette.h rename to libs/dolphin/include/dolphin/charPipeline/texPalette.h diff --git a/include/dolphin/db.h b/libs/dolphin/include/dolphin/db.h similarity index 84% rename from include/dolphin/db.h rename to libs/dolphin/include/dolphin/db.h index 0a35c06198..c62f188e40 100644 --- a/include/dolphin/db.h +++ b/libs/dolphin/include/dolphin/db.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_DB_H_ #define _DOLPHIN_DB_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -22,5 +19,4 @@ u32 DBRead(u8*, u32); } #endif -#endif #endif // _DOLPHIN_DB_H_ diff --git a/include/dolphin/db/DBInterface.h b/libs/dolphin/include/dolphin/db/DBInterface.h similarity index 89% rename from include/dolphin/db/DBInterface.h rename to libs/dolphin/include/dolphin/db/DBInterface.h index 58a90f1e5d..7bfa354272 100644 --- a/include/dolphin/db/DBInterface.h +++ b/libs/dolphin/include/dolphin/db/DBInterface.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_DBINTERFACE_H_ #define _DOLPHIN_DBINTERFACE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -32,4 +29,3 @@ void __DBSetPresent(u32 value); #endif #endif -#endif diff --git a/include/dolphin/demo.h b/libs/dolphin/include/dolphin/demo.h similarity index 100% rename from include/dolphin/demo.h rename to libs/dolphin/include/dolphin/demo.h diff --git a/include/dolphin/demo/DEMOAVX.h b/libs/dolphin/include/dolphin/demo/DEMOAVX.h similarity index 100% rename from include/dolphin/demo/DEMOAVX.h rename to libs/dolphin/include/dolphin/demo/DEMOAVX.h diff --git a/include/dolphin/demo/DEMOInit.h b/libs/dolphin/include/dolphin/demo/DEMOInit.h similarity index 100% rename from include/dolphin/demo/DEMOInit.h rename to libs/dolphin/include/dolphin/demo/DEMOInit.h diff --git a/include/dolphin/demo/DEMOPad.h b/libs/dolphin/include/dolphin/demo/DEMOPad.h similarity index 100% rename from include/dolphin/demo/DEMOPad.h rename to libs/dolphin/include/dolphin/demo/DEMOPad.h diff --git a/include/dolphin/demo/DEMOPuts.h b/libs/dolphin/include/dolphin/demo/DEMOPuts.h similarity index 100% rename from include/dolphin/demo/DEMOPuts.h rename to libs/dolphin/include/dolphin/demo/DEMOPuts.h diff --git a/include/dolphin/demo/DEMOStats.h b/libs/dolphin/include/dolphin/demo/DEMOStats.h similarity index 100% rename from include/dolphin/demo/DEMOStats.h rename to libs/dolphin/include/dolphin/demo/DEMOStats.h diff --git a/include/dolphin/demo/DEMOWin.h b/libs/dolphin/include/dolphin/demo/DEMOWin.h similarity index 100% rename from include/dolphin/demo/DEMOWin.h rename to libs/dolphin/include/dolphin/demo/DEMOWin.h diff --git a/include/dolphin/dolphin.h b/libs/dolphin/include/dolphin/dolphin.h similarity index 87% rename from include/dolphin/dolphin.h rename to libs/dolphin/include/dolphin/dolphin.h index a81740a6cf..ac1ebcf7b0 100644 --- a/include/dolphin/dolphin.h +++ b/libs/dolphin/include/dolphin/dolphin.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_H_ #define _DOLPHIN_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -25,4 +22,3 @@ #include #endif -#endif diff --git a/include/dolphin/dsp.h b/libs/dolphin/include/dolphin/dsp.h similarity index 95% rename from include/dolphin/dsp.h rename to libs/dolphin/include/dolphin/dsp.h index 42c5e5f97f..72ffa82e62 100644 --- a/include/dolphin/dsp.h +++ b/libs/dolphin/include/dolphin/dsp.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_DSP_H_ #define _DOLPHIN_DSP_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -58,4 +55,3 @@ DSPTaskInfo* __DSPGetCurrentTask(void); #endif #endif -#endif diff --git a/include/dolphin/dtk.h b/libs/dolphin/include/dolphin/dtk.h similarity index 100% rename from include/dolphin/dtk.h rename to libs/dolphin/include/dolphin/dtk.h diff --git a/include/dolphin/dvd.h b/libs/dolphin/include/dolphin/dvd.h similarity index 99% rename from include/dolphin/dvd.h rename to libs/dolphin/include/dolphin/dvd.h index 382e82c318..ae036cad3f 100644 --- a/include/dolphin/dvd.h +++ b/libs/dolphin/include/dolphin/dvd.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_DVD_H_ #define _DOLPHIN_DVD_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -237,4 +234,3 @@ void DVDDumpWaitingQueue(void); #endif #endif -#endif diff --git a/include/dolphin/exi.h b/libs/dolphin/include/dolphin/exi.h similarity index 97% rename from include/dolphin/exi.h rename to libs/dolphin/include/dolphin/exi.h index 17cfc7d563..f094c36130 100644 --- a/include/dolphin/exi.h +++ b/libs/dolphin/include/dolphin/exi.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_EXI_H_ #define _DOLPHIN_EXI_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -104,4 +101,3 @@ char* EXIGetTypeString(u32 type); #endif #endif -#endif diff --git a/include/dolphin/gd.h b/libs/dolphin/include/dolphin/gd.h similarity index 84% rename from include/dolphin/gd.h rename to libs/dolphin/include/dolphin/gd.h index 2a39517353..57c929dad6 100644 --- a/include/dolphin/gd.h +++ b/libs/dolphin/include/dolphin/gd.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_H_ #define _DOLPHIN_GD_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -15,4 +12,3 @@ #include #endif -#endif diff --git a/include/dolphin/gd/GDBase.h b/libs/dolphin/include/dolphin/gd/GDBase.h similarity index 97% rename from include/dolphin/gd/GDBase.h rename to libs/dolphin/include/dolphin/gd/GDBase.h index 264f25bc4d..3e148c3228 100644 --- a/include/dolphin/gd/GDBase.h +++ b/libs/dolphin/include/dolphin/gd/GDBase.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_BASE_H #define _DOLPHIN_GD_BASE_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -152,4 +149,3 @@ static inline u32 GDGetGDLObjOffset(const GDLObj* dl) { #endif #endif -#endif diff --git a/include/dolphin/gd/GDFile.h b/libs/dolphin/include/dolphin/gd/GDFile.h similarity index 88% rename from include/dolphin/gd/GDFile.h rename to libs/dolphin/include/dolphin/gd/GDFile.h index 8ccd30a19b..3589fbb7ee 100644 --- a/include/dolphin/gd/GDFile.h +++ b/libs/dolphin/include/dolphin/gd/GDFile.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_FILE_H #define _DOLPHIN_GD_FILE_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -32,4 +29,3 @@ s32 GDReadDLFile(const char* fName, u32* numDLs, u32* numPLs, GDGList** DLDescAr #endif #endif -#endif diff --git a/include/dolphin/gd/GDGeometry.h b/libs/dolphin/include/dolphin/gd/GDGeometry.h similarity index 99% rename from include/dolphin/gd/GDGeometry.h rename to libs/dolphin/include/dolphin/gd/GDGeometry.h index 77bb313725..3b0424fbd4 100644 --- a/include/dolphin/gd/GDGeometry.h +++ b/libs/dolphin/include/dolphin/gd/GDGeometry.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_GEOMETRY_H_ #define _DOLPHIN_GD_GEOMETRY_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -525,4 +522,3 @@ void GDSetCoPlanar(u8 enable); #endif #endif -#endif diff --git a/include/dolphin/gd/GDIndirect.h b/libs/dolphin/include/dolphin/gd/GDIndirect.h similarity index 97% rename from include/dolphin/gd/GDIndirect.h rename to libs/dolphin/include/dolphin/gd/GDIndirect.h index 80064d577c..4ca854c31b 100644 --- a/include/dolphin/gd/GDIndirect.h +++ b/libs/dolphin/include/dolphin/gd/GDIndirect.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_INDIRECT_H_ #define _DOLPHIN_GD_INDIRECT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -92,4 +89,3 @@ void __GDSetIndTexMask(u32 mask); #endif #endif -#endif diff --git a/include/dolphin/gd/GDLight.h b/libs/dolphin/include/dolphin/gd/GDLight.h similarity index 96% rename from include/dolphin/gd/GDLight.h rename to libs/dolphin/include/dolphin/gd/GDLight.h index bc53ec4954..9c4f68d38d 100644 --- a/include/dolphin/gd/GDLight.h +++ b/libs/dolphin/include/dolphin/gd/GDLight.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_LIGHT_H_ #define _DOLPHIN_GD_LIGHT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include "global.h" @@ -79,4 +76,3 @@ inline static u16 __GDLightID2Offset(GXLightID id) { #endif #endif -#endif diff --git a/include/dolphin/gd/GDPixel.h b/libs/dolphin/include/dolphin/gd/GDPixel.h similarity index 97% rename from include/dolphin/gd/GDPixel.h rename to libs/dolphin/include/dolphin/gd/GDPixel.h index 8d9611f22f..158b04ec1f 100644 --- a/include/dolphin/gd/GDPixel.h +++ b/libs/dolphin/include/dolphin/gd/GDPixel.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_PIXEL_H #define _DOLPHIN_GD_PIXEL_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -96,4 +93,3 @@ void GDSetDrawSync(u16 token); #endif #endif -#endif diff --git a/include/dolphin/gd/GDTev.h b/libs/dolphin/include/dolphin/gd/GDTev.h similarity index 98% rename from include/dolphin/gd/GDTev.h rename to libs/dolphin/include/dolphin/gd/GDTev.h index f81cba54ed..baec8b5e2e 100644 --- a/include/dolphin/gd/GDTev.h +++ b/libs/dolphin/include/dolphin/gd/GDTev.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_TEV_H #define _DOLPHIN_GD_TEV_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -134,4 +131,3 @@ void GDSetTevOrder(GXTevStageID evenStage, GXTexCoordID coord0, GXTexMapID map0, #endif #endif -#endif diff --git a/include/dolphin/gd/GDTexture.h b/libs/dolphin/include/dolphin/gd/GDTexture.h similarity index 97% rename from include/dolphin/gd/GDTexture.h rename to libs/dolphin/include/dolphin/gd/GDTexture.h index d041de665b..2370cbb52b 100644 --- a/include/dolphin/gd/GDTexture.h +++ b/libs/dolphin/include/dolphin/gd/GDTexture.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_TEXTURE_H #define _DOLPHIN_GD_TEXTURE_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -128,4 +125,3 @@ void GDLoadTlutRaw(u32 tlut_ptr_raw, u32 tmem_addr, GXTlutSize size); #endif #endif -#endif diff --git a/include/dolphin/gd/GDTransform.h b/libs/dolphin/include/dolphin/gd/GDTransform.h similarity index 95% rename from include/dolphin/gd/GDTransform.h rename to libs/dolphin/include/dolphin/gd/GDTransform.h index e3699519f9..8d0159fdb0 100644 --- a/include/dolphin/gd/GDTransform.h +++ b/libs/dolphin/include/dolphin/gd/GDTransform.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GD_TRANSFORM_H_ #define _DOLPHIN_GD_TRANSFORM_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -57,4 +54,3 @@ void GDSetProjection(const Mtx44 mtx, GXProjectionType type); #endif #endif -#endif diff --git a/include/dolphin/gf.h b/libs/dolphin/include/dolphin/gf.h similarity index 73% rename from include/dolphin/gf.h rename to libs/dolphin/include/dolphin/gf.h index 31a7fd5910..50676aeab8 100644 --- a/include/dolphin/gf.h +++ b/libs/dolphin/include/dolphin/gf.h @@ -1,13 +1,9 @@ #ifndef _DOLPHIN_GF_H_ #define _DOLPHIN_GF_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include #include #endif -#endif diff --git a/include/dolphin/gf/GFGeometry.h b/libs/dolphin/include/dolphin/gf/GFGeometry.h similarity index 92% rename from include/dolphin/gf/GFGeometry.h rename to libs/dolphin/include/dolphin/gf/GFGeometry.h index 4d6c885807..c0866a5e10 100644 --- a/include/dolphin/gf/GFGeometry.h +++ b/libs/dolphin/include/dolphin/gf/GFGeometry.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GF_GFGEOMETRY_H_ #define _DOLPHIN_GF_GFGEOMETRY_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #define GF_GEN_MODE(nTexGens, nChans, nTevs, cm, nInds) \ @@ -41,5 +38,4 @@ static inline void GFWriteXFCmd(u16 addr, u32 val) { void GFSetGenMode2(u8 nTexGens, u8 nChans, u8 nTevs, u8 nInds, GXCullMode cm); -#endif #endif /* _DOLPHIN_GF_GFGEOMETRY_H_ */ diff --git a/include/dolphin/gf/GFLight.h b/libs/dolphin/include/dolphin/gf/GFLight.h similarity index 70% rename from include/dolphin/gf/GFLight.h rename to libs/dolphin/include/dolphin/gf/GFLight.h index 570f58e88e..3c4e222ae6 100644 --- a/include/dolphin/gf/GFLight.h +++ b/libs/dolphin/include/dolphin/gf/GFLight.h @@ -1,12 +1,8 @@ #ifndef _DOLPHIN_GF_GFLIGHT_H #define _DOLPHIN_GF_GFLIGHT_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include void GFSetChanAmbColor(GXChannelID chan, GXColor color); -#endif #endif /* _DOLPHIN_GF_GFLIGHT_H */ diff --git a/include/dolphin/gf/GFPixel.h b/libs/dolphin/include/dolphin/gf/GFPixel.h similarity index 87% rename from include/dolphin/gf/GFPixel.h rename to libs/dolphin/include/dolphin/gf/GFPixel.h index a200b776f1..93b7ff99a1 100644 --- a/include/dolphin/gf/GFPixel.h +++ b/libs/dolphin/include/dolphin/gf/GFPixel.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GF_GFPIXEL_H #define _DOLPHIN_GF_GFPIXEL_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include void GFSetFog(GXFogType type, f32 startz, f32 endz, f32 nearz, f32 farz, GXColor color); @@ -13,5 +10,4 @@ void GFSetBlendModeEtc(GXBlendMode type, GXBlendFactor src_factor, u8 dither_enable); void GFSetZMode(u8 compare_enable, GXCompare func, u8 update_enable); -#endif #endif /* _DOLPHIN_GF_GFPIXEL_H */ diff --git a/include/dolphin/gf/GFTev.h b/libs/dolphin/include/dolphin/gf/GFTev.h similarity index 70% rename from include/dolphin/gf/GFTev.h rename to libs/dolphin/include/dolphin/gf/GFTev.h index 2a20479e70..ade4c412ae 100644 --- a/include/dolphin/gf/GFTev.h +++ b/libs/dolphin/include/dolphin/gf/GFTev.h @@ -1,12 +1,8 @@ #ifndef _DOLPHIN_GF_GFTEV_H #define _DOLPHIN_GF_GFTEV_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include void GFSetTevColorS10(GXTevRegID reg, GXColorS10 color); -#endif #endif /* _DOLPHIN_GF_GFTEV_H */ diff --git a/include/dolphin/gx.h b/libs/dolphin/include/dolphin/gx.h similarity index 93% rename from include/dolphin/gx.h rename to libs/dolphin/include/dolphin/gx.h index 100fe8a8d9..0e90e543e1 100644 --- a/include/dolphin/gx.h +++ b/libs/dolphin/include/dolphin/gx.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_H_ #define _DOLPHIN_GX_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -41,4 +38,3 @@ void GXSetDrawSync(u16 token); #endif #endif -#endif diff --git a/include/dolphin/gx/GXBump.h b/libs/dolphin/include/dolphin/gx/GXBump.h similarity index 95% rename from include/dolphin/gx/GXBump.h rename to libs/dolphin/include/dolphin/gx/GXBump.h index 61118c0876..2a24dc69f8 100644 --- a/include/dolphin/gx/GXBump.h +++ b/libs/dolphin/include/dolphin/gx/GXBump.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXBUMP_H_ #define _DOLPHIN_GX_GXBUMP_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -30,4 +27,3 @@ void __GXSetIndirectMask(u32 mask); #endif #endif -#endif diff --git a/include/dolphin/gx/GXCommandList.h b/libs/dolphin/include/dolphin/gx/GXCommandList.h similarity index 92% rename from include/dolphin/gx/GXCommandList.h rename to libs/dolphin/include/dolphin/gx/GXCommandList.h index e89037e774..9adae3cb79 100644 --- a/include/dolphin/gx/GXCommandList.h +++ b/libs/dolphin/include/dolphin/gx/GXCommandList.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXCOMMANDLIST_H_ #define _DOLPHIN_GX_GXCOMMANDLIST_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #define GX_NOP 0x00 @@ -38,4 +35,3 @@ extern u8 GXTexImage3Ids[8]; extern u8 GXTexTlutIds[8]; #endif -#endif diff --git a/include/dolphin/gx/GXCpu2Efb.h b/libs/dolphin/include/dolphin/gx/GXCpu2Efb.h similarity index 91% rename from include/dolphin/gx/GXCpu2Efb.h rename to libs/dolphin/include/dolphin/gx/GXCpu2Efb.h index 32263310b9..46aa3e3369 100644 --- a/include/dolphin/gx/GXCpu2Efb.h +++ b/libs/dolphin/include/dolphin/gx/GXCpu2Efb.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXCPU2EFB_H_ #define _DOLPHIN_GX_GXCPU2EFB_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -30,4 +27,3 @@ u32 GXDecompressZ16(u32 z16, GXZFmt16 zfmt); #endif #endif -#endif diff --git a/include/dolphin/gx/GXCull.h b/libs/dolphin/include/dolphin/gx/GXCull.h similarity index 80% rename from include/dolphin/gx/GXCull.h rename to libs/dolphin/include/dolphin/gx/GXCull.h index 14a3fcbfd3..cac4381812 100644 --- a/include/dolphin/gx/GXCull.h +++ b/libs/dolphin/include/dolphin/gx/GXCull.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXCULL_H_ #define _DOLPHIN_GX_GXCULL_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -19,4 +16,3 @@ void GXSetCoPlanar(GXBool enable); #endif #endif -#endif diff --git a/include/dolphin/gx/GXDispList.h b/libs/dolphin/include/dolphin/gx/GXDispList.h similarity index 79% rename from include/dolphin/gx/GXDispList.h rename to libs/dolphin/include/dolphin/gx/GXDispList.h index fb6fd3d400..357fb8f7e0 100644 --- a/include/dolphin/gx/GXDispList.h +++ b/libs/dolphin/include/dolphin/gx/GXDispList.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXDISPLIST_H_ #define _DOLPHIN_GX_GXDISPLIST_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -19,4 +16,3 @@ void GXCallDisplayList(void* list, u32 nbytes); #endif #endif -#endif diff --git a/include/dolphin/gx/GXDraw.h b/libs/dolphin/include/dolphin/gx/GXDraw.h similarity index 86% rename from include/dolphin/gx/GXDraw.h rename to libs/dolphin/include/dolphin/gx/GXDraw.h index 75e58d7408..c8e779345a 100644 --- a/include/dolphin/gx/GXDraw.h +++ b/libs/dolphin/include/dolphin/gx/GXDraw.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXDRAW_H_ #define _DOLPHIN_GX_GXDRAW_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -25,4 +22,3 @@ u32 GXGenNormalTable(u8 depth, f32* table); #endif #endif -#endif diff --git a/include/dolphin/gx/GXEnum.h b/libs/dolphin/include/dolphin/gx/GXEnum.h similarity index 99% rename from include/dolphin/gx/GXEnum.h rename to libs/dolphin/include/dolphin/gx/GXEnum.h index 49f97ace7b..cd84f22399 100644 --- a/include/dolphin/gx/GXEnum.h +++ b/libs/dolphin/include/dolphin/gx/GXEnum.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXENUM_H_ #define _DOLPHIN_GX_GXENUM_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include typedef u8 GXBool; @@ -925,4 +922,3 @@ typedef enum _GXCPRegs { } GXCPRegs; #endif -#endif diff --git a/include/dolphin/gx/GXFifo.h b/libs/dolphin/include/dolphin/gx/GXFifo.h similarity index 95% rename from include/dolphin/gx/GXFifo.h rename to libs/dolphin/include/dolphin/gx/GXFifo.h index 8dbc020363..069f36a4ea 100644 --- a/include/dolphin/gx/GXFifo.h +++ b/libs/dolphin/include/dolphin/gx/GXFifo.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXFIFO_H_ #define _DOLPHIN_GX_GXFIFO_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -47,4 +44,3 @@ void GXRestoreWriteGatherPipe(void); #endif #endif -#endif diff --git a/include/dolphin/gx/GXFrameBuffer.h b/libs/dolphin/include/dolphin/gx/GXFrameBuffer.h similarity index 96% rename from include/dolphin/gx/GXFrameBuffer.h rename to libs/dolphin/include/dolphin/gx/GXFrameBuffer.h index 99b1af436f..73b513fa32 100644 --- a/include/dolphin/gx/GXFrameBuffer.h +++ b/libs/dolphin/include/dolphin/gx/GXFrameBuffer.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXFRAMEBUFFER_H_ #define _DOLPHIN_GX_GXFRAMEBUFFER_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -67,4 +64,3 @@ f32 GXGetYScaleFactor(u16 efbHeight, u16 xfbHeight); #endif #endif -#endif diff --git a/include/dolphin/gx/GXGeometry.h b/libs/dolphin/include/dolphin/gx/GXGeometry.h similarity index 95% rename from include/dolphin/gx/GXGeometry.h rename to libs/dolphin/include/dolphin/gx/GXGeometry.h index 3b49a3ff37..614cd48310 100644 --- a/include/dolphin/gx/GXGeometry.h +++ b/libs/dolphin/include/dolphin/gx/GXGeometry.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXGEOMETRY_H_ #define _DOLPHIN_GX_GXGEOMETRY_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -53,4 +50,3 @@ void GXEnableTexOffsets(GXTexCoordID coord, u8 line_enable, u8 point_enable); #endif #endif -#endif diff --git a/include/dolphin/gx/GXGet.h b/libs/dolphin/include/dolphin/gx/GXGet.h similarity index 97% rename from include/dolphin/gx/GXGet.h rename to libs/dolphin/include/dolphin/gx/GXGet.h index 553201d51f..d1ba630a46 100644 --- a/include/dolphin/gx/GXGet.h +++ b/libs/dolphin/include/dolphin/gx/GXGet.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXGET_H_ #define _DOLPHIN_GX_GXGET_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -65,4 +62,3 @@ void GXGetScissor(u32* left, u32* top, u32* wd, u32* ht); #endif #endif -#endif diff --git a/include/dolphin/gx/GXLighting.h b/libs/dolphin/include/dolphin/gx/GXLighting.h similarity index 94% rename from include/dolphin/gx/GXLighting.h rename to libs/dolphin/include/dolphin/gx/GXLighting.h index fb1af06882..83c5aae423 100644 --- a/include/dolphin/gx/GXLighting.h +++ b/libs/dolphin/include/dolphin/gx/GXLighting.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXLIGHTING_H_ #define _DOLPHIN_GX_GXLIGHTING_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -33,4 +30,3 @@ void GXSetChanCtrl(GXChannelID chan, GXBool enable, GXColorSrc amb_src, GXColorS #endif #endif -#endif diff --git a/include/dolphin/gx/GXManage.h b/libs/dolphin/include/dolphin/gx/GXManage.h similarity index 91% rename from include/dolphin/gx/GXManage.h rename to libs/dolphin/include/dolphin/gx/GXManage.h index 2a5784b84a..fd899d3619 100644 --- a/include/dolphin/gx/GXManage.h +++ b/libs/dolphin/include/dolphin/gx/GXManage.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXMANAGE_H_ #define _DOLPHIN_GX_GXMANAGE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -37,4 +34,3 @@ GXDrawDoneCallback GXSetDrawDoneCallback(GXDrawDoneCallback cb); #endif #endif -#endif diff --git a/include/dolphin/gx/GXPerf.h b/libs/dolphin/include/dolphin/gx/GXPerf.h similarity index 93% rename from include/dolphin/gx/GXPerf.h rename to libs/dolphin/include/dolphin/gx/GXPerf.h index f579e4201a..bd1b474aa8 100644 --- a/include/dolphin/gx/GXPerf.h +++ b/libs/dolphin/include/dolphin/gx/GXPerf.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXPERF_H_ #define _DOLPHIN_GX_GXPERF_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -31,4 +28,3 @@ u32 GXReadClksPerVtx(void); #endif #endif -#endif diff --git a/include/dolphin/gx/GXPixel.h b/libs/dolphin/include/dolphin/gx/GXPixel.h similarity index 93% rename from include/dolphin/gx/GXPixel.h rename to libs/dolphin/include/dolphin/gx/GXPixel.h index ed3e245db5..d61838d1a9 100644 --- a/include/dolphin/gx/GXPixel.h +++ b/libs/dolphin/include/dolphin/gx/GXPixel.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXPIXEL_H_ #define _DOLPHIN_GX_GXPIXEL_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -31,4 +28,3 @@ void GXSetFogColor(GXColor color); #endif #endif -#endif diff --git a/include/dolphin/gx/GXStruct.h b/libs/dolphin/include/dolphin/gx/GXStruct.h similarity index 95% rename from include/dolphin/gx/GXStruct.h rename to libs/dolphin/include/dolphin/gx/GXStruct.h index d460f76d55..3e528e5069 100644 --- a/include/dolphin/gx/GXStruct.h +++ b/libs/dolphin/include/dolphin/gx/GXStruct.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXSTRUCT_H_ #define _DOLPHIN_GX_GXSTRUCT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -84,4 +81,3 @@ typedef struct _GXVtxAttrFmtList { #endif #endif -#endif diff --git a/include/dolphin/gx/GXTev.h b/libs/dolphin/include/dolphin/gx/GXTev.h similarity index 95% rename from include/dolphin/gx/GXTev.h rename to libs/dolphin/include/dolphin/gx/GXTev.h index a804fd0ccd..8deb22d083 100644 --- a/include/dolphin/gx/GXTev.h +++ b/libs/dolphin/include/dolphin/gx/GXTev.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXTEV_H_ #define _DOLPHIN_GX_GXTEV_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -34,4 +31,3 @@ void GXSetNumTevStages(u8 nStages); #endif #endif -#endif diff --git a/include/dolphin/gx/GXTexture.h b/libs/dolphin/include/dolphin/gx/GXTexture.h similarity index 97% rename from include/dolphin/gx/GXTexture.h rename to libs/dolphin/include/dolphin/gx/GXTexture.h index e84dcffe47..f42dc2295a 100644 --- a/include/dolphin/gx/GXTexture.h +++ b/libs/dolphin/include/dolphin/gx/GXTexture.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXTEXTURE_H_ #define _DOLPHIN_GX_GXTEXTURE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -53,4 +50,3 @@ void GXInitTexObjMaxAniso(GXTexObj* obj, GXAnisotropy max_aniso); #endif #endif -#endif diff --git a/include/dolphin/gx/GXTransform.h b/libs/dolphin/include/dolphin/gx/GXTransform.h similarity index 93% rename from include/dolphin/gx/GXTransform.h rename to libs/dolphin/include/dolphin/gx/GXTransform.h index f433f65f44..1e7f94e579 100644 --- a/include/dolphin/gx/GXTransform.h +++ b/libs/dolphin/include/dolphin/gx/GXTransform.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXTRANSFORM_H_ #define _DOLPHIN_GX_GXTRANSFORM_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -33,5 +30,5 @@ void GXSetZScaleOffset(f32 scale, f32 offset); #ifdef __cplusplus } #endif -#endif + #endif diff --git a/include/dolphin/gx/GXVerify.h b/libs/dolphin/include/dolphin/gx/GXVerify.h similarity index 88% rename from include/dolphin/gx/GXVerify.h rename to libs/dolphin/include/dolphin/gx/GXVerify.h index b1a299e0da..93a1b29e58 100644 --- a/include/dolphin/gx/GXVerify.h +++ b/libs/dolphin/include/dolphin/gx/GXVerify.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_GX_GXVERIFY_H_ #define _DOLPHIN_GX_GXVERIFY_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -30,4 +27,3 @@ void __GXVerifyVATImm(GXAttr attr, GXCompCnt cnt, GXCompType type, u8 frac); #endif #endif -#endif diff --git a/include/dolphin/gx/GXVert.h b/libs/dolphin/include/dolphin/gx/GXVert.h similarity index 68% rename from include/dolphin/gx/GXVert.h rename to libs/dolphin/include/dolphin/gx/GXVert.h index ddf01179bf..91b7d7cc0b 100644 --- a/include/dolphin/gx/GXVert.h +++ b/libs/dolphin/include/dolphin/gx/GXVert.h @@ -1,49 +1,6 @@ #ifndef _DOLPHIN_GX_GXVERT_H_ #define _DOLPHIN_GX_GXVERT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#elif defined(TARGET_PC) -// On PC, include Aurora's GXVert for GXPosition/GXNormal/GXColor/GXTexCoord/GXEnd -// (extern functions implemented in Aurora's GXVert.cpp, stream-based vertex buffers) -#include "../../../extern/aurora/include/dolphin/gx/GXVert.h" - -// Aurora's GXVert.h does not provide GXCmd, GXParam, GXMatrixIndex, or a valid -// GXWGFifo target. J3D code uses these for low-level display list writes. -// We declare them as extern (implemented in stubs.cpp) and provide a dummy -// GXWGFifo that writes into a throw-away buffer so direct FIFO writes don't crash. - -// Replace Aurora's GXWGFifo macro (pointing to 0xCC008000) with an extern variable -#undef GXWGFifo -#ifdef __cplusplus -extern "C" { -#endif - -// PPCWGPipe is already typedef'd by Aurora's GXVert.h above. -// Dummy FIFO sink: direct GXWGFifo writes in J3DFifo.h land here harmlessly. -extern volatile PPCWGPipe GXWGFifo; - -void GXCmd1u8(const u8 x); -void GXCmd1u16(const u16 x); -void GXCmd1u32(const u32 x); - -void GXParam1u8(const u8 x); -void GXParam1u16(const u16 x); -void GXParam1u32(const u32 x); -void GXParam1s8(const s8 x); -void GXParam1s16(const s16 x); -void GXParam1s32(const s32 x); -void GXParam1f32(const f32 x); -void GXParam3f32(const f32 x, const f32 y, const f32 z); -void GXParam4f32(const f32 x, const f32 y, const f32 z, const f32 w); - -void GXMatrixIndex1u8(const u8 x); - -#ifdef __cplusplus -} -#endif - -#else #include #include @@ -181,4 +138,3 @@ FUNC_1PARAM(GXMatrixIndex, u8) #endif #endif -#endif diff --git a/include/dolphin/hio.h b/libs/dolphin/include/dolphin/hio.h similarity index 100% rename from include/dolphin/hio.h rename to libs/dolphin/include/dolphin/hio.h diff --git a/include/dolphin/hw_regs.h b/libs/dolphin/include/dolphin/hw_regs.h similarity index 100% rename from include/dolphin/hw_regs.h rename to libs/dolphin/include/dolphin/hw_regs.h diff --git a/include/dolphin/mcc.h b/libs/dolphin/include/dolphin/mcc.h similarity index 100% rename from include/dolphin/mcc.h rename to libs/dolphin/include/dolphin/mcc.h diff --git a/include/dolphin/mix.h b/libs/dolphin/include/dolphin/mix.h similarity index 97% rename from include/dolphin/mix.h rename to libs/dolphin/include/dolphin/mix.h index aa9a22b1dd..f58b3d63dc 100644 --- a/include/dolphin/mix.h +++ b/libs/dolphin/include/dolphin/mix.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_MIX_H_ #define _DOLPHIN_MIX_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -95,5 +92,4 @@ void MIXUpdateSettings(void); } #endif -#endif #endif // _DOLPHIN_MIX_H_ diff --git a/include/dolphin/_mtx.h b/libs/dolphin/include/dolphin/mtx.h similarity index 99% rename from include/dolphin/_mtx.h rename to libs/dolphin/include/dolphin/mtx.h index 4201269dc8..23c832d7f1 100644 --- a/include/dolphin/_mtx.h +++ b/libs/dolphin/include/dolphin/mtx.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_MTX_H_ #define _DOLPHIN_MTX_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -376,4 +373,3 @@ void C_QUATCompA(const Quaternion* qprev, const Quaternion* q, const Quaternion* #endif #endif -#endif diff --git a/include/dolphin/os.h b/libs/dolphin/include/dolphin/os.h similarity index 99% rename from include/dolphin/os.h rename to libs/dolphin/include/dolphin/os.h index de27e1390e..4d536a6572 100644 --- a/include/dolphin/os.h +++ b/libs/dolphin/include/dolphin/os.h @@ -4,10 +4,6 @@ #include #include -#ifdef __REVOLUTION_SDK__ -#include -#else - #include #include @@ -362,6 +358,8 @@ inline s16 __OSf32tos16(__REGISTER f32 inF) { psq_st inF, 0(tmpPtr), 0x1, 5 lha out, 0(tmpPtr) } +#else + return (s16)inF; // this is wrong i believe #endif // clang-format on @@ -382,6 +380,8 @@ inline u8 __OSf32tou8(__REGISTER f32 inF) { psq_st inF, 0(tmpPtr), 0x1, 2 lbz out, 0(tmpPtr) } +#else + return (u8)inF; // this is also wrong i believe #endif // clang-format on @@ -417,5 +417,4 @@ static inline void OSInitFastCast(void) { } #endif -#endif // __REVOLUTION_SDK__ -#endif // _DOLPHIN_OS_H_ +#endif diff --git a/include/dolphin/os/OSAlarm.h b/libs/dolphin/include/dolphin/os/OSAlarm.h similarity index 92% rename from include/dolphin/os/OSAlarm.h rename to libs/dolphin/include/dolphin/os/OSAlarm.h index 43e4822142..3105039181 100644 --- a/include/dolphin/os/OSAlarm.h +++ b/libs/dolphin/include/dolphin/os/OSAlarm.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSALARM_H_ #define _DOLPHIN_OSALARM_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -36,5 +33,4 @@ void OSCancelAlarms(u32 tag); } #endif -#endif #endif // _DOLPHIN_OSALARM_H_ diff --git a/include/dolphin/os/OSAlloc.h b/libs/dolphin/include/dolphin/os/OSAlloc.h similarity index 91% rename from include/dolphin/os/OSAlloc.h rename to libs/dolphin/include/dolphin/os/OSAlloc.h index 426b6ae439..77eb88661f 100644 --- a/include/dolphin/os/OSAlloc.h +++ b/libs/dolphin/include/dolphin/os/OSAlloc.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSALLOC_H_ #define _DOLPHIN_OSALLOC_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -35,4 +32,3 @@ void OSVisitAllocated(void (*visitor)(void*, u32)); #endif #endif -#endif diff --git a/include/dolphin/os/OSCache.h b/libs/dolphin/include/dolphin/os/OSCache.h similarity index 93% rename from include/dolphin/os/OSCache.h rename to libs/dolphin/include/dolphin/os/OSCache.h index 2b4bbfd07e..89e7ce96ba 100644 --- a/include/dolphin/os/OSCache.h +++ b/libs/dolphin/include/dolphin/os/OSCache.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSCACHE_H_ #define _DOLPHIN_OSCACHE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -39,4 +36,3 @@ void __OSCacheInit(void); #endif #endif -#endif diff --git a/include/dolphin/os/OSContext.h b/libs/dolphin/include/dolphin/os/OSContext.h similarity index 98% rename from include/dolphin/os/OSContext.h rename to libs/dolphin/include/dolphin/os/OSContext.h index 900baf40af..cbb0b92e4e 100644 --- a/include/dolphin/os/OSContext.h +++ b/libs/dolphin/include/dolphin/os/OSContext.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSCONTEXT_H_ #define _DOLPHIN_OSCONTEXT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -174,4 +171,3 @@ void OSFillFPUContext(OSContext* context); #endif #endif -#endif diff --git a/include/dolphin/os/OSDC.h b/libs/dolphin/include/dolphin/os/OSDC.h similarity index 84% rename from include/dolphin/os/OSDC.h rename to libs/dolphin/include/dolphin/os/OSDC.h index 995c1630cc..bab2d68edc 100644 --- a/include/dolphin/os/OSDC.h +++ b/libs/dolphin/include/dolphin/os/OSDC.h @@ -1,10 +1,6 @@ #ifndef _DOLPHIN_OSDC_H_ #define _DOLPHIN_OSDC_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else - #ifdef __cplusplus extern "C" { #endif @@ -25,4 +21,3 @@ void DCBlockInvalidate(void* addr); #endif #endif -#endif diff --git a/include/dolphin/os/OSError.h b/libs/dolphin/include/dolphin/os/OSError.h similarity index 93% rename from include/dolphin/os/OSError.h rename to libs/dolphin/include/dolphin/os/OSError.h index aeeaede148..4a2fc7bd71 100644 --- a/include/dolphin/os/OSError.h +++ b/libs/dolphin/include/dolphin/os/OSError.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSERROR_H_ #define _DOLPHIN_OSERROR_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -39,4 +36,3 @@ extern OSErrorHandler __OSErrorTable[17]; #endif #endif -#endif diff --git a/include/dolphin/os/OSException.h b/libs/dolphin/include/dolphin/os/OSException.h similarity index 97% rename from include/dolphin/os/OSException.h rename to libs/dolphin/include/dolphin/os/OSException.h index 0b909ca202..e9a2f22569 100644 --- a/include/dolphin/os/OSException.h +++ b/libs/dolphin/include/dolphin/os/OSException.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSEXCEPTION_H_ #define _DOLPHIN_OSEXCEPTION_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -61,5 +58,4 @@ __OSExceptionHandler __OSGetExceptionHandler(__OSException exception); } #endif -#endif #endif // _DOLPHIN_OSEXCEPTION_H_ diff --git a/include/dolphin/os/OSExec.h b/libs/dolphin/include/dolphin/os/OSExec.h similarity index 91% rename from include/dolphin/os/OSExec.h rename to libs/dolphin/include/dolphin/os/OSExec.h index 7fd5380b70..af0dc4da0c 100644 --- a/include/dolphin/os/OSExec.h +++ b/libs/dolphin/include/dolphin/os/OSExec.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSEXEC_H_ #define _DOLPHIN_OSEXEC_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -36,4 +33,3 @@ void OSExecl(const char* dolfile, const char* arg0, ...); #endif #endif -#endif diff --git a/include/dolphin/os/OSFont.h b/libs/dolphin/include/dolphin/os/OSFont.h similarity index 94% rename from include/dolphin/os/OSFont.h rename to libs/dolphin/include/dolphin/os/OSFont.h index 1c1d480ab4..1fff41a629 100644 --- a/include/dolphin/os/OSFont.h +++ b/libs/dolphin/include/dolphin/os/OSFont.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSFONT_H_ #define _DOLPHIN_OSFONT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -59,4 +56,3 @@ int OSSetFontWidth(int fixed); #endif #endif -#endif diff --git a/include/dolphin/os/OSIC.h b/libs/dolphin/include/dolphin/os/OSIC.h similarity index 80% rename from include/dolphin/os/OSIC.h rename to libs/dolphin/include/dolphin/os/OSIC.h index 20156e6874..3309d3a6f1 100644 --- a/include/dolphin/os/OSIC.h +++ b/libs/dolphin/include/dolphin/os/OSIC.h @@ -1,10 +1,6 @@ #ifndef _DOLPHIN_OSIC_H_ #define _DOLPHIN_OSIC_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else - #ifdef __cplusplus extern "C" { #endif @@ -22,4 +18,3 @@ void ICSync(void); #endif #endif -#endif diff --git a/include/dolphin/os/OSInterrupt.h b/libs/dolphin/include/dolphin/os/OSInterrupt.h similarity index 98% rename from include/dolphin/os/OSInterrupt.h rename to libs/dolphin/include/dolphin/os/OSInterrupt.h index 37e4f96958..fb74135a2b 100644 --- a/include/dolphin/os/OSInterrupt.h +++ b/libs/dolphin/include/dolphin/os/OSInterrupt.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSINTERRUPT_H_ #define _DOLPHIN_OSINTERRUPT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -119,4 +116,3 @@ OSInterruptMask __OSUnmaskInterrupts(OSInterruptMask mask); #endif #endif -#endif diff --git a/include/dolphin/os/OSL2.h b/libs/dolphin/include/dolphin/os/OSL2.h similarity index 81% rename from include/dolphin/os/OSL2.h rename to libs/dolphin/include/dolphin/os/OSL2.h index 0622de06dd..01b4a620c0 100644 --- a/include/dolphin/os/OSL2.h +++ b/libs/dolphin/include/dolphin/os/OSL2.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSL2_H_ #define _DOLPHIN_OSL2_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -21,4 +18,3 @@ void L2SetWriteThrough(BOOL writeThrough); #endif #endif -#endif diff --git a/include/dolphin/os/OSLC.h b/libs/dolphin/include/dolphin/os/OSLC.h similarity index 83% rename from include/dolphin/os/OSLC.h rename to libs/dolphin/include/dolphin/os/OSLC.h index c266b20e7b..af49708b14 100644 --- a/include/dolphin/os/OSLC.h +++ b/libs/dolphin/include/dolphin/os/OSLC.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSLC_H_ #define _DOLPHIN_OSLC_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -20,4 +17,3 @@ void LCAllocNoInvalidate(void *addr, u32 nBytes); #endif #endif -#endif diff --git a/include/dolphin/os/OSMemory.h b/libs/dolphin/include/dolphin/os/OSMemory.h similarity index 89% rename from include/dolphin/os/OSMemory.h rename to libs/dolphin/include/dolphin/os/OSMemory.h index b1eaaf498c..a5debebc90 100644 --- a/include/dolphin/os/OSMemory.h +++ b/libs/dolphin/include/dolphin/os/OSMemory.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSMEMORY_H_ #define _DOLPHIN_OSMEMORY_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -29,4 +26,3 @@ u32 OSGetConsoleSimulatedMemSize(void); #endif #endif -#endif diff --git a/include/dolphin/os/OSMessage.h b/libs/dolphin/include/dolphin/os/OSMessage.h similarity index 90% rename from include/dolphin/os/OSMessage.h rename to libs/dolphin/include/dolphin/os/OSMessage.h index 0660be565d..8cdd3f1b02 100644 --- a/include/dolphin/os/OSMessage.h +++ b/libs/dolphin/include/dolphin/os/OSMessage.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSMESSAGE_H_ #define _DOLPHIN_OSMESSAGE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -33,5 +30,4 @@ int OSJamMessage(OSMessageQueue* mq, void* msg, s32 flags); } #endif -#endif #endif // _DOLPHIN_OSMESSAGE_H_ diff --git a/include/dolphin/os/OSModule.h b/libs/dolphin/include/dolphin/os/OSModule.h similarity index 97% rename from include/dolphin/os/OSModule.h rename to libs/dolphin/include/dolphin/os/OSModule.h index d104cf7a18..6e66e9b003 100644 --- a/include/dolphin/os/OSModule.h +++ b/libs/dolphin/include/dolphin/os/OSModule.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSMODULE_H_ #define _DOLPHIN_OSMODULE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -118,4 +115,3 @@ void OSNotifyUnlink(OSModuleInfo* module); #endif #endif -#endif diff --git a/include/dolphin/os/OSMutex.h b/libs/dolphin/include/dolphin/os/OSMutex.h similarity index 89% rename from include/dolphin/os/OSMutex.h rename to libs/dolphin/include/dolphin/os/OSMutex.h index 58985f7a3c..ef5565eb67 100644 --- a/include/dolphin/os/OSMutex.h +++ b/libs/dolphin/include/dolphin/os/OSMutex.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSMUTEX_H_ #define _DOLPHIN_OSMUTEX_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -34,4 +31,3 @@ void OSSignalCond(OSCond* cond); #endif #endif -#endif diff --git a/include/dolphin/os/OSReboot.h b/libs/dolphin/include/dolphin/os/OSReboot.h similarity index 82% rename from include/dolphin/os/OSReboot.h rename to libs/dolphin/include/dolphin/os/OSReboot.h index 517851aa34..6509534793 100644 --- a/include/dolphin/os/OSReboot.h +++ b/libs/dolphin/include/dolphin/os/OSReboot.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSREBOOT_H_ #define _DOLPHIN_OSREBOOT_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -20,4 +17,3 @@ void __OSReboot(u32 resetCode, u32 bootDol); #endif #endif -#endif diff --git a/include/dolphin/os/OSReset.h b/libs/dolphin/include/dolphin/os/OSReset.h similarity index 91% rename from include/dolphin/os/OSReset.h rename to libs/dolphin/include/dolphin/os/OSReset.h index 221861a4a6..15c2ba62ff 100644 --- a/include/dolphin/os/OSReset.h +++ b/libs/dolphin/include/dolphin/os/OSReset.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSRESET_H_ #define _DOLPHIN_OSRESET_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -40,4 +37,3 @@ u32 OSSetBootDol(u32 dolOffset); #endif #endif -#endif diff --git a/include/dolphin/os/OSResetSW.h b/libs/dolphin/include/dolphin/os/OSResetSW.h similarity index 81% rename from include/dolphin/os/OSResetSW.h rename to libs/dolphin/include/dolphin/os/OSResetSW.h index 88a7f194f4..3c630b8573 100644 --- a/include/dolphin/os/OSResetSW.h +++ b/libs/dolphin/include/dolphin/os/OSResetSW.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSRESETSW_H_ #define _DOLPHIN_OSRESETSW_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -21,4 +18,3 @@ BOOL OSGetResetButtonState(void); #endif #endif -#endif diff --git a/include/dolphin/os/OSRtc.h b/libs/dolphin/include/dolphin/os/OSRtc.h similarity index 95% rename from include/dolphin/os/OSRtc.h rename to libs/dolphin/include/dolphin/os/OSRtc.h index e35525dae9..583043f4a4 100644 --- a/include/dolphin/os/OSRtc.h +++ b/libs/dolphin/include/dolphin/os/OSRtc.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSRTC_H_ #define _DOLPHIN_OSRTC_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -84,5 +81,4 @@ void OSSetWirelessID(s32 chan, u16 id); } #endif -#endif #endif // _DOLPHIN_OSRTC_H_ diff --git a/include/dolphin/os/OSSemaphore.h b/libs/dolphin/include/dolphin/os/OSSemaphore.h similarity index 86% rename from include/dolphin/os/OSSemaphore.h rename to libs/dolphin/include/dolphin/os/OSSemaphore.h index 93b942f9e1..aac23811a8 100644 --- a/include/dolphin/os/OSSemaphore.h +++ b/libs/dolphin/include/dolphin/os/OSSemaphore.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSSEMAPHORE_H_ #define _DOLPHIN_OSSEMAPHORE_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -25,5 +22,4 @@ s32 OSGetSemaphoreCount(OSSemaphore* sem); } #endif -#endif #endif // _DOLPHIN_OSSEMAPHORE_H_ diff --git a/include/dolphin/os/OSSerial.h b/libs/dolphin/include/dolphin/os/OSSerial.h similarity index 60% rename from include/dolphin/os/OSSerial.h rename to libs/dolphin/include/dolphin/os/OSSerial.h index c6dd0a59e4..7c38395f71 100644 --- a/include/dolphin/os/OSSerial.h +++ b/libs/dolphin/include/dolphin/os/OSSerial.h @@ -1,10 +1,6 @@ #ifndef _DOLPHIN_OSSERIAL_H #define _DOLPHIN_OSSERIAL_H -#ifdef __REVOLUTION_SDK__ -#include -#else #include -#endif #endif // _DOLPHIN_OSSERIAL_H diff --git a/include/dolphin/os/OSThread.h b/libs/dolphin/include/dolphin/os/OSThread.h similarity index 97% rename from include/dolphin/os/OSThread.h rename to libs/dolphin/include/dolphin/os/OSThread.h index c113575983..5511c7595b 100644 --- a/include/dolphin/os/OSThread.h +++ b/libs/dolphin/include/dolphin/os/OSThread.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSTHREAD_H_ #define _DOLPHIN_OSTHREAD_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -113,4 +110,3 @@ OSSwitchThreadCallback OSSetSwitchThreadCallback(OSSwitchThreadCallback callback #endif #endif -#endif diff --git a/include/dolphin/os/OSTime.h b/libs/dolphin/include/dolphin/os/OSTime.h similarity index 93% rename from include/dolphin/os/OSTime.h rename to libs/dolphin/include/dolphin/os/OSTime.h index b6e9fd7b8c..118adee7c2 100644 --- a/include/dolphin/os/OSTime.h +++ b/libs/dolphin/include/dolphin/os/OSTime.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSTIME_H_ #define _DOLPHIN_OSTIME_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -44,5 +41,4 @@ extern "C" { } #endif -#endif #endif // _DOLPHIN_OSTIME_H_ diff --git a/include/dolphin/os/OSTimer.h b/libs/dolphin/include/dolphin/os/OSTimer.h similarity index 83% rename from include/dolphin/os/OSTimer.h rename to libs/dolphin/include/dolphin/os/OSTimer.h index caa4076ffe..490cccb67c 100644 --- a/include/dolphin/os/OSTimer.h +++ b/libs/dolphin/include/dolphin/os/OSTimer.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSTIMER_H_ #define _DOLPHIN_OSTIMER_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -21,5 +18,4 @@ void OSStopTimer(void); } #endif -#endif #endif // _DOLPHIN_OSTIMER_H_ diff --git a/include/dolphin/os/OSUtf.h b/libs/dolphin/include/dolphin/os/OSUtf.h similarity index 86% rename from include/dolphin/os/OSUtf.h rename to libs/dolphin/include/dolphin/os/OSUtf.h index 44c908ef0f..2f721d5787 100644 --- a/include/dolphin/os/OSUtf.h +++ b/libs/dolphin/include/dolphin/os/OSUtf.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_OSUTF_H_ #define _DOLPHIN_OSUTF_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -23,5 +20,4 @@ u32 OSSJIStoUTF32(u16 sjis); } #endif -#endif #endif // _DOLPHIN_OSUTF_H_ diff --git a/include/dolphin/pad.h b/libs/dolphin/include/dolphin/pad.h similarity index 97% rename from include/dolphin/pad.h rename to libs/dolphin/include/dolphin/pad.h index eb208d4287..d966b80945 100644 --- a/include/dolphin/pad.h +++ b/libs/dolphin/include/dolphin/pad.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_PAD_H_ #define _DOLPHIN_PAD_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -105,4 +102,3 @@ void PADClampCircle(PADStatus* status); #endif #endif -#endif diff --git a/include/dolphin/perf.h b/libs/dolphin/include/dolphin/perf.h similarity index 100% rename from include/dolphin/perf.h rename to libs/dolphin/include/dolphin/perf.h diff --git a/include/dolphin/sdk_math.h b/libs/dolphin/include/dolphin/sdk_math.h similarity index 100% rename from include/dolphin/sdk_math.h rename to libs/dolphin/include/dolphin/sdk_math.h diff --git a/include/dolphin/seq.h b/libs/dolphin/include/dolphin/seq.h similarity index 95% rename from include/dolphin/seq.h rename to libs/dolphin/include/dolphin/seq.h index 8c950ca2a3..754798093d 100644 --- a/include/dolphin/seq.h +++ b/libs/dolphin/include/dolphin/seq.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_SEQ_H_ #define _DOLPHIN_SEQ_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -54,5 +51,4 @@ s32 SEQGetVolume(SEQSEQUENCE* sequence); } #endif -#endif #endif // _DOLPHIN_SEQ_H_ diff --git a/include/dolphin/si.h b/libs/dolphin/include/dolphin/si.h similarity index 98% rename from include/dolphin/si.h rename to libs/dolphin/include/dolphin/si.h index ed1b442ad8..04b01ba4d7 100644 --- a/include/dolphin/si.h +++ b/libs/dolphin/include/dolphin/si.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_SI_H_ #define _DOLPHIN_SI_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -175,5 +172,4 @@ void SIControlSteering(s32 chan, u32 control, s32 level); } #endif -#endif #endif // _DOLPHIN_SI_H_ diff --git a/include/dolphin/sp.h b/libs/dolphin/include/dolphin/sp.h similarity index 92% rename from include/dolphin/sp.h rename to libs/dolphin/include/dolphin/sp.h index 4401b8c9fc..52f4fff020 100644 --- a/include/dolphin/sp.h +++ b/libs/dolphin/include/dolphin/sp.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_SP_H_ #define _DOLPHIN_SP_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -41,4 +38,3 @@ void SPPrepareEnd(SPSoundEntry* sound, AXVPB* axvpb); #endif #endif -#endif diff --git a/include/dolphin/syn.h b/libs/dolphin/include/dolphin/syn.h similarity index 98% rename from include/dolphin/syn.h rename to libs/dolphin/include/dolphin/syn.h index 0b8848f9d4..8373c5db91 100644 --- a/include/dolphin/syn.h +++ b/libs/dolphin/include/dolphin/syn.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_SYN_H_ #define _DOLPHIN_SYN_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include @@ -172,5 +169,4 @@ u8 SYNGetMidiController(SYNSYNTH* synth, u8 midiChannel, u8 function); } #endif -#endif #endif // _DOLPHIN_SYN_H_ diff --git a/include/dolphin/thp.h b/libs/dolphin/include/dolphin/thp.h similarity index 98% rename from include/dolphin/thp.h rename to libs/dolphin/include/dolphin/thp.h index 250c518f6b..455afe6ccb 100644 --- a/include/dolphin/thp.h +++ b/libs/dolphin/include/dolphin/thp.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_THP_H_ #define _DOLPHIN_THP_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #ifdef __cplusplus @@ -154,5 +151,4 @@ static s32 __THPHuffDecodeTab(THPFileInfo* info, THPHuffmanTab* h); } #endif -#endif #endif // _DOLPHIN_THP_H_ diff --git a/include/dolphin/types.h b/libs/dolphin/include/dolphin/types.h similarity index 96% rename from include/dolphin/types.h rename to libs/dolphin/include/dolphin/types.h index 8c7620a057..3ab6227062 100644 --- a/include/dolphin/types.h +++ b/libs/dolphin/include/dolphin/types.h @@ -1,10 +1,6 @@ #ifndef _DOLPHIN_TYPES_H_ #define _DOLPHIN_TYPES_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else - #if _WIN64 || __LP64__ #define BIT_64 1 #else @@ -117,4 +113,3 @@ typedef unsigned int uint; #endif #endif -#endif diff --git a/include/dolphin/vi.h b/libs/dolphin/include/dolphin/vi.h similarity index 64% rename from include/dolphin/vi.h rename to libs/dolphin/include/dolphin/vi.h index b8fa79160e..af41844266 100644 --- a/include/dolphin/vi.h +++ b/libs/dolphin/include/dolphin/vi.h @@ -1,11 +1,7 @@ #ifndef _DOLPHIN_VI_H_ #define _DOLPHIN_VI_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #endif -#endif diff --git a/include/dolphin/vi/vifuncs.h b/libs/dolphin/include/dolphin/vi/vifuncs.h similarity index 92% rename from include/dolphin/vi/vifuncs.h rename to libs/dolphin/include/dolphin/vi/vifuncs.h index b05611a427..eb95984ede 100644 --- a/include/dolphin/vi/vifuncs.h +++ b/libs/dolphin/include/dolphin/vi/vifuncs.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_VIFUNCS_H_ #define _DOLPHIN_VIFUNCS_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #include #include @@ -37,4 +34,3 @@ u32 VIGetDTVStatus(void); #endif #endif -#endif diff --git a/include/dolphin/vi/vitypes.h b/libs/dolphin/include/dolphin/vi/vitypes.h similarity index 95% rename from include/dolphin/vi/vitypes.h rename to libs/dolphin/include/dolphin/vi/vitypes.h index 998082d3c9..983a89b7ea 100644 --- a/include/dolphin/vi/vitypes.h +++ b/libs/dolphin/include/dolphin/vi/vitypes.h @@ -1,9 +1,6 @@ #ifndef _DOLPHIN_VITYPES_H_ #define _DOLPHIN_VITYPES_H_ -#ifdef __REVOLUTION_SDK__ -#include -#else #include #define VI_TVMODE(format, interlace) (((format) << 2) + (interlace)) @@ -42,4 +39,3 @@ typedef enum { typedef void (*VIRetraceCallback)(u32 retraceCount); #endif -#endif diff --git a/src/dolphin/G2D/G2D.c b/libs/dolphin/src/G2D/G2D.c similarity index 100% rename from src/dolphin/G2D/G2D.c rename to libs/dolphin/src/G2D/G2D.c diff --git a/src/dolphin/ai/ai.c b/libs/dolphin/src/ai/ai.c similarity index 100% rename from src/dolphin/ai/ai.c rename to libs/dolphin/src/ai/ai.c diff --git a/src/dolphin/am/__am.h b/libs/dolphin/src/am/__am.h similarity index 100% rename from src/dolphin/am/__am.h rename to libs/dolphin/src/am/__am.h diff --git a/src/dolphin/am/am.c b/libs/dolphin/src/am/am.c similarity index 100% rename from src/dolphin/am/am.c rename to libs/dolphin/src/am/am.c diff --git a/src/dolphin/amcnotstub/amcnotstub.c b/libs/dolphin/src/amcnotstub/amcnotstub.c similarity index 100% rename from src/dolphin/amcnotstub/amcnotstub.c rename to libs/dolphin/src/amcnotstub/amcnotstub.c diff --git a/src/dolphin/amcstubs/AmcExi2Stubs.c b/libs/dolphin/src/amcstubs/AmcExi2Stubs.c similarity index 100% rename from src/dolphin/amcstubs/AmcExi2Stubs.c rename to libs/dolphin/src/amcstubs/AmcExi2Stubs.c diff --git a/src/dolphin/ar/__ar.h b/libs/dolphin/src/ar/__ar.h similarity index 100% rename from src/dolphin/ar/__ar.h rename to libs/dolphin/src/ar/__ar.h diff --git a/src/dolphin/ar/ar.c b/libs/dolphin/src/ar/ar.c similarity index 100% rename from src/dolphin/ar/ar.c rename to libs/dolphin/src/ar/ar.c diff --git a/src/dolphin/ar/arq.c b/libs/dolphin/src/ar/arq.c similarity index 100% rename from src/dolphin/ar/arq.c rename to libs/dolphin/src/ar/arq.c diff --git a/src/dolphin/ax/AX.c b/libs/dolphin/src/ax/AX.c similarity index 100% rename from src/dolphin/ax/AX.c rename to libs/dolphin/src/ax/AX.c diff --git a/src/dolphin/ax/AXAlloc.c b/libs/dolphin/src/ax/AXAlloc.c similarity index 100% rename from src/dolphin/ax/AXAlloc.c rename to libs/dolphin/src/ax/AXAlloc.c diff --git a/src/dolphin/ax/AXAux.c b/libs/dolphin/src/ax/AXAux.c similarity index 100% rename from src/dolphin/ax/AXAux.c rename to libs/dolphin/src/ax/AXAux.c diff --git a/src/dolphin/ax/AXCL.c b/libs/dolphin/src/ax/AXCL.c similarity index 100% rename from src/dolphin/ax/AXCL.c rename to libs/dolphin/src/ax/AXCL.c diff --git a/src/dolphin/ax/AXComp.c b/libs/dolphin/src/ax/AXComp.c similarity index 100% rename from src/dolphin/ax/AXComp.c rename to libs/dolphin/src/ax/AXComp.c diff --git a/src/dolphin/ax/AXOut.c b/libs/dolphin/src/ax/AXOut.c similarity index 100% rename from src/dolphin/ax/AXOut.c rename to libs/dolphin/src/ax/AXOut.c diff --git a/src/dolphin/ax/AXProf.c b/libs/dolphin/src/ax/AXProf.c similarity index 100% rename from src/dolphin/ax/AXProf.c rename to libs/dolphin/src/ax/AXProf.c diff --git a/src/dolphin/ax/AXSPB.c b/libs/dolphin/src/ax/AXSPB.c similarity index 100% rename from src/dolphin/ax/AXSPB.c rename to libs/dolphin/src/ax/AXSPB.c diff --git a/src/dolphin/ax/AXVPB.c b/libs/dolphin/src/ax/AXVPB.c similarity index 100% rename from src/dolphin/ax/AXVPB.c rename to libs/dolphin/src/ax/AXVPB.c diff --git a/src/dolphin/ax/DSPCode.c b/libs/dolphin/src/ax/DSPCode.c similarity index 100% rename from src/dolphin/ax/DSPCode.c rename to libs/dolphin/src/ax/DSPCode.c diff --git a/src/dolphin/ax/__ax.h b/libs/dolphin/src/ax/__ax.h similarity index 100% rename from src/dolphin/ax/__ax.h rename to libs/dolphin/src/ax/__ax.h diff --git a/src/dolphin/axart/axart.c b/libs/dolphin/src/axart/axart.c similarity index 100% rename from src/dolphin/axart/axart.c rename to libs/dolphin/src/axart/axart.c diff --git a/src/dolphin/axart/axart3d.c b/libs/dolphin/src/axart/axart3d.c similarity index 100% rename from src/dolphin/axart/axart3d.c rename to libs/dolphin/src/axart/axart3d.c diff --git a/src/dolphin/axart/axartcents.c b/libs/dolphin/src/axart/axartcents.c similarity index 100% rename from src/dolphin/axart/axartcents.c rename to libs/dolphin/src/axart/axartcents.c diff --git a/src/dolphin/axart/axartenv.c b/libs/dolphin/src/axart/axartenv.c similarity index 100% rename from src/dolphin/axart/axartenv.c rename to libs/dolphin/src/axart/axartenv.c diff --git a/src/dolphin/axart/axartlfo.c b/libs/dolphin/src/axart/axartlfo.c similarity index 100% rename from src/dolphin/axart/axartlfo.c rename to libs/dolphin/src/axart/axartlfo.c diff --git a/src/dolphin/axart/axartlpf.c b/libs/dolphin/src/axart/axartlpf.c similarity index 100% rename from src/dolphin/axart/axartlpf.c rename to libs/dolphin/src/axart/axartlpf.c diff --git a/src/dolphin/axart/axartsound.c b/libs/dolphin/src/axart/axartsound.c similarity index 100% rename from src/dolphin/axart/axartsound.c rename to libs/dolphin/src/axart/axartsound.c diff --git a/src/dolphin/axfx/__axfx.h b/libs/dolphin/src/axfx/__axfx.h similarity index 100% rename from src/dolphin/axfx/__axfx.h rename to libs/dolphin/src/axfx/__axfx.h diff --git a/src/dolphin/axfx/axfx.c b/libs/dolphin/src/axfx/axfx.c similarity index 100% rename from src/dolphin/axfx/axfx.c rename to libs/dolphin/src/axfx/axfx.c diff --git a/src/dolphin/axfx/chorus.c b/libs/dolphin/src/axfx/chorus.c similarity index 100% rename from src/dolphin/axfx/chorus.c rename to libs/dolphin/src/axfx/chorus.c diff --git a/src/dolphin/axfx/delay.c b/libs/dolphin/src/axfx/delay.c similarity index 100% rename from src/dolphin/axfx/delay.c rename to libs/dolphin/src/axfx/delay.c diff --git a/src/dolphin/axfx/reverb_hi.c b/libs/dolphin/src/axfx/reverb_hi.c similarity index 100% rename from src/dolphin/axfx/reverb_hi.c rename to libs/dolphin/src/axfx/reverb_hi.c diff --git a/src/dolphin/axfx/reverb_hi_4ch.c b/libs/dolphin/src/axfx/reverb_hi_4ch.c similarity index 100% rename from src/dolphin/axfx/reverb_hi_4ch.c rename to libs/dolphin/src/axfx/reverb_hi_4ch.c diff --git a/src/dolphin/axfx/reverb_std.c b/libs/dolphin/src/axfx/reverb_std.c similarity index 100% rename from src/dolphin/axfx/reverb_std.c rename to libs/dolphin/src/axfx/reverb_std.c diff --git a/src/dolphin/base/PPCArch.c b/libs/dolphin/src/base/PPCArch.c similarity index 100% rename from src/dolphin/base/PPCArch.c rename to libs/dolphin/src/base/PPCArch.c diff --git a/src/dolphin/base/PPCPm.c b/libs/dolphin/src/base/PPCPm.c similarity index 100% rename from src/dolphin/base/PPCPm.c rename to libs/dolphin/src/base/PPCPm.c diff --git a/src/dolphin/card/CARDBios.c b/libs/dolphin/src/card/CARDBios.c similarity index 100% rename from src/dolphin/card/CARDBios.c rename to libs/dolphin/src/card/CARDBios.c diff --git a/src/dolphin/card/CARDBlock.c b/libs/dolphin/src/card/CARDBlock.c similarity index 100% rename from src/dolphin/card/CARDBlock.c rename to libs/dolphin/src/card/CARDBlock.c diff --git a/src/dolphin/card/CARDCheck.c b/libs/dolphin/src/card/CARDCheck.c similarity index 100% rename from src/dolphin/card/CARDCheck.c rename to libs/dolphin/src/card/CARDCheck.c diff --git a/src/dolphin/card/CARDCreate.c b/libs/dolphin/src/card/CARDCreate.c similarity index 100% rename from src/dolphin/card/CARDCreate.c rename to libs/dolphin/src/card/CARDCreate.c diff --git a/src/dolphin/card/CARDDelete.c b/libs/dolphin/src/card/CARDDelete.c similarity index 100% rename from src/dolphin/card/CARDDelete.c rename to libs/dolphin/src/card/CARDDelete.c diff --git a/src/dolphin/card/CARDDir.c b/libs/dolphin/src/card/CARDDir.c similarity index 100% rename from src/dolphin/card/CARDDir.c rename to libs/dolphin/src/card/CARDDir.c diff --git a/src/dolphin/card/CARDErase.c b/libs/dolphin/src/card/CARDErase.c similarity index 100% rename from src/dolphin/card/CARDErase.c rename to libs/dolphin/src/card/CARDErase.c diff --git a/src/dolphin/card/CARDFormat.c b/libs/dolphin/src/card/CARDFormat.c similarity index 100% rename from src/dolphin/card/CARDFormat.c rename to libs/dolphin/src/card/CARDFormat.c diff --git a/src/dolphin/card/CARDMount.c b/libs/dolphin/src/card/CARDMount.c similarity index 100% rename from src/dolphin/card/CARDMount.c rename to libs/dolphin/src/card/CARDMount.c diff --git a/src/dolphin/card/CARDNet.c b/libs/dolphin/src/card/CARDNet.c similarity index 100% rename from src/dolphin/card/CARDNet.c rename to libs/dolphin/src/card/CARDNet.c diff --git a/src/dolphin/card/CARDOpen.c b/libs/dolphin/src/card/CARDOpen.c similarity index 100% rename from src/dolphin/card/CARDOpen.c rename to libs/dolphin/src/card/CARDOpen.c diff --git a/src/dolphin/card/CARDProgram.c b/libs/dolphin/src/card/CARDProgram.c similarity index 100% rename from src/dolphin/card/CARDProgram.c rename to libs/dolphin/src/card/CARDProgram.c diff --git a/src/dolphin/card/CARDRaw.c b/libs/dolphin/src/card/CARDRaw.c similarity index 100% rename from src/dolphin/card/CARDRaw.c rename to libs/dolphin/src/card/CARDRaw.c diff --git a/src/dolphin/card/CARDRdwr.c b/libs/dolphin/src/card/CARDRdwr.c similarity index 100% rename from src/dolphin/card/CARDRdwr.c rename to libs/dolphin/src/card/CARDRdwr.c diff --git a/src/dolphin/card/CARDRead.c b/libs/dolphin/src/card/CARDRead.c similarity index 100% rename from src/dolphin/card/CARDRead.c rename to libs/dolphin/src/card/CARDRead.c diff --git a/src/dolphin/card/CARDRename.c b/libs/dolphin/src/card/CARDRename.c similarity index 100% rename from src/dolphin/card/CARDRename.c rename to libs/dolphin/src/card/CARDRename.c diff --git a/src/dolphin/card/CARDStat.c b/libs/dolphin/src/card/CARDStat.c similarity index 100% rename from src/dolphin/card/CARDStat.c rename to libs/dolphin/src/card/CARDStat.c diff --git a/src/dolphin/card/CARDStatEx.c b/libs/dolphin/src/card/CARDStatEx.c similarity index 100% rename from src/dolphin/card/CARDStatEx.c rename to libs/dolphin/src/card/CARDStatEx.c diff --git a/src/dolphin/card/CARDUnlock.c b/libs/dolphin/src/card/CARDUnlock.c similarity index 100% rename from src/dolphin/card/CARDUnlock.c rename to libs/dolphin/src/card/CARDUnlock.c diff --git a/src/dolphin/card/CARDWrite.c b/libs/dolphin/src/card/CARDWrite.c similarity index 100% rename from src/dolphin/card/CARDWrite.c rename to libs/dolphin/src/card/CARDWrite.c diff --git a/src/dolphin/card/__card.h b/libs/dolphin/src/card/__card.h similarity index 100% rename from src/dolphin/card/__card.h rename to libs/dolphin/src/card/__card.h diff --git a/src/dolphin/db/db.c b/libs/dolphin/src/db/db.c similarity index 100% rename from src/dolphin/db/db.c rename to libs/dolphin/src/db/db.c diff --git a/src/dolphin/demo/DEMOAVX.c b/libs/dolphin/src/demo/DEMOAVX.c similarity index 100% rename from src/dolphin/demo/DEMOAVX.c rename to libs/dolphin/src/demo/DEMOAVX.c diff --git a/src/dolphin/demo/DEMOFont.c b/libs/dolphin/src/demo/DEMOFont.c similarity index 100% rename from src/dolphin/demo/DEMOFont.c rename to libs/dolphin/src/demo/DEMOFont.c diff --git a/src/dolphin/demo/DEMOInit.c b/libs/dolphin/src/demo/DEMOInit.c similarity index 100% rename from src/dolphin/demo/DEMOInit.c rename to libs/dolphin/src/demo/DEMOInit.c diff --git a/src/dolphin/demo/DEMOPad.c b/libs/dolphin/src/demo/DEMOPad.c similarity index 100% rename from src/dolphin/demo/DEMOPad.c rename to libs/dolphin/src/demo/DEMOPad.c diff --git a/src/dolphin/demo/DEMOPuts.c b/libs/dolphin/src/demo/DEMOPuts.c similarity index 100% rename from src/dolphin/demo/DEMOPuts.c rename to libs/dolphin/src/demo/DEMOPuts.c diff --git a/src/dolphin/demo/DEMOStats.c b/libs/dolphin/src/demo/DEMOStats.c similarity index 100% rename from src/dolphin/demo/DEMOStats.c rename to libs/dolphin/src/demo/DEMOStats.c diff --git a/src/dolphin/demo/DEMOWin.c b/libs/dolphin/src/demo/DEMOWin.c similarity index 100% rename from src/dolphin/demo/DEMOWin.c rename to libs/dolphin/src/demo/DEMOWin.c diff --git a/src/dolphin/demo/__demo.h b/libs/dolphin/src/demo/__demo.h similarity index 100% rename from src/dolphin/demo/__demo.h rename to libs/dolphin/src/demo/__demo.h diff --git a/src/dolphin/dsp/__dsp.h b/libs/dolphin/src/dsp/__dsp.h similarity index 100% rename from src/dolphin/dsp/__dsp.h rename to libs/dolphin/src/dsp/__dsp.h diff --git a/src/dolphin/dsp/dsp.c b/libs/dolphin/src/dsp/dsp.c similarity index 100% rename from src/dolphin/dsp/dsp.c rename to libs/dolphin/src/dsp/dsp.c diff --git a/src/dolphin/dsp/dsp_debug.c b/libs/dolphin/src/dsp/dsp_debug.c similarity index 100% rename from src/dolphin/dsp/dsp_debug.c rename to libs/dolphin/src/dsp/dsp_debug.c diff --git a/src/dolphin/dsp/dsp_perf.c b/libs/dolphin/src/dsp/dsp_perf.c similarity index 100% rename from src/dolphin/dsp/dsp_perf.c rename to libs/dolphin/src/dsp/dsp_perf.c diff --git a/src/dolphin/dsp/dsp_task.c b/libs/dolphin/src/dsp/dsp_task.c similarity index 100% rename from src/dolphin/dsp/dsp_task.c rename to libs/dolphin/src/dsp/dsp_task.c diff --git a/src/dolphin/dtk/dtk.c b/libs/dolphin/src/dtk/dtk.c similarity index 100% rename from src/dolphin/dtk/dtk.c rename to libs/dolphin/src/dtk/dtk.c diff --git a/src/dolphin/dvd/__dvd.h b/libs/dolphin/src/dvd/__dvd.h similarity index 100% rename from src/dolphin/dvd/__dvd.h rename to libs/dolphin/src/dvd/__dvd.h diff --git a/src/dolphin/dvd/dvd.c b/libs/dolphin/src/dvd/dvd.c similarity index 100% rename from src/dolphin/dvd/dvd.c rename to libs/dolphin/src/dvd/dvd.c diff --git a/src/dolphin/dvd/dvdFatal.c b/libs/dolphin/src/dvd/dvdFatal.c similarity index 100% rename from src/dolphin/dvd/dvdFatal.c rename to libs/dolphin/src/dvd/dvdFatal.c diff --git a/src/dolphin/dvd/dvderror.c b/libs/dolphin/src/dvd/dvderror.c similarity index 100% rename from src/dolphin/dvd/dvderror.c rename to libs/dolphin/src/dvd/dvderror.c diff --git a/src/dolphin/dvd/dvdfs.c b/libs/dolphin/src/dvd/dvdfs.c similarity index 100% rename from src/dolphin/dvd/dvdfs.c rename to libs/dolphin/src/dvd/dvdfs.c diff --git a/src/dolphin/dvd/dvdidutils.c b/libs/dolphin/src/dvd/dvdidutils.c similarity index 100% rename from src/dolphin/dvd/dvdidutils.c rename to libs/dolphin/src/dvd/dvdidutils.c diff --git a/src/dolphin/dvd/dvdlow.c b/libs/dolphin/src/dvd/dvdlow.c similarity index 100% rename from src/dolphin/dvd/dvdlow.c rename to libs/dolphin/src/dvd/dvdlow.c diff --git a/src/dolphin/dvd/dvdqueue.c b/libs/dolphin/src/dvd/dvdqueue.c similarity index 100% rename from src/dolphin/dvd/dvdqueue.c rename to libs/dolphin/src/dvd/dvdqueue.c diff --git a/src/dolphin/dvd/fstload.c b/libs/dolphin/src/dvd/fstload.c similarity index 100% rename from src/dolphin/dvd/fstload.c rename to libs/dolphin/src/dvd/fstload.c diff --git a/src/dolphin/exi/EXIAd16.c b/libs/dolphin/src/exi/EXIAd16.c similarity index 100% rename from src/dolphin/exi/EXIAd16.c rename to libs/dolphin/src/exi/EXIAd16.c diff --git a/src/dolphin/exi/EXIBios.c b/libs/dolphin/src/exi/EXIBios.c similarity index 100% rename from src/dolphin/exi/EXIBios.c rename to libs/dolphin/src/exi/EXIBios.c diff --git a/src/dolphin/exi/EXIUart.c b/libs/dolphin/src/exi/EXIUart.c similarity index 100% rename from src/dolphin/exi/EXIUart.c rename to libs/dolphin/src/exi/EXIUart.c diff --git a/src/dolphin/fileCache/fileCache.c b/libs/dolphin/src/fileCache/fileCache.c similarity index 100% rename from src/dolphin/fileCache/fileCache.c rename to libs/dolphin/src/fileCache/fileCache.c diff --git a/src/dolphin/gd/GDBase.c b/libs/dolphin/src/gd/GDBase.c similarity index 100% rename from src/dolphin/gd/GDBase.c rename to libs/dolphin/src/gd/GDBase.c diff --git a/src/dolphin/gd/GDFile.c b/libs/dolphin/src/gd/GDFile.c similarity index 100% rename from src/dolphin/gd/GDFile.c rename to libs/dolphin/src/gd/GDFile.c diff --git a/src/dolphin/gd/GDGeometry.c b/libs/dolphin/src/gd/GDGeometry.c similarity index 100% rename from src/dolphin/gd/GDGeometry.c rename to libs/dolphin/src/gd/GDGeometry.c diff --git a/src/dolphin/gd/GDIndirect.c b/libs/dolphin/src/gd/GDIndirect.c similarity index 100% rename from src/dolphin/gd/GDIndirect.c rename to libs/dolphin/src/gd/GDIndirect.c diff --git a/src/dolphin/gd/GDLight.c b/libs/dolphin/src/gd/GDLight.c similarity index 100% rename from src/dolphin/gd/GDLight.c rename to libs/dolphin/src/gd/GDLight.c diff --git a/src/dolphin/gd/GDPixel.c b/libs/dolphin/src/gd/GDPixel.c similarity index 100% rename from src/dolphin/gd/GDPixel.c rename to libs/dolphin/src/gd/GDPixel.c diff --git a/src/dolphin/gd/GDTev.c b/libs/dolphin/src/gd/GDTev.c similarity index 100% rename from src/dolphin/gd/GDTev.c rename to libs/dolphin/src/gd/GDTev.c diff --git a/src/dolphin/gd/GDTexture.c b/libs/dolphin/src/gd/GDTexture.c similarity index 100% rename from src/dolphin/gd/GDTexture.c rename to libs/dolphin/src/gd/GDTexture.c diff --git a/src/dolphin/gd/GDTransform.c b/libs/dolphin/src/gd/GDTransform.c similarity index 100% rename from src/dolphin/gd/GDTransform.c rename to libs/dolphin/src/gd/GDTransform.c diff --git a/src/dolphin/gf/GFGeometry.cpp b/libs/dolphin/src/gf/GFGeometry.cpp similarity index 100% rename from src/dolphin/gf/GFGeometry.cpp rename to libs/dolphin/src/gf/GFGeometry.cpp diff --git a/src/dolphin/gf/GFLight.cpp b/libs/dolphin/src/gf/GFLight.cpp similarity index 100% rename from src/dolphin/gf/GFLight.cpp rename to libs/dolphin/src/gf/GFLight.cpp diff --git a/src/dolphin/gf/GFPixel.cpp b/libs/dolphin/src/gf/GFPixel.cpp similarity index 100% rename from src/dolphin/gf/GFPixel.cpp rename to libs/dolphin/src/gf/GFPixel.cpp diff --git a/src/dolphin/gf/GFTev.cpp b/libs/dolphin/src/gf/GFTev.cpp similarity index 100% rename from src/dolphin/gf/GFTev.cpp rename to libs/dolphin/src/gf/GFTev.cpp diff --git a/src/dolphin/gx/GXAttr.c b/libs/dolphin/src/gx/GXAttr.c similarity index 100% rename from src/dolphin/gx/GXAttr.c rename to libs/dolphin/src/gx/GXAttr.c diff --git a/src/dolphin/gx/GXBump.c b/libs/dolphin/src/gx/GXBump.c similarity index 100% rename from src/dolphin/gx/GXBump.c rename to libs/dolphin/src/gx/GXBump.c diff --git a/src/dolphin/gx/GXDisplayList.c b/libs/dolphin/src/gx/GXDisplayList.c similarity index 100% rename from src/dolphin/gx/GXDisplayList.c rename to libs/dolphin/src/gx/GXDisplayList.c diff --git a/src/dolphin/gx/GXDraw.c b/libs/dolphin/src/gx/GXDraw.c similarity index 100% rename from src/dolphin/gx/GXDraw.c rename to libs/dolphin/src/gx/GXDraw.c diff --git a/src/dolphin/gx/GXFifo.c b/libs/dolphin/src/gx/GXFifo.c similarity index 100% rename from src/dolphin/gx/GXFifo.c rename to libs/dolphin/src/gx/GXFifo.c diff --git a/src/dolphin/gx/GXFrameBuf.c b/libs/dolphin/src/gx/GXFrameBuf.c similarity index 100% rename from src/dolphin/gx/GXFrameBuf.c rename to libs/dolphin/src/gx/GXFrameBuf.c diff --git a/src/dolphin/gx/GXGeometry.c b/libs/dolphin/src/gx/GXGeometry.c similarity index 100% rename from src/dolphin/gx/GXGeometry.c rename to libs/dolphin/src/gx/GXGeometry.c diff --git a/src/dolphin/gx/GXInit.c b/libs/dolphin/src/gx/GXInit.c similarity index 100% rename from src/dolphin/gx/GXInit.c rename to libs/dolphin/src/gx/GXInit.c diff --git a/src/dolphin/gx/GXLight.c b/libs/dolphin/src/gx/GXLight.c similarity index 100% rename from src/dolphin/gx/GXLight.c rename to libs/dolphin/src/gx/GXLight.c diff --git a/src/dolphin/gx/GXMisc.c b/libs/dolphin/src/gx/GXMisc.c similarity index 100% rename from src/dolphin/gx/GXMisc.c rename to libs/dolphin/src/gx/GXMisc.c diff --git a/src/dolphin/gx/GXPerf.c b/libs/dolphin/src/gx/GXPerf.c similarity index 100% rename from src/dolphin/gx/GXPerf.c rename to libs/dolphin/src/gx/GXPerf.c diff --git a/src/dolphin/gx/GXPixel.c b/libs/dolphin/src/gx/GXPixel.c similarity index 100% rename from src/dolphin/gx/GXPixel.c rename to libs/dolphin/src/gx/GXPixel.c diff --git a/src/dolphin/gx/GXSave.c b/libs/dolphin/src/gx/GXSave.c similarity index 100% rename from src/dolphin/gx/GXSave.c rename to libs/dolphin/src/gx/GXSave.c diff --git a/src/dolphin/gx/GXStubs.c b/libs/dolphin/src/gx/GXStubs.c similarity index 100% rename from src/dolphin/gx/GXStubs.c rename to libs/dolphin/src/gx/GXStubs.c diff --git a/src/dolphin/gx/GXTev.c b/libs/dolphin/src/gx/GXTev.c similarity index 100% rename from src/dolphin/gx/GXTev.c rename to libs/dolphin/src/gx/GXTev.c diff --git a/src/dolphin/gx/GXTexture.c b/libs/dolphin/src/gx/GXTexture.c similarity index 100% rename from src/dolphin/gx/GXTexture.c rename to libs/dolphin/src/gx/GXTexture.c diff --git a/src/dolphin/gx/GXTransform.c b/libs/dolphin/src/gx/GXTransform.c similarity index 100% rename from src/dolphin/gx/GXTransform.c rename to libs/dolphin/src/gx/GXTransform.c diff --git a/src/dolphin/gx/GXVerifRAS.c b/libs/dolphin/src/gx/GXVerifRAS.c similarity index 100% rename from src/dolphin/gx/GXVerifRAS.c rename to libs/dolphin/src/gx/GXVerifRAS.c diff --git a/src/dolphin/gx/GXVerifXF.c b/libs/dolphin/src/gx/GXVerifXF.c similarity index 100% rename from src/dolphin/gx/GXVerifXF.c rename to libs/dolphin/src/gx/GXVerifXF.c diff --git a/src/dolphin/gx/GXVerify.c b/libs/dolphin/src/gx/GXVerify.c similarity index 100% rename from src/dolphin/gx/GXVerify.c rename to libs/dolphin/src/gx/GXVerify.c diff --git a/src/dolphin/gx/GXVert.c b/libs/dolphin/src/gx/GXVert.c similarity index 100% rename from src/dolphin/gx/GXVert.c rename to libs/dolphin/src/gx/GXVert.c diff --git a/src/dolphin/gx/__gx.h b/libs/dolphin/src/gx/__gx.h similarity index 100% rename from src/dolphin/gx/__gx.h rename to libs/dolphin/src/gx/__gx.h diff --git a/src/dolphin/hio/hio.c b/libs/dolphin/src/hio/hio.c similarity index 100% rename from src/dolphin/hio/hio.c rename to libs/dolphin/src/hio/hio.c diff --git a/src/dolphin/mcc/fio.c b/libs/dolphin/src/mcc/fio.c similarity index 100% rename from src/dolphin/mcc/fio.c rename to libs/dolphin/src/mcc/fio.c diff --git a/src/dolphin/mcc/mcc.c b/libs/dolphin/src/mcc/mcc.c similarity index 100% rename from src/dolphin/mcc/mcc.c rename to libs/dolphin/src/mcc/mcc.c diff --git a/src/dolphin/mcc/tty.c b/libs/dolphin/src/mcc/tty.c similarity index 100% rename from src/dolphin/mcc/tty.c rename to libs/dolphin/src/mcc/tty.c diff --git a/src/dolphin/mix/mix.c b/libs/dolphin/src/mix/mix.c similarity index 100% rename from src/dolphin/mix/mix.c rename to libs/dolphin/src/mix/mix.c diff --git a/src/dolphin/mtx/mtx.c b/libs/dolphin/src/mtx/mtx.c similarity index 100% rename from src/dolphin/mtx/mtx.c rename to libs/dolphin/src/mtx/mtx.c diff --git a/src/dolphin/mtx/mtx44.c b/libs/dolphin/src/mtx/mtx44.c similarity index 100% rename from src/dolphin/mtx/mtx44.c rename to libs/dolphin/src/mtx/mtx44.c diff --git a/src/dolphin/mtx/mtx44vec.c b/libs/dolphin/src/mtx/mtx44vec.c similarity index 100% rename from src/dolphin/mtx/mtx44vec.c rename to libs/dolphin/src/mtx/mtx44vec.c diff --git a/src/dolphin/mtx/mtxstack.c b/libs/dolphin/src/mtx/mtxstack.c similarity index 100% rename from src/dolphin/mtx/mtxstack.c rename to libs/dolphin/src/mtx/mtxstack.c diff --git a/src/dolphin/mtx/mtxvec.c b/libs/dolphin/src/mtx/mtxvec.c similarity index 100% rename from src/dolphin/mtx/mtxvec.c rename to libs/dolphin/src/mtx/mtxvec.c diff --git a/src/dolphin/mtx/psmtx.c b/libs/dolphin/src/mtx/psmtx.c similarity index 100% rename from src/dolphin/mtx/psmtx.c rename to libs/dolphin/src/mtx/psmtx.c diff --git a/src/dolphin/mtx/quat.c b/libs/dolphin/src/mtx/quat.c similarity index 100% rename from src/dolphin/mtx/quat.c rename to libs/dolphin/src/mtx/quat.c diff --git a/src/dolphin/mtx/vec.c b/libs/dolphin/src/mtx/vec.c similarity index 100% rename from src/dolphin/mtx/vec.c rename to libs/dolphin/src/mtx/vec.c diff --git a/src/dolphin/odemustubs/odemustubs.c b/libs/dolphin/src/odemustubs/odemustubs.c similarity index 100% rename from src/dolphin/odemustubs/odemustubs.c rename to libs/dolphin/src/odemustubs/odemustubs.c diff --git a/src/dolphin/odenotstub/odenotstub.c b/libs/dolphin/src/odenotstub/odenotstub.c similarity index 100% rename from src/dolphin/odenotstub/odenotstub.c rename to libs/dolphin/src/odenotstub/odenotstub.c diff --git a/src/dolphin/os/OS.c b/libs/dolphin/src/os/OS.c similarity index 100% rename from src/dolphin/os/OS.c rename to libs/dolphin/src/os/OS.c diff --git a/src/dolphin/os/OSAddress.c b/libs/dolphin/src/os/OSAddress.c similarity index 100% rename from src/dolphin/os/OSAddress.c rename to libs/dolphin/src/os/OSAddress.c diff --git a/src/dolphin/os/OSAlarm.c b/libs/dolphin/src/os/OSAlarm.c similarity index 100% rename from src/dolphin/os/OSAlarm.c rename to libs/dolphin/src/os/OSAlarm.c diff --git a/src/dolphin/os/OSAlloc.c b/libs/dolphin/src/os/OSAlloc.c similarity index 100% rename from src/dolphin/os/OSAlloc.c rename to libs/dolphin/src/os/OSAlloc.c diff --git a/src/dolphin/os/OSArena.c b/libs/dolphin/src/os/OSArena.c similarity index 100% rename from src/dolphin/os/OSArena.c rename to libs/dolphin/src/os/OSArena.c diff --git a/src/dolphin/os/OSAudioSystem.c b/libs/dolphin/src/os/OSAudioSystem.c similarity index 100% rename from src/dolphin/os/OSAudioSystem.c rename to libs/dolphin/src/os/OSAudioSystem.c diff --git a/src/dolphin/os/OSCache.c b/libs/dolphin/src/os/OSCache.c similarity index 100% rename from src/dolphin/os/OSCache.c rename to libs/dolphin/src/os/OSCache.c diff --git a/src/dolphin/os/OSContext.c b/libs/dolphin/src/os/OSContext.c similarity index 100% rename from src/dolphin/os/OSContext.c rename to libs/dolphin/src/os/OSContext.c diff --git a/src/dolphin/os/OSError.c b/libs/dolphin/src/os/OSError.c similarity index 100% rename from src/dolphin/os/OSError.c rename to libs/dolphin/src/os/OSError.c diff --git a/src/dolphin/os/OSExec.c b/libs/dolphin/src/os/OSExec.c similarity index 100% rename from src/dolphin/os/OSExec.c rename to libs/dolphin/src/os/OSExec.c diff --git a/src/dolphin/os/OSFatal.c b/libs/dolphin/src/os/OSFatal.c similarity index 100% rename from src/dolphin/os/OSFatal.c rename to libs/dolphin/src/os/OSFatal.c diff --git a/src/dolphin/os/OSFont.c b/libs/dolphin/src/os/OSFont.c similarity index 100% rename from src/dolphin/os/OSFont.c rename to libs/dolphin/src/os/OSFont.c diff --git a/src/dolphin/os/OSInterrupt.c b/libs/dolphin/src/os/OSInterrupt.c similarity index 100% rename from src/dolphin/os/OSInterrupt.c rename to libs/dolphin/src/os/OSInterrupt.c diff --git a/src/dolphin/os/OSLink.c b/libs/dolphin/src/os/OSLink.c similarity index 100% rename from src/dolphin/os/OSLink.c rename to libs/dolphin/src/os/OSLink.c diff --git a/src/dolphin/os/OSMemory.c b/libs/dolphin/src/os/OSMemory.c similarity index 100% rename from src/dolphin/os/OSMemory.c rename to libs/dolphin/src/os/OSMemory.c diff --git a/src/dolphin/os/OSMessage.c b/libs/dolphin/src/os/OSMessage.c similarity index 100% rename from src/dolphin/os/OSMessage.c rename to libs/dolphin/src/os/OSMessage.c diff --git a/src/dolphin/os/OSMutex.c b/libs/dolphin/src/os/OSMutex.c similarity index 100% rename from src/dolphin/os/OSMutex.c rename to libs/dolphin/src/os/OSMutex.c diff --git a/src/dolphin/os/OSReboot.c b/libs/dolphin/src/os/OSReboot.c similarity index 100% rename from src/dolphin/os/OSReboot.c rename to libs/dolphin/src/os/OSReboot.c diff --git a/src/dolphin/os/OSReset.c b/libs/dolphin/src/os/OSReset.c similarity index 100% rename from src/dolphin/os/OSReset.c rename to libs/dolphin/src/os/OSReset.c diff --git a/src/dolphin/os/OSResetSW.c b/libs/dolphin/src/os/OSResetSW.c similarity index 100% rename from src/dolphin/os/OSResetSW.c rename to libs/dolphin/src/os/OSResetSW.c diff --git a/src/dolphin/os/OSRtc.c b/libs/dolphin/src/os/OSRtc.c similarity index 100% rename from src/dolphin/os/OSRtc.c rename to libs/dolphin/src/os/OSRtc.c diff --git a/src/dolphin/os/OSSemaphore.c b/libs/dolphin/src/os/OSSemaphore.c similarity index 100% rename from src/dolphin/os/OSSemaphore.c rename to libs/dolphin/src/os/OSSemaphore.c diff --git a/src/dolphin/os/OSStopwatch.c b/libs/dolphin/src/os/OSStopwatch.c similarity index 100% rename from src/dolphin/os/OSStopwatch.c rename to libs/dolphin/src/os/OSStopwatch.c diff --git a/src/dolphin/os/OSSync.c b/libs/dolphin/src/os/OSSync.c similarity index 100% rename from src/dolphin/os/OSSync.c rename to libs/dolphin/src/os/OSSync.c diff --git a/src/dolphin/os/OSThread.c b/libs/dolphin/src/os/OSThread.c similarity index 100% rename from src/dolphin/os/OSThread.c rename to libs/dolphin/src/os/OSThread.c diff --git a/src/dolphin/os/OSTime.c b/libs/dolphin/src/os/OSTime.c similarity index 100% rename from src/dolphin/os/OSTime.c rename to libs/dolphin/src/os/OSTime.c diff --git a/src/dolphin/os/OSTimer.c b/libs/dolphin/src/os/OSTimer.c similarity index 100% rename from src/dolphin/os/OSTimer.c rename to libs/dolphin/src/os/OSTimer.c diff --git a/src/dolphin/os/OSUtf.c b/libs/dolphin/src/os/OSUtf.c similarity index 100% rename from src/dolphin/os/OSUtf.c rename to libs/dolphin/src/os/OSUtf.c diff --git a/src/dolphin/os/__os.h b/libs/dolphin/src/os/__os.h similarity index 100% rename from src/dolphin/os/__os.h rename to libs/dolphin/src/os/__os.h diff --git a/src/dolphin/os/__ppc_eabi_init.c b/libs/dolphin/src/os/__ppc_eabi_init.c similarity index 100% rename from src/dolphin/os/__ppc_eabi_init.c rename to libs/dolphin/src/os/__ppc_eabi_init.c diff --git a/src/dolphin/os/__ppc_eabi_init.cpp b/libs/dolphin/src/os/__ppc_eabi_init.cpp similarity index 100% rename from src/dolphin/os/__ppc_eabi_init.cpp rename to libs/dolphin/src/os/__ppc_eabi_init.cpp diff --git a/src/dolphin/os/__start.c b/libs/dolphin/src/os/__start.c similarity index 100% rename from src/dolphin/os/__start.c rename to libs/dolphin/src/os/__start.c diff --git a/src/dolphin/os/time.dolphin.c b/libs/dolphin/src/os/time.dolphin.c similarity index 100% rename from src/dolphin/os/time.dolphin.c rename to libs/dolphin/src/os/time.dolphin.c diff --git a/src/dolphin/pad/Pad.c b/libs/dolphin/src/pad/Pad.c similarity index 100% rename from src/dolphin/pad/Pad.c rename to libs/dolphin/src/pad/Pad.c diff --git a/src/dolphin/pad/Padclamp.c b/libs/dolphin/src/pad/Padclamp.c similarity index 100% rename from src/dolphin/pad/Padclamp.c rename to libs/dolphin/src/pad/Padclamp.c diff --git a/src/dolphin/perf/__perf.h b/libs/dolphin/src/perf/__perf.h similarity index 100% rename from src/dolphin/perf/__perf.h rename to libs/dolphin/src/perf/__perf.h diff --git a/src/dolphin/perf/perf.c b/libs/dolphin/src/perf/perf.c similarity index 100% rename from src/dolphin/perf/perf.c rename to libs/dolphin/src/perf/perf.c diff --git a/src/dolphin/perf/perfdraw.c b/libs/dolphin/src/perf/perfdraw.c similarity index 100% rename from src/dolphin/perf/perfdraw.c rename to libs/dolphin/src/perf/perfdraw.c diff --git a/src/dolphin/seq/seq.c b/libs/dolphin/src/seq/seq.c similarity index 100% rename from src/dolphin/seq/seq.c rename to libs/dolphin/src/seq/seq.c diff --git a/src/dolphin/si/SIBios.c b/libs/dolphin/src/si/SIBios.c similarity index 100% rename from src/dolphin/si/SIBios.c rename to libs/dolphin/src/si/SIBios.c diff --git a/src/dolphin/si/SISamplingRate.c b/libs/dolphin/src/si/SISamplingRate.c similarity index 100% rename from src/dolphin/si/SISamplingRate.c rename to libs/dolphin/src/si/SISamplingRate.c diff --git a/src/dolphin/si/SISteering.c b/libs/dolphin/src/si/SISteering.c similarity index 100% rename from src/dolphin/si/SISteering.c rename to libs/dolphin/src/si/SISteering.c diff --git a/src/dolphin/si/SISteeringAuto.c b/libs/dolphin/src/si/SISteeringAuto.c similarity index 100% rename from src/dolphin/si/SISteeringAuto.c rename to libs/dolphin/src/si/SISteeringAuto.c diff --git a/src/dolphin/si/SISteeringXfer.c b/libs/dolphin/src/si/SISteeringXfer.c similarity index 100% rename from src/dolphin/si/SISteeringXfer.c rename to libs/dolphin/src/si/SISteeringXfer.c diff --git a/src/dolphin/si/__si.h b/libs/dolphin/src/si/__si.h similarity index 100% rename from src/dolphin/si/__si.h rename to libs/dolphin/src/si/__si.h diff --git a/src/dolphin/sp/sp.c b/libs/dolphin/src/sp/sp.c similarity index 100% rename from src/dolphin/sp/sp.c rename to libs/dolphin/src/sp/sp.c diff --git a/src/dolphin/support/HTable.c b/libs/dolphin/src/support/HTable.c similarity index 100% rename from src/dolphin/support/HTable.c rename to libs/dolphin/src/support/HTable.c diff --git a/src/dolphin/support/List.c b/libs/dolphin/src/support/List.c similarity index 100% rename from src/dolphin/support/List.c rename to libs/dolphin/src/support/List.c diff --git a/src/dolphin/support/Tree.c b/libs/dolphin/src/support/Tree.c similarity index 100% rename from src/dolphin/support/Tree.c rename to libs/dolphin/src/support/Tree.c diff --git a/src/dolphin/support/string.c b/libs/dolphin/src/support/string.c similarity index 100% rename from src/dolphin/support/string.c rename to libs/dolphin/src/support/string.c diff --git a/src/dolphin/syn/__syn.h b/libs/dolphin/src/syn/__syn.h similarity index 100% rename from src/dolphin/syn/__syn.h rename to libs/dolphin/src/syn/__syn.h diff --git a/src/dolphin/syn/syn.c b/libs/dolphin/src/syn/syn.c similarity index 100% rename from src/dolphin/syn/syn.c rename to libs/dolphin/src/syn/syn.c diff --git a/src/dolphin/syn/synctrl.c b/libs/dolphin/src/syn/synctrl.c similarity index 100% rename from src/dolphin/syn/synctrl.c rename to libs/dolphin/src/syn/synctrl.c diff --git a/src/dolphin/syn/synenv.c b/libs/dolphin/src/syn/synenv.c similarity index 100% rename from src/dolphin/syn/synenv.c rename to libs/dolphin/src/syn/synenv.c diff --git a/src/dolphin/syn/synlfo.c b/libs/dolphin/src/syn/synlfo.c similarity index 100% rename from src/dolphin/syn/synlfo.c rename to libs/dolphin/src/syn/synlfo.c diff --git a/src/dolphin/syn/synmix.c b/libs/dolphin/src/syn/synmix.c similarity index 100% rename from src/dolphin/syn/synmix.c rename to libs/dolphin/src/syn/synmix.c diff --git a/src/dolphin/syn/synpitch.c b/libs/dolphin/src/syn/synpitch.c similarity index 100% rename from src/dolphin/syn/synpitch.c rename to libs/dolphin/src/syn/synpitch.c diff --git a/src/dolphin/syn/synsample.c b/libs/dolphin/src/syn/synsample.c similarity index 100% rename from src/dolphin/syn/synsample.c rename to libs/dolphin/src/syn/synsample.c diff --git a/src/dolphin/syn/synvoice.c b/libs/dolphin/src/syn/synvoice.c similarity index 100% rename from src/dolphin/syn/synvoice.c rename to libs/dolphin/src/syn/synvoice.c diff --git a/src/dolphin/syn/synwt.c b/libs/dolphin/src/syn/synwt.c similarity index 100% rename from src/dolphin/syn/synwt.c rename to libs/dolphin/src/syn/synwt.c diff --git a/src/dolphin/texPalette/texPalette.c b/libs/dolphin/src/texPalette/texPalette.c similarity index 100% rename from src/dolphin/texPalette/texPalette.c rename to libs/dolphin/src/texPalette/texPalette.c diff --git a/src/dolphin/vi/__vi.h b/libs/dolphin/src/vi/__vi.h similarity index 100% rename from src/dolphin/vi/__vi.h rename to libs/dolphin/src/vi/__vi.h diff --git a/src/dolphin/vi/gpioexi.c b/libs/dolphin/src/vi/gpioexi.c similarity index 100% rename from src/dolphin/vi/gpioexi.c rename to libs/dolphin/src/vi/gpioexi.c diff --git a/src/dolphin/vi/i2c.c b/libs/dolphin/src/vi/i2c.c similarity index 100% rename from src/dolphin/vi/i2c.c rename to libs/dolphin/src/vi/i2c.c diff --git a/src/dolphin/vi/initphilips.c b/libs/dolphin/src/vi/initphilips.c similarity index 100% rename from src/dolphin/vi/initphilips.c rename to libs/dolphin/src/vi/initphilips.c diff --git a/src/dolphin/vi/vi.c b/libs/dolphin/src/vi/vi.c similarity index 100% rename from src/dolphin/vi/vi.c rename to libs/dolphin/src/vi/vi.c diff --git a/include/revolution/ai.h b/libs/revolution/include/revolution/ai.h similarity index 100% rename from include/revolution/ai.h rename to libs/revolution/include/revolution/ai.h diff --git a/include/revolution/amc/AmcExi2Comm.h b/libs/revolution/include/revolution/amc/AmcExi2Comm.h similarity index 100% rename from include/revolution/amc/AmcExi2Comm.h rename to libs/revolution/include/revolution/amc/AmcExi2Comm.h diff --git a/include/revolution/amc/AmcTypes.h b/libs/revolution/include/revolution/amc/AmcTypes.h similarity index 100% rename from include/revolution/amc/AmcTypes.h rename to libs/revolution/include/revolution/amc/AmcTypes.h diff --git a/include/revolution/aralt.h b/libs/revolution/include/revolution/aralt.h similarity index 100% rename from include/revolution/aralt.h rename to libs/revolution/include/revolution/aralt.h diff --git a/include/revolution/arc.h b/libs/revolution/include/revolution/arc.h similarity index 100% rename from include/revolution/arc.h rename to libs/revolution/include/revolution/arc.h diff --git a/include/revolution/ax.h b/libs/revolution/include/revolution/ax.h similarity index 100% rename from include/revolution/ax.h rename to libs/revolution/include/revolution/ax.h diff --git a/include/revolution/axart.h b/libs/revolution/include/revolution/axart.h similarity index 100% rename from include/revolution/axart.h rename to libs/revolution/include/revolution/axart.h diff --git a/include/revolution/axfx.h b/libs/revolution/include/revolution/axfx.h similarity index 100% rename from include/revolution/axfx.h rename to libs/revolution/include/revolution/axfx.h diff --git a/include/revolution/base/PPCArch.h b/libs/revolution/include/revolution/base/PPCArch.h similarity index 100% rename from include/revolution/base/PPCArch.h rename to libs/revolution/include/revolution/base/PPCArch.h diff --git a/include/revolution/card.h b/libs/revolution/include/revolution/card.h similarity index 100% rename from include/revolution/card.h rename to libs/revolution/include/revolution/card.h diff --git a/include/revolution/db.h b/libs/revolution/include/revolution/db.h similarity index 100% rename from include/revolution/db.h rename to libs/revolution/include/revolution/db.h diff --git a/include/revolution/db/DBInterface.h b/libs/revolution/include/revolution/db/DBInterface.h similarity index 100% rename from include/revolution/db/DBInterface.h rename to libs/revolution/include/revolution/db/DBInterface.h diff --git a/include/revolution/dsp.h b/libs/revolution/include/revolution/dsp.h similarity index 100% rename from include/revolution/dsp.h rename to libs/revolution/include/revolution/dsp.h diff --git a/include/revolution/dvd.h b/libs/revolution/include/revolution/dvd.h similarity index 100% rename from include/revolution/dvd.h rename to libs/revolution/include/revolution/dvd.h diff --git a/include/revolution/esp.h b/libs/revolution/include/revolution/esp.h similarity index 100% rename from include/revolution/esp.h rename to libs/revolution/include/revolution/esp.h diff --git a/include/revolution/euart.h b/libs/revolution/include/revolution/euart.h similarity index 100% rename from include/revolution/euart.h rename to libs/revolution/include/revolution/euart.h diff --git a/include/revolution/exi.h b/libs/revolution/include/revolution/exi.h similarity index 100% rename from include/revolution/exi.h rename to libs/revolution/include/revolution/exi.h diff --git a/include/revolution/fs.h b/libs/revolution/include/revolution/fs.h similarity index 100% rename from include/revolution/fs.h rename to libs/revolution/include/revolution/fs.h diff --git a/include/revolution/gd.h b/libs/revolution/include/revolution/gd.h similarity index 100% rename from include/revolution/gd.h rename to libs/revolution/include/revolution/gd.h diff --git a/include/revolution/gd/GDBase.h b/libs/revolution/include/revolution/gd/GDBase.h similarity index 100% rename from include/revolution/gd/GDBase.h rename to libs/revolution/include/revolution/gd/GDBase.h diff --git a/include/revolution/gd/GDFile.h b/libs/revolution/include/revolution/gd/GDFile.h similarity index 100% rename from include/revolution/gd/GDFile.h rename to libs/revolution/include/revolution/gd/GDFile.h diff --git a/include/revolution/gd/GDGeometry.h b/libs/revolution/include/revolution/gd/GDGeometry.h similarity index 100% rename from include/revolution/gd/GDGeometry.h rename to libs/revolution/include/revolution/gd/GDGeometry.h diff --git a/include/revolution/gd/GDIndirect.h b/libs/revolution/include/revolution/gd/GDIndirect.h similarity index 100% rename from include/revolution/gd/GDIndirect.h rename to libs/revolution/include/revolution/gd/GDIndirect.h diff --git a/include/revolution/gd/GDLight.h b/libs/revolution/include/revolution/gd/GDLight.h similarity index 100% rename from include/revolution/gd/GDLight.h rename to libs/revolution/include/revolution/gd/GDLight.h diff --git a/include/revolution/gd/GDPixel.h b/libs/revolution/include/revolution/gd/GDPixel.h similarity index 100% rename from include/revolution/gd/GDPixel.h rename to libs/revolution/include/revolution/gd/GDPixel.h diff --git a/include/revolution/gd/GDTev.h b/libs/revolution/include/revolution/gd/GDTev.h similarity index 100% rename from include/revolution/gd/GDTev.h rename to libs/revolution/include/revolution/gd/GDTev.h diff --git a/include/revolution/gd/GDTexture.h b/libs/revolution/include/revolution/gd/GDTexture.h similarity index 100% rename from include/revolution/gd/GDTexture.h rename to libs/revolution/include/revolution/gd/GDTexture.h diff --git a/include/revolution/gd/GDTransform.h b/libs/revolution/include/revolution/gd/GDTransform.h similarity index 100% rename from include/revolution/gd/GDTransform.h rename to libs/revolution/include/revolution/gd/GDTransform.h diff --git a/include/revolution/gf.h b/libs/revolution/include/revolution/gf.h similarity index 100% rename from include/revolution/gf.h rename to libs/revolution/include/revolution/gf.h diff --git a/include/revolution/gf/GFGeometry.h b/libs/revolution/include/revolution/gf/GFGeometry.h similarity index 100% rename from include/revolution/gf/GFGeometry.h rename to libs/revolution/include/revolution/gf/GFGeometry.h diff --git a/include/revolution/gf/GFLight.h b/libs/revolution/include/revolution/gf/GFLight.h similarity index 100% rename from include/revolution/gf/GFLight.h rename to libs/revolution/include/revolution/gf/GFLight.h diff --git a/include/revolution/gf/GFPixel.h b/libs/revolution/include/revolution/gf/GFPixel.h similarity index 100% rename from include/revolution/gf/GFPixel.h rename to libs/revolution/include/revolution/gf/GFPixel.h diff --git a/include/revolution/gf/GFTev.h b/libs/revolution/include/revolution/gf/GFTev.h similarity index 100% rename from include/revolution/gf/GFTev.h rename to libs/revolution/include/revolution/gf/GFTev.h diff --git a/include/revolution/gx.h b/libs/revolution/include/revolution/gx.h similarity index 100% rename from include/revolution/gx.h rename to libs/revolution/include/revolution/gx.h diff --git a/include/revolution/gx/GXBump.h b/libs/revolution/include/revolution/gx/GXBump.h similarity index 100% rename from include/revolution/gx/GXBump.h rename to libs/revolution/include/revolution/gx/GXBump.h diff --git a/include/revolution/gx/GXCommandList.h b/libs/revolution/include/revolution/gx/GXCommandList.h similarity index 100% rename from include/revolution/gx/GXCommandList.h rename to libs/revolution/include/revolution/gx/GXCommandList.h diff --git a/include/revolution/gx/GXCpu2Efb.h b/libs/revolution/include/revolution/gx/GXCpu2Efb.h similarity index 100% rename from include/revolution/gx/GXCpu2Efb.h rename to libs/revolution/include/revolution/gx/GXCpu2Efb.h diff --git a/include/revolution/gx/GXCull.h b/libs/revolution/include/revolution/gx/GXCull.h similarity index 100% rename from include/revolution/gx/GXCull.h rename to libs/revolution/include/revolution/gx/GXCull.h diff --git a/include/revolution/gx/GXDispList.h b/libs/revolution/include/revolution/gx/GXDispList.h similarity index 100% rename from include/revolution/gx/GXDispList.h rename to libs/revolution/include/revolution/gx/GXDispList.h diff --git a/include/revolution/gx/GXDraw.h b/libs/revolution/include/revolution/gx/GXDraw.h similarity index 100% rename from include/revolution/gx/GXDraw.h rename to libs/revolution/include/revolution/gx/GXDraw.h diff --git a/include/revolution/gx/GXEnum.h b/libs/revolution/include/revolution/gx/GXEnum.h similarity index 100% rename from include/revolution/gx/GXEnum.h rename to libs/revolution/include/revolution/gx/GXEnum.h diff --git a/include/revolution/gx/GXFifo.h b/libs/revolution/include/revolution/gx/GXFifo.h similarity index 100% rename from include/revolution/gx/GXFifo.h rename to libs/revolution/include/revolution/gx/GXFifo.h diff --git a/include/revolution/gx/GXFrameBuffer.h b/libs/revolution/include/revolution/gx/GXFrameBuffer.h similarity index 100% rename from include/revolution/gx/GXFrameBuffer.h rename to libs/revolution/include/revolution/gx/GXFrameBuffer.h diff --git a/include/revolution/gx/GXGeometry.h b/libs/revolution/include/revolution/gx/GXGeometry.h similarity index 100% rename from include/revolution/gx/GXGeometry.h rename to libs/revolution/include/revolution/gx/GXGeometry.h diff --git a/include/revolution/gx/GXGet.h b/libs/revolution/include/revolution/gx/GXGet.h similarity index 100% rename from include/revolution/gx/GXGet.h rename to libs/revolution/include/revolution/gx/GXGet.h diff --git a/include/revolution/gx/GXLighting.h b/libs/revolution/include/revolution/gx/GXLighting.h similarity index 100% rename from include/revolution/gx/GXLighting.h rename to libs/revolution/include/revolution/gx/GXLighting.h diff --git a/include/revolution/gx/GXManage.h b/libs/revolution/include/revolution/gx/GXManage.h similarity index 100% rename from include/revolution/gx/GXManage.h rename to libs/revolution/include/revolution/gx/GXManage.h diff --git a/include/revolution/gx/GXPerf.h b/libs/revolution/include/revolution/gx/GXPerf.h similarity index 100% rename from include/revolution/gx/GXPerf.h rename to libs/revolution/include/revolution/gx/GXPerf.h diff --git a/include/revolution/gx/GXPixel.h b/libs/revolution/include/revolution/gx/GXPixel.h similarity index 100% rename from include/revolution/gx/GXPixel.h rename to libs/revolution/include/revolution/gx/GXPixel.h diff --git a/include/revolution/gx/GXStruct.h b/libs/revolution/include/revolution/gx/GXStruct.h similarity index 100% rename from include/revolution/gx/GXStruct.h rename to libs/revolution/include/revolution/gx/GXStruct.h diff --git a/include/revolution/gx/GXTev.h b/libs/revolution/include/revolution/gx/GXTev.h similarity index 100% rename from include/revolution/gx/GXTev.h rename to libs/revolution/include/revolution/gx/GXTev.h diff --git a/include/revolution/gx/GXTexture.h b/libs/revolution/include/revolution/gx/GXTexture.h similarity index 100% rename from include/revolution/gx/GXTexture.h rename to libs/revolution/include/revolution/gx/GXTexture.h diff --git a/include/revolution/gx/GXTransform.h b/libs/revolution/include/revolution/gx/GXTransform.h similarity index 100% rename from include/revolution/gx/GXTransform.h rename to libs/revolution/include/revolution/gx/GXTransform.h diff --git a/include/revolution/gx/GXVerify.h b/libs/revolution/include/revolution/gx/GXVerify.h similarity index 100% rename from include/revolution/gx/GXVerify.h rename to libs/revolution/include/revolution/gx/GXVerify.h diff --git a/include/revolution/gx/GXVert.h b/libs/revolution/include/revolution/gx/GXVert.h similarity index 100% rename from include/revolution/gx/GXVert.h rename to libs/revolution/include/revolution/gx/GXVert.h diff --git a/include/revolution/hbm.h b/libs/revolution/include/revolution/hbm.h similarity index 100% rename from include/revolution/hbm.h rename to libs/revolution/include/revolution/hbm.h diff --git a/include/revolution/hio2.h b/libs/revolution/include/revolution/hio2.h similarity index 100% rename from include/revolution/hio2.h rename to libs/revolution/include/revolution/hio2.h diff --git a/include/revolution/hw_regs.h b/libs/revolution/include/revolution/hw_regs.h similarity index 100% rename from include/revolution/hw_regs.h rename to libs/revolution/include/revolution/hw_regs.h diff --git a/include/revolution/ipc.h b/libs/revolution/include/revolution/ipc.h similarity index 100% rename from include/revolution/ipc.h rename to libs/revolution/include/revolution/ipc.h diff --git a/include/revolution/ipc/ipcProfile.h b/libs/revolution/include/revolution/ipc/ipcProfile.h similarity index 100% rename from include/revolution/ipc/ipcProfile.h rename to libs/revolution/include/revolution/ipc/ipcProfile.h diff --git a/include/revolution/ipc/ipcclt.h b/libs/revolution/include/revolution/ipc/ipcclt.h similarity index 100% rename from include/revolution/ipc/ipcclt.h rename to libs/revolution/include/revolution/ipc/ipcclt.h diff --git a/include/revolution/ipc/memory.h b/libs/revolution/include/revolution/ipc/memory.h similarity index 100% rename from include/revolution/ipc/memory.h rename to libs/revolution/include/revolution/ipc/memory.h diff --git a/include/revolution/kpad.h b/libs/revolution/include/revolution/kpad.h similarity index 100% rename from include/revolution/kpad.h rename to libs/revolution/include/revolution/kpad.h diff --git a/include/revolution/mem.h b/libs/revolution/include/revolution/mem.h similarity index 100% rename from include/revolution/mem.h rename to libs/revolution/include/revolution/mem.h diff --git a/include/revolution/mem/allocator.h b/libs/revolution/include/revolution/mem/allocator.h similarity index 100% rename from include/revolution/mem/allocator.h rename to libs/revolution/include/revolution/mem/allocator.h diff --git a/include/revolution/mem/expHeap.h b/libs/revolution/include/revolution/mem/expHeap.h similarity index 100% rename from include/revolution/mem/expHeap.h rename to libs/revolution/include/revolution/mem/expHeap.h diff --git a/include/revolution/mem/heapCommon.h b/libs/revolution/include/revolution/mem/heapCommon.h similarity index 100% rename from include/revolution/mem/heapCommon.h rename to libs/revolution/include/revolution/mem/heapCommon.h diff --git a/include/revolution/mem/list.h b/libs/revolution/include/revolution/mem/list.h similarity index 100% rename from include/revolution/mem/list.h rename to libs/revolution/include/revolution/mem/list.h diff --git a/include/revolution/mix.h b/libs/revolution/include/revolution/mix.h similarity index 100% rename from include/revolution/mix.h rename to libs/revolution/include/revolution/mix.h diff --git a/include/revolution/mtx.h b/libs/revolution/include/revolution/mtx.h similarity index 100% rename from include/revolution/mtx.h rename to libs/revolution/include/revolution/mtx.h diff --git a/include/revolution/nand.h b/libs/revolution/include/revolution/nand.h similarity index 100% rename from include/revolution/nand.h rename to libs/revolution/include/revolution/nand.h diff --git a/include/revolution/os.h b/libs/revolution/include/revolution/os.h similarity index 100% rename from include/revolution/os.h rename to libs/revolution/include/revolution/os.h diff --git a/include/revolution/os/OSAlarm.h b/libs/revolution/include/revolution/os/OSAlarm.h similarity index 100% rename from include/revolution/os/OSAlarm.h rename to libs/revolution/include/revolution/os/OSAlarm.h diff --git a/include/revolution/os/OSAlloc.h b/libs/revolution/include/revolution/os/OSAlloc.h similarity index 100% rename from include/revolution/os/OSAlloc.h rename to libs/revolution/include/revolution/os/OSAlloc.h diff --git a/include/revolution/os/OSCache.h b/libs/revolution/include/revolution/os/OSCache.h similarity index 100% rename from include/revolution/os/OSCache.h rename to libs/revolution/include/revolution/os/OSCache.h diff --git a/include/revolution/os/OSContext.h b/libs/revolution/include/revolution/os/OSContext.h similarity index 100% rename from include/revolution/os/OSContext.h rename to libs/revolution/include/revolution/os/OSContext.h diff --git a/include/revolution/os/OSDC.h b/libs/revolution/include/revolution/os/OSDC.h similarity index 100% rename from include/revolution/os/OSDC.h rename to libs/revolution/include/revolution/os/OSDC.h diff --git a/include/revolution/os/OSError.h b/libs/revolution/include/revolution/os/OSError.h similarity index 100% rename from include/revolution/os/OSError.h rename to libs/revolution/include/revolution/os/OSError.h diff --git a/include/revolution/os/OSException.h b/libs/revolution/include/revolution/os/OSException.h similarity index 100% rename from include/revolution/os/OSException.h rename to libs/revolution/include/revolution/os/OSException.h diff --git a/include/revolution/os/OSExec.h b/libs/revolution/include/revolution/os/OSExec.h similarity index 100% rename from include/revolution/os/OSExec.h rename to libs/revolution/include/revolution/os/OSExec.h diff --git a/include/revolution/os/OSFont.h b/libs/revolution/include/revolution/os/OSFont.h similarity index 100% rename from include/revolution/os/OSFont.h rename to libs/revolution/include/revolution/os/OSFont.h diff --git a/include/revolution/os/OSHardware.h b/libs/revolution/include/revolution/os/OSHardware.h similarity index 100% rename from include/revolution/os/OSHardware.h rename to libs/revolution/include/revolution/os/OSHardware.h diff --git a/include/revolution/os/OSIC.h b/libs/revolution/include/revolution/os/OSIC.h similarity index 100% rename from include/revolution/os/OSIC.h rename to libs/revolution/include/revolution/os/OSIC.h diff --git a/include/revolution/os/OSInterrupt.h b/libs/revolution/include/revolution/os/OSInterrupt.h similarity index 100% rename from include/revolution/os/OSInterrupt.h rename to libs/revolution/include/revolution/os/OSInterrupt.h diff --git a/include/revolution/os/OSIpc.h b/libs/revolution/include/revolution/os/OSIpc.h similarity index 100% rename from include/revolution/os/OSIpc.h rename to libs/revolution/include/revolution/os/OSIpc.h diff --git a/include/revolution/os/OSL2.h b/libs/revolution/include/revolution/os/OSL2.h similarity index 100% rename from include/revolution/os/OSL2.h rename to libs/revolution/include/revolution/os/OSL2.h diff --git a/include/revolution/os/OSLC.h b/libs/revolution/include/revolution/os/OSLC.h similarity index 100% rename from include/revolution/os/OSLC.h rename to libs/revolution/include/revolution/os/OSLC.h diff --git a/include/revolution/os/OSMemory.h b/libs/revolution/include/revolution/os/OSMemory.h similarity index 100% rename from include/revolution/os/OSMemory.h rename to libs/revolution/include/revolution/os/OSMemory.h diff --git a/include/revolution/os/OSMessage.h b/libs/revolution/include/revolution/os/OSMessage.h similarity index 100% rename from include/revolution/os/OSMessage.h rename to libs/revolution/include/revolution/os/OSMessage.h diff --git a/include/revolution/os/OSModule.h b/libs/revolution/include/revolution/os/OSModule.h similarity index 100% rename from include/revolution/os/OSModule.h rename to libs/revolution/include/revolution/os/OSModule.h diff --git a/include/revolution/os/OSMutex.h b/libs/revolution/include/revolution/os/OSMutex.h similarity index 100% rename from include/revolution/os/OSMutex.h rename to libs/revolution/include/revolution/os/OSMutex.h diff --git a/include/revolution/os/OSNandbootInfo.h b/libs/revolution/include/revolution/os/OSNandbootInfo.h similarity index 100% rename from include/revolution/os/OSNandbootInfo.h rename to libs/revolution/include/revolution/os/OSNandbootInfo.h diff --git a/include/revolution/os/OSNet.h b/libs/revolution/include/revolution/os/OSNet.h similarity index 100% rename from include/revolution/os/OSNet.h rename to libs/revolution/include/revolution/os/OSNet.h diff --git a/include/revolution/os/OSPlayRecord.h b/libs/revolution/include/revolution/os/OSPlayRecord.h similarity index 100% rename from include/revolution/os/OSPlayRecord.h rename to libs/revolution/include/revolution/os/OSPlayRecord.h diff --git a/include/revolution/os/OSPlayTime.h b/libs/revolution/include/revolution/os/OSPlayTime.h similarity index 100% rename from include/revolution/os/OSPlayTime.h rename to libs/revolution/include/revolution/os/OSPlayTime.h diff --git a/include/revolution/os/OSReboot.h b/libs/revolution/include/revolution/os/OSReboot.h similarity index 100% rename from include/revolution/os/OSReboot.h rename to libs/revolution/include/revolution/os/OSReboot.h diff --git a/include/revolution/os/OSReset.h b/libs/revolution/include/revolution/os/OSReset.h similarity index 100% rename from include/revolution/os/OSReset.h rename to libs/revolution/include/revolution/os/OSReset.h diff --git a/include/revolution/os/OSResetSW.h b/libs/revolution/include/revolution/os/OSResetSW.h similarity index 86% rename from include/revolution/os/OSResetSW.h rename to libs/revolution/include/revolution/os/OSResetSW.h index c6fc2d027f..752efaea89 100644 --- a/include/revolution/os/OSResetSW.h +++ b/libs/revolution/include/revolution/os/OSResetSW.h @@ -11,6 +11,7 @@ typedef void (*OSResetCallback)(void); typedef void (*OSPowerCallback)(void); OSResetCallback OSSetResetCallback(OSResetCallback callback); +OSPowerCallback OSSetPowerCallback(OSPowerCallback callback); BOOL OSGetResetSwitchState(void); BOOL OSGetResetButtonState(void); diff --git a/include/revolution/os/OSRtc.h b/libs/revolution/include/revolution/os/OSRtc.h similarity index 100% rename from include/revolution/os/OSRtc.h rename to libs/revolution/include/revolution/os/OSRtc.h diff --git a/include/revolution/os/OSSemaphore.h b/libs/revolution/include/revolution/os/OSSemaphore.h similarity index 100% rename from include/revolution/os/OSSemaphore.h rename to libs/revolution/include/revolution/os/OSSemaphore.h diff --git a/include/revolution/os/OSSerial.h b/libs/revolution/include/revolution/os/OSSerial.h similarity index 100% rename from include/revolution/os/OSSerial.h rename to libs/revolution/include/revolution/os/OSSerial.h diff --git a/include/revolution/os/OSStateFlags.h b/libs/revolution/include/revolution/os/OSStateFlags.h similarity index 100% rename from include/revolution/os/OSStateFlags.h rename to libs/revolution/include/revolution/os/OSStateFlags.h diff --git a/include/revolution/os/OSThread.h b/libs/revolution/include/revolution/os/OSThread.h similarity index 100% rename from include/revolution/os/OSThread.h rename to libs/revolution/include/revolution/os/OSThread.h diff --git a/include/revolution/os/OSTime.h b/libs/revolution/include/revolution/os/OSTime.h similarity index 100% rename from include/revolution/os/OSTime.h rename to libs/revolution/include/revolution/os/OSTime.h diff --git a/include/revolution/os/OSTimer.h b/libs/revolution/include/revolution/os/OSTimer.h similarity index 100% rename from include/revolution/os/OSTimer.h rename to libs/revolution/include/revolution/os/OSTimer.h diff --git a/include/revolution/os/OSUtf.h b/libs/revolution/include/revolution/os/OSUtf.h similarity index 100% rename from include/revolution/os/OSUtf.h rename to libs/revolution/include/revolution/os/OSUtf.h diff --git a/include/revolution/pad.h b/libs/revolution/include/revolution/pad.h similarity index 100% rename from include/revolution/pad.h rename to libs/revolution/include/revolution/pad.h diff --git a/include/revolution/private/GXFDLShortcut.h b/libs/revolution/include/revolution/private/GXFDLShortcut.h similarity index 100% rename from include/revolution/private/GXFDLShortcut.h rename to libs/revolution/include/revolution/private/GXFDLShortcut.h diff --git a/include/revolution/private/GXRegs.h b/libs/revolution/include/revolution/private/GXRegs.h similarity index 100% rename from include/revolution/private/GXRegs.h rename to libs/revolution/include/revolution/private/GXRegs.h diff --git a/include/revolution/private/bp_reg.h b/libs/revolution/include/revolution/private/bp_reg.h similarity index 100% rename from include/revolution/private/bp_reg.h rename to libs/revolution/include/revolution/private/bp_reg.h diff --git a/include/revolution/private/cp_reg.h b/libs/revolution/include/revolution/private/cp_reg.h similarity index 100% rename from include/revolution/private/cp_reg.h rename to libs/revolution/include/revolution/private/cp_reg.h diff --git a/include/revolution/private/gen_reg.h b/libs/revolution/include/revolution/private/gen_reg.h similarity index 100% rename from include/revolution/private/gen_reg.h rename to libs/revolution/include/revolution/private/gen_reg.h diff --git a/include/revolution/private/iosrestypes.h b/libs/revolution/include/revolution/private/iosrestypes.h similarity index 100% rename from include/revolution/private/iosrestypes.h rename to libs/revolution/include/revolution/private/iosrestypes.h diff --git a/include/revolution/private/iostypes.h b/libs/revolution/include/revolution/private/iostypes.h similarity index 100% rename from include/revolution/private/iostypes.h rename to libs/revolution/include/revolution/private/iostypes.h diff --git a/include/revolution/private/pe_reg.h b/libs/revolution/include/revolution/private/pe_reg.h similarity index 100% rename from include/revolution/private/pe_reg.h rename to libs/revolution/include/revolution/private/pe_reg.h diff --git a/include/revolution/private/pi_reg.h b/libs/revolution/include/revolution/private/pi_reg.h similarity index 100% rename from include/revolution/private/pi_reg.h rename to libs/revolution/include/revolution/private/pi_reg.h diff --git a/include/revolution/private/ras_reg.h b/libs/revolution/include/revolution/private/ras_reg.h similarity index 100% rename from include/revolution/private/ras_reg.h rename to libs/revolution/include/revolution/private/ras_reg.h diff --git a/include/revolution/private/su_reg.h b/libs/revolution/include/revolution/private/su_reg.h similarity index 100% rename from include/revolution/private/su_reg.h rename to libs/revolution/include/revolution/private/su_reg.h diff --git a/include/revolution/private/tev_reg.h b/libs/revolution/include/revolution/private/tev_reg.h similarity index 100% rename from include/revolution/private/tev_reg.h rename to libs/revolution/include/revolution/private/tev_reg.h diff --git a/include/revolution/private/tx_reg.h b/libs/revolution/include/revolution/private/tx_reg.h similarity index 100% rename from include/revolution/private/tx_reg.h rename to libs/revolution/include/revolution/private/tx_reg.h diff --git a/include/revolution/private/xf_mem.h b/libs/revolution/include/revolution/private/xf_mem.h similarity index 100% rename from include/revolution/private/xf_mem.h rename to libs/revolution/include/revolution/private/xf_mem.h diff --git a/include/revolution/revolution.h b/libs/revolution/include/revolution/revolution.h similarity index 100% rename from include/revolution/revolution.h rename to libs/revolution/include/revolution/revolution.h diff --git a/include/revolution/sc.h b/libs/revolution/include/revolution/sc.h similarity index 99% rename from include/revolution/sc.h rename to libs/revolution/include/revolution/sc.h index 88ecad9660..262b165607 100644 --- a/include/revolution/sc.h +++ b/libs/revolution/include/revolution/sc.h @@ -184,6 +184,7 @@ u8 SCGetEuRgb60Mode(void); BOOL SCGetIdleMode(SCIdleModeInfo* data); u8 SCGetLanguage(void); u8 SCGetProgressiveMode(void); +void SCSetProgressiveMode(u8 mode); u8 SCGetScreenSaverMode(void); u8 SCGetSoundMode(void); u32 SCGetCounterBias(void); diff --git a/include/revolution/sdk_math.h b/libs/revolution/include/revolution/sdk_math.h similarity index 100% rename from include/revolution/sdk_math.h rename to libs/revolution/include/revolution/sdk_math.h diff --git a/include/revolution/seq.h b/libs/revolution/include/revolution/seq.h similarity index 100% rename from include/revolution/seq.h rename to libs/revolution/include/revolution/seq.h diff --git a/include/revolution/si.h b/libs/revolution/include/revolution/si.h similarity index 100% rename from include/revolution/si.h rename to libs/revolution/include/revolution/si.h diff --git a/include/revolution/sp.h b/libs/revolution/include/revolution/sp.h similarity index 100% rename from include/revolution/sp.h rename to libs/revolution/include/revolution/sp.h diff --git a/include/revolution/syn.h b/libs/revolution/include/revolution/syn.h similarity index 100% rename from include/revolution/syn.h rename to libs/revolution/include/revolution/syn.h diff --git a/include/revolution/thp.h b/libs/revolution/include/revolution/thp.h similarity index 100% rename from include/revolution/thp.h rename to libs/revolution/include/revolution/thp.h diff --git a/include/revolution/tpl.h b/libs/revolution/include/revolution/tpl.h similarity index 100% rename from include/revolution/tpl.h rename to libs/revolution/include/revolution/tpl.h diff --git a/include/revolution/types.h b/libs/revolution/include/revolution/types.h similarity index 100% rename from include/revolution/types.h rename to libs/revolution/include/revolution/types.h diff --git a/include/revolution/usb.h b/libs/revolution/include/revolution/usb.h similarity index 100% rename from include/revolution/usb.h rename to libs/revolution/include/revolution/usb.h diff --git a/include/revolution/vi.h b/libs/revolution/include/revolution/vi.h similarity index 100% rename from include/revolution/vi.h rename to libs/revolution/include/revolution/vi.h diff --git a/include/revolution/vi/vifuncs.h b/libs/revolution/include/revolution/vi/vifuncs.h similarity index 100% rename from include/revolution/vi/vifuncs.h rename to libs/revolution/include/revolution/vi/vifuncs.h diff --git a/include/revolution/vi/vitypes.h b/libs/revolution/include/revolution/vi/vitypes.h similarity index 100% rename from include/revolution/vi/vitypes.h rename to libs/revolution/include/revolution/vi/vitypes.h diff --git a/include/revolution/wenc.h b/libs/revolution/include/revolution/wenc.h similarity index 100% rename from include/revolution/wenc.h rename to libs/revolution/include/revolution/wenc.h diff --git a/include/revolution/wpad.h b/libs/revolution/include/revolution/wpad.h similarity index 100% rename from include/revolution/wpad.h rename to libs/revolution/include/revolution/wpad.h diff --git a/include/revolution/wpad/bte.h b/libs/revolution/include/revolution/wpad/bte.h similarity index 100% rename from include/revolution/wpad/bte.h rename to libs/revolution/include/revolution/wpad/bte.h diff --git a/include/revolution/wpad/wud.h b/libs/revolution/include/revolution/wpad/wud.h similarity index 100% rename from include/revolution/wpad/wud.h rename to libs/revolution/include/revolution/wpad/wud.h diff --git a/include/revolution/wud.h b/libs/revolution/include/revolution/wud.h similarity index 100% rename from include/revolution/wud.h rename to libs/revolution/include/revolution/wud.h diff --git a/src/revolution/ai/ai.c b/libs/revolution/src/ai/ai.c similarity index 100% rename from src/revolution/ai/ai.c rename to libs/revolution/src/ai/ai.c diff --git a/src/revolution/aralt/__ar.h b/libs/revolution/src/aralt/__ar.h similarity index 100% rename from src/revolution/aralt/__ar.h rename to libs/revolution/src/aralt/__ar.h diff --git a/src/revolution/aralt/aralt.c b/libs/revolution/src/aralt/aralt.c similarity index 100% rename from src/revolution/aralt/aralt.c rename to libs/revolution/src/aralt/aralt.c diff --git a/src/revolution/arc/arc.c b/libs/revolution/src/arc/arc.c similarity index 100% rename from src/revolution/arc/arc.c rename to libs/revolution/src/arc/arc.c diff --git a/src/revolution/ax/AXAux.c b/libs/revolution/src/ax/AXAux.c similarity index 100% rename from src/revolution/ax/AXAux.c rename to libs/revolution/src/ax/AXAux.c diff --git a/src/revolution/ax/AXCL.c b/libs/revolution/src/ax/AXCL.c similarity index 100% rename from src/revolution/ax/AXCL.c rename to libs/revolution/src/ax/AXCL.c diff --git a/src/revolution/axfx/AXFXHooks.c b/libs/revolution/src/axfx/AXFXHooks.c similarity index 100% rename from src/revolution/axfx/AXFXHooks.c rename to libs/revolution/src/axfx/AXFXHooks.c diff --git a/src/revolution/axfx/AXFXReverbHi.c b/libs/revolution/src/axfx/AXFXReverbHi.c similarity index 100% rename from src/revolution/axfx/AXFXReverbHi.c rename to libs/revolution/src/axfx/AXFXReverbHi.c diff --git a/src/revolution/axfx/AXFXReverbHiExp.c b/libs/revolution/src/axfx/AXFXReverbHiExp.c similarity index 100% rename from src/revolution/axfx/AXFXReverbHiExp.c rename to libs/revolution/src/axfx/AXFXReverbHiExp.c diff --git a/src/revolution/base/PPCArch.c b/libs/revolution/src/base/PPCArch.c similarity index 100% rename from src/revolution/base/PPCArch.c rename to libs/revolution/src/base/PPCArch.c diff --git a/src/revolution/base/PPCPm.c b/libs/revolution/src/base/PPCPm.c similarity index 100% rename from src/revolution/base/PPCPm.c rename to libs/revolution/src/base/PPCPm.c diff --git a/src/revolution/card/CARDBios.c b/libs/revolution/src/card/CARDBios.c similarity index 100% rename from src/revolution/card/CARDBios.c rename to libs/revolution/src/card/CARDBios.c diff --git a/src/revolution/card/CARDBlock.c b/libs/revolution/src/card/CARDBlock.c similarity index 99% rename from src/revolution/card/CARDBlock.c rename to libs/revolution/src/card/CARDBlock.c index b7af255ddf..9a1f02145f 100644 --- a/src/revolution/card/CARDBlock.c +++ b/libs/revolution/src/card/CARDBlock.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDCheck.c b/libs/revolution/src/card/CARDCheck.c similarity index 99% rename from src/revolution/card/CARDCheck.c rename to libs/revolution/src/card/CARDCheck.c index 4a9b78c736..1d1b715b18 100644 --- a/src/revolution/card/CARDCheck.c +++ b/libs/revolution/src/card/CARDCheck.c @@ -1,4 +1,4 @@ -#include +#include #include "os/__os.h" #include "__card.h" diff --git a/src/revolution/card/CARDCreate.c b/libs/revolution/src/card/CARDCreate.c similarity index 99% rename from src/revolution/card/CARDCreate.c rename to libs/revolution/src/card/CARDCreate.c index 7da5ab0911..a94036d832 100644 --- a/src/revolution/card/CARDCreate.c +++ b/libs/revolution/src/card/CARDCreate.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDDelete.c b/libs/revolution/src/card/CARDDelete.c similarity index 98% rename from src/revolution/card/CARDDelete.c rename to libs/revolution/src/card/CARDDelete.c index 0acf24be1c..a72d01bdeb 100644 --- a/src/revolution/card/CARDDelete.c +++ b/libs/revolution/src/card/CARDDelete.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDDir.c b/libs/revolution/src/card/CARDDir.c similarity index 98% rename from src/revolution/card/CARDDir.c rename to libs/revolution/src/card/CARDDir.c index e154a9c428..87e289e1ae 100644 --- a/src/revolution/card/CARDDir.c +++ b/libs/revolution/src/card/CARDDir.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDErase.c b/libs/revolution/src/card/CARDErase.c similarity index 98% rename from src/revolution/card/CARDErase.c rename to libs/revolution/src/card/CARDErase.c index 73bb8ef04b..0b55994fb9 100644 --- a/src/revolution/card/CARDErase.c +++ b/libs/revolution/src/card/CARDErase.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDFormat.c b/libs/revolution/src/card/CARDFormat.c similarity index 99% rename from src/revolution/card/CARDFormat.c rename to libs/revolution/src/card/CARDFormat.c index 7bcc76daa1..7719fbb03c 100644 --- a/src/revolution/card/CARDFormat.c +++ b/libs/revolution/src/card/CARDFormat.c @@ -1,4 +1,4 @@ -#include +#include #include "os/__os.h" #include "__card.h" diff --git a/src/revolution/card/CARDMount.c b/libs/revolution/src/card/CARDMount.c similarity index 99% rename from src/revolution/card/CARDMount.c rename to libs/revolution/src/card/CARDMount.c index 4ca607dc3b..472606427a 100644 --- a/src/revolution/card/CARDMount.c +++ b/libs/revolution/src/card/CARDMount.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "os/__os.h" #include "__card.h" diff --git a/src/revolution/card/CARDNet.c b/libs/revolution/src/card/CARDNet.c similarity index 99% rename from src/revolution/card/CARDNet.c rename to libs/revolution/src/card/CARDNet.c index 5f43d3becf..513997c685 100644 --- a/src/revolution/card/CARDNet.c +++ b/libs/revolution/src/card/CARDNet.c @@ -1,4 +1,4 @@ -#include +#include #include "os/__os.h" #include "__card.h" diff --git a/src/revolution/card/CARDOpen.c b/libs/revolution/src/card/CARDOpen.c similarity index 99% rename from src/revolution/card/CARDOpen.c rename to libs/revolution/src/card/CARDOpen.c index bd86568291..0a48c0e527 100644 --- a/src/revolution/card/CARDOpen.c +++ b/libs/revolution/src/card/CARDOpen.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDProgram.c b/libs/revolution/src/card/CARDProgram.c similarity index 99% rename from src/revolution/card/CARDProgram.c rename to libs/revolution/src/card/CARDProgram.c index 2e603777fa..30bdc42d38 100644 --- a/src/revolution/card/CARDProgram.c +++ b/libs/revolution/src/card/CARDProgram.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDRaw.c b/libs/revolution/src/card/CARDRaw.c similarity index 98% rename from src/revolution/card/CARDRaw.c rename to libs/revolution/src/card/CARDRaw.c index 584a9be9c2..91c0ab92fa 100644 --- a/src/revolution/card/CARDRaw.c +++ b/libs/revolution/src/card/CARDRaw.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDRdwr.c b/libs/revolution/src/card/CARDRdwr.c similarity index 98% rename from src/revolution/card/CARDRdwr.c rename to libs/revolution/src/card/CARDRdwr.c index 8350f57ac4..b94ac032cd 100644 --- a/src/revolution/card/CARDRdwr.c +++ b/libs/revolution/src/card/CARDRdwr.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDRead.c b/libs/revolution/src/card/CARDRead.c similarity index 99% rename from src/revolution/card/CARDRead.c rename to libs/revolution/src/card/CARDRead.c index 74bd544a6f..4a468e1faa 100644 --- a/src/revolution/card/CARDRead.c +++ b/libs/revolution/src/card/CARDRead.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDRename.c b/libs/revolution/src/card/CARDRename.c similarity index 98% rename from src/revolution/card/CARDRename.c rename to libs/revolution/src/card/CARDRename.c index 0a76aca32b..590208480a 100644 --- a/src/revolution/card/CARDRename.c +++ b/libs/revolution/src/card/CARDRename.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDStat.c b/libs/revolution/src/card/CARDStat.c similarity index 99% rename from src/revolution/card/CARDStat.c rename to libs/revolution/src/card/CARDStat.c index f99455b42b..6181086795 100644 --- a/src/revolution/card/CARDStat.c +++ b/libs/revolution/src/card/CARDStat.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDStatEx.c b/libs/revolution/src/card/CARDStatEx.c similarity index 98% rename from src/revolution/card/CARDStatEx.c rename to libs/revolution/src/card/CARDStatEx.c index 0ec84c1cea..4a5fa87e81 100644 --- a/src/revolution/card/CARDStatEx.c +++ b/libs/revolution/src/card/CARDStatEx.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDUnlock.c b/libs/revolution/src/card/CARDUnlock.c similarity index 99% rename from src/revolution/card/CARDUnlock.c rename to libs/revolution/src/card/CARDUnlock.c index 48f64e500a..93298297c8 100644 --- a/src/revolution/card/CARDUnlock.c +++ b/libs/revolution/src/card/CARDUnlock.c @@ -1,6 +1,5 @@ #include -#include -#include +#include #include "__card.h" diff --git a/src/revolution/card/CARDWrite.c b/libs/revolution/src/card/CARDWrite.c similarity index 99% rename from src/revolution/card/CARDWrite.c rename to libs/revolution/src/card/CARDWrite.c index ad9fa4a273..b76255ea72 100644 --- a/src/revolution/card/CARDWrite.c +++ b/libs/revolution/src/card/CARDWrite.c @@ -1,4 +1,4 @@ -#include +#include #include "__card.h" diff --git a/src/revolution/card/__card.h b/libs/revolution/src/card/__card.h similarity index 100% rename from src/revolution/card/__card.h rename to libs/revolution/src/card/__card.h diff --git a/src/revolution/dsp/__dsp.h b/libs/revolution/src/dsp/__dsp.h similarity index 100% rename from src/revolution/dsp/__dsp.h rename to libs/revolution/src/dsp/__dsp.h diff --git a/src/revolution/dsp/dsp.c b/libs/revolution/src/dsp/dsp.c similarity index 100% rename from src/revolution/dsp/dsp.c rename to libs/revolution/src/dsp/dsp.c diff --git a/src/revolution/dsp/dsp_debug.c b/libs/revolution/src/dsp/dsp_debug.c similarity index 100% rename from src/revolution/dsp/dsp_debug.c rename to libs/revolution/src/dsp/dsp_debug.c diff --git a/src/revolution/dsp/dsp_task.c b/libs/revolution/src/dsp/dsp_task.c similarity index 100% rename from src/revolution/dsp/dsp_task.c rename to libs/revolution/src/dsp/dsp_task.c diff --git a/src/revolution/dvd/__dvd.h b/libs/revolution/src/dvd/__dvd.h similarity index 100% rename from src/revolution/dvd/__dvd.h rename to libs/revolution/src/dvd/__dvd.h diff --git a/src/revolution/dvd/dvd.c b/libs/revolution/src/dvd/dvd.c similarity index 100% rename from src/revolution/dvd/dvd.c rename to libs/revolution/src/dvd/dvd.c diff --git a/src/revolution/dvd/dvdDeviceError.c b/libs/revolution/src/dvd/dvdDeviceError.c similarity index 100% rename from src/revolution/dvd/dvdDeviceError.c rename to libs/revolution/src/dvd/dvdDeviceError.c diff --git a/src/revolution/dvd/dvdFatal.c b/libs/revolution/src/dvd/dvdFatal.c similarity index 100% rename from src/revolution/dvd/dvdFatal.c rename to libs/revolution/src/dvd/dvdFatal.c diff --git a/src/revolution/dvd/dvd_broadway.c b/libs/revolution/src/dvd/dvd_broadway.c similarity index 100% rename from src/revolution/dvd/dvd_broadway.c rename to libs/revolution/src/dvd/dvd_broadway.c diff --git a/src/revolution/dvd/dvderror.c b/libs/revolution/src/dvd/dvderror.c similarity index 100% rename from src/revolution/dvd/dvderror.c rename to libs/revolution/src/dvd/dvderror.c diff --git a/src/revolution/dvd/dvdfs.c b/libs/revolution/src/dvd/dvdfs.c similarity index 100% rename from src/revolution/dvd/dvdfs.c rename to libs/revolution/src/dvd/dvdfs.c diff --git a/src/revolution/dvd/dvdidutils.c b/libs/revolution/src/dvd/dvdidutils.c similarity index 100% rename from src/revolution/dvd/dvdidutils.c rename to libs/revolution/src/dvd/dvdidutils.c diff --git a/src/revolution/dvd/dvdqueue.c b/libs/revolution/src/dvd/dvdqueue.c similarity index 100% rename from src/revolution/dvd/dvdqueue.c rename to libs/revolution/src/dvd/dvdqueue.c diff --git a/src/revolution/esp/esp.c b/libs/revolution/src/esp/esp.c similarity index 100% rename from src/revolution/esp/esp.c rename to libs/revolution/src/esp/esp.c diff --git a/src/revolution/euart/euart.c b/libs/revolution/src/euart/euart.c similarity index 100% rename from src/revolution/euart/euart.c rename to libs/revolution/src/euart/euart.c diff --git a/src/revolution/exi/EXIBios.c b/libs/revolution/src/exi/EXIBios.c similarity index 100% rename from src/revolution/exi/EXIBios.c rename to libs/revolution/src/exi/EXIBios.c diff --git a/src/revolution/exi/EXICommon.c b/libs/revolution/src/exi/EXICommon.c similarity index 100% rename from src/revolution/exi/EXICommon.c rename to libs/revolution/src/exi/EXICommon.c diff --git a/src/revolution/exi/EXIUart.c b/libs/revolution/src/exi/EXIUart.c similarity index 100% rename from src/revolution/exi/EXIUart.c rename to libs/revolution/src/exi/EXIUart.c diff --git a/src/revolution/fs/fs.c b/libs/revolution/src/fs/fs.c similarity index 100% rename from src/revolution/fs/fs.c rename to libs/revolution/src/fs/fs.c diff --git a/src/revolution/gd/GDBase.c b/libs/revolution/src/gd/GDBase.c similarity index 100% rename from src/revolution/gd/GDBase.c rename to libs/revolution/src/gd/GDBase.c diff --git a/src/revolution/gd/GDFile.c b/libs/revolution/src/gd/GDFile.c similarity index 100% rename from src/revolution/gd/GDFile.c rename to libs/revolution/src/gd/GDFile.c diff --git a/src/revolution/gd/GDGeometry.c b/libs/revolution/src/gd/GDGeometry.c similarity index 100% rename from src/revolution/gd/GDGeometry.c rename to libs/revolution/src/gd/GDGeometry.c diff --git a/src/revolution/gd/GDIndirect.c b/libs/revolution/src/gd/GDIndirect.c similarity index 100% rename from src/revolution/gd/GDIndirect.c rename to libs/revolution/src/gd/GDIndirect.c diff --git a/src/revolution/gd/GDLight.c b/libs/revolution/src/gd/GDLight.c similarity index 100% rename from src/revolution/gd/GDLight.c rename to libs/revolution/src/gd/GDLight.c diff --git a/src/revolution/gd/GDPixel.c b/libs/revolution/src/gd/GDPixel.c similarity index 100% rename from src/revolution/gd/GDPixel.c rename to libs/revolution/src/gd/GDPixel.c diff --git a/src/revolution/gd/GDTev.c b/libs/revolution/src/gd/GDTev.c similarity index 100% rename from src/revolution/gd/GDTev.c rename to libs/revolution/src/gd/GDTev.c diff --git a/src/revolution/gd/GDTexture.c b/libs/revolution/src/gd/GDTexture.c similarity index 100% rename from src/revolution/gd/GDTexture.c rename to libs/revolution/src/gd/GDTexture.c diff --git a/src/revolution/gd/GDTransform.c b/libs/revolution/src/gd/GDTransform.c similarity index 100% rename from src/revolution/gd/GDTransform.c rename to libs/revolution/src/gd/GDTransform.c diff --git a/src/revolution/gf/GFGeometry.cpp b/libs/revolution/src/gf/GFGeometry.cpp similarity index 100% rename from src/revolution/gf/GFGeometry.cpp rename to libs/revolution/src/gf/GFGeometry.cpp diff --git a/src/revolution/gf/GFLight.cpp b/libs/revolution/src/gf/GFLight.cpp similarity index 100% rename from src/revolution/gf/GFLight.cpp rename to libs/revolution/src/gf/GFLight.cpp diff --git a/src/revolution/gf/GFPixel.cpp b/libs/revolution/src/gf/GFPixel.cpp similarity index 100% rename from src/revolution/gf/GFPixel.cpp rename to libs/revolution/src/gf/GFPixel.cpp diff --git a/src/revolution/gf/GFTev.cpp b/libs/revolution/src/gf/GFTev.cpp similarity index 100% rename from src/revolution/gf/GFTev.cpp rename to libs/revolution/src/gf/GFTev.cpp diff --git a/src/revolution/gx/GXAttr.c b/libs/revolution/src/gx/GXAttr.c similarity index 100% rename from src/revolution/gx/GXAttr.c rename to libs/revolution/src/gx/GXAttr.c diff --git a/src/revolution/gx/GXBump.c b/libs/revolution/src/gx/GXBump.c similarity index 100% rename from src/revolution/gx/GXBump.c rename to libs/revolution/src/gx/GXBump.c diff --git a/src/revolution/gx/GXDisplayList.c b/libs/revolution/src/gx/GXDisplayList.c similarity index 100% rename from src/revolution/gx/GXDisplayList.c rename to libs/revolution/src/gx/GXDisplayList.c diff --git a/src/revolution/gx/GXDraw.c b/libs/revolution/src/gx/GXDraw.c similarity index 100% rename from src/revolution/gx/GXDraw.c rename to libs/revolution/src/gx/GXDraw.c diff --git a/src/revolution/gx/GXFifo.c b/libs/revolution/src/gx/GXFifo.c similarity index 100% rename from src/revolution/gx/GXFifo.c rename to libs/revolution/src/gx/GXFifo.c diff --git a/src/revolution/gx/GXFrameBuf.c b/libs/revolution/src/gx/GXFrameBuf.c similarity index 100% rename from src/revolution/gx/GXFrameBuf.c rename to libs/revolution/src/gx/GXFrameBuf.c diff --git a/src/revolution/gx/GXGeometry.c b/libs/revolution/src/gx/GXGeometry.c similarity index 100% rename from src/revolution/gx/GXGeometry.c rename to libs/revolution/src/gx/GXGeometry.c diff --git a/src/revolution/gx/GXInit.c b/libs/revolution/src/gx/GXInit.c similarity index 100% rename from src/revolution/gx/GXInit.c rename to libs/revolution/src/gx/GXInit.c diff --git a/src/revolution/gx/GXLight.c b/libs/revolution/src/gx/GXLight.c similarity index 100% rename from src/revolution/gx/GXLight.c rename to libs/revolution/src/gx/GXLight.c diff --git a/src/revolution/gx/GXMisc.c b/libs/revolution/src/gx/GXMisc.c similarity index 100% rename from src/revolution/gx/GXMisc.c rename to libs/revolution/src/gx/GXMisc.c diff --git a/src/revolution/gx/GXPerf.c b/libs/revolution/src/gx/GXPerf.c similarity index 100% rename from src/revolution/gx/GXPerf.c rename to libs/revolution/src/gx/GXPerf.c diff --git a/src/revolution/gx/GXPixel.c b/libs/revolution/src/gx/GXPixel.c similarity index 100% rename from src/revolution/gx/GXPixel.c rename to libs/revolution/src/gx/GXPixel.c diff --git a/src/revolution/gx/GXSave.c b/libs/revolution/src/gx/GXSave.c similarity index 100% rename from src/revolution/gx/GXSave.c rename to libs/revolution/src/gx/GXSave.c diff --git a/src/revolution/gx/GXStubs.c b/libs/revolution/src/gx/GXStubs.c similarity index 100% rename from src/revolution/gx/GXStubs.c rename to libs/revolution/src/gx/GXStubs.c diff --git a/src/revolution/gx/GXTev.c b/libs/revolution/src/gx/GXTev.c similarity index 100% rename from src/revolution/gx/GXTev.c rename to libs/revolution/src/gx/GXTev.c diff --git a/src/revolution/gx/GXTexture.c b/libs/revolution/src/gx/GXTexture.c similarity index 100% rename from src/revolution/gx/GXTexture.c rename to libs/revolution/src/gx/GXTexture.c diff --git a/src/revolution/gx/GXTransform.c b/libs/revolution/src/gx/GXTransform.c similarity index 100% rename from src/revolution/gx/GXTransform.c rename to libs/revolution/src/gx/GXTransform.c diff --git a/src/revolution/gx/GXVerifRAS.c b/libs/revolution/src/gx/GXVerifRAS.c similarity index 100% rename from src/revolution/gx/GXVerifRAS.c rename to libs/revolution/src/gx/GXVerifRAS.c diff --git a/src/revolution/gx/GXVerifXF.c b/libs/revolution/src/gx/GXVerifXF.c similarity index 100% rename from src/revolution/gx/GXVerifXF.c rename to libs/revolution/src/gx/GXVerifXF.c diff --git a/src/revolution/gx/GXVerify.c b/libs/revolution/src/gx/GXVerify.c similarity index 100% rename from src/revolution/gx/GXVerify.c rename to libs/revolution/src/gx/GXVerify.c diff --git a/src/revolution/gx/GXVert.c b/libs/revolution/src/gx/GXVert.c similarity index 100% rename from src/revolution/gx/GXVert.c rename to libs/revolution/src/gx/GXVert.c diff --git a/src/revolution/gx/__gx.h b/libs/revolution/src/gx/__gx.h similarity index 100% rename from src/revolution/gx/__gx.h rename to libs/revolution/src/gx/__gx.h diff --git a/src/revolution/hio2/hio2.c b/libs/revolution/src/hio2/hio2.c similarity index 100% rename from src/revolution/hio2/hio2.c rename to libs/revolution/src/hio2/hio2.c diff --git a/src/revolution/homebuttonLib/HBMAnmController.cpp b/libs/revolution/src/homebuttonLib/HBMAnmController.cpp similarity index 100% rename from src/revolution/homebuttonLib/HBMAnmController.cpp rename to libs/revolution/src/homebuttonLib/HBMAnmController.cpp diff --git a/src/revolution/homebuttonLib/HBMAnmController.h b/libs/revolution/src/homebuttonLib/HBMAnmController.h similarity index 100% rename from src/revolution/homebuttonLib/HBMAnmController.h rename to libs/revolution/src/homebuttonLib/HBMAnmController.h diff --git a/src/revolution/homebuttonLib/HBMBase.cpp b/libs/revolution/src/homebuttonLib/HBMBase.cpp similarity index 100% rename from src/revolution/homebuttonLib/HBMBase.cpp rename to libs/revolution/src/homebuttonLib/HBMBase.cpp diff --git a/src/revolution/homebuttonLib/HBMBase.h b/libs/revolution/src/homebuttonLib/HBMBase.h similarity index 100% rename from src/revolution/homebuttonLib/HBMBase.h rename to libs/revolution/src/homebuttonLib/HBMBase.h diff --git a/src/revolution/homebuttonLib/HBMCommon.h b/libs/revolution/src/homebuttonLib/HBMCommon.h similarity index 100% rename from src/revolution/homebuttonLib/HBMCommon.h rename to libs/revolution/src/homebuttonLib/HBMCommon.h diff --git a/src/revolution/homebuttonLib/HBMController.cpp b/libs/revolution/src/homebuttonLib/HBMController.cpp similarity index 100% rename from src/revolution/homebuttonLib/HBMController.cpp rename to libs/revolution/src/homebuttonLib/HBMController.cpp diff --git a/src/revolution/homebuttonLib/HBMController.h b/libs/revolution/src/homebuttonLib/HBMController.h similarity index 100% rename from src/revolution/homebuttonLib/HBMController.h rename to libs/revolution/src/homebuttonLib/HBMController.h diff --git a/src/revolution/homebuttonLib/HBMFrameController.cpp b/libs/revolution/src/homebuttonLib/HBMFrameController.cpp similarity index 100% rename from src/revolution/homebuttonLib/HBMFrameController.cpp rename to libs/revolution/src/homebuttonLib/HBMFrameController.cpp diff --git a/src/revolution/homebuttonLib/HBMFrameController.h b/libs/revolution/src/homebuttonLib/HBMFrameController.h similarity index 100% rename from src/revolution/homebuttonLib/HBMFrameController.h rename to libs/revolution/src/homebuttonLib/HBMFrameController.h diff --git a/src/revolution/homebuttonLib/HBMGUIManager.cpp b/libs/revolution/src/homebuttonLib/HBMGUIManager.cpp similarity index 100% rename from src/revolution/homebuttonLib/HBMGUIManager.cpp rename to libs/revolution/src/homebuttonLib/HBMGUIManager.cpp diff --git a/src/revolution/homebuttonLib/HBMGUIManager.h b/libs/revolution/src/homebuttonLib/HBMGUIManager.h similarity index 100% rename from src/revolution/homebuttonLib/HBMGUIManager.h rename to libs/revolution/src/homebuttonLib/HBMGUIManager.h diff --git a/src/revolution/homebuttonLib/HBMRemoteSpk.cpp b/libs/revolution/src/homebuttonLib/HBMRemoteSpk.cpp similarity index 100% rename from src/revolution/homebuttonLib/HBMRemoteSpk.cpp rename to libs/revolution/src/homebuttonLib/HBMRemoteSpk.cpp diff --git a/src/revolution/homebuttonLib/HBMRemoteSpk.h b/libs/revolution/src/homebuttonLib/HBMRemoteSpk.h similarity index 100% rename from src/revolution/homebuttonLib/HBMRemoteSpk.h rename to libs/revolution/src/homebuttonLib/HBMRemoteSpk.h diff --git a/src/revolution/homebuttonLib/nw4hbm/db/DbgPrintBase.h b/libs/revolution/src/homebuttonLib/nw4hbm/db/DbgPrintBase.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/DbgPrintBase.h rename to libs/revolution/src/homebuttonLib/nw4hbm/db/DbgPrintBase.h diff --git a/src/revolution/homebuttonLib/nw4hbm/db/assert.h b/libs/revolution/src/homebuttonLib/nw4hbm/db/assert.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/assert.h rename to libs/revolution/src/homebuttonLib/nw4hbm/db/assert.h diff --git a/src/revolution/homebuttonLib/nw4hbm/db/console.h b/libs/revolution/src/homebuttonLib/nw4hbm/db/console.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/console.h rename to libs/revolution/src/homebuttonLib/nw4hbm/db/console.h diff --git a/src/revolution/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/db/db_DbgPrintBase.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/db/db_assert.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/db/db_assert.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/db_assert.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/db/db_assert.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/db/db_console.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/db/db_console.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/db_console.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/db/db_console.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/db/db_directPrint.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/db/db_directPrint.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/db_directPrint.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/db/db_directPrint.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/db/db_mapFile.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/db/db_mapFile.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/db_mapFile.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/db/db_mapFile.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/db/directPrint.h b/libs/revolution/src/homebuttonLib/nw4hbm/db/directPrint.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/directPrint.h rename to libs/revolution/src/homebuttonLib/nw4hbm/db/directPrint.h diff --git a/src/revolution/homebuttonLib/nw4hbm/db/mapFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/db/mapFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/db/mapFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/db/mapFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/animation.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/animation.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/animation.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/animation.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/bounding.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/bounding.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/bounding.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/bounding.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/common.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/common.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/common.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/common.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/drawInfo.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/drawInfo.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/drawInfo.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/drawInfo.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/group.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/group.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/group.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/group.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/layout.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/layout.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/layout.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/layout.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_animation.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_arcResourceAccessor.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_bounding.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_common.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_common.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_common.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_common.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_drawInfo.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_group.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_group.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_group.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_group.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_layout.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_material.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_material.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_material.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_material.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_pane.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_picture.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_resourceAccessor.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_textBox.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_types.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_types.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_types.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_types.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_window.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_window.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/lyt_window.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/lyt_window.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/material.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/material.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/material.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/material.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/pane.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/pane.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/pane.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/pane.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/picture.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/picture.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/picture.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/picture.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/resourceAccessor.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/resourceAccessor.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/resourceAccessor.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/resourceAccessor.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/resources.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/resources.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/resources.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/resources.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/textBox.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/textBox.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/textBox.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/textBox.h diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/window.h b/libs/revolution/src/homebuttonLib/nw4hbm/lyt/window.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/lyt/window.h rename to libs/revolution/src/homebuttonLib/nw4hbm/lyt/window.h diff --git a/src/revolution/homebuttonLib/nw4hbm/macros.h b/libs/revolution/src/homebuttonLib/nw4hbm/macros.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/macros.h rename to libs/revolution/src/homebuttonLib/nw4hbm/macros.h diff --git a/src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h b/libs/revolution/src/homebuttonLib/nw4hbm/math/arithmetic.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/arithmetic.h rename to libs/revolution/src/homebuttonLib/nw4hbm/math/arithmetic.h diff --git a/src/revolution/homebuttonLib/nw4hbm/math/constants.h b/libs/revolution/src/homebuttonLib/nw4hbm/math/constants.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/constants.h rename to libs/revolution/src/homebuttonLib/nw4hbm/math/constants.h diff --git a/src/revolution/homebuttonLib/nw4hbm/math/equation.h b/libs/revolution/src/homebuttonLib/nw4hbm/math/equation.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/equation.h rename to libs/revolution/src/homebuttonLib/nw4hbm/math/equation.h diff --git a/src/revolution/homebuttonLib/nw4hbm/math/geometry.h b/libs/revolution/src/homebuttonLib/nw4hbm/math/geometry.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/geometry.h rename to libs/revolution/src/homebuttonLib/nw4hbm/math/geometry.h diff --git a/src/revolution/homebuttonLib/nw4hbm/math/math_triangular.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/math/math_triangular.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/math_triangular.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/math/math_triangular.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/math/triangular.h b/libs/revolution/src/homebuttonLib/nw4hbm/math/triangular.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/triangular.h rename to libs/revolution/src/homebuttonLib/nw4hbm/math/triangular.h diff --git a/src/revolution/homebuttonLib/nw4hbm/math/types.h b/libs/revolution/src/homebuttonLib/nw4hbm/math/types.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/math/types.h rename to libs/revolution/src/homebuttonLib/nw4hbm/math/types.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/AxManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/AxManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/AxManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/AxManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/AxVoice.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/AxVoice.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/AxVoice.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/AxVoice.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/Bank.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/Bank.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/Bank.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/Bank.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/BankFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/BankFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/BankFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/BankFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/BasicPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/BasicPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/BasicPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/BasicPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/BasicSound.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/BasicSound.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/BasicSound.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/BasicSound.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/Channel.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/Channel.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/Channel.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/Channel.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/ChannelManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/ChannelManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/ChannelManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/ChannelManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/DisposeCallback.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/DisposeCallback.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/DisposeCallback.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/DisposeCallback.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/DisposeCallbackManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/DisposeCallbackManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/DisposeCallbackManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/DisposeCallbackManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/DvdSoundArchive.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/DvdSoundArchive.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/DvdSoundArchive.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/DvdSoundArchive.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/EnvGenerator.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/EnvGenerator.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/EnvGenerator.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/EnvGenerator.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/ExternalSoundPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/ExternalSoundPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/ExternalSoundPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/ExternalSoundPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/FrameHeap.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/FrameHeap.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/FrameHeap.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/FrameHeap.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/FxBase.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/FxBase.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/FxBase.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/FxBase.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/InstanceManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/InstanceManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/InstanceManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/InstanceManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/InstancePool.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/InstancePool.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/InstancePool.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/InstancePool.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/Lfo.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/Lfo.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/Lfo.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/Lfo.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MemorySoundArchive.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MemorySoundArchive.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MemorySoundArchive.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MemorySoundArchive.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MidiSeqPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MidiSeqPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MidiSeqPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MidiSeqPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MidiSeqTrack.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MidiSeqTrack.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MidiSeqTrack.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MidiSeqTrack.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MmlParser.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MmlParser.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MmlParser.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MmlParser.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MmlSeqTrack.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MmlSeqTrack.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MmlSeqTrack.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MmlSeqTrack.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MmlSeqTrackAllocator.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MmlSeqTrackAllocator.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MmlSeqTrackAllocator.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MmlSeqTrackAllocator.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/MoveValue.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/MoveValue.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/MoveValue.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/MoveValue.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/NandSoundArchive.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/NandSoundArchive.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/NandSoundArchive.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/NandSoundArchive.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/NoteOnCallback.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/NoteOnCallback.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/NoteOnCallback.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/NoteOnCallback.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/PlayerHeap.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/PlayerHeap.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/PlayerHeap.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/PlayerHeap.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/RemoteSpeaker.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/RemoteSpeaker.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/RemoteSpeaker.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/RemoteSpeaker.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/RemoteSpeakerManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/RemoteSpeakerManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/RemoteSpeakerManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/RemoteSpeakerManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SeqFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SeqFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SeqPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SeqPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SeqSound.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqSound.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SeqSound.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqSound.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SeqSoundHandle.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqSoundHandle.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SeqSoundHandle.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqSoundHandle.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SeqTrack.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqTrack.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SeqTrack.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqTrack.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SeqTrackAllocator.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqTrackAllocator.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SeqTrackAllocator.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SeqTrackAllocator.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundArchive.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchive.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundArchive.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchive.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundArchiveFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchiveFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundArchiveFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchiveFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundArchiveLoader.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchiveLoader.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundArchiveLoader.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchiveLoader.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundArchivePlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchivePlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundArchivePlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundArchivePlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundHandle.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundHandle.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundHandle.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundHandle.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundHeap.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundHeap.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundHeap.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundHeap.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundInstanceManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundInstanceManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundInstanceManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundInstanceManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundMemoryAllocatable.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundMemoryAllocatable.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundMemoryAllocatable.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundMemoryAllocatable.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundStartable.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundStartable.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundStartable.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundStartable.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundSystem.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundSystem.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundSystem.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundSystem.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/SoundThread.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundThread.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/SoundThread.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/SoundThread.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/StrmChannel.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmChannel.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/StrmChannel.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmChannel.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/StrmFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/StrmFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/StrmPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/StrmPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/StrmSound.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmSound.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/StrmSound.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmSound.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/StrmSoundHandle.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmSoundHandle.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/StrmSoundHandle.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/StrmSoundHandle.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/Task.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/Task.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/Task.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/Task.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/TaskManager.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/TaskManager.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/TaskManager.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/TaskManager.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/TaskThread.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/TaskThread.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/TaskThread.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/TaskThread.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/Util.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/Util.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/Util.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/Util.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WaveFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WaveFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WaveFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WaveFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WavePlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WavePlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WavePlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WavePlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WaveSound.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WaveSound.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WaveSound.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WaveSound.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WaveSoundHandle.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WaveSoundHandle.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WaveSoundHandle.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WaveSoundHandle.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WsdFile.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WsdFile.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WsdFile.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WsdFile.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WsdPlayer.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WsdPlayer.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WsdPlayer.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WsdPlayer.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/WsdTrack.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/WsdTrack.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/WsdTrack.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/WsdTrack.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/debug.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/debug.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/debug.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/debug.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundArchivePlayer.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundHandle.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundStartable.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/snd_global.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_global.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/snd_global.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_global.h diff --git a/src/revolution/homebuttonLib/nw4hbm/snd/snd_types.h b/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_types.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/snd/snd_types.h rename to libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_types.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/CharStrmReader.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/CharStrmReader.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/CharStrmReader.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/CharStrmReader.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/CharWriter.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/CharWriter.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/CharWriter.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/CharWriter.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/Color.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/Color.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/Color.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/Color.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/DvdFileStream.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/DvdFileStream.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/DvdFileStream.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/DvdFileStream.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/DvdLockedFileStream.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/DvdLockedFileStream.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/DvdLockedFileStream.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/DvdLockedFileStream.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/FileStream.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/FileStream.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/FileStream.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/FileStream.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/Font.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/Font.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/Font.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/Font.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/IOStream.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/IOStream.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/IOStream.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/IOStream.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/LinkList.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/LinkList.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/LinkList.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/LinkList.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/Lock.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/Lock.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/Lock.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/Lock.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/NandFileStream.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/NandFileStream.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/NandFileStream.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/NandFileStream.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/Rect.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/Rect.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/Rect.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/Rect.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ResFont.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ResFont.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ResFont.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ResFont.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/RuntimeTypeInfo.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/RuntimeTypeInfo.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/RuntimeTypeInfo.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/RuntimeTypeInfo.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/TagProcessor.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/TagProcessor.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/TagProcessor.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/TagProcessor.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/TagProcessorBase.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/TagProcessorBase.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/TagProcessorBase.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/TagProcessorBase.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/TextWriter.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/TextWriter.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/TextWriter.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/TextWriter.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/TextWriterBase.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/TextWriterBase.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/TextWriterBase.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/WideTagProcessor.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/WideTagProcessor.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/WideTagProcessor.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/WideTagProcessor.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/WideTextWriter.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/WideTextWriter.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/WideTextWriter.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/WideTextWriter.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/binaryFileFormat.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/binaryFileFormat.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/binaryFileFormat.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/binaryFileFormat.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/fontResources.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/fontResources.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/fontResources.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/fontResources.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/inlines.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/inlines.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/inlines.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/inlines.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/list.h b/libs/revolution/src/homebuttonLib/nw4hbm/ut/list.h similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/list.h rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/list.h diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_CharStrmReader.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_CharWriter.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_DvdFileStream.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_DvdFileStream.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_DvdFileStream.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_DvdFileStream.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_FileStream.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_FileStream.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_FileStream.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_FileStream.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_Font.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_Font.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_Font.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_Font.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_IOStream.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_IOStream.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_IOStream.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_IOStream.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_LinkList.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_NandFileStream.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_NandFileStream.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_NandFileStream.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_NandFileStream.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_ResFont.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_ResFontBase.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_TagProcessorBase.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_TextWriterBase.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_binaryFileFormat.cpp diff --git a/src/revolution/homebuttonLib/nw4hbm/ut/ut_list.cpp b/libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_list.cpp similarity index 100% rename from src/revolution/homebuttonLib/nw4hbm/ut/ut_list.cpp rename to libs/revolution/src/homebuttonLib/nw4hbm/ut/ut_list.cpp diff --git a/src/revolution/homebuttonLib/sound/mix.cpp b/libs/revolution/src/homebuttonLib/sound/mix.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/mix.cpp rename to libs/revolution/src/homebuttonLib/sound/mix.cpp diff --git a/src/revolution/homebuttonLib/sound/mix.h b/libs/revolution/src/homebuttonLib/sound/mix.h similarity index 100% rename from src/revolution/homebuttonLib/sound/mix.h rename to libs/revolution/src/homebuttonLib/sound/mix.h diff --git a/src/revolution/homebuttonLib/sound/seq.cpp b/libs/revolution/src/homebuttonLib/sound/seq.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/seq.cpp rename to libs/revolution/src/homebuttonLib/sound/seq.cpp diff --git a/src/revolution/homebuttonLib/sound/seq.h b/libs/revolution/src/homebuttonLib/sound/seq.h similarity index 100% rename from src/revolution/homebuttonLib/sound/seq.h rename to libs/revolution/src/homebuttonLib/sound/seq.h diff --git a/src/revolution/homebuttonLib/sound/syn.cpp b/libs/revolution/src/homebuttonLib/sound/syn.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/syn.cpp rename to libs/revolution/src/homebuttonLib/sound/syn.cpp diff --git a/src/revolution/homebuttonLib/sound/syn.h b/libs/revolution/src/homebuttonLib/sound/syn.h similarity index 100% rename from src/revolution/homebuttonLib/sound/syn.h rename to libs/revolution/src/homebuttonLib/sound/syn.h diff --git a/src/revolution/homebuttonLib/sound/synctrl.cpp b/libs/revolution/src/homebuttonLib/sound/synctrl.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/synctrl.cpp rename to libs/revolution/src/homebuttonLib/sound/synctrl.cpp diff --git a/src/revolution/homebuttonLib/sound/synenv.cpp b/libs/revolution/src/homebuttonLib/sound/synenv.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/synenv.cpp rename to libs/revolution/src/homebuttonLib/sound/synenv.cpp diff --git a/src/revolution/homebuttonLib/sound/synmix.cpp b/libs/revolution/src/homebuttonLib/sound/synmix.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/synmix.cpp rename to libs/revolution/src/homebuttonLib/sound/synmix.cpp diff --git a/src/revolution/homebuttonLib/sound/synpitch.cpp b/libs/revolution/src/homebuttonLib/sound/synpitch.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/synpitch.cpp rename to libs/revolution/src/homebuttonLib/sound/synpitch.cpp diff --git a/src/revolution/homebuttonLib/sound/synprivate.h b/libs/revolution/src/homebuttonLib/sound/synprivate.h similarity index 100% rename from src/revolution/homebuttonLib/sound/synprivate.h rename to libs/revolution/src/homebuttonLib/sound/synprivate.h diff --git a/src/revolution/homebuttonLib/sound/synsample.cpp b/libs/revolution/src/homebuttonLib/sound/synsample.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/synsample.cpp rename to libs/revolution/src/homebuttonLib/sound/synsample.cpp diff --git a/src/revolution/homebuttonLib/sound/synvoice.cpp b/libs/revolution/src/homebuttonLib/sound/synvoice.cpp similarity index 100% rename from src/revolution/homebuttonLib/sound/synvoice.cpp rename to libs/revolution/src/homebuttonLib/sound/synvoice.cpp diff --git a/src/revolution/ipc/ipcMain.c b/libs/revolution/src/ipc/ipcMain.c similarity index 100% rename from src/revolution/ipc/ipcMain.c rename to libs/revolution/src/ipc/ipcMain.c diff --git a/src/revolution/ipc/ipcProfile.c b/libs/revolution/src/ipc/ipcProfile.c similarity index 100% rename from src/revolution/ipc/ipcProfile.c rename to libs/revolution/src/ipc/ipcProfile.c diff --git a/src/revolution/ipc/ipcclt.c b/libs/revolution/src/ipc/ipcclt.c similarity index 100% rename from src/revolution/ipc/ipcclt.c rename to libs/revolution/src/ipc/ipcclt.c diff --git a/src/revolution/ipc/memory.c b/libs/revolution/src/ipc/memory.c similarity index 100% rename from src/revolution/ipc/memory.c rename to libs/revolution/src/ipc/memory.c diff --git a/src/revolution/kpad/KPAD.c b/libs/revolution/src/kpad/KPAD.c similarity index 99% rename from src/revolution/kpad/KPAD.c rename to libs/revolution/src/kpad/KPAD.c index 672a62cfa0..01cf8854d1 100644 --- a/src/revolution/kpad/KPAD.c +++ b/libs/revolution/src/kpad/KPAD.c @@ -1,5 +1,4 @@ #include -#include #include #include "types.h" @@ -7,6 +6,8 @@ #include #include +#include "__kpad.h" + static const char* __KPADVersion = "<< RVL_SDK - KPAD \trelease build: Oct 4 2006 11:56:50 (0x4199_60726) >>"; static Vec2 icenter_org = {0.000f, 0.000f}; diff --git a/src/revolution/kpad/__kpad.h b/libs/revolution/src/kpad/__kpad.h similarity index 100% rename from src/revolution/kpad/__kpad.h rename to libs/revolution/src/kpad/__kpad.h diff --git a/src/revolution/mem/mem_allocator.c b/libs/revolution/src/mem/mem_allocator.c similarity index 100% rename from src/revolution/mem/mem_allocator.c rename to libs/revolution/src/mem/mem_allocator.c diff --git a/src/revolution/mem/mem_expHeap.c b/libs/revolution/src/mem/mem_expHeap.c similarity index 100% rename from src/revolution/mem/mem_expHeap.c rename to libs/revolution/src/mem/mem_expHeap.c diff --git a/src/revolution/mem/mem_heapCommon.c b/libs/revolution/src/mem/mem_heapCommon.c similarity index 100% rename from src/revolution/mem/mem_heapCommon.c rename to libs/revolution/src/mem/mem_heapCommon.c diff --git a/src/revolution/mem/mem_list.c b/libs/revolution/src/mem/mem_list.c similarity index 100% rename from src/revolution/mem/mem_list.c rename to libs/revolution/src/mem/mem_list.c diff --git a/src/revolution/mtx/mtx.c b/libs/revolution/src/mtx/mtx.c similarity index 100% rename from src/revolution/mtx/mtx.c rename to libs/revolution/src/mtx/mtx.c diff --git a/src/revolution/mtx/mtx44.c b/libs/revolution/src/mtx/mtx44.c similarity index 100% rename from src/revolution/mtx/mtx44.c rename to libs/revolution/src/mtx/mtx44.c diff --git a/src/revolution/mtx/mtx44vec.c b/libs/revolution/src/mtx/mtx44vec.c similarity index 100% rename from src/revolution/mtx/mtx44vec.c rename to libs/revolution/src/mtx/mtx44vec.c diff --git a/src/revolution/mtx/mtxstack.c b/libs/revolution/src/mtx/mtxstack.c similarity index 100% rename from src/revolution/mtx/mtxstack.c rename to libs/revolution/src/mtx/mtxstack.c diff --git a/src/revolution/mtx/mtxvec.c b/libs/revolution/src/mtx/mtxvec.c similarity index 100% rename from src/revolution/mtx/mtxvec.c rename to libs/revolution/src/mtx/mtxvec.c diff --git a/src/revolution/mtx/psmtx.c b/libs/revolution/src/mtx/psmtx.c similarity index 100% rename from src/revolution/mtx/psmtx.c rename to libs/revolution/src/mtx/psmtx.c diff --git a/src/revolution/mtx/quat.c b/libs/revolution/src/mtx/quat.c similarity index 100% rename from src/revolution/mtx/quat.c rename to libs/revolution/src/mtx/quat.c diff --git a/src/revolution/mtx/vec.c b/libs/revolution/src/mtx/vec.c similarity index 100% rename from src/revolution/mtx/vec.c rename to libs/revolution/src/mtx/vec.c diff --git a/src/revolution/nand/NANDCheck.c b/libs/revolution/src/nand/NANDCheck.c similarity index 100% rename from src/revolution/nand/NANDCheck.c rename to libs/revolution/src/nand/NANDCheck.c diff --git a/src/revolution/nand/NANDCore.c b/libs/revolution/src/nand/NANDCore.c similarity index 100% rename from src/revolution/nand/NANDCore.c rename to libs/revolution/src/nand/NANDCore.c diff --git a/src/revolution/nand/NANDErrorMessage.c b/libs/revolution/src/nand/NANDErrorMessage.c similarity index 100% rename from src/revolution/nand/NANDErrorMessage.c rename to libs/revolution/src/nand/NANDErrorMessage.c diff --git a/src/revolution/nand/NANDLogging.c b/libs/revolution/src/nand/NANDLogging.c similarity index 100% rename from src/revolution/nand/NANDLogging.c rename to libs/revolution/src/nand/NANDLogging.c diff --git a/src/revolution/nand/NANDOpenClose.c b/libs/revolution/src/nand/NANDOpenClose.c similarity index 100% rename from src/revolution/nand/NANDOpenClose.c rename to libs/revolution/src/nand/NANDOpenClose.c diff --git a/src/revolution/nand/nand.c b/libs/revolution/src/nand/nand.c similarity index 100% rename from src/revolution/nand/nand.c rename to libs/revolution/src/nand/nand.c diff --git a/src/revolution/os/OS.c b/libs/revolution/src/os/OS.c similarity index 100% rename from src/revolution/os/OS.c rename to libs/revolution/src/os/OS.c diff --git a/src/revolution/os/OSAddress.c b/libs/revolution/src/os/OSAddress.c similarity index 100% rename from src/revolution/os/OSAddress.c rename to libs/revolution/src/os/OSAddress.c diff --git a/src/revolution/os/OSAlarm.c b/libs/revolution/src/os/OSAlarm.c similarity index 100% rename from src/revolution/os/OSAlarm.c rename to libs/revolution/src/os/OSAlarm.c diff --git a/src/revolution/os/OSAlloc.c b/libs/revolution/src/os/OSAlloc.c similarity index 100% rename from src/revolution/os/OSAlloc.c rename to libs/revolution/src/os/OSAlloc.c diff --git a/src/revolution/os/OSArena.c b/libs/revolution/src/os/OSArena.c similarity index 100% rename from src/revolution/os/OSArena.c rename to libs/revolution/src/os/OSArena.c diff --git a/src/revolution/os/OSAudioSystem.c b/libs/revolution/src/os/OSAudioSystem.c similarity index 100% rename from src/revolution/os/OSAudioSystem.c rename to libs/revolution/src/os/OSAudioSystem.c diff --git a/src/revolution/os/OSCache.c b/libs/revolution/src/os/OSCache.c similarity index 100% rename from src/revolution/os/OSCache.c rename to libs/revolution/src/os/OSCache.c diff --git a/src/revolution/os/OSContext.c b/libs/revolution/src/os/OSContext.c similarity index 100% rename from src/revolution/os/OSContext.c rename to libs/revolution/src/os/OSContext.c diff --git a/src/revolution/os/OSError.c b/libs/revolution/src/os/OSError.c similarity index 100% rename from src/revolution/os/OSError.c rename to libs/revolution/src/os/OSError.c diff --git a/src/revolution/os/OSExec.c b/libs/revolution/src/os/OSExec.c similarity index 100% rename from src/revolution/os/OSExec.c rename to libs/revolution/src/os/OSExec.c diff --git a/src/revolution/os/OSFatal.c b/libs/revolution/src/os/OSFatal.c similarity index 100% rename from src/revolution/os/OSFatal.c rename to libs/revolution/src/os/OSFatal.c diff --git a/src/revolution/os/OSFont.c b/libs/revolution/src/os/OSFont.c similarity index 100% rename from src/revolution/os/OSFont.c rename to libs/revolution/src/os/OSFont.c diff --git a/src/revolution/os/OSInterrupt.c b/libs/revolution/src/os/OSInterrupt.c similarity index 100% rename from src/revolution/os/OSInterrupt.c rename to libs/revolution/src/os/OSInterrupt.c diff --git a/src/revolution/os/OSIpc.c b/libs/revolution/src/os/OSIpc.c similarity index 100% rename from src/revolution/os/OSIpc.c rename to libs/revolution/src/os/OSIpc.c diff --git a/src/revolution/os/OSLaunch.c b/libs/revolution/src/os/OSLaunch.c similarity index 100% rename from src/revolution/os/OSLaunch.c rename to libs/revolution/src/os/OSLaunch.c diff --git a/src/revolution/os/OSLink.c b/libs/revolution/src/os/OSLink.c similarity index 100% rename from src/revolution/os/OSLink.c rename to libs/revolution/src/os/OSLink.c diff --git a/src/revolution/os/OSMemory.c b/libs/revolution/src/os/OSMemory.c similarity index 100% rename from src/revolution/os/OSMemory.c rename to libs/revolution/src/os/OSMemory.c diff --git a/src/revolution/os/OSMessage.c b/libs/revolution/src/os/OSMessage.c similarity index 100% rename from src/revolution/os/OSMessage.c rename to libs/revolution/src/os/OSMessage.c diff --git a/src/revolution/os/OSMutex.c b/libs/revolution/src/os/OSMutex.c similarity index 100% rename from src/revolution/os/OSMutex.c rename to libs/revolution/src/os/OSMutex.c diff --git a/src/revolution/os/OSNandbootInfo.c b/libs/revolution/src/os/OSNandbootInfo.c similarity index 100% rename from src/revolution/os/OSNandbootInfo.c rename to libs/revolution/src/os/OSNandbootInfo.c diff --git a/src/revolution/os/OSNet.c b/libs/revolution/src/os/OSNet.c similarity index 100% rename from src/revolution/os/OSNet.c rename to libs/revolution/src/os/OSNet.c diff --git a/src/revolution/os/OSPlayRecord.c b/libs/revolution/src/os/OSPlayRecord.c similarity index 100% rename from src/revolution/os/OSPlayRecord.c rename to libs/revolution/src/os/OSPlayRecord.c diff --git a/src/revolution/os/OSPlayTime.c b/libs/revolution/src/os/OSPlayTime.c similarity index 100% rename from src/revolution/os/OSPlayTime.c rename to libs/revolution/src/os/OSPlayTime.c diff --git a/src/revolution/os/OSReboot.c b/libs/revolution/src/os/OSReboot.c similarity index 100% rename from src/revolution/os/OSReboot.c rename to libs/revolution/src/os/OSReboot.c diff --git a/src/revolution/os/OSReset.c b/libs/revolution/src/os/OSReset.c similarity index 100% rename from src/revolution/os/OSReset.c rename to libs/revolution/src/os/OSReset.c diff --git a/src/revolution/os/OSRtc.c b/libs/revolution/src/os/OSRtc.c similarity index 100% rename from src/revolution/os/OSRtc.c rename to libs/revolution/src/os/OSRtc.c diff --git a/src/revolution/os/OSStateFlags.c b/libs/revolution/src/os/OSStateFlags.c similarity index 100% rename from src/revolution/os/OSStateFlags.c rename to libs/revolution/src/os/OSStateFlags.c diff --git a/src/revolution/os/OSStateTM.c b/libs/revolution/src/os/OSStateTM.c similarity index 100% rename from src/revolution/os/OSStateTM.c rename to libs/revolution/src/os/OSStateTM.c diff --git a/src/revolution/os/OSStopwatch.c b/libs/revolution/src/os/OSStopwatch.c similarity index 100% rename from src/revolution/os/OSStopwatch.c rename to libs/revolution/src/os/OSStopwatch.c diff --git a/src/revolution/os/OSSync.c b/libs/revolution/src/os/OSSync.c similarity index 100% rename from src/revolution/os/OSSync.c rename to libs/revolution/src/os/OSSync.c diff --git a/src/revolution/os/OSThread.c b/libs/revolution/src/os/OSThread.c similarity index 100% rename from src/revolution/os/OSThread.c rename to libs/revolution/src/os/OSThread.c diff --git a/src/revolution/os/OSTime.c b/libs/revolution/src/os/OSTime.c similarity index 100% rename from src/revolution/os/OSTime.c rename to libs/revolution/src/os/OSTime.c diff --git a/src/revolution/os/OSUtf.c b/libs/revolution/src/os/OSUtf.c similarity index 100% rename from src/revolution/os/OSUtf.c rename to libs/revolution/src/os/OSUtf.c diff --git a/src/revolution/os/__os.h b/libs/revolution/src/os/__os.h similarity index 100% rename from src/revolution/os/__os.h rename to libs/revolution/src/os/__os.h diff --git a/src/revolution/os/__ppc_eabi_init.cpp b/libs/revolution/src/os/__ppc_eabi_init.cpp similarity index 100% rename from src/revolution/os/__ppc_eabi_init.cpp rename to libs/revolution/src/os/__ppc_eabi_init.cpp diff --git a/src/revolution/os/__start.c b/libs/revolution/src/os/__start.c similarity index 100% rename from src/revolution/os/__start.c rename to libs/revolution/src/os/__start.c diff --git a/src/revolution/pad/Pad.c b/libs/revolution/src/pad/Pad.c similarity index 99% rename from src/revolution/pad/Pad.c rename to libs/revolution/src/pad/Pad.c index 1dcc38c52b..b20da7bb14 100644 --- a/src/revolution/pad/Pad.c +++ b/libs/revolution/src/pad/Pad.c @@ -5,7 +5,7 @@ #include #include "__si.h" -#include "revolution/vi/__vi.h" +#include "__vi.h" #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) diff --git a/src/revolution/pad/Padclamp.c b/libs/revolution/src/pad/Padclamp.c similarity index 100% rename from src/revolution/pad/Padclamp.c rename to libs/revolution/src/pad/Padclamp.c diff --git a/src/revolution/sc/scapi.c b/libs/revolution/src/sc/scapi.c similarity index 100% rename from src/revolution/sc/scapi.c rename to libs/revolution/src/sc/scapi.c diff --git a/src/revolution/sc/scapi_prdinfo.c b/libs/revolution/src/sc/scapi_prdinfo.c similarity index 100% rename from src/revolution/sc/scapi_prdinfo.c rename to libs/revolution/src/sc/scapi_prdinfo.c diff --git a/src/revolution/sc/scsystem.c b/libs/revolution/src/sc/scsystem.c similarity index 100% rename from src/revolution/sc/scsystem.c rename to libs/revolution/src/sc/scsystem.c diff --git a/src/revolution/si/SIBios.c b/libs/revolution/src/si/SIBios.c similarity index 100% rename from src/revolution/si/SIBios.c rename to libs/revolution/src/si/SIBios.c diff --git a/src/revolution/si/SISamplingRate.c b/libs/revolution/src/si/SISamplingRate.c similarity index 100% rename from src/revolution/si/SISamplingRate.c rename to libs/revolution/src/si/SISamplingRate.c diff --git a/src/revolution/si/__si.h b/libs/revolution/src/si/__si.h similarity index 100% rename from src/revolution/si/__si.h rename to libs/revolution/src/si/__si.h diff --git a/src/revolution/tpl/TPL.c b/libs/revolution/src/tpl/TPL.c similarity index 100% rename from src/revolution/tpl/TPL.c rename to libs/revolution/src/tpl/TPL.c diff --git a/src/revolution/usb/__usb.h b/libs/revolution/src/usb/__usb.h similarity index 100% rename from src/revolution/usb/__usb.h rename to libs/revolution/src/usb/__usb.h diff --git a/src/revolution/usb/usb.c b/libs/revolution/src/usb/usb.c similarity index 99% rename from src/revolution/usb/usb.c rename to libs/revolution/src/usb/usb.c index 822171d510..4f25d1aaf2 100644 --- a/src/revolution/usb/usb.c +++ b/libs/revolution/src/usb/usb.c @@ -1,5 +1,4 @@ #include -#include #include #include @@ -10,6 +9,8 @@ #include #include +#include "__usb.h" + #if SDK_AUG2010 #define IPC_ARENA_SIZE 0x4000 #else diff --git a/src/revolution/vi/__vi.h b/libs/revolution/src/vi/__vi.h similarity index 100% rename from src/revolution/vi/__vi.h rename to libs/revolution/src/vi/__vi.h diff --git a/src/revolution/vi/i2c.c b/libs/revolution/src/vi/i2c.c similarity index 100% rename from src/revolution/vi/i2c.c rename to libs/revolution/src/vi/i2c.c diff --git a/src/revolution/vi/vi.c b/libs/revolution/src/vi/vi.c similarity index 100% rename from src/revolution/vi/vi.c rename to libs/revolution/src/vi/vi.c diff --git a/src/revolution/vi/vi3in1.c b/libs/revolution/src/vi/vi3in1.c similarity index 100% rename from src/revolution/vi/vi3in1.c rename to libs/revolution/src/vi/vi3in1.c diff --git a/src/revolution/wenc/wenc.c b/libs/revolution/src/wenc/wenc.c similarity index 100% rename from src/revolution/wenc/wenc.c rename to libs/revolution/src/wenc/wenc.c diff --git a/src/revolution/wpad/WPAD.c b/libs/revolution/src/wpad/WPAD.c similarity index 99% rename from src/revolution/wpad/WPAD.c rename to libs/revolution/src/wpad/WPAD.c index 31a40e1ab8..20e7509da3 100644 --- a/src/revolution/wpad/WPAD.c +++ b/libs/revolution/src/wpad/WPAD.c @@ -1,15 +1,16 @@ #include -#include #include #include #include #include #include -#include #include #include +#include "__wpad.h" +#include "__wud.h" + extern volatile BOOL __OSIsReturnToIdle; //TODO: this apparently should be aligned to 32 bytes, but diff --git a/src/revolution/wpad/WPADEncrypt.c b/libs/revolution/src/wpad/WPADEncrypt.c similarity index 99% rename from src/revolution/wpad/WPADEncrypt.c rename to libs/revolution/src/wpad/WPADEncrypt.c index 9852cc6162..d910e80636 100644 --- a/src/revolution/wpad/WPADEncrypt.c +++ b/libs/revolution/src/wpad/WPADEncrypt.c @@ -1,4 +1,4 @@ -#include +#include "__wpad.h" #include "cstring" diff --git a/src/revolution/wpad/WPADHIDParser.c b/libs/revolution/src/wpad/WPADHIDParser.c similarity index 99% rename from src/revolution/wpad/WPADHIDParser.c rename to libs/revolution/src/wpad/WPADHIDParser.c index 4b8b774b7c..b7d1339c48 100644 --- a/src/revolution/wpad/WPADHIDParser.c +++ b/libs/revolution/src/wpad/WPADHIDParser.c @@ -1,7 +1,8 @@ #include -#include #include +#include "__wpad.h" + extern void DEBUGPrint(const char*, ...); void __a1_20_status_report(u8 chan, u8* data); diff --git a/src/revolution/wpad/WPADMem.c b/libs/revolution/src/wpad/WPADMem.c similarity index 57% rename from src/revolution/wpad/WPADMem.c rename to libs/revolution/src/wpad/WPADMem.c index efbcc8b9e5..906cc50a05 100644 --- a/src/revolution/wpad/WPADMem.c +++ b/libs/revolution/src/wpad/WPADMem.c @@ -1,3 +1,3 @@ -#include +#include "__wpad.h" WPADMEMControlBlock _wmb[WPAD_MAX_CONTROLLERS]; diff --git a/src/revolution/wpad/__wpad.h b/libs/revolution/src/wpad/__wpad.h similarity index 100% rename from src/revolution/wpad/__wpad.h rename to libs/revolution/src/wpad/__wpad.h diff --git a/src/revolution/wpad/wpad_debug_msg.c b/libs/revolution/src/wpad/wpad_debug_msg.c similarity index 63% rename from src/revolution/wpad/wpad_debug_msg.c rename to libs/revolution/src/wpad/wpad_debug_msg.c index 2713ba81c9..ae5f498226 100644 --- a/src/revolution/wpad/wpad_debug_msg.c +++ b/libs/revolution/src/wpad/wpad_debug_msg.c @@ -1,4 +1,4 @@ -#include +#include "__wpad.h" void DEBUGPrint(const char* fmt, ...) { // NONMATCHING diff --git a/src/revolution/wud/WUD.c b/libs/revolution/src/wud/WUD.c similarity index 99% rename from src/revolution/wud/WUD.c rename to libs/revolution/src/wud/WUD.c index b6f7073699..72a2c9b60b 100644 --- a/src/revolution/wud/WUD.c +++ b/libs/revolution/src/wud/WUD.c @@ -1,5 +1,4 @@ #include -#include #include #include @@ -10,6 +9,8 @@ #include #include +#include "__wud.h" + #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define CLAMP(val, min, max) ((val) > (max) ? (max) : (val) < (min) ? (min) : (val)) diff --git a/src/revolution/wud/WUDHidHost.c b/libs/revolution/src/wud/WUDHidHost.c similarity index 99% rename from src/revolution/wud/WUDHidHost.c rename to libs/revolution/src/wud/WUDHidHost.c index aaae4d0aa2..0eed6c623a 100644 --- a/src/revolution/wud/WUDHidHost.c +++ b/libs/revolution/src/wud/WUDHidHost.c @@ -1,9 +1,10 @@ #include -#include #include #include #include +#include "__wud.h" + #define DEBUGPrint WUD_DEBUGPrint // TODO(kiwi) Is this from BTA? diff --git a/src/revolution/wud/__wud.h b/libs/revolution/src/wud/__wud.h similarity index 100% rename from src/revolution/wud/__wud.h rename to libs/revolution/src/wud/__wud.h diff --git a/src/revolution/wud/debug_msg.c b/libs/revolution/src/wud/debug_msg.c similarity index 74% rename from src/revolution/wud/debug_msg.c rename to libs/revolution/src/wud/debug_msg.c index 8e05cc0499..470b33e68f 100644 --- a/src/revolution/wud/debug_msg.c +++ b/libs/revolution/src/wud/debug_msg.c @@ -1,8 +1,7 @@ -#include +#include "__wud.h" #include void WUD_DEBUGPrint(const char* msg, ...) { va_list list; } - diff --git a/src/DynamicLink.cpp b/src/DynamicLink.cpp index f224eb43cf..969c485f55 100644 --- a/src/DynamicLink.cpp +++ b/src/DynamicLink.cpp @@ -11,6 +11,7 @@ #include #include "m_Do/m_Do_dvd_thread.h" #include "m_Do/m_Do_ext.h" +#include "os_report.h" DynamicModuleControlBase* DynamicModuleControlBase::mFirst; diff --git a/src/NdevExi2A/DebuggerDriver.c b/src/NdevExi2A/DebuggerDriver.c index 8bbc082f23..670de960db 100644 --- a/src/NdevExi2A/DebuggerDriver.c +++ b/src/NdevExi2A/DebuggerDriver.c @@ -1,8 +1,8 @@ #include "NdevExi2A/DebuggerDriver.h" #include "NdevExi2A/exi2.h" -#include -#include +#include +#include static s32 __DBRecvDataSize; static u32 __DBRecvMail; diff --git a/src/SSystem/SComponent/c_cc_s.cpp b/src/SSystem/SComponent/c_cc_s.cpp index 2690d49dbc..72df9625d8 100644 --- a/src/SSystem/SComponent/c_cc_s.cpp +++ b/src/SSystem/SComponent/c_cc_s.cpp @@ -6,6 +6,7 @@ #include "SSystem/SComponent/c_cc_s.h" #include "JSystem/JUtility/JUTAssert.h" #include +#include "os_report.h" #define CHECK_FLOAT_CLASS(line, x) JUT_ASSERT(line, !std::isnan(x)); #define CHECK_FLOAT_RANGE(line, x) JUT_ASSERT(line, -1.0e32f < x && x < 1.0e32f); diff --git a/src/SSystem/SComponent/c_list.cpp b/src/SSystem/SComponent/c_list.cpp index 57f49cec1a..0f590a969a 100644 --- a/src/SSystem/SComponent/c_list.cpp +++ b/src/SSystem/SComponent/c_list.cpp @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_list.h" #include "SSystem/SComponent/c_node.h" -#include +#include void cLs_Init(node_list_class* list) { list->mpHead = NULL; diff --git a/src/SSystem/SComponent/c_list_iter.cpp b/src/SSystem/SComponent/c_list_iter.cpp index 077840f838..be97b39c0b 100644 --- a/src/SSystem/SComponent/c_list_iter.cpp +++ b/src/SSystem/SComponent/c_list_iter.cpp @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_list_iter.h" #include "SSystem/SComponent/c_list.h" -#include +#include int cLsIt_Method(node_list_class* list, cNdIt_MethodFunc method, void* data) { if (list->mSize > 0) diff --git a/src/SSystem/SComponent/c_m2d.cpp b/src/SSystem/SComponent/c_m2d.cpp index 9629819e55..6a11d01e2f 100644 --- a/src/SSystem/SComponent/c_m2d.cpp +++ b/src/SSystem/SComponent/c_m2d.cpp @@ -7,6 +7,7 @@ #include "SSystem/SComponent/c_m3d.h" #include "SSystem/SComponent/c_m3d_g_cir.h" #include "JSystem/JUtility/JUTAssert.h" +#include "os_report.h" void cM2d_CrossCirLin(cM2dGCir& param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4, f32* param_5, f32* param_6) { diff --git a/src/SSystem/SComponent/c_m3d_g_tri.cpp b/src/SSystem/SComponent/c_m3d_g_tri.cpp index fcf135b3b8..714848f241 100644 --- a/src/SSystem/SComponent/c_m3d_g_tri.cpp +++ b/src/SSystem/SComponent/c_m3d_g_tri.cpp @@ -20,7 +20,7 @@ void cM3dGTri::setPos(const Vec* vtx_a, const Vec* vtx_b, const Vec* vtx_c) { JUT_ASSERT(99, !cM3d_IsZero(GetNP()->x) || !cM3d_IsZero(GetNP()->y) || !cM3d_IsZero(GetNP()->z)); } -void cM3dGTri::setBg(const Vec* vtx_a, const Vec* vtx_b, const Vec* vtx_c, const cM3dGPla* plane) { +void cM3dGTri::setBg(const BE(Vec)* vtx_a, const BE(Vec)* vtx_b, const BE(Vec)* vtx_c, const cM3dGPla* plane) { mA.x = vtx_a->x; mA.y = vtx_a->y; mA.z = vtx_a->z; diff --git a/src/SSystem/SComponent/c_node.cpp b/src/SSystem/SComponent/c_node.cpp index a1957273ef..f23b7b3371 100644 --- a/src/SSystem/SComponent/c_node.cpp +++ b/src/SSystem/SComponent/c_node.cpp @@ -4,7 +4,7 @@ */ #include "SSystem/SComponent/c_node.h" -#include +#include void cNd_Join(node_class* node_a, node_class* node_b) { node_a->mpNextNode = node_b; diff --git a/src/SSystem/SComponent/c_node_iter.cpp b/src/SSystem/SComponent/c_node_iter.cpp index a26b6a1743..5eeb939ad4 100644 --- a/src/SSystem/SComponent/c_node_iter.cpp +++ b/src/SSystem/SComponent/c_node_iter.cpp @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_node_iter.h" #include "SSystem/SComponent/c_node.h" -#include +#include int cNdIt_Method(node_class* node, cNdIt_MethodFunc method, void* data) { int ret = 1; diff --git a/src/SSystem/SComponent/c_phase.cpp b/src/SSystem/SComponent/c_phase.cpp index fbef09e635..64d291c053 100644 --- a/src/SSystem/SComponent/c_phase.cpp +++ b/src/SSystem/SComponent/c_phase.cpp @@ -7,12 +7,12 @@ #include "global.h" void cPhs_Reset(request_of_phase_process_class* phase) { - phase->id = cPhs_INIT_e; + phase->id = 0; } void cPhs_Set(request_of_phase_process_class* phase, cPhs__Handler* handlerTbl) { phase->mpHandlerTable = handlerTbl; - phase->id = cPhs_INIT_e; + phase->id = 0; } void cPhs_UnCompleate(request_of_phase_process_class* phase) { diff --git a/src/SSystem/SComponent/c_tree_iter.cpp b/src/SSystem/SComponent/c_tree_iter.cpp index f7ffabf4c7..9446dbd52c 100644 --- a/src/SSystem/SComponent/c_tree_iter.cpp +++ b/src/SSystem/SComponent/c_tree_iter.cpp @@ -7,7 +7,7 @@ #include "SSystem/SComponent/c_list.h" #include "SSystem/SComponent/c_list_iter.h" #include "SSystem/SComponent/c_tree.h" -#include +#include int cTrIt_Method(node_lists_tree_class* tree, cNdIt_MethodFunc method, void* data) { node_list_class* list = tree->mpLists; diff --git a/src/Z2AudioLib/Z2AudioMgr.cpp b/src/Z2AudioLib/Z2AudioMgr.cpp index 58ef5fc997..f46a2fc897 100644 --- a/src/Z2AudioLib/Z2AudioMgr.cpp +++ b/src/Z2AudioLib/Z2AudioMgr.cpp @@ -1,16 +1,17 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "Z2AudioLib/Z2AudioMgr.h" #include "JSystem/JAudio2/JASAiCtrl.h" +#include "JSystem/JAudio2/JASAudioThread.h" #include "JSystem/JAudio2/JASDriverIF.h" #include "JSystem/JAudio2/JASResArcLoader.h" #include "JSystem/JAudio2/JASSeqParser.h" #include "JSystem/JAudio2/JAUInitializer.h" #include "JSystem/JAudio2/JAUSectionHeap.h" -#include "JSystem/JAudio2/JAUStreamAramMgr.h" #include "JSystem/JAudio2/JAUSeqCollection.h" +#include "JSystem/JAudio2/JAUStreamAramMgr.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "Z2AudioLib/Z2AudioArcLoader.h" +#include "Z2AudioLib/Z2AudioMgr.h" #include "Z2AudioLib/Z2Param.h" #include "Z2AudioLib/Z2SoundHandles.h" @@ -105,6 +106,19 @@ void Z2AudioMgr::init(JKRSolidHeap* heap, u32 memSize, void* baaData, JKRArchive JASPoolAllocObject::newMemPool(0x4e); OS_REPORT("[Z2AudioMgr::init]before Create Section: %d\n", heap->getFreeSize()); +#if TARGET_PC + // Fix a race condition with OS threading where JAUNewSectionHeap will use all the remaining + // space in the JASDram heap before JASAudioThread has finished initializing. + + OSLockMutex(&JASAudioThread::sThreadInitCompleteMutex); + while (!JASAudioThread::sThreadInitComplete) { + OSWaitCond( + &JASAudioThread::sThreadInitCompleteCond, + &JASAudioThread::sThreadInitCompleteMutex); + } + OSUnlockMutex(&JASAudioThread::sThreadInitCompleteMutex); +#endif + JAUSectionHeap* sectionHeap = JAUNewSectionHeap(true); sectionHeap->setSeqDataArchive(seqArc); size_t resMaxSize = JASResArcLoader::getResMaxSize(seqArc); diff --git a/src/Z2AudioLib/Z2Creature.cpp b/src/Z2AudioLib/Z2Creature.cpp index 14b0d31023..36938f3c78 100644 --- a/src/Z2AudioLib/Z2Creature.cpp +++ b/src/Z2AudioLib/Z2Creature.cpp @@ -2,6 +2,7 @@ #include "Z2AudioLib/Z2Param.h" #include "Z2AudioLib/Z2Calc.h" #include "Z2AudioLib/Z2AudioMgr.h" +#include "os_report.h" static void Z2_E_sw_modPitch(Z2SoundHandlePool*, u32); static void Z2_E_ms_modVol(Z2SoundHandlePool*, u32); @@ -137,6 +138,10 @@ void Z2Creature::setSoundStarter(Z2SoundStarter* soundStarter) { } void Z2Creature::initAnime(void* animation, bool param_1, f32 startFrame, f32 param_3) { +#if TARGET_PC + puts("In this house we HATE anime!!!"); + return; +#endif mSoundObjAnime.initAnime(animation, param_1, startFrame, param_3); } @@ -204,6 +209,11 @@ Z2SoundHandlePool* Z2Creature::startCreatureSoundLevel(JAISoundID soundID, u32 m } Z2SoundHandlePool* Z2Creature::startCreatureVoice(JAISoundID soundID, s8 reverb) { + #if TARGET_PC + // stubbed + return nullptr; + #endif + switch (soundID) { case Z2SE_MDN_V_FLY_OUT: case Z2SE_MDN_V_MGN_TAME: diff --git a/src/Z2AudioLib/Z2FxLineMgr.cpp b/src/Z2AudioLib/Z2FxLineMgr.cpp index 61d37c6785..55f54b99fa 100644 --- a/src/Z2AudioLib/Z2FxLineMgr.cpp +++ b/src/Z2AudioLib/Z2FxLineMgr.cpp @@ -4,6 +4,7 @@ #include "JSystem/JKernel/JKRArchive.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JSupport/JSUMemoryStream.h" +#include "os_report.h" Z2FxLineMgr::Z2FxLineMgr() : JASGlobalInstance(true) { mConfig = NULL; diff --git a/src/Z2AudioLib/Z2SeqMgr.cpp b/src/Z2AudioLib/Z2SeqMgr.cpp index a9cad68b5e..da56da734e 100644 --- a/src/Z2AudioLib/Z2SeqMgr.cpp +++ b/src/Z2AudioLib/Z2SeqMgr.cpp @@ -8,6 +8,7 @@ #include "Z2AudioLib/Z2Calc.h" #include "JSystem/JAudio2/JAISoundChild.h" #include "JSystem/JAudio2/JAISeq.h" +#include "os_report.h" static const char* sSpotName[] = { "F_SP00", diff --git a/src/Z2AudioLib/Z2SoundObject.cpp b/src/Z2AudioLib/Z2SoundObject.cpp index 69b0dc3bad..5b6a768215 100644 --- a/src/Z2AudioLib/Z2SoundObject.cpp +++ b/src/Z2AudioLib/Z2SoundObject.cpp @@ -17,6 +17,7 @@ #if PLATFORM_WII || PLATFORM_SHIELD #include "Z2AudioCS/Z2AudioCS.h" #endif +#include "os_report.h" Z2SoundObjBase::Z2SoundObjBase() #if DEBUG diff --git a/src/Z2AudioLib/Z2WolfHowlMgr.cpp b/src/Z2AudioLib/Z2WolfHowlMgr.cpp index 5f34fab19c..7214ab20cf 100644 --- a/src/Z2AudioLib/Z2WolfHowlMgr.cpp +++ b/src/Z2AudioLib/Z2WolfHowlMgr.cpp @@ -6,6 +6,7 @@ #include "Z2AudioLib/Z2SoundMgr.h" #include "Z2AudioLib/Z2Audience.h" #include "d/d_demo.h" +#include "os_report.h" static f32 cPitchDown = 0.8909f; diff --git a/src/amcstubs/AmcExi2Stubs.c b/src/amcstubs/AmcExi2Stubs.c index dcb3b944f7..a036e57a0d 100644 --- a/src/amcstubs/AmcExi2Stubs.c +++ b/src/amcstubs/AmcExi2Stubs.c @@ -3,7 +3,7 @@ * Description: */ -#include +#include void EXI2_Init(vu8**, EXICallback) {} diff --git a/src/c/c_dylink.cpp b/src/c/c_dylink.cpp index 2d47e2df7a..dd11128d6b 100644 --- a/src/c/c_dylink.cpp +++ b/src/c/c_dylink.cpp @@ -19,10 +19,9 @@ #endif static DynamicNameTableEntry const DynamicNameTable[] = { +#if !TARGET_PC {PROC_ALLDIE, "d_a_alldie"}, -#ifndef TARGET_PC {PROC_Obj_Swpush, "d_a_obj_swpush"}, -#endif // TARGET_PC {PROC_Obj_Swpush2, "d_a_obj_swpush2"}, {PROC_Obj_Swpush5, "d_a_obj_swpush5"}, {PROC_Tag_Gstart, "d_a_tag_gstart"}, @@ -31,9 +30,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { #endif {PROC_Obj_Lv6ElevtA, "d_a_obj_lv6elevta"}, {PROC_OBJ_SO, "d_a_obj_so"}, -#ifndef TARGET_PC {PROC_Obj_Movebox, "d_a_obj_movebox"}, -#endif // TARGET_PC {PROC_Obj_SwTurn, "d_a_obj_swturn"}, {PROC_Obj_Lv6SwTurn, "d_a_obj_lv6swturn"}, {PROC_OBJ_SEKIZOA, "d_a_obj_sekizoa"}, @@ -41,9 +38,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_TAG_GRA, "d_a_tag_gra"}, {PROC_TAG_YAMI, "d_a_tag_yami"}, {PROC_Obj_Ladder, "d_a_obj_ladder"}, -#ifndef TARGET_PC {PROC_OBJ_BEF, "d_a_obj_brakeeff"}, -#endif // TARGET_PC {PROC_OBJ_FMOBJ, "d_a_obj_fmobj"}, {PROC_OBJ_LBOX, "d_a_obj_lbox"}, {PROC_OBJ_WEB0, "d_a_obj_web0"}, @@ -228,9 +223,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_Obj_SZbridge, "d_a_obj_szbridge"}, {PROC_Obj_KakarikoBrg, "d_a_obj_warp_kbrg"}, {PROC_Obj_OrdinBrg, "d_a_obj_warp_obrg"}, -#ifndef TARGET_PC {PROC_Obj_BurnBox, "d_a_obj_burnbox"}, -#endif // TARGET_PC {PROC_Obj_KJgjs, "d_a_obj_kjgjs"}, {PROC_OBJ_IHASI, "d_a_obj_ihasi"}, {PROC_Obj_IceBlock, "d_a_obj_iceblock"}, @@ -242,9 +235,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_NPC_ZRA, "d_a_npc_zra"}, {PROC_Obj_Chandelier, "d_a_obj_chandelier"}, {PROC_Obj_Stopper2, "d_a_obj_stopper2"}, -#ifndef TARGET_PC {PROC_DOOR20, "d_a_door_shutter"}, -#endif // TARGET_PC {PROC_Tag_Hinit, "d_a_tag_hinit"}, {PROC_Tag_Hjump, "d_a_tag_hjump"}, {PROC_Tag_AJnot, "d_a_tag_ajnot"}, @@ -252,13 +243,9 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_CANOE, "d_a_canoe"}, {PROC_HORSE, "d_a_horse"}, {PROC_E_WB, "d_a_e_wb"}, -#ifndef TARGET_PC {PROC_OBJ_ITO, "d_a_obj_ito"}, -#endif // TARGET_PC {PROC_OBJ_SW, "d_a_obj_sw"}, -#ifndef TARGET_PC {PROC_SPINNER, "d_a_spinner"}, -#endif // TARGET_PC {PROC_B_OB, "d_a_b_ob"}, {PROC_KAGO, "d_a_kago"}, {PROC_E_YC, "d_a_e_yc"}, @@ -267,20 +254,16 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_B_ZANTZ, "d_a_b_zant_mobile"}, {PROC_B_ZANT, "d_a_b_zant"}, {PROC_B_ZANTM, "d_a_b_zant_magic"}, -#ifndef TARGET_PC {PROC_TBOX, "d_a_tbox"}, {PROC_TBOX2, "d_a_tbox2"}, {PROC_BOOMERANG, "d_a_boomerang"}, {PROC_MIDNA, "d_a_midna"}, -#endif // TARGET_PC {PROC_NPC_TK, "d_a_npc_tk"}, {PROC_NPC_WORM, "d_a_npc_worm"}, {PROC_PPolamp, "d_a_ppolamp"}, {PROC_BkyRock, "d_a_obj_bky_rock"}, -#ifndef TARGET_PC {PROC_HITOBJ, "d_a_hitobj"}, {PROC_EP, "d_a_ep"}, -#endif // TARGET_PC {PROC_COW, "d_a_cow"}, {PROC_PERU, "d_a_peru"}, {PROC_NI, "d_a_ni"}, @@ -332,17 +315,13 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_MG_FISH, "d_a_mg_fish"}, {PROC_FSHOP, "d_a_mg_fshop"}, {PROC_NPC_DU, "d_a_npc_du"}, -#ifndef TARGET_PC {PROC_DISAPPEAR, "d_a_disappear"}, -#endif // TARGET_PC {PROC_Obj_Mato, "d_a_obj_mato"}, {PROC_Obj_Flag, "d_a_obj_flag"}, {PROC_Obj_Flag2, "d_a_obj_flag2"}, {PROC_Obj_Flag3, "d_a_obj_flag3"}, {PROC_Obj_GOMIKABE, "d_a_obj_gomikabe"}, -#ifndef TARGET_PC {PROC_Obj_Yousei, "d_a_obj_yousei"}, -#endif // TARGET_PC {PROC_Obj_Kabuto, "d_a_obj_kabuto"}, {PROC_Obj_Cho, "d_a_obj_cho"}, {PROC_Obj_Kuw, "d_a_obj_kuwagata"}, @@ -369,9 +348,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_Izumi_Gate, "d_a_izumi_gate"}, {PROC_Obj_Fchain, "d_a_obj_fchain"}, {PROC_Obj_Wchain, "d_a_obj_wchain"}, -#ifndef TARGET_PC {PROC_Tag_Attp, "d_a_tag_attention"}, -#endif // TARGET_PC {PROC_Obj_Tornado, "d_a_obj_tornado"}, {PROC_Obj_Tornado2, "d_a_obj_tornado2"}, {PROC_Obj_FirePillar, "d_a_obj_firepillar"}, @@ -563,9 +540,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_E_WAP, "d_a_e_warpappear"}, {PROC_Obj_SmallKey, "d_a_obj_smallkey"}, {PROC_Obj_Kantera, "d_a_obj_kantera"}, -#ifndef TARGET_PC {PROC_Obj_LifeContainer, "d_a_obj_life_container"}, -#endif // TARGET_PC {PROC_Obj_Shield, "d_a_obj_shield"}, {PROC_Demo_Item, "d_a_demo_item"}, #if !PLATFORM_SHIELD @@ -573,32 +548,24 @@ static DynamicNameTableEntry const DynamicNameTable[] = { #endif {PROC_Obj_Drop, "d_a_obj_drop"}, {PROC_OBJ_RW, "d_a_obj_rw"}, -#ifndef TARGET_PC {PROC_NBOMB, "d_a_nbomb"}, -#endif // TARGET_PC {PROC_TAG_CSW, "d_a_tag_csw"}, {PROC_TAG_QS, "d_a_tag_qs"}, {PROC_HOZELDA, "d_a_hozelda"}, #if !PLATFORM_SHIELD {PROC_SWC00, "d_a_swc00"}, #endif -#ifndef TARGET_PC {PROC_KNOB20, "d_a_door_knob00"}, {PROC_DBDOOR, "d_a_door_dbdoor00"}, -#endif // TARGET_PC {PROC_BOSS_DOOR, "d_a_door_boss"}, {PROC_L1BOSS_DOOR, "d_a_door_bossL1"}, {PROC_L1MBOSS_DOOR, "d_a_door_mbossL1"}, {PROC_L5BOSS_DOOR, "d_a_door_bossL5"}, -#ifndef TARGET_PC {PROC_DSHUTTER, "d_a_dshutter"}, {PROC_SPIRAL_DOOR, "d_a_door_spiral"}, -#endif // TARGET_PC {PROC_Tag_ChgRestart, "d_a_tag_chgrestart"}, {PROC_Tag_Restart, "d_a_tag_setrestart"}, -#ifndef TARGET_PC {PROC_ANDSW, "d_a_andsw"}, -#endif // TARGET_PC #if !PLATFORM_SHIELD {PROC_ANDSW2, "d_a_andsw2"}, #endif @@ -724,17 +691,13 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_NPC_MK, "d_a_npc_mk"}, #endif {PROC_NPC_P2, "d_a_npc_p2"}, -#ifndef TARGET_PC {PROC_KYTAG00, "d_a_kytag00"}, -#endif // TARGET_PC #if !PLATFORM_SHIELD {PROC_KYTAG01, "d_a_kytag01"}, #endif {PROC_KYTAG02, "d_a_kytag02"}, {PROC_KYTAG03, "d_a_kytag03"}, -#ifndef TARGET_PC {PROC_KYTAG04, "d_a_kytag04"}, -#endif // TARGET_PC {PROC_KYTAG05, "d_a_kytag05"}, {PROC_KYTAG06, "d_a_kytag06"}, {PROC_KYTAG07, "d_a_kytag07"}, @@ -747,9 +710,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_KYTAG14, "d_a_kytag14"}, {PROC_KYTAG15, "d_a_kytag15"}, {PROC_KYTAG16, "d_a_kytag16"}, -#ifndef TARGET_PC {PROC_KYTAG17, "d_a_kytag17"}, -#endif // TARGET_PC {PROC_Ykgr, "d_a_ykgr"}, {PROC_TALK, "d_a_talk"}, {PROC_Obj_Crope, "d_a_obj_crope"}, @@ -768,15 +729,12 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_Tag_Lv8Gate, "d_a_tag_Lv8Gate"}, {PROC_Tag_TheBHint, "d_a_tag_theB_hint"}, {PROC_Tag_Assist, "d_a_tag_assistance"}, -#ifndef TARGET_PC {PROC_DEMO00, "d_a_demo00"}, -#endif {PROC_TAG_CAMERA, "d_a_tag_camera"}, {PROC_TAG_CHKPOINT, "d_a_tag_chkpoint"}, #if !PLATFORM_SHIELD {PROC_TAG_EVENT, "d_a_tag_event"}, #endif -#ifndef TARGET_PC {PROC_TAG_EVT, "d_a_tag_evt"}, {PROC_TAG_TELOP, "d_a_tag_telop"}, {PROC_TAG_HOWL, "d_a_tag_howl"}, @@ -792,7 +750,6 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_BG, "d_a_bg"}, {PROC_SET_BG_OBJ, "d_a_set_bgobj"}, {PROC_BG_OBJ, "d_a_bg_obj"}, -#endif {PROC_MIRROR, "d_a_mirror"}, {PROC_MOVIE_PLAYER, "d_a_movie_player"}, #if !PLATFORM_SHIELD @@ -800,21 +757,15 @@ static DynamicNameTableEntry const DynamicNameTable[] = { #endif {PROC_FR, "d_a_fr"}, {PROC_ECONT, "d_a_econt"}, -#ifndef TARGET_PC {PROC_MG_ROD, "d_a_mg_rod"}, -#endif // TARGET_PC {PROC_E_ARROW, "d_a_e_arrow"}, {PROC_BULLET, "d_a_bullet"}, -#ifndef TARGET_PC {PROC_SWHIT0, "d_a_swhit0"}, -#endif // TARGET_PC {PROC_E_TH_BALL, "d_a_e_th_ball"}, -#ifndef TARGET_PC {PROC_TAG_EVTAREA, "d_a_tag_evtarea"}, {PROC_TAG_EVTMSG, "d_a_tag_evtmsg"}, {PROC_TAG_KMSG, "d_a_tag_kmsg"}, {PROC_TAG_PUSH, "d_a_tag_push"}, -#endif // TARGET_PC {PROC_E_MK_BO, "d_a_e_mk_bo"}, {PROC_E_MM_MT, "d_a_e_mm_mt"}, {PROC_OBJ_KBOX, "d_a_obj_kbox"}, @@ -822,9 +773,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_B_GOS, "d_a_b_gos"}, {PROC_OBJ_YSTONE, "d_a_obj_ystone"}, {PROC_MANT, "d_a_mant"}, -#ifndef TARGET_PC {PROC_CROD, "d_a_crod"}, -#endif // TARGET_PC {PROC_OBJ_PLEAF, "d_a_obj_pleaf"}, {PROC_OBJ_KBACKET, "d_a_obj_kbacket"}, {PROC_OBJ_YBAG, "d_a_obj_yel_bag"}, @@ -832,9 +781,7 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_OBJ_AUTOMATA, "d_a_obj_automata"}, {PROC_OBJ_GADGET, "d_a_obj_gadget"}, {PROC_OBJ_KAGO, "d_a_obj_kago"}, -#ifndef TARGET_PC {PROC_Obj_Carry, "d_a_obj_carry"}, -#endif // TARGET_PC {PROC_Obj_Stone, "d_a_obj_stone"}, {PROC_OBJ_HB, "d_a_obj_hb"}, {PROC_NPC_INKO, "d_a_npc_inko"}, @@ -844,17 +791,16 @@ static DynamicNameTableEntry const DynamicNameTable[] = { {PROC_E_BI_LEAF, "d_a_e_bi_leaf"}, {PROC_START_AND_GOAL, "d_a_startAndGoal"}, {PROC_NPC_DF, "d_a_npc_df"}, -#ifndef TARGET_PC {PROC_ARROW, "d_a_arrow"}, {PROC_PATH_LINE, "d_a_path_line"}, {PROC_TAG_ALLMATO, "d_a_tag_allmato"}, {PROC_Obj_Timer, "d_a_obj_timer"}, {PROC_SCENE_EXIT, "d_a_scene_exit"}, {PROC_SUSPEND, "d_a_suspend"}, -#endif // TARGET_PC #if !PLATFORM_SHIELD {PROC_GRASS, "d_a_grass"}, #endif +#endif {-1, NULL}, }; @@ -867,6 +813,7 @@ static BOOL cDyl_Initialized; int cCc_Init() { JUT_ASSERT(37, !DMC_initialized); +#if !TARGET_PC #if PLATFORM_GCN JKRHeap* parentHeap = mDoExt_getArchiveHeap(); #else @@ -908,6 +855,8 @@ int cCc_Init() { FixedMemoryCheck* check = FixedMemoryCheck::easyCreate(DMC, sizeof(DMC)); #endif +#endif + DMC_initialized = true; return 1; } @@ -1013,10 +962,6 @@ static int cDyl_InitCallback(void* param_0) { #ifdef TARGET_PC // On PC, the profile list is statically linked (g_fpcPf_ProfileList_p in f_pc_profile.cpp). // Skip DVD-based REL loading and string table — OSLink/OSLinkFixed are stubs. - cDyl_Initialized = true; - fopScnM_CreateReq(PROC_LOGO_SCENE, 0x7FFF, 0, 0); - printf("[DIAG] cDyl_InitCallback: PROC_LOGO_SCENE created (PC path), DONE\n"); fflush(stdout); - return 1; #else #if PLATFORM_GCN JKRHeap* parentHeap = mDoExt_getArchiveHeap(); @@ -1048,12 +993,12 @@ static int cDyl_InitCallback(void* param_0) { printf("[DIAG] cDyl_InitCallback: linking f_pc_profile_lst...\n"); fflush(stdout); dmc.link(); printf("[DIAG] cDyl_InitCallback: link done\n"); fflush(stdout); +#endif cDyl_Initialized = true; fopScnM_CreateReq(PROC_LOGO_SCENE, 0x7FFF, 0, 0); printf("[DIAG] cDyl_InitCallback: PROC_LOGO_SCENE created, DONE\n"); fflush(stdout); return 1; -#endif } static mDoDvdThd_callback_c* cDyl_DVD; @@ -1102,7 +1047,7 @@ int cDylPhs::Link(request_of_phase_process_class* i_phase, s16 i_ProfName) { (request_of_phase_process_fn)cDylPhs::phase_03 }; - if (i_phase->id == cPhs_NEXT_e) { + if (i_phase->id == 2) { return cPhs_COMPLEATE_e; } @@ -1110,11 +1055,11 @@ int cDylPhs::Link(request_of_phase_process_class* i_phase, s16 i_ProfName) { } int cDylPhs::Unlink(request_of_phase_process_class* i_phase, s16 i_ProfName) { - JUT_ASSERT(460, i_phase->id != cPhs_LOADING_e); + JUT_ASSERT(460, i_phase->id != 1); - if (i_phase->id == cPhs_NEXT_e) { + if (i_phase->id == 2) { int ret = cDyl_Unlink(i_ProfName); - i_phase->id = cPhs_INIT_e; + i_phase->id = 0; return ret; } diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index 5f6bd7ca17..76e9c81839 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -4885,7 +4885,7 @@ int daAlink_c::create() { dComIfGp_setPlayer(0, this); dComIfGp_setLinkPlayer(this); - fopAcM_setStageLayer(this); + fopAcM_setStageLayer(&LEAFDRAW_BASE(this)); if (sceneMode == 7) { current.pos = dComIfGs_getTurnRestartPos(); diff --git a/src/d/actor/d_a_bg_obj.cpp b/src/d/actor/d_a_bg_obj.cpp index 599a69d452..062aaa975e 100644 --- a/src/d/actor/d_a_bg_obj.cpp +++ b/src/d/actor/d_a_bg_obj.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_bg_obj.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" #include -#include +#include #include #include "d/actor/d_a_set_bgobj.h" #include "d/d_s_play.h" diff --git a/src/d/actor/d_a_cow.cpp b/src/d/actor/d_a_cow.cpp index 8244ee8446..1830791f66 100644 --- a/src/d/actor/d_a_cow.cpp +++ b/src/d/actor/d_a_cow.cpp @@ -15,7 +15,7 @@ #include "d/d_com_inf_game.h" #include "d/d_meter2_info.h" #include "d/d_timer.h" -#include +#include #include #include "f_op/f_op_actor_mng.h" #include "f_op/f_op_camera_mng.h" diff --git a/src/d/actor/d_a_cstaF.cpp b/src/d/actor/d_a_cstaF.cpp index f680728f54..5efb45d8b8 100644 --- a/src/d/actor/d_a_cstaF.cpp +++ b/src/d/actor/d_a_cstaF.cpp @@ -585,7 +585,7 @@ actor_process_profile_definition g_profile_CSTAF = { fpcPi_CURRENT_e, // mListPrio PROC_CSTAF, // mProcName &g_fpcLf_Method.base, // sub_method - 0x00000B38, // mSize + sizeof(daCstaF_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_cstatue.cpp b/src/d/actor/d_a_cstatue.cpp index 6a1f0a126b..cf93dd474e 100644 --- a/src/d/actor/d_a_cstatue.cpp +++ b/src/d/actor/d_a_cstatue.cpp @@ -1220,7 +1220,7 @@ actor_process_profile_definition g_profile_CSTATUE = { fpcPi_CURRENT_e, // mListPrio PROC_CSTATUE, // mProcName &g_fpcLf_Method.base, // sub_method - 0x00000B2C, // mSize + sizeof(daCstatue_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_e_kr.cpp b/src/d/actor/d_a_e_kr.cpp index c32921568b..af60702e80 100644 --- a/src/d/actor/d_a_e_kr.cpp +++ b/src/d/actor/d_a_e_kr.cpp @@ -398,7 +398,7 @@ static BOOL coach_path_check(e_kr_class* i_this) { return FALSE; } - Vec* pointPos = &i_this->field_0x6e4->m_points[0].m_position; + BE(Vec)* pointPos = &i_this->field_0x6e4->m_points[0].m_position; f32 x = pointPos->x - coach->current.pos.x; f32 z = pointPos->z - coach->current.pos.z; if (JMAFastSqrt(x * x + z * z) < 500.0f + KREG_F(9)) { diff --git a/src/d/actor/d_a_e_nz.cpp b/src/d/actor/d_a_e_nz.cpp index 59f4258f7e..dec0970516 100644 --- a/src/d/actor/d_a_e_nz.cpp +++ b/src/d/actor/d_a_e_nz.cpp @@ -373,8 +373,8 @@ static void e_nz_damage(e_nz_class* i_this) { } } -static BOOL getPolyColor(cBgS_PolyInfo& param_1, int param_2, _GXColor* param_3, - _GXColor* param_4, u8* param_5, f32* param_6) { +static BOOL getPolyColor(cBgS_PolyInfo& param_1, int param_2, GXColor* param_3, + GXColor* param_4, u8* param_5, f32* param_6) { if (!dComIfG_Bgsp().ChkPolySafe(param_1)) { return FALSE; } diff --git a/src/d/actor/d_a_e_oct_bg.cpp b/src/d/actor/d_a_e_oct_bg.cpp index a16544f204..da094293f1 100644 --- a/src/d/actor/d_a_e_oct_bg.cpp +++ b/src/d/actor/d_a_e_oct_bg.cpp @@ -4,7 +4,7 @@ #include "d/dolzel_rel.h" // IWYU pragma: keep -#include +#include #include "d/actor/d_a_e_oct_bg.h" #include "f_op/f_op_actor_mng.h" diff --git a/src/d/actor/d_a_e_rdb.cpp b/src/d/actor/d_a_e_rdb.cpp index 6f60344479..43c133948e 100644 --- a/src/d/actor/d_a_e_rdb.cpp +++ b/src/d/actor/d_a_e_rdb.cpp @@ -252,8 +252,8 @@ static void e_rdb_fight(e_rdb_class* i_this) { i_this->field_0x6c8 = 1; } -static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, _GXColor* p_effPrim, - _GXColor* p_effEnv, u8* p_alpha, f32* p_ratio) { +static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, GXColor* p_effPrim, + GXColor* p_effEnv, u8* p_alpha, f32* p_ratio) { if (dComIfG_Bgsp().ChkPolySafe(i_polyInfo) == 0) { return 0; } @@ -301,7 +301,7 @@ static void e_rdb_attack(e_rdb_class* i_this) { if (frame == 68) { u8 i_alpha; f32 i_ratio; - _GXColor i_effPrim, i_effEnv; + GXColor i_effPrim, i_effEnv; if (getPolyColor(i_this->mAcch.m_gnd, 0, &i_effPrim, &i_effEnv, &i_alpha, &i_ratio) != 0) { @@ -395,7 +395,7 @@ static void e_rdb_spin_attack(e_rdb_class* i_this) { cLib_addCalc0(&i_this->enemy.speedF, 1.0f, 3.0f); u8 i_alpha; f32 i_ratio; - _GXColor i_effPrim, i_effEnv; + GXColor i_effPrim, i_effEnv; if (iVar1 != 0 && getPolyColor(i_this->mAcch.m_gnd, 0, &i_effPrim, &i_effEnv, &i_alpha, &i_ratio) != 0) { diff --git a/src/d/actor/d_a_e_sb.cpp b/src/d/actor/d_a_e_sb.cpp index d876993191..065cb8e67e 100644 --- a/src/d/actor/d_a_e_sb.cpp +++ b/src/d/actor/d_a_e_sb.cpp @@ -1048,7 +1048,7 @@ int daE_SB_c::Draw() { mpMorf->entryDL(); cXyz my_vec; my_vec.set(current.pos.x, 100.0f + current.pos.y, current.pos.z); - _GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex(); + GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex(); mShadowKey = dComIfGd_setShadow(mShadowKey, 1, model, &my_vec, 1000.0f, 300.0f, current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr, 0, 1.0f, tex_obj); diff --git a/src/d/actor/d_a_e_sg.cpp b/src/d/actor/d_a_e_sg.cpp index 36f1953709..38cb8ce1ae 100644 --- a/src/d/actor/d_a_e_sg.cpp +++ b/src/d/actor/d_a_e_sg.cpp @@ -93,7 +93,7 @@ static int daE_SG_Draw(e_sg_class* i_this) { cXyz shadow_pos(i_this->current.pos.x, i_this->current.pos.y + 100.0f, i_this->current.pos.z); - _GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex(); + GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex(); i_this->mShadowKey = dComIfGd_setShadow(i_this->mShadowKey, 1, i_this->mpModel, &shadow_pos, 400.0f, 0.0f, diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 587f091acf..b2f253ad61 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -352,7 +352,7 @@ static int e_wb_lr_wall_check(e_wb_class* i_this) { } static int daE_WB_Draw(e_wb_class* i_this) { - static _GXColor l_color = { + static GXColor l_color = { 0x14, 0x0F, 0x00, diff --git a/src/d/actor/d_a_e_ym.cpp b/src/d/actor/d_a_e_ym.cpp index 38e63b4fa4..0ec3817470 100644 --- a/src/d/actor/d_a_e_ym.cpp +++ b/src/d/actor/d_a_e_ym.cpp @@ -2315,7 +2315,7 @@ void daE_YM_c::executeRail() { void daE_YM_c::executeBackRail() { static f32 YM_DIG_POS_Y[] = {-15.0f, -30.0f, -70.0f}; - cXyz my_vec_0 = dPath_GetPnt(mpPath, mCurrentPntNo)->m_position; + cXyz my_vec_0 = (Vec)dPath_GetPnt(mpPath, mCurrentPntNo)->m_position; switch (mMode) { case 0: { if (current.pos.abs(my_vec_0) < 150.0f) { @@ -2775,7 +2775,7 @@ void daE_YM_c::setLockByCargo() { void daE_YM_c::executeRiver() { cXyz player_pos = daPy_getPlayerActorClass()->current.pos; - cXyz pnt_pos = dPath_GetPnt(mpPath, mCurrentPntNo)->m_position; + cXyz pnt_pos = (Vec)dPath_GetPnt(mpPath, mCurrentPntNo)->m_position; cXyz my_vec_0; f32 next_path; switch (mMode) { diff --git a/src/d/actor/d_a_grass.cpp b/src/d/actor/d_a_grass.cpp index 04992b39b5..89e84015c9 100644 --- a/src/d/actor/d_a_grass.cpp +++ b/src/d/actor/d_a_grass.cpp @@ -350,7 +350,7 @@ int daGrass_c::create() { } m_myObj = this; - fopAcM_setStageLayer(this); + fopAcM_setStageLayer(&LEAFDRAW_BASE(this)); return cPhs_COMPLEATE_e; } @@ -406,7 +406,7 @@ actor_process_profile_definition g_profile_GRASS = { fpcPi_CURRENT_e, // mListPrio PROC_GRASS, // mProcName &g_fpcLf_Method.base, // sub_method - 0x00000570, // mSize + sizeof(daGrass_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index 433a9030b1..efbc2f2e7a 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -1087,7 +1087,7 @@ int daHorse_c::checkDemoAction() { void daHorse_c::setStickRodeoMove() { if (m_rodeoPath != NULL) { - Vec* path_pnt_pos = &m_rodeoPath->m_points[m_rodeoPoint].m_position; + BE(Vec)* path_pnt_pos = &m_rodeoPath->m_points[m_rodeoPoint].m_position; cXyz pos_vec(path_pnt_pos->x - current.pos.x, path_pnt_pos->y - current.pos.y, path_pnt_pos->z - current.pos.z); f32 dist_to_pnt = pos_vec.absXZ(); @@ -3325,8 +3325,8 @@ int daHorse_c::callHorseSubstance(cXyz const* i_pos) { if (m_path != NULL && (checkStateFlg0(FLG0_NO_DRAW_WAIT) || dist_xz2 > SQUARE(2000.0f))) { daAlink_c* player = daAlink_getAlinkActorClass(); - Vec* farthest_pos; - Vec* path_pnt_pos; + BE(Vec)* farthest_pos; + BE(Vec)* path_pnt_pos; for (int i = 0; i < m_path->m_num; i++) { path_pnt_pos = &m_path->m_points[i].m_position; diff --git a/src/d/actor/d_a_kago.cpp b/src/d/actor/d_a_kago.cpp index 9f4dd6e463..90e77c4c60 100644 --- a/src/d/actor/d_a_kago.cpp +++ b/src/d/actor/d_a_kago.cpp @@ -23,6 +23,16 @@ #include "f_op/f_op_camera_mng.h" #include "f_op/f_op_overlap_mng.h" +#include "res/Object/E_yc.h" +#include "res/Object/E_kc.h" + +#define TYPE_TWILIGHT 0 +#define TYPE_NORMAL 1 + +#define SCENE_TYPE_LAKE_HYLIA 0 +#define SCENE_TYPE_RIVER 1 +#define SCENE_TYPE_BOARD_HOUSE 2 +#define SCENE_TYPE_DEFAULT 3 namespace { static dCcD_SrcSph cc_sph_src = { { @@ -143,44 +153,34 @@ void daKago_HIO_c::genMessage(JORMContext* ctx) { } #endif -int daKago_c::getBckName(int param_0) { - if (field_0x6e7 == 0) { - return param_0; +int daKago_c::getBckName(int i_resIdx) { + if (mType == TYPE_TWILIGHT) { + return i_resIdx; } - switch (param_0) { - case 7: - return 4; - case 8: - return 5; - case 9: - return 6; - case 10: - return 7; - case 11: - return 8; - case 12: - return 9; - case 13: - return 10; - case 14: - return 11; - case 15: - return 12; - case 21: - return 13; - default: - return 6; + // convert shadow kargorok res idx to normal kargorok res idx + switch (i_resIdx) { + case dRes_ID_E_YC_BCK_YC_CRASH_e: return dRes_ID_E_KC_BCK_KC_CRASH_e; + case dRes_ID_E_YC_BCK_YC_CRASH2_e: return dRes_ID_E_KC_BCK_KC_CRASH2_e; + case dRes_ID_E_YC_BCK_YC_FLY_e: return dRes_ID_E_KC_BCK_KC_FLY_e; + case dRes_ID_E_YC_BCK_YC_FLY_BRAKE_e: return dRes_ID_E_KC_BCK_KC_FLY_BRAKE_e; + case dRes_ID_E_YC_BCK_YC_FLY_DASH_WL_e: return dRes_ID_E_KC_BCK_KC_FLY_DASH_WL_e; + case dRes_ID_E_YC_BCK_YC_FLY_GLIDE_e: return dRes_ID_E_KC_BCK_KC_FLY_GLIDE_e; + case dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e: return dRes_ID_E_KC_BCK_KC_FLY_GLIDE_WL_e; + case dRes_ID_E_YC_BCK_YC_FLY_LIMIT_WL_e: return dRes_ID_E_KC_BCK_KC_FLY_LIMIT_WL_e; + case dRes_ID_E_YC_BCK_YC_FLY_WL_e: return dRes_ID_E_KC_BCK_KC_FLY_WL_e; + case dRes_ID_E_YC_BCK_YC_HOVERING_e: return dRes_ID_E_KC_BCK_KC_HOVERING_e; + default: return dRes_ID_E_KC_BCK_KC_FLY_e; } } -void daKago_c::setBck(int param_0, u8 param_1, f32 param_2, f32 param_3) { - mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(field_0x75c, getBckName(param_0)), - param_1, param_2, param_3, 0.0f, -1.0f); +void daKago_c::setBck(int i_anm, u8 i_mode, f32 i_morf, f32 i_speed) { + mAnm_p->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(mArcName, getBckName(i_anm)), + i_mode, i_morf, i_speed, 0.0f, -1.0f); } -bool daKago_c::checkBck(int param_0) { - if (mpMorf->getAnm() == dComIfG_getObjectRes(field_0x75c, getBckName(param_0))) { +bool daKago_c::checkBck(int i_anm) { + if (mAnm_p->getAnm() == dComIfG_getObjectRes(mArcName, getBckName(i_anm))) { return true; } else { return false; @@ -193,16 +193,19 @@ int daKago_c::draw() { } g_env_light.settingTevStruct(2, ¤t.pos, &tevStr); - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); g_env_light.setLightTevColorType_MAJI(model, &tevStr); + fopAcM_setEffectMtx(this, model->getModelData()); + dComIfGd_setListDark(); - mpMorf->entryDL(); + mAnm_p->entryDL(); dComIfGd_setList(); + cXyz unkXyz1; unkXyz1.set(current.pos.x, current.pos.y + 100.0f, current.pos.z); - field_0x764 = - dComIfGd_setShadow(field_0x764, 0, model, &unkXyz1, 3500.0f, 0.0f, current.pos.y, + mShadowId = + dComIfGd_setShadow(mShadowId, 0, model, &unkXyz1, 3500.0f, 0.0f, current.pos.y, mObjAcch.GetGroundH(), mObjAcch.m_gnd, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); @@ -216,22 +219,26 @@ static int daKago_Draw(daKago_c* i_this) { int daKago_c::executeBalloonMenu() { dCamera_c* camera = dCam_getBody(); - switch (field_0x6eb) { + switch (mBalloonMenuMode) { case 0: - if (field_0x6e7 == 1 && (mCurrentAction == 0 || mCurrentAction == 5) && - !dComIfGp_event_runCheck() && mDoCPd_c::getTrigB(0)) + if (mType == TYPE_NORMAL && (mAction == ACTION_FLY_e || mAction == ACTION_ATTACK_e) && + !dComIfGp_event_runCheck() && mDoCPd_c::getTrigB(PAD_1)) { - field_0x6eb = 1; + mBalloonMenuMode = 1; return 1; } return 0; case 1: - if (eventInfo.checkCommandDemoAccrpt() == 0) { + if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 1, 0xffff, 0); - eventInfo.onCondition(2); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); + #if VERSION == VERSION_SHIELD_DEBUG + return 0; + #else break; + #endif } mMsgFlow.init(this, 0x457, 0, NULL); @@ -239,32 +246,29 @@ int daKago_c::executeBalloonMenu() { camera->Stop(); camera->SetTrimSize(3); - field_0x6eb = 0x2; - + mBalloonMenuMode = 2; break; case 2: if (mMsgFlow.doFlow(this, NULL, 0)) { if (dMsgObject_getSelectCursorPos() == 0) { - field_0x6eb = 0; + mBalloonMenuMode = 0; camera->Start(); camera->SetTrimSize(0); dComIfGp_event_reset(); - return 1; } if (dMsgObject_getSelectCursorPos() == 1) { - field_0x6eb = 3; + mBalloonMenuMode = 3; dComIfGp_setNextStage("F_SP112", 0, dComIfGp_roomControl_getStayNo(), dComIfG_play_c::getLayerNo(0), 0.0f, 10, 1, 0, 0, 1, 0); } else { - field_0x6eb = 3; + mBalloonMenuMode = 3; dStage_changeScene(3, 0.0f, 0, fopAcM_GetRoomNo(this), 0, -1); } } - break; } @@ -275,37 +279,35 @@ static u8 hio_set; static daKago_HIO_c l_HIO; f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) { - f32 retVal; - - retVal = mGroundHeight; + f32 gnd_height = mGroundHeight; if (mpPath1 != NULL) { - cXyz pointPos1; - cXyz pointPos2; + cXyz nextPntPos; + cXyz prevPntPos; cXyz cStack_140; - pointPos1 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; + nextPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; - int pointIdx2 = (int)mPathIdx - (int)mPathIdxOffset; - if (pointIdx2 >= mpPath1->m_num || pointIdx2 < 0) { - pointIdx2 = mPathIdx; + int prevPntNo = (int)mPathCurrentPointNo - (int)mPathStep; + if (prevPntNo >= mpPath1->m_num || prevPntNo < 0) { + prevPntNo = mPathCurrentPointNo; } - pointPos2 = dPath_GetPnt(mpPath1, pointIdx2)->m_position; + prevPntPos = dPath_GetPnt(mpPath1, prevPntNo)->m_position; - s16 targetAngleY = cLib_targetAngleY(&pointPos2, &pointPos1); + s16 pntAngle = cLib_targetAngleY(&prevPntPos, &nextPntPos); - mDoMtx_stack_c::YrotS(-targetAngleY); + mDoMtx_stack_c::YrotS(-pntAngle); mDoMtx_stack_c::transM(-i_pos.x, -i_pos.y, -i_pos.z); - mDoMtx_stack_c::multVec(&pointPos2, &cStack_140); + mDoMtx_stack_c::multVec(&prevPntPos, &cStack_140); f32 var_f29 = -cStack_140.z; if (var_f29 < 0.0f) { var_f29 = 0.0f; } - mDoMtx_stack_c::YrotS(-targetAngleY); + mDoMtx_stack_c::YrotS(-pntAngle); mDoMtx_stack_c::transM(-i_pos.x, -i_pos.y, -i_pos.z); - mDoMtx_stack_c::multVec(&pointPos1, &cStack_140); + mDoMtx_stack_c::multVec(&nextPntPos, &cStack_140); f32 var_f28 = cStack_140.z; if (var_f28 < 0.0f) { @@ -313,12 +315,12 @@ f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) { } f32 var_f27 = var_f29 / (var_f29 + var_f28); - retVal = pointPos1.y * var_f27 + pointPos2.y * (1.0f - var_f27); + gnd_height = nextPntPos.y * var_f27 + prevPntPos.y * (1.0f - var_f27); if (o_step != NULL) { - f32 pointLatDist = pointPos1.absXZ(pointPos2); - f32 pointVertDist = std::abs(pointPos1.y - pointPos2.y); - *o_step = pointVertDist * l_HIO.mFlightSpeed / pointLatDist + 5.0f; + f32 pntDistXZ = nextPntPos.absXZ(prevPntPos); + f32 pntDistY = std::abs(nextPntPos.y - prevPntPos.y); + *o_step = pntDistY * l_HIO.mFlightSpeed / pntDistXZ + 5.0f; } } @@ -327,19 +329,20 @@ f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) { dBgS_GndChk gndChk; cXyz gndChkPos(i_pos.x, i_pos.y + 500.0f, i_pos.z); gndChk.SetPos(&gndChkPos); - field_0x700 = dComIfG_Bgsp().GroundCross(&gndChk); + mGroundFlyHeight = dComIfG_Bgsp().GroundCross(&gndChk); - field_0x738 = 0; + mGndSpecialCode = 0; - if (field_0x700 != -G_CM3D_F_INF) { - field_0x738 = dComIfG_Bgsp().GetSpecialCode(gndChk); - field_0x700 += l_HIO.mFlightGroundAltitude; - if (retVal < field_0x700) { - retVal = field_0x700; - if (current.pos.y < retVal) { + if (mGroundFlyHeight != -G_CM3D_F_INF) { + mGndSpecialCode = dComIfG_Bgsp().GetSpecialCode(gndChk); + + mGroundFlyHeight += l_HIO.mFlightGroundAltitude; + if (gnd_height < mGroundFlyHeight) { + gnd_height = mGroundFlyHeight; + if (current.pos.y < gnd_height) { mGroundHeight = current.pos.y; } else { - mGroundHeight = field_0x700; + mGroundHeight = mGroundFlyHeight; } if (o_step != NULL) { @@ -360,15 +363,15 @@ f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) { unkFlag1 = TRUE; } - if (retVal < gndCrossMag) { - field_0x700 = gndCrossMag; - retVal = gndCrossMag; + if (gnd_height < gndCrossMag) { + mGroundFlyHeight = gndCrossMag; + gnd_height = gndCrossMag; field_0x6e0 = 1; if (current.pos.y < gndCrossMag) { mGroundHeight = current.pos.y; } else { - mGroundHeight = field_0x700; + mGroundHeight = mGroundFlyHeight; } if (o_step != NULL) { @@ -382,37 +385,37 @@ f32 daKago_c::checkGroundHeight(cXyz i_pos, f32* o_step) { field_0x6e6 = 1; } } else { - field_0x71c = 0; + mWaterSplashTimer = 0; field_0x6e6 = 0; } - return retVal; + return gnd_height; } -f32 daKago_c::checkRoofHeight(cXyz param_0) { - f32 roofChkYVal = mRoofHeight; +f32 daKago_c::checkRoofHeight(cXyz i_pos) { + f32 roof_height = mRoofHeight; BOOL unkFlag1 = FALSE; field_0x6e5 = 0; dBgS_RoofChk roofChk; - cXyz unkXyz1(param_0.x, param_0.y - 500.0f, param_0.z); - roofChk.SetPos(unkXyz1); + cXyz chkpos(i_pos.x, i_pos.y - 500.0f, i_pos.z); + roofChk.SetPos(chkpos); - roofChkYVal = dComIfG_Bgsp().RoofChk(&roofChk); - if (roofChkYVal != G_CM3D_F_INF) { - roofChkYVal -= l_HIO.mFlightCeilingAltitude; - if (current.pos.y > roofChkYVal) { + roof_height = dComIfG_Bgsp().RoofChk(&roofChk); + if (roof_height != G_CM3D_F_INF) { + roof_height -= l_HIO.mFlightCeilingAltitude; + if (current.pos.y > roof_height) { mRoofHeight = current.pos.y; } else { - mRoofHeight = roofChkYVal; + mRoofHeight = roof_height; } if (dComIfG_Bgsp().GetSpecialCode(roofChk) == 1) { unkFlag1 = TRUE; } - if (std::abs(current.pos.y - roofChkYVal) < 310.0f) { + if (std::abs(current.pos.y - roof_height) < 310.0f) { fopAc_ac_c* actor = dComIfG_Bgsp().GetActorPointer(roofChk); if (actor != NULL && fopAcM_GetName(actor) == PROC_Obj_RIVERROCK) { if (((daObjRIVERROCK_c*)actor)->mBreakSubAction == daObjRIVERROCK_c::BREAK_MOVE) { @@ -432,7 +435,7 @@ f32 daKago_c::checkRoofHeight(cXyz param_0) { field_0x6e3 = 0; } - return roofChkYVal; + return roof_height; } void daKago_c::checkMoveHeight() { @@ -444,58 +447,61 @@ void daKago_c::checkMoveHeight() { void daKago_c::checkSizeBg() { dBgS_LinChk linChk; - cXyz unkXyz1; - cXyz unkXyz2; + cXyz line_start; + cXyz line_end; cM3dGPla plane; - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); field_0x6d9 = 0; - if (mCurrentAction == 4) { + if (mAction == ACTION_WAIT_e) { return; } - mDoMtx_stack_c::copy(model->getAnmMtx(10)); - mDoMtx_stack_c::multVecZero(&unkXyz1); - mDoMtx_stack_c::copy(model->getAnmMtx(14)); - mDoMtx_stack_c::multVecZero(&unkXyz2); - unkXyz2 = unkXyz1 + (unkXyz2 - unkXyz1) * 0.9f; - linChk.Set(&unkXyz1, &unkXyz2, NULL); + mDoMtx_stack_c::copy(model->getAnmMtx(YC_JNT_SHOULDERL_1_e)); + mDoMtx_stack_c::multVecZero(&line_start); + mDoMtx_stack_c::copy(model->getAnmMtx(YC_JNT_HANDL_3_e)); + mDoMtx_stack_c::multVecZero(&line_end); + line_end = line_start + (line_end - line_start) * 0.9f; + linChk.Set(&line_start, &line_end, NULL); + if (dComIfG_Bgsp().LineCross(&linChk)) { dComIfG_Bgsp().GetTriPla(linChk, &plane); if (dComIfG_Bgsp().GetSpecialCode(linChk) == 1) { field_0x6d9 |= (u8)1; - field_0x650[0] = linChk.GetCross(); + mWallHitEffPos[0] = linChk.GetCross(); } } - mDoMtx_stack_c::copy(model->getAnmMtx(15)); - mDoMtx_stack_c::multVecZero(&unkXyz1); - mDoMtx_stack_c::copy(model->getAnmMtx(19)); - mDoMtx_stack_c::multVecZero(&unkXyz2); - unkXyz2 = (unkXyz1 + (unkXyz2 - unkXyz1) * 0.9f); - linChk.Set(&unkXyz1, &unkXyz2, NULL); + mDoMtx_stack_c::copy(model->getAnmMtx(YC_JNT_SHOULDERR_1_e)); + mDoMtx_stack_c::multVecZero(&line_start); + mDoMtx_stack_c::copy(model->getAnmMtx(YC_JNT_HANDR_3_e)); + mDoMtx_stack_c::multVecZero(&line_end); + line_end = (line_start + (line_end - line_start) * 0.9f); + linChk.Set(&line_start, &line_end, NULL); + if (dComIfG_Bgsp().LineCross(&linChk)) { dComIfG_Bgsp().GetTriPla(linChk, &plane); if (dComIfG_Bgsp().GetSpecialCode(linChk) == 1) { field_0x6d9 |= (u8)0x2; - field_0x650[1] = linChk.GetCross(); + mWallHitEffPos[1] = linChk.GetCross(); } } - unkXyz1 = current.pos; - mDoMtx_stack_c::copy(model->getAnmMtx(1)); - mDoMtx_stack_c::multVecZero(&unkXyz1); + line_start = current.pos; + mDoMtx_stack_c::copy(model->getAnmMtx(YC_JNT_BACKBONE1_e)); + mDoMtx_stack_c::multVecZero(&line_start); mDoMtx_stack_c::transM(300.0f, 0.0f, 0.0f); - mDoMtx_stack_c::multVecZero(&unkXyz2); - linChk.Set(&unkXyz1, &unkXyz2, NULL); + mDoMtx_stack_c::multVecZero(&line_end); + linChk.Set(&line_start, &line_end, NULL); + if (dComIfG_Bgsp().LineCross(&linChk)) { dComIfG_Bgsp().GetTriPla(linChk, &plane); if (dComIfG_Bgsp().GetSpecialCode(linChk) == 1) { if (!checkYaguraPos(linChk.GetCross())) { field_0x6d9 |= (u8)4; - this->field_0x650[2] = linChk.GetCross(); + mWallHitEffPos[2] = linChk.GetCross(); } } } @@ -505,12 +511,12 @@ s16 daKago_c::getBeforeGroundHeight(u8 param_0) { return 0; } -void daKago_c::demo_skip(int param_0) { +void daKago_c::demo_skip(int i_parameter) { dCamera_c* camera = dCam_getBody(); - switch (param_0) { + switch (i_parameter) { case 0: - field_0x748 = 2; + mDemoMode = 2; field_0x74c = 0; break; case 1: @@ -521,10 +527,10 @@ void daKago_c::demo_skip(int param_0) { case 2: setMidnaRideOn(); setPlayerRideOn(); - field_0x718 = field_0x71a = 0; + mHeadRotZ = mHeadRotY = 0; /* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete (Horse grass appears in various places) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[84]); - field_0x748 = 7; + mDemoMode = 7; field_0x74c = 0; break; case 4: @@ -534,10 +540,10 @@ void daKago_c::demo_skip(int param_0) { case 5: case 6: if (setSceneChange(3)) { - if (param_0 == 5) { - field_0x748 = 6; + if (i_parameter == 5) { + mDemoMode = 6; } else { - field_0x748 = 5; + mDemoMode = 5; field_0x6cc = 1.0f; } } @@ -545,14 +551,14 @@ void daKago_c::demo_skip(int param_0) { case 7: setRideOff(); case 8: { - field_0x68c.set(-77875.0f, -18287.0f, 42000.0f); - field_0x698.set(-77275.0f, -18500.0f, 41090.0f); + mDemoCamCenter.set(-77875.0f, -18287.0f, 42000.0f); + mDemoCamEye.set(-77275.0f, -18500.0f, 41090.0f); field_0x6a4.set(-77615.0f, -18640.0f, 41400.0f); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&field_0x6a4, 0, 0); field_0x6de = 0; speed.y = speedF = 0.0f; - setActionMode(4, 0); - camera->Set(field_0x68c, field_0x698, 70.0f, 0); + setActionMode(ACTION_WAIT_e, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, 70.0f, 0); camera->Reset(); camera->Start(); camera->SetTrimSize(0); @@ -563,14 +569,14 @@ void daKago_c::demo_skip(int param_0) { case 9: setRideOff(); case 10: - field_0x68c.set(3703.0f, 337.0f, 863.0f); - field_0x698.set(3726.0f, 272.0f, 1196.0f); + mDemoCamCenter.set(3703.0f, 337.0f, 863.0f); + mDemoCamEye.set(3726.0f, 272.0f, 1196.0f); field_0x6a4.set(3782.0f, 222.0f, 690.0f); daPy_getPlayerActorClass()->setPlayerPosAndAngle(&field_0x6a4, 0, 0); field_0x6de = 0; speed.y = speedF = 0.0f; - setActionMode(4, 0); - camera->Set(field_0x68c, field_0x698, 70.0f, 0); + setActionMode(ACTION_WAIT_e, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, 70.0f, 0); camera->Reset(); camera->Start(); camera->SetTrimSize(0); @@ -579,27 +585,28 @@ void daKago_c::demo_skip(int param_0) { } } -int daKago_c::DemoSkipCallBack(void* param_0, int param_1) { - if (param_0 != NULL) { - ((daKago_c*)param_0)->demo_skip(param_1); - return 1; +int daKago_c::DemoSkipCallBack(void* i_this, int i_parameter) { + if (i_this != NULL) { + ((daKago_c*)i_this)->demo_skip(i_parameter); + return TRUE; } - return 0; + + return FALSE; } -void daKago_c::setActionMode(int param_0, int param_1) { +void daKago_c::setActionMode(int i_action, int i_mode) { mIsFlying = false; - mCurrentAction = param_0; - field_0x744 = param_1; + mAction = i_action; + mMode = i_mode; } void daKago_c::setMidnaTagPos() { - cXyz unkXyz1; + cXyz tagPos; daMidna_c* midna = daPy_getPlayerActorClass()->getMidnaActor(); if (midna != NULL) { mDoMtx_stack_c::copy(getMidnaLocaterMtx()); - mDoMtx_stack_c::multVecZero(&unkXyz1); - midna->onTagWaitPos(&unkXyz1); + mDoMtx_stack_c::multVecZero(&tagPos); + midna->onTagWaitPos(&tagPos); } } @@ -621,6 +628,7 @@ void daKago_c::setRideOff() { midna->offTagWaitPos(); midna->offCargoActor(); } + daPy_getPlayerActorClass()->offCargoCarry(); } @@ -628,78 +636,75 @@ s8 daKago_c::searchNearPassPoint() { cXyz pointPos; cXyz playerPos(daPy_getPlayerActorClass()->current.pos); - f32 unkFloat1; - f32 unkFloat2 = unkFloat1 = 100000.0f; - int pointIdx1; - for (int i = 0; i < mpPath1->m_num; i++) { - pointPos = dPath_GetPnt(mpPath1,i)->m_position; + f32 prev_nearest_distXZ, nearest_distXZ; + nearest_distXZ = prev_nearest_distXZ = 100000.0f; + int nearest_point_no; - f32 playerLatDist = playerPos.absXZ(pointPos); - if (playerLatDist < unkFloat2) { - unkFloat1 = unkFloat2; - unkFloat2 = playerLatDist; - pointIdx1 = i; - } else if (playerLatDist < unkFloat1) { - unkFloat1 = playerLatDist; + for (int i = 0; i < mpPath1->m_num; i++) { + pointPos = dPath_GetPnt(mpPath1, i)->m_position; + + f32 player_pnt_distXZ = playerPos.absXZ(pointPos); + if (player_pnt_distXZ < nearest_distXZ) { + prev_nearest_distXZ = nearest_distXZ; + nearest_distXZ = player_pnt_distXZ; + nearest_point_no = i; + } else if (player_pnt_distXZ < prev_nearest_distXZ) { + prev_nearest_distXZ = player_pnt_distXZ; } } - int pointIdx2 = pointIdx1 + mPathIdxOffset; - if (pointIdx2 < 0) { - pointIdx2 = 1; - } else if (pointIdx2 >= mpPath1->m_num) { - pointIdx2 = mpPath1->m_num - 1; + int next_point_no = nearest_point_no + mPathStep; + if (next_point_no < 0) { + next_point_no = 1; + } else if (next_point_no >= mpPath1->m_num) { + next_point_no = mpPath1->m_num - 1; } - return pointIdx2; + return next_point_no; } -int daKago_c::setSceneChange(int param_0) { - int unkInt1 = 0; - switch (param_0) { - case 0: - if (field_0x6e7 == 0) { - unkInt1 = 1; - } else { - unkInt1 = 6; - } +int daKago_c::setSceneChange(int i_mode) { + int exitID = 0; + switch (i_mode) { + case 0: + if (mType == TYPE_TWILIGHT) { + exitID = 1; + } else { + exitID = 6; + } break; case 1: - unkInt1 = 0; - + exitID = 0; endBalloonScore(); - break; case 2: - if (field_0x6e7 == 0) { - unkInt1 = 3; + if (mType == TYPE_TWILIGHT) { + exitID = 3; } else { - unkInt1 = 0; + exitID = 0; } endBalloonScore(); - break; case 3: - unkInt1 = 3; - + exitID = 3; break; } - return dStage_changeScene(unkInt1, 0.0f, 10, fopAcM_GetRoomNo(this), 0, -1); + return dStage_changeScene(exitID, 0.0f, 10, fopAcM_GetRoomNo(this), 0, -1); } void daKago_c::createBalloonScore() { - if (field_0x6e7 != 0 && mBalloon2DId == fpcM_ERROR_PROCESS_ID_e) { - mBalloon2DId = fopAcM_create(PROC_BALLOON2D, 0, 0, 0xffffffff, 0, 0, -1); + if (mType != TYPE_TWILIGHT && mBalloon2DId == fpcM_ERROR_PROCESS_ID_e) { + mBalloon2DId = fopAcM_create(PROC_BALLOON2D, 0, NULL, -1, NULL, NULL, -1); field_0x6e9 = 1; } } void daKago_c::startBalloonScore() { fopAc_ac_c* balloon_actor; - if (field_0x6e7 != 0 && field_0x6e9 == 1) { + if (mType != TYPE_TWILIGHT && field_0x6e9 == 1) { fopAcM_SearchByID(mBalloon2DId, &balloon_actor); if (balloon_actor != NULL) { ((daBalloon2D_c*)balloon_actor)->show(); @@ -711,9 +716,9 @@ void daKago_c::startBalloonScore() { void daKago_c::endBalloonScore() { fopAc_ac_c* balloon2D; - fopAc_ac_c *balloonObj; + fopAc_ac_c* balloonObj; - if (field_0x6e7 != 0) { + if (mType != TYPE_TWILIGHT) { fopAcM_SearchByID(mBalloon2DId, &balloon2D); if (balloon2D != NULL) { ((daBalloon2D_c*)balloon2D)->hide(); @@ -726,11 +731,11 @@ void daKago_c::endBalloonScore() { } } -f32 daKago_c::checkNextPath(cXyz param_0) { +f32 daKago_c::checkNextPath(cXyz i_pntPos) { cXyz cStack_14; mDoMtx_stack_c::YrotS(-field_0x714); mDoMtx_stack_c::transM(-current.pos.x, -current.pos.y, -current.pos.z); - mDoMtx_stack_c::multVec(¶m_0, &cStack_14); + mDoMtx_stack_c::multVec(&i_pntPos, &cStack_14); return cStack_14.z; } @@ -745,10 +750,11 @@ void daKago_c::checkHeight() { bool daKago_c::checkYaguraPos(cXyz param_0) { cXyz local_18(-22984.0f, 0.0f, 7455.0f); cXyz cStack_24; - s16 temp = -0x770; - mDoMtx_stack_c::YrotS(-temp); + s16 rot_y = -0x770; + mDoMtx_stack_c::YrotS(-rot_y); mDoMtx_stack_c::transM(-local_18.x, -local_18.y, -local_18.z); mDoMtx_stack_c::multVec(¶m_0, &cStack_24); + if (std::abs(cStack_24.z) < 700.0f) { return true; } else { @@ -758,12 +764,12 @@ bool daKago_c::checkYaguraPos(cXyz param_0) { bool daKago_c::checkWallHitFall(int param_0) { if (field_0x6e5 != 0) { - cXyz unkXyz1; - setActionMode(1, 3); - dComIfGp_getVibration().StartShock(8, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); - unkXyz1 = current.pos; - unkXyz1.y += 200.0f; - setWallHitEffect(unkXyz1, 0); + cXyz effpos; + setActionMode(ACTION_STAGGER_e, 3); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); + effpos = current.pos; + effpos.y += 200.0f; + setWallHitEffect(effpos, 0); return true; } @@ -773,37 +779,37 @@ bool daKago_c::checkWallHitFall(int param_0) { if (!checkYaguraPos(current.pos)) { if (abs(unkInt1) > 0x7000) { field_0x6d9 |= (u8)0x4; - field_0x650[2].set(current.pos.x + cM_ssin(shape_angle.y) * 200.0f, current.pos.y, current.pos.z + cM_scos(shape_angle.y) * 200.0f); + mWallHitEffPos[2].set(current.pos.x + cM_ssin(shape_angle.y) * 200.0f, current.pos.y, current.pos.z + cM_scos(shape_angle.y) * 200.0f); } } if (unkInt1 > 0) { field_0x6d9 |= (u8)0x1; - field_0x650[0].set(current.pos.x + cM_ssin(shape_angle.y + 0x4000) * 200.0f, current.pos.y, - current.pos.z + cM_scos(shape_angle.y + 0x4000) * 200.0f); + mWallHitEffPos[0].set(current.pos.x + cM_ssin(shape_angle.y + 0x4000) * 200.0f, current.pos.y, + current.pos.z + cM_scos(shape_angle.y + 0x4000) * 200.0f); } else { field_0x6d9 |= (u8)0x2; - field_0x650[1].set(current.pos.x + cM_ssin(shape_angle.y + -0x4000) * 200.0f, - current.pos.y, - current.pos.z + cM_scos(shape_angle.y + -0x4000) * 200.0f); + mWallHitEffPos[1].set(current.pos.x + cM_ssin(shape_angle.y + -0x4000) * 200.0f, + current.pos.y, + current.pos.z + cM_scos(shape_angle.y + -0x4000) * 200.0f); } } if ((field_0x6d9 & 0x4) != 0) { - setActionMode(1, 0); - dComIfGp_getVibration().StartShock(8, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); - setWallHitEffect(field_0x650[2], 0); + setActionMode(ACTION_STAGGER_e, 0); + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER8, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); + setWallHitEffect(mWallHitEffPos[2], 0); return true; } - if (param_0 != 0 && field_0x720 == 0 && (field_0x6d9 & 0x3) != 0) { - dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); + if (param_0 != 0 && mWallHitInvulnTimer == 0 && (field_0x6d9 & 0x3) != 0) { + dComIfGp_getVibration().StartShock(VIBMODE_S_POWER2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); if ((field_0x6d9 & 0x1) != 0) { - setActionMode(1, 1); - setWallHitEffect(field_0x650[0], 1); + setActionMode(ACTION_STAGGER_e, 1); + setWallHitEffect(mWallHitEffPos[0], 1); } else { - setActionMode(1, 2); - setWallHitEffect(field_0x650[1], 1); + setActionMode(ACTION_STAGGER_e, 2); + setWallHitEffect(mWallHitEffPos[1], 1); } return true; } @@ -816,8 +822,8 @@ bool daKago_c::checkAttackStart() { return false; } - if (mDoCPd_c::getTrigA(0)) { - setActionMode(5, 0); + if (mDoCPd_c::getTrigA(PAD_1)) { + setActionMode(ACTION_ATTACK_e, 0); mIsFlying = true; return true; } else { @@ -825,11 +831,9 @@ bool daKago_c::checkAttackStart() { } } -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - s16 daKago_c::getValueY(f32 param_0) { - s16 valueY = field_0x6f4 * param_0; + s16 valueY = mStickY * param_0; + f32 var_f31; if (valueY < 0) { if (current.pos.y > mRoofHeight - 200.0f) { @@ -853,11 +857,11 @@ s16 daKago_c::getValueY(f32 param_0) { } s16 daKago_c::getValueX(f32 param_0) { - return -field_0x6f0 * param_0; + return -mStickX * param_0; } s16 daKago_c::getValueAbsX(f32 param_0) { - return std::abs(-field_0x6f0 * param_0); + return std::abs(-mStickX * param_0); } void daKago_c::flySpeedCalcLockOn() { @@ -873,31 +877,31 @@ void daKago_c::flySpeedCalcLockOn() { cLib_addCalcAngleS(¤t.angle.x, angleX, 8, 0x100, 0x10); shape_angle.x = current.angle.x; - s16 angleX2 = current.angle.y; + + s16 prevAngleY = current.angle.y; cLib_addCalcAngleS(¤t.angle.y, angleY, 8, 0x100, 0x10); shape_angle.y = current.angle.y; - cLib_addCalcAngleS(&shape_angle.z, ((angleX2 - current.angle.y) * 0x20), 8, 0x400, 0x10); + cLib_addCalcAngleS(&shape_angle.z, ((prevAngleY - current.angle.y) * 0x20), 8, 0x400, 0x10); if (shape_angle.z > 0x3000) { shape_angle.z = 0x3000; } - if (shape_angle.z < -0x3000) { shape_angle.z = -0x3000; } } -void daKago_c::flySpeedCalc(s16 param_0, int param_1) { +void daKago_c::flySpeedCalc(s16 param_0, int i_calcType) { s16 var_r29; s16 var_r28; s16 var_r27; s16 sp_8; - if (param_1 == 0) { + if (i_calcType == 0) { sp_8 = 0x2000; - } else if (param_1 == 1) { + } else if (i_calcType == 1) { sp_8 = 0x1000; - } else if (param_1 == 2) { + } else if (i_calcType == 2) { sp_8 = 0x2aaa; } @@ -910,7 +914,7 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { field_0x710 += getValueY(40.0f); var_r29 = 0x200; - if (param_1 == 2) { + if (i_calcType == 2) { var_r29 = 0x400; } if (field_0x710 > var_r29) { @@ -920,7 +924,7 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { field_0x710 = -var_r29; } - if (field_0x6f4 > 0.0f) { + if (mStickY > 0.0f) { if (current.angle.x < var_r28) { current.angle.x += field_0x710; } else { @@ -952,6 +956,7 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { } current.angle.x += field_0x710; } + if (current.angle.x > 0x2aaa) { current.angle.x = 0x2aaa; } @@ -961,28 +966,28 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { shape_angle.x = current.angle.x; var_r27 = 0x2000; - if (param_1 == 1) { + if (i_calcType == 1) { var_r27 = 0x1000; - } else if (param_1 == 2) { + } else if (i_calcType == 2) { var_r27 = 0x2aaa; } f32 unkFloat1 = 20.0f; var_r29 = 0x100; - if (param_1 == 2) { + if (i_calcType == 2) { unkFloat1 = 30.0f; var_r29 = 0x200; } var_r28 = param_0 + getValueX(var_r27); if (mpLockActor != NULL) { - var_r28 = cLib_targetAngleY((Vec*)¤t, (Vec*)&mpLockActor->current); + var_r28 = cLib_targetAngleY(¤t.pos, &mpLockActor->current.pos); } int always_zero = 0; if (!always_zero) { if (abs((s16)(current.angle.y - param_0)) < var_r27) { - if (field_0x6f0) { + if (mStickX) { field_0x712 += getValueX(unkFloat1); if (field_0x712 > getValueAbsX(var_r29)) { field_0x712 = getValueAbsX(var_r29); @@ -993,18 +998,20 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { } else { cLib_addCalcAngleS(&field_0x712, 0, 8, 0x20, 0x10); } + current.angle.y += field_0x712; } else { int sp_14 = 0; - if (field_0x6f0 < 0.0f) { + if (mStickX < 0.0f) { if ((s16)(current.angle.y - param_0) < var_r27) { sp_14 = 1; } } else { - if (field_0x6f0 > 0.0f && (s16)(current.angle.y - param_0) > var_r27) { + if (mStickX > 0.0f && (s16)(current.angle.y - param_0) > var_r27) { sp_14 = 1; } } + if (sp_14 != 0) { field_0x712 += getValueX(unkFloat1); if (field_0x712 > getValueAbsX(var_r29)) { @@ -1020,7 +1027,9 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { } } } + shape_angle.y = current.angle.y; + cLib_addCalcAngleS(&shape_angle.z, -field_0x712 * 0x20, 8, 0x400, 0x10); if (shape_angle.z > 0x3000) { shape_angle.z = 0x3000; @@ -1031,7 +1040,7 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { if (field_0x6e3 == 1) { field_0x6e3 = 2; - if (field_0x6e7 == 1) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -1040,58 +1049,60 @@ void daKago_c::flySpeedCalc(s16 param_0, int param_1) { if (field_0x6e6 == 1) { field_0x6e6 = 2; - if (mCurrentAction == 5) { - field_0x71c = l_HIO.mSplashGenTimeDuringDash; + if (mAction == ACTION_ATTACK_e) { + mWaterSplashTimer = l_HIO.mSplashGenTimeDuringDash; } else { - field_0x71c = l_HIO.mWaterSplashTime; + mWaterSplashTimer = l_HIO.mWaterSplashTime; } } } bool daKago_c::checkFlySceneChange() { - if ((mPathIdxOffset > 0 && mPathIdx >= mpPath1->m_num - 1 || - mPathIdxOffset < 0 && mPathIdx < 1) && - field_0x73c == 1 && fopOvlpM_IsPeek() == 0) + if (((mPathStep > 0 && mPathCurrentPointNo >= mpPath1->m_num - 1) || (mPathStep < 0 && mPathCurrentPointNo < 1)) + && mSceneType == SCENE_TYPE_RIVER + && !fopOvlpM_IsPeek()) { - setActionMode(0, 4); + setActionMode(ACTION_FLY_e, 4); field_0x728 = 300; - if (checkBck(9) == 0) { - setBck(9, 2, 10.0f, 1.0f); + if (!checkBck(dRes_ID_E_YC_BCK_YC_FLY_e)) { + setBck(dRes_ID_E_YC_BCK_YC_FLY_e, 2, 10.0f, 1.0f); } - if (mPathIdxOffset > 0) { + if (mPathStep > 0) { setSceneChange(1); } else { setSceneChange(2); } return true; - } else { - return false; } + + return false; } void daKago_c::setFlyAway() { current.angle.y = shape_angle.y; - setActionMode(0, 3); + setActionMode(ACTION_FLY_e, 3); field_0x728 = 90; - if (!checkBck(9)) { - setBck(9, 2, 10.0f, 1.0f); + + if (!checkBck(dRes_ID_E_YC_BCK_YC_FLY_e)) { + setBck(dRes_ID_E_YC_BCK_YC_FLY_e, 2, 10.0f, 1.0f); } + dComIfGp_getVibration().StopQuake(0x1f); } void daKago_c::setFlyAnime() { if (cM_rnd() < 0.5) { - if (checkBck(15) == 0) { - setBck(15, 2, 10.0f, 1.0f); + if (!checkBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e)) { + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); } else { - setBck(13, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e, 2, 10.0f, 1.0f); } } else { - if (!checkBck(13)) { - setBck(13, 2, 10.0f, 1.0f); + if (!checkBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e)) { + setBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e, 2, 10.0f, 1.0f); } } @@ -1099,23 +1110,24 @@ void daKago_c::setFlyAnime() { } void daKago_c::executeFly() { - s16 unkInt1; - s16 unkInt2; - f32 unkFloat1; - cXyz unkXyz1; - cXyz unkXyz2; + s16 pntAngleY; + s16 pntAngleX; + f32 targetFlySpeed; + cXyz nextPntPos; + cXyz prevPntPos; cXyz unkXyz3; startBalloonScore(); - if (field_0x744 < 3) { + if (mMode < 3) { if (mDashCooldownTime == 0) { - dComIfGp_setDoStatusForce(0x4b, 0); + dComIfGp_setDoStatusForce(BUTTON_STATUS_UNK_75, 0); } - if (field_0x6e7 == 1) { - dComIfGp_setAStatusForce(0x2a, 0); + + if (mType == TYPE_NORMAL) { + dComIfGp_setAStatusForce(BUTTON_STATUS_QUIT, 0); } else { - dComIfGp_setAStatusForce(0x27, 0); + dComIfGp_setAStatusForce(BUTTON_STATUS_UNK_39, 0); } } @@ -1126,7 +1138,7 @@ void daKago_c::executeFly() { checkHeight(); mIsFlying = true; - switch (field_0x744) { + switch (mMode) { case 0: shape_angle.y = current.angle.y; mGroundHeight = checkGroundHeight(current.pos, NULL); @@ -1135,27 +1147,29 @@ void daKago_c::executeFly() { case 1: setFlyAnime(); field_0x710 = field_0x712 = 0; - field_0x744 = 2; + mMode = 2; break; case 2: - unkXyz1 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; - unkXyz2 = dPath_GetPnt(mpPath1, mPathIdx - mPathIdxOffset)->m_position; - unkInt1 = cLib_targetAngleY(&unkXyz2, &unkXyz1); - field_0x714 = unkInt1; - flySpeedCalc(unkInt1, 0); - if (checkBck(11)) { - if (mpMorf->isStop()) { + nextPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; + prevPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo - mPathStep)->m_position; + pntAngleY = cLib_targetAngleY(&prevPntPos, &nextPntPos); + field_0x714 = pntAngleY; + + flySpeedCalc(pntAngleY, 0); + + if (checkBck(dRes_ID_E_YC_BCK_YC_FLY_DASH_WL_e)) { + if (mAnm_p->isStop()) { setFlyAnime(); } } else { if (field_0x710 < 0) { - if (!checkBck(15)) { - setBck(15, 2, 10.0f, 1.0f); + if (!checkBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e)) { + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); } field_0x728 = 10; } else if (field_0x710 > 0) { - if (!checkBck(13)) { - setBck(13, 2, 10.0f, 1.0f); + if (!checkBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e)) { + setBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e, 2, 10.0f, 1.0f); } field_0x728 = 90; } else { @@ -1164,22 +1178,26 @@ void daKago_c::executeFly() { } } } + if (cM_ssin(current.angle.x) > 0.0f) { - unkFloat1 = l_HIO.mFlightSpeed + l_HIO.mDescentRateIncrement * cM_ssin(current.angle.x); + targetFlySpeed = l_HIO.mFlightSpeed + l_HIO.mDescentRateIncrement * cM_ssin(current.angle.x); } else { - unkFloat1 = l_HIO.mFlightSpeed + l_HIO.mAscentRateDecel * cM_ssin(current.angle.x); + targetFlySpeed = l_HIO.mFlightSpeed + l_HIO.mAscentRateDecel * cM_ssin(current.angle.x); } - if (std::abs(field_0x6f8 - unkFloat1) > 10.0f) { - cLib_chaseF(&field_0x6f8, unkFloat1, 2.0f); + + if (std::abs(mFlySpeed - targetFlySpeed) > 10.0f) { + cLib_chaseF(&mFlySpeed, targetFlySpeed, 2.0f); } else { - cLib_chaseF(&field_0x6f8, unkFloat1, 1.0f); + cLib_chaseF(&mFlySpeed, targetFlySpeed, 1.0f); } - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - unkXyz3.z = checkNextPath(unkXyz1); + + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); + + unkXyz3.z = checkNextPath(nextPntPos); if (unkXyz3.z < 0.0f) { - if (abs((s16)(unkInt1 - cLib_targetAngleY(&unkXyz2, ¤t.pos))) < 0x4000) { - mPathIdx += mPathIdxOffset; + if (abs((s16)(pntAngleY - cLib_targetAngleY(&prevPntPos, ¤t.pos))) < 0x4000) { + mPathCurrentPointNo += mPathStep; if (checkFlySceneChange()) { return; } @@ -1188,35 +1206,40 @@ void daKago_c::executeFly() { break; case 3: case 4: - if (mPathIdx >= mpPath1->m_num) { - unkInt1 = current.angle.y; - unkInt2 = 0; + if (mPathCurrentPointNo >= mpPath1->m_num) { + pntAngleY = current.angle.y; + pntAngleX = 0; } else { - unkXyz1 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; - unkXyz2 = dPath_GetPnt(mpPath1, mPathIdx - mPathIdxOffset)->m_position; - unkInt1 = cLib_targetAngleY(&unkXyz2, &unkXyz1); - unkInt2 = -cLib_targetAngleX(&unkXyz2, &unkXyz1); + nextPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; + prevPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo - mPathStep)->m_position; + pntAngleY = cLib_targetAngleY(&prevPntPos, &nextPntPos); + pntAngleX = -cLib_targetAngleX(&prevPntPos, &nextPntPos); } - if (field_0x744 == 3) { + + if (mMode == 3) { cLib_chaseUC(&field_0x6de, 0, 4); - cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x10); + cLib_addCalcAngleS(¤t.angle.x, -0x2000, 8, 0x100, 0x10); } else { - cLib_addCalcAngleS(¤t.angle.x, unkInt2, 8, 0x100, 0x10); + cLib_addCalcAngleS(¤t.angle.x, pntAngleX, 8, 0x100, 0x10); } + shape_angle.x = current.angle.x; - cLib_addCalcAngleS(¤t.angle.y, unkInt1, 8, 0x400, 0x10); + cLib_addCalcAngleS(¤t.angle.y, pntAngleY, 8, 0x400, 0x10); shape_angle.y = current.angle.y; cLib_addCalcAngleS(&shape_angle.z, 0, 8, 0x400, 0x10); - unkFloat1 = l_HIO.mFlightSpeed + 20.0f; - if (std::abs(field_0x6f8 - unkFloat1) > 10.0f) { - cLib_chaseF(&field_0x6f8, unkFloat1, 2.0f); + targetFlySpeed = l_HIO.mFlightSpeed + 20.0f; + + if (std::abs(mFlySpeed - targetFlySpeed) > 10.0f) { + cLib_chaseF(&mFlySpeed, targetFlySpeed, 2.0f); } else { - cLib_chaseF(&field_0x6f8, unkFloat1, 1.0f); + cLib_chaseF(&mFlySpeed, targetFlySpeed, 1.0f); } - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); + if (field_0x728 == 0) { - setActionMode(4, 0); + setActionMode(ACTION_WAIT_e, 0); } return; } @@ -1229,31 +1252,31 @@ void daKago_c::executeFly() { void daKago_c::executeStagger() { dCamera_c* camera = dCam_getBody(); - cXyz cStack_94 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; - cXyz cStack_a0 = dPath_GetPnt(mpPath1, mPathIdx - mPathIdxOffset)->m_position; + cXyz nextPntPos = (Vec)dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; + cXyz prevPntPos = (Vec)dPath_GetPnt(mpPath1, mPathCurrentPointNo - mPathStep)->m_position; - field_0x714 = cLib_targetAngleY(&cStack_a0, &cStack_94); + field_0x714 = cLib_targetAngleY(&prevPntPos, &nextPntPos); - if (field_0x6e7 == 1) { - dComIfGp_setAStatusForce(0x2a, 0); + if (mType == TYPE_NORMAL) { + dComIfGp_setAStatusForce(BUTTON_STATUS_QUIT, 0); } else { - dComIfGp_setAStatusForce(0x27, 0); + dComIfGp_setAStatusForce(BUTTON_STATUS_UNK_39, 0); } checkHeight(); mIsFlying = true; - switch (field_0x744) { + switch (mMode) { case 0: mSph.OffAtSetBit(); - daPy_getPlayerActorClass()->setPlayerDamage(0, 1); + daPy_getPlayerActorClass()->setPlayerDamage(0, TRUE); - mDoMtx_stack_c::copy(mpMorf->getModel()->getAnmMtx(6)); + mDoMtx_stack_c::copy(mAnm_p->getModel()->getAnmMtx(YC_JNT_HEAD_e)); mDoMtx_stack_c::multVecZero(&field_0x674); - if (field_0x6e7 == 0) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSound(Z2SE_EN_YC_CRASH, 0, -1); mSound.startCreatureVoice(Z2SE_EN_YC_V_HANGED, -1); } else { @@ -1261,12 +1284,12 @@ void daKago_c::executeStagger() { mSound.startCreatureVoice(Z2SE_EN_KC_V_CRASH, -1); } - setBck(7, 0, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_CRASH_e, 0, 10.0f, 1.0f); field_0x728 = 60; speedF = 30.0f; - if (current.pos.y < cStack_94.y) { + if (current.pos.y < nextPntPos.y) { speed.y = 30.0f; } else { speed.y = -30.0f; @@ -1274,22 +1297,21 @@ void daKago_c::executeStagger() { current.angle.y = field_0x6da - (s16)(current.angle.y - field_0x6da) + 0x8000; - field_0x744 = 4; - + mMode = 4; break; case 1: case 2: mSph.OffAtSetBit(); - daPy_getPlayerActorClass()->setPlayerDamage(0, 1); + daPy_getPlayerActorClass()->setPlayerDamage(0, TRUE); - setBck(15, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); field_0x728 = 10; - field_0x720 = (int)l_HIO.mWallHitInvulnTime; + mWallHitInvulnTimer = (int)l_HIO.mWallHitInvulnTime; speedF = 40.0f; - if (field_0x744 == 1) { + if (mMode == 1) { shape_angle.z = 0x3000; ANGLE_ADD(current.angle.y, -0x2000); if (abs((s16)(current.angle.y - field_0x714)) > 0x2000) { @@ -1306,18 +1328,17 @@ void daKago_c::executeStagger() { mSound.startCreatureSound(Z2SE_EN_YC_HIT_SIDE, 0, -1); dComIfGp_getVibration().StartQuake(1, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); - field_0x744 = 5; - + mMode = 5; break; case 3: - daPy_getPlayerActorClass()->setPlayerDamage(2, 1); + daPy_getPlayerActorClass()->setPlayerDamage(2, TRUE); mSph.OffAtSetBit(); - mDoMtx_stack_c::copy(mpMorf->getModel()->getAnmMtx(6)); + mDoMtx_stack_c::copy(mAnm_p->getModel()->getAnmMtx(YC_JNT_HEAD_e)); mDoMtx_stack_c::multVecZero(&field_0x674); - if (field_0x6e7 == 0) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSound(Z2SE_EN_YC_CRASH, 0, -1); mSound.startCreatureVoice(Z2SE_EN_YC_V_HANGED, -1); } else { @@ -1325,14 +1346,13 @@ void daKago_c::executeStagger() { mSound.startCreatureVoice(Z2SE_EN_KC_V_CRASH, -1); } - setBck(7, 0, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_CRASH_e, 0, 10.0f, 1.0f); - field_0x728 = 0x3c; + field_0x728 = 60; speedF = 30.0f; speed.y = -50.0f; - field_0x744 = 6; - + mMode = 6; break; case 5: cLib_addCalcAngleS(&shape_angle.y, current.angle.y, 8, 0x400, 0x40); @@ -1351,28 +1371,27 @@ void daKago_c::executeStagger() { } shape_angle.y = current.angle.y; - field_0x6f8 = 40.0f; + mFlySpeed = 40.0f; - setActionMode(0, 1); + setActionMode(ACTION_FLY_e, 1); dComIfGp_getVibration().StopQuake(0x1f); - break; case 4: case 6: - if (checkBck(7)) { - cXyz cStack_ac; + if (checkBck(dRes_ID_E_YC_BCK_YC_CRASH_e)) { + cXyz line_end; mDoMtx_stack_c::copy(mLegR3Mtx); - mDoMtx_stack_c::multVecZero(&cStack_ac); - cStack_ac.y -= 20.0f; + mDoMtx_stack_c::multVecZero(&line_end); + line_end.y -= 20.0f; - cXyz cStack_b8 = current.pos; - cStack_b8.y += 50.0f; + cXyz line_start = current.pos; + line_start.y += 50.0f; - dBgS_LinChk dStack_88; - dStack_88.Set(&cStack_b8, &cStack_ac, NULL); + dBgS_LinChk linechk; + linechk.Set(&line_start, &line_end, NULL); - if (dComIfG_Bgsp().LineCross(&dStack_88)) { + if (dComIfG_Bgsp().LineCross(&linechk)) { current.pos.y += 5.0f; } @@ -1380,13 +1399,13 @@ void daKago_c::executeStagger() { field_0x728 = 60; - if (mpMorf->checkFrame(22.0f)) { + if (mAnm_p->checkFrame(22.0f)) { setRideOff(); - setBck(8, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_CRASH2_e, 2, 10.0f, 1.0f); } } - if (field_0x744 == 4) { + if (mMode == 4) { cLib_addCalcAngleS(&shape_angle.y, current.angle.y + 0x8000, 8, 0x100, 0x10); } else { cLib_addCalcAngleS(&shape_angle.y, current.angle.y, 8, 0x100, 0x10); @@ -1401,40 +1420,38 @@ void daKago_c::executeStagger() { if (field_0x728 == 0) { setFlyAway(); - field_0x6f8 = -10.0f; + mFlySpeed = -10.0f; } - break; } } void daKago_c::executeWait() { - daPy_py_c* player = (daPy_py_c*)daPy_getPlayerActorClass()->getMidnaActor(); + daMidna_c* midna = daPy_getPlayerActorClass()->getMidnaActor(); if (field_0x728 == 0) { cLib_chaseUC(&field_0x6de, 0, 4); } if (field_0x6df == 0) { - if (player->checkWolfCargoCarrySceneChange()) { - if (field_0x73c == 1) { + if (daPy_py_c::checkWolfCargoCarrySceneChange()) { + if (mSceneType == SCENE_TYPE_RIVER) { createBalloonScore(); if (dComIfGp_getStartStagePoint() == 0) { - mPathIdxOffset = 1; - mPathIdx = 0; + mPathStep = 1; + mPathCurrentPointNo = 0; mPathDir = 1; } else { - mPathIdxOffset = -1; - mPathIdx = mpPath1->m_num + -1; + mPathStep = -1; + mPathCurrentPointNo = mpPath1->m_num + -1; mPathDir = -1; } - old.pos = dPath_GetPnt(mpPath1, mPathIdx)->m_position; - current.pos = old.pos; - mPathIdx += mPathIdxOffset; - field_0x6a4 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; + current.pos = old.pos = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; + mPathCurrentPointNo += mPathStep; + field_0x6a4 = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; - current.angle.y = shape_angle.y = cLib_targetAngleY((Vec*)¤t, &field_0x6a4); - if (player != NULL) { + current.angle.y = shape_angle.y = cLib_targetAngleY(¤t.pos, &field_0x6a4); + if (midna != NULL) { setMidnaRideOn(); setPlayerRideOn(); @@ -1442,16 +1459,16 @@ void daKago_c::executeWait() { field_0x6de = 0xff; field_0x6df = 1; - if (mPathDir == 1 && field_0x6e7 == 0 && dComIfGs_isSaveSwitch(9) == 0) { - setActionMode(9, 0); + if (mPathDir == 1 && mType == TYPE_TWILIGHT && !dComIfGs_isSaveSwitch(9)) { + setActionMode(ACTION_DEMO_FLY_e, 0); } else { - setActionMode(10, 0); + setActionMode(ACTION_DEMO_FLY2_e, 0); } setFlyAnime(); moveDemoFly(); } - } else if (field_0x73c == 0 || field_0x73c == 2) { + } else if (mSceneType == SCENE_TYPE_LAKE_HYLIA || mSceneType == SCENE_TYPE_BOARD_HOUSE) { setMidnaRideOn(); setPlayerRideOn(); @@ -1459,30 +1476,29 @@ void daKago_c::executeWait() { field_0x6de = 0xff; field_0x6df = 1; - setActionMode(8, 0); + setActionMode(ACTION_LANDING_e, 0); executeLanding(); } - } - return; } #if DEBUG mPathDir = 1; - if (mDoCPd_c::getHoldL(0) && mDoCPd_c::getHoldR(0) && - mDoCPd_c::getTrigB(0)) + if (mDoCPd_c::getHoldL(PAD_1) && mDoCPd_c::getHoldR(PAD_1) && + mDoCPd_c::getTrigB(PAD_1)) { - setActionMode(2, 0); + setActionMode(ACTION_EVENT_e, 0); - if (field_0x73c == 2) { + if (mSceneType == SCENE_TYPE_BOARD_HOUSE) { setKagoPath(1); } else { setKagoPath(5); - if (field_0x73c == 1) { + if (mSceneType == SCENE_TYPE_RIVER) { createBalloonScore(); + return; } } } @@ -1490,48 +1506,49 @@ void daKago_c::executeWait() { } bool daKago_c::calcAttackMove(int param_0) { - cXyz acStack_20; - cXyz cStack_2c; + cXyz nextPntPos; + cXyz prevPntPos; cXyz cStack_38; - acStack_20 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; - cStack_2c = dPath_GetPnt(mpPath1, mPathIdx - mPathIdxOffset)->m_position; + nextPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; + prevPntPos = dPath_GetPnt(mpPath1, mPathCurrentPointNo - mPathStep)->m_position; - s16 targetAngleY = cLib_targetAngleY(&cStack_2c, &acStack_20); - field_0x714 = targetAngleY; + s16 pntAngleY = cLib_targetAngleY(&prevPntPos, &nextPntPos); + field_0x714 = pntAngleY; if (mpLockActor != NULL) { flySpeedCalcLockOn(); } else { if (param_0 == 0) { - flySpeedCalc(targetAngleY, 1); + flySpeedCalc(pntAngleY, 1); } else { - flySpeedCalc(targetAngleY, 2); + flySpeedCalc(pntAngleY, 2); } } - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); - cStack_38.z = checkNextPath(acStack_20); + cStack_38.z = checkNextPath(nextPntPos); if (cStack_38.z < 0.0f) { - if (abs((s16)(targetAngleY - cLib_targetAngleY(&cStack_2c, ¤t.pos))) < 0x4000) { - mPathIdx += mPathIdxOffset; + if (abs((s16)(pntAngleY - cLib_targetAngleY(&prevPntPos, ¤t.pos))) < 0x4000) { + mPathCurrentPointNo += mPathStep; if (checkFlySceneChange()) { return true; } } } + return false; } void daKago_c::executeAttack() { - field_0x6dd = 1; + mIsAttack = TRUE; - if (field_0x6e7 == 1) { - dComIfGp_setAStatusForce(0x2a, 0); + if (mType == TYPE_NORMAL) { + dComIfGp_setAStatusForce(BUTTON_STATUS_QUIT, 0); } else { - dComIfGp_setAStatusForce(0x27, 0); + dComIfGp_setAStatusForce(BUTTON_STATUS_UNK_39, 0); } checkHeight(); @@ -1543,15 +1560,15 @@ void daKago_c::executeAttack() { setDashSibukiEffect(); } - switch (field_0x744) { + switch (mMode) { case 0: mDashCooldownTime = l_HIO.mDashCooldownTime; mDashTime = l_HIO.mDashTime; - field_0x744 = 1; + mMode = 1; setDashBlurEffect(0); - setBck(11, 0, 5.0f, l_HIO.mDashTimeMultiplier); + setBck(dRes_ID_E_YC_BCK_YC_FLY_DASH_WL_e, 0, 5.0f, l_HIO.mDashTimeMultiplier); dComIfGp_getVibration().StartShock(1, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); @@ -1568,18 +1585,20 @@ void daKago_c::executeAttack() { break; case 1: setDashEffect(); + if (calcAttackMove(0) == 0) { - cLib_chaseF(&field_0x6f8, 30.0f, l_HIO.mDashTimeMultiplier * 3.0f); - if (mpMorf->checkFrame(9.0f)) { - if (field_0x6e7 == 0) { + cLib_chaseF(&mFlySpeed, 30.0f, l_HIO.mDashTimeMultiplier * 3.0f); + if (mAnm_p->checkFrame(9.0f)) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSound(Z2SE_EN_YC_DASH, 0, -1); } else { mSound.startCreatureSound(Z2SE_EN_KC_DASH, 0, -1); } } - if (mpMorf->checkFrame(12.0f)) { - field_0x744 = 2; - field_0x728 = 0x14; + + if (mAnm_p->checkFrame(12.0f)) { + mMode = 2; + field_0x728 = 20; dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); dComIfGp_getVibration().StartQuake(1, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); @@ -1593,15 +1612,15 @@ void daKago_c::executeAttack() { case 2: setDashEffect(); - if (mpMorf->checkFrame(23.0f)) { + if (mAnm_p->checkFrame(23.0f)) { mSph.OnAtSetBit(); } if (calcAttackMove(1) == 0) { - cLib_chaseF(&field_0x6f8, 100.0f, 5.0f); + cLib_chaseF(&mFlySpeed, 100.0f, 5.0f); if (field_0x728 == 0) { - field_0x744 = 3; + mMode = 3; } if (field_0x728 < 10 && checkWallHitFall(0)) { @@ -1617,8 +1636,9 @@ void daKago_c::executeAttack() { break; case 3: setDashEffect(); + if (calcAttackMove(1) == 0) { - cLib_chaseF(&field_0x6f8, 100.0f, 3.0f); + cLib_chaseF(&mFlySpeed, 100.0f, 3.0f); if (checkWallHitFall(0)) { dComIfGp_getVibration().StopQuake(0x1f); @@ -1626,8 +1646,7 @@ void daKago_c::executeAttack() { } else { mDashTime--; if (mDashTime == 0) { - field_0x744 = 4; - + mMode = 4; dComIfGp_getVibration().StopQuake(0x1f); } } @@ -1637,13 +1656,13 @@ void daKago_c::executeAttack() { setDashEffect(); case 5: if (calcAttackMove(0) == 0) { - cLib_chaseF(&field_0x6f8, l_HIO.mFlightSpeed, 5.0f); - if (field_0x6f8 <= l_HIO.mFlightSpeed) { + cLib_chaseF(&mFlySpeed, l_HIO.mFlightSpeed, 5.0f); + if (mFlySpeed <= l_HIO.mFlightSpeed) { mpLockActor = NULL; mSph.OffAtSetBit(); - setActionMode(0, 2); + setActionMode(ACTION_FLY_e, 2); field_0x6c8 = 0; field_0x6c4 = 8000.0f; @@ -1655,56 +1674,57 @@ void daKago_c::executeAttack() { } void daKago_c::calcCircleCamera(int param_0) { - cXyz cStack_20; + cXyz targetPos; mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(shape_angle.y); mDoMtx_stack_c::XrotM(shape_angle.x); mDoMtx_stack_c::transM(0.0f, 0.0f, 1500.0f); - mDoMtx_stack_c::multVecZero(&cStack_20); + mDoMtx_stack_c::multVecZero(&targetPos); if (param_0 == 0) { - field_0x68c = cStack_20; + mDemoCamCenter = targetPos; } else if (param_0 == 1) { - cLib_addCalcPos(&field_0x68c, cStack_20, 0.1f, field_0x6f8 + 100.0f, + cLib_addCalcPos(&mDemoCamCenter, targetPos, 0.1f, mFlySpeed + 100.0f, 10.0f); } else { - cLib_addCalcPos(&field_0x68c, cStack_20, 0.5f, field_0x6f8 + 30.0f, + cLib_addCalcPos(&mDemoCamCenter, targetPos, 0.5f, mFlySpeed + 30.0f, 10.0f); } + mDoMtx_stack_c::transM(0.0f, 0.0f, -1000.0f); - mDoMtx_stack_c::multVecZero(&cStack_20); + mDoMtx_stack_c::multVecZero(&targetPos); if (param_0 == 0) { - field_0x698 = cStack_20; + mDemoCamEye = targetPos; } else if (param_0 == 1) { - cLib_addCalcPos(&field_0x698, cStack_20, 0.1f, field_0x6f8 + 100.0f, + cLib_addCalcPos(&mDemoCamEye, targetPos, 0.1f, mFlySpeed + 100.0f, 10.0f); } else { - cLib_addCalcPos(&field_0x698, cStack_20, 0.5f, field_0x6f8 + 30.0f, 10.0f); + cLib_addCalcPos(&mDemoCamEye, targetPos, 0.5f, mFlySpeed + 30.0f, 10.0f); } - field_0x6d4 = 60.0f; - dCam_getBody()->Set(field_0x68c, field_0x698, field_0x6d4, 0); + mDemoCamFovy = 60.0f; + dCam_getBody()->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); } void daKago_c::executeEvent() { dCamera_c* camera = dCam_getBody(); - daPy_py_c* unusedPlayer = daPy_getPlayerActorClass(); + daPy_py_c* player = daPy_getPlayerActorClass(); - if ((field_0x73c == 0) && dComIfG_play_c::getLayerNo(0) == 13 && dComIfGs_isSaveSwitch(0x10)) { - dComIfGs_onSaveSwitch(0x1a); - setActionMode(4, 0); + if (mSceneType == SCENE_TYPE_LAKE_HYLIA && dComIfG_play_c::getLayerNo(0) == 13 && dComIfGs_isSaveSwitch(16)) { + dComIfGs_onSaveSwitch(26); + setActionMode(ACTION_WAIT_e, 0); } else { if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 3); - eventInfo.onCondition(2); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } else { camera->Stop(); camera->SetTrimSize(3); - field_0x748 = 0; + mDemoMode = 0; field_0x74c = 0; - setActionMode(3, 0); + setActionMode(ACTION_PERCH_e, 0); field_0x6dc = 1; field_0x6de = 0xff; dComIfGs_onSaveSwitch(8); @@ -1718,13 +1738,13 @@ void daKago_c::initPerchDemo() { cXyz midnaPos; fopAc_ac_c* midna = daPy_getPlayerActorClass()->getMidnaActor(); - if (midna != 0) { + if (midna != NULL) { midnaPos = midna->current.pos; } - switch (field_0x748) { + switch (mDemoMode) { case 0: { - Z2GetAudioMgr()->setDemoName(field_0x760); + Z2GetAudioMgr()->setDemoName(mDemoName); field_0x771 = 0; current.pos = dPath_GetPnt(mpPath2, field_0x771)->m_position; @@ -1733,14 +1753,14 @@ void daKago_c::initPerchDemo() { field_0x771 = 0; } - cXyz cStack_48 = dPath_GetPnt(mpPath2, field_0x771)->m_position; + cXyz cStack_48 = (Vec)dPath_GetPnt(mpPath2, field_0x771)->m_position; s16 sVar5 = cLib_targetAngleY(¤t.pos, &cStack_48); int local_80 = 2; if (local_80 >= (int)mpPath2->m_num) { local_80 = mpPath2->m_num - 1; } - cXyz cStack_54 = dPath_GetPnt(mpPath2, local_80)->m_position; + cXyz cStack_54 = (Vec)dPath_GetPnt(mpPath2, local_80)->m_position; s16 sp08 = cLib_targetAngleY(¤t.pos, &cStack_48); if ((s16)(sVar5 - sp08) < 0) { sVar5 = sVar5 - 0x1000; @@ -1753,46 +1773,44 @@ void daKago_c::initPerchDemo() { speed.y = 0.0f; speedF = 20.0f; - field_0x72c = 0xb4; + field_0x72c = 180; field_0x728 = field_0x72c + 90; field_0x6e8 = 0; - if ((field_0x73c == 0) && dComIfG_play_c::getLayerNo(0) == 13 && (playerPos.x > -90000.0f)) - { + if (mSceneType == SCENE_TYPE_LAKE_HYLIA && dComIfG_play_c::getLayerNo(0) == 13 && playerPos.x > -90000.0f) { field_0x6e8 = 1; } calcCircleCamera(0); field_0x6e4 = 0; - break; } case 1: { field_0x728 = 90; - field_0x6f8 = 20.0f; + mFlySpeed = 20.0f; break; } case 2: { - if (field_0x73c != 0) { - mPathIdx = searchNearPassPoint(); + if (mSceneType != SCENE_TYPE_LAKE_HYLIA) { + mPathCurrentPointNo = searchNearPassPoint(); } field_0x758 = 1; - if (mPathIdxOffset < 0) { + if (mPathStep < 0) { angleY = angleY + 0x8000; daPy_getPlayerActorClass()->setPlayerPosAndAngle(&playerPos, angleY, 0); - field_0x758 = 0xffffffff; + field_0x758 = -1; } mDoMtx_stack_c::transS(midnaPos); mDoMtx_stack_c::YrotM(angleY); mDoMtx_stack_c::transM(0.0f, 1000.0f, -1000.0f); - mDoMtx_stack_c::multVecZero((Vec*)¤t); + mDoMtx_stack_c::multVecZero(¤t.pos); - setBck(0xc, 2, 0.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_e, 2, 0.0f, 1.0f); mDoMtx_stack_c::transS(midnaPos); mDoMtx_stack_c::YrotM(angleY); @@ -1801,10 +1819,10 @@ void daKago_c::initPerchDemo() { current.angle.y = cLib_targetAngleY(¤t.pos, &field_0x6a4); current.angle.x = -cLib_targetAngleX(¤t.pos, &field_0x6a4); - field_0x6f8 = 20.0f; + mFlySpeed = 20.0f; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; @@ -1813,37 +1831,35 @@ void daKago_c::initPerchDemo() { mDoMtx_stack_c::transS(playerPos); mDoMtx_stack_c::YrotM(angleY); mDoMtx_stack_c::transM(-100.0f, 100.0f, -300.0f); - mDoMtx_stack_c::multVecZero(&field_0x68c); + mDoMtx_stack_c::multVecZero(&mDemoCamCenter); mDoMtx_stack_c::transM(100.0f, -100.0f, 300.0f); mDoMtx_stack_c::transM(100.0f, 30.0f, 300.0f); - mDoMtx_stack_c::multVecZero(&field_0x698); + mDoMtx_stack_c::multVecZero(&mDemoCamEye); - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - dCam_getBody()->Set(field_0x68c, field_0x698, field_0x6d4, 0); + dCam_getBody()->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); field_0x728 = 10; - break; } case 3: { - setBck(9, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_e, 2, 10.0f, 1.0f); setMidnaTagPos(); speedF = speed.y = 0.0f; field_0x728 = 30; - break; } case 4: { - setBck(0xf, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); - if (field_0x73c == 0) { + if (mSceneType == SCENE_TYPE_LAKE_HYLIA) { field_0x6a4.set(-90000.0f, -16000.0f, 40000.0f); } else { - field_0x6a4 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; + field_0x6a4 = dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; } setMidnaRideOn(); @@ -1851,15 +1867,14 @@ void daKago_c::initPerchDemo() { dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); - field_0x744 = 1; + mMode = 1; field_0x728 = 30; - break; } } field_0x74c = 1; - field_0x744 = 0; + mMode = 0; } bool daKago_c::executePerchDemo() { @@ -1870,17 +1885,17 @@ bool daKago_c::executePerchDemo() { daMidna_c* midna = daPy_getPlayerActorClass()->getMidnaActor(); s16 midnaYaw; - if (midna != 0) { + if (midna != NULL) { midnaPos = midna->current.pos; midnaYaw = midna->shape_angle.y; } field_0x750++; - switch (field_0x748) { + switch (mDemoMode) { case 0: { calcCircleCamera(1); - if ((field_0x750 & 0x20) != 0) { + if (field_0x750 & 0x20) { cLib_chaseF(&field_0x6fc, 3.0f, 0.3f); } else { cLib_chaseF(&field_0x6fc, -3.0f, 0.3f); @@ -1889,7 +1904,7 @@ bool daKago_c::executePerchDemo() { current.pos.y = current.pos.y + field_0x6fc; if (field_0x72c != 0) { - cXyz cStack_64 = dPath_GetPnt(mpPath2, field_0x771)->m_position; + cXyz cStack_64 = (Vec)dPath_GetPnt(mpPath2, field_0x771)->m_position; cLib_addCalcAngleS(¤t.angle.y, cLib_targetAngleY(¤t.pos, &cStack_64), 0x20, 0x100, 0x40); if (current.pos.abs(cStack_64) < 200.0f) { field_0x771++; @@ -1900,7 +1915,7 @@ bool daKago_c::executePerchDemo() { cLib_addCalcAngleS(&shape_angle.y, current.angle.y, 0x20, 0x100, 0x40); } else { if (field_0x754 == 0) { - if (field_0x6e7 == 1) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -1914,57 +1929,55 @@ bool daKago_c::executePerchDemo() { } if (field_0x728 == 0) { - field_0x748 = 1; + mDemoMode = 1; return true; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); - break; } case 1: { calcCircleCamera(2); cLib_addCalcAngleS(&shape_angle.x, -cLib_targetAngleX(¤t.pos, &playerPos), 4, 0x400, 0x40); - cLib_addCalcAngleS(&shape_angle.y, cLib_targetAngleY((Vec*)¤t, &playerPos), 4, 0x200, 0x40); + cLib_addCalcAngleS(&shape_angle.y, cLib_targetAngleY(¤t.pos, &playerPos), 4, 0x200, 0x40); current.angle.y = shape_angle.y; current.angle.x = shape_angle.x; - cLib_chaseF(&field_0x6f8, 60.0f, 1.0f); + cLib_chaseF(&mFlySpeed, 60.0f, 1.0f); - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (current.pos.abs(playerPos) < 2000.0f) { - field_0x748 = 2; + mDemoMode = 2; return true; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 0); - break; } case 2: { if (field_0x6e4 == 0) { - if (field_0x73c == 0) { + if (mSceneType == SCENE_TYPE_LAKE_HYLIA) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 4); - } else if (field_0x73c == 2) { + } else if (mSceneType == SCENE_TYPE_BOARD_HOUSE) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 5); } } - if (field_0x744 == 0) { + if (mMode == 0) { current.angle.y = cLib_targetAngleY(¤t.pos, &field_0x6a4); current.angle.x = -cLib_targetAngleX(¤t.pos, &field_0x6a4); - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 != 0) { shape_angle.x = current.angle.x; if (field_0x728 == 1) { - if (field_0x6e7 == 1) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -1976,9 +1989,9 @@ bool daKago_c::executePerchDemo() { shape_angle.y = current.angle.y; if (field_0x6a4.abs(current.pos) < 300.0f) { - field_0x744 = 1; + mMode = 1; - setBck(0x15, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_HOVERING_e, 2, 10.0f, 1.0f); field_0x728 = 60; @@ -1988,16 +2001,16 @@ bool daKago_c::executePerchDemo() { mDoMtx_stack_c::multVecZero(&field_0x6a4); } } else { - cLib_chaseF(&field_0x6f8, 0.0f, 1.0f); + cLib_chaseF(&mFlySpeed, 0.0f, 1.0f); cLib_addCalcAngleS(¤t.angle.y, cLib_targetAngleY(¤t.pos, &field_0x6a4), 4, 0x400, 0x100); cLib_addCalcAngleS(¤t.angle.x, 0, 4, 0x100, 0x80); cLib_addCalcAngleS(&shape_angle.x, 0, 4, 0x100, 0x80); shape_angle.y = current.angle.y; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - if (!field_0x6f8 && field_0x728 == 0) { - field_0x748 = 3; + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); + if (!mFlySpeed && field_0x728 == 0) { + mDemoMode = 3; return true; } } @@ -2006,23 +2019,22 @@ bool daKago_c::executePerchDemo() { mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(0.0f, 400.0f, -300.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 5.0f, 5.0f); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 5.0f, 5.0f); mDoMtx_stack_c::transS(playerPos); mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(100.0f, 30.0f, 300.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 20.0f, 10.0f); - - dCam_getBody()->Set(field_0x68c, field_0x698, field_0x6d4, 0); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 20.0f, 10.0f); + dCam_getBody()->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); break; } case 3: { if (field_0x6e4 == 0) { - if (field_0x73c == 0) { + if (mSceneType == SCENE_TYPE_LAKE_HYLIA) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 4); - } else if (field_0x73c == 2) { + } else if (mSceneType == SCENE_TYPE_BOARD_HOUSE) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 5); } } @@ -2031,34 +2043,33 @@ bool daKago_c::executePerchDemo() { mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(0.0f, 100.0f, 0.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 20.0f, 10.0f); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 20.0f, 10.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(300.0f, 50.0f, 500.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 20.0f, 10.0f); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 20.0f, 10.0f); - cLib_chaseF(&field_0x6d4, 70.0f, 1.0f); + cLib_chaseF(&mDemoCamFovy, 70.0f, 1.0f); - dCam_getBody()->Set(field_0x68c, field_0x698, field_0x6d4, 0); + dCam_getBody()->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); cLib_addCalcAngleS(¤t.angle.x, 0, 4, 0x400, 0x100); shape_angle.x = current.angle.x; if (field_0x728 == 0) { - field_0x748 = 4; + mDemoMode = 4; return true; } - break; } case 4: { if (field_0x6e4 == 0) { - if (field_0x73c == 0) { + if (mSceneType == SCENE_TYPE_LAKE_HYLIA) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 4); - } else if (field_0x73c == 2) { + } else if (mSceneType == SCENE_TYPE_BOARD_HOUSE) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 6); } } @@ -2066,22 +2077,20 @@ bool daKago_c::executePerchDemo() { if (PerchDemoAwayForward()) { return true; } - break; } case 5: { f32 maxStep = field_0x6cc * 50.0f; f32 minStep = field_0x6cc * 10.0f; cLib_chaseF(&field_0x6cc, 0.0f, 0.05f); - cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, maxStep, minStep); + cLib_addCalcPos(&mDemoCamCenter, midnaPos, 0.5f, maxStep, minStep); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(0.0f, 50.0f, -800.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, maxStep, minStep); - cLib_chaseF(&field_0x6d4, 70.0f, 1.0f); - dCam_getBody()->Set(field_0x68c, field_0x698, field_0x6d4, 0); - + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, maxStep, minStep); + cLib_chaseF(&mDemoCamFovy, 70.0f, 1.0f); + dCam_getBody()->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); break; } case 6: @@ -2092,7 +2101,6 @@ bool daKago_c::executePerchDemo() { } bool daKago_c::PerchDemoAwayForward() { - cXyz playerPos = daPy_getPlayerActorClass()->current.pos; s16 playerYaw = daPy_getPlayerActorClass()->shape_angle.y; @@ -2108,58 +2116,58 @@ bool daKago_c::PerchDemoAwayForward() { midnaYaw = midna->shape_angle.y; } - switch (field_0x744) { + switch (mMode) { case 0: case 1: { f32 unusedFloat1 = 20.0f; f32 unusedFloat2 = 10.0f; - field_0x68c += speed; - field_0x698 += speed; + mDemoCamCenter += speed; + mDemoCamEye += speed; mDoMtx_stack_c::transS(midnaPos); mDoMtx_stack_c::YrotM(playerYaw); - if (field_0x744 == 0) { + if (mMode == 0) { mDoMtx_stack_c::transM(0.0f, 100.0f, 0.0f); } else { mDoMtx_stack_c::transM(0.0f, -200.0f, 0.0f); } mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 10.0f, 5.0f); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 10.0f, 5.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(playerYaw); - if (field_0x744 == 0) { + if (mMode == 0) { mDoMtx_stack_c::transM(300.0f, 50.0f, 500.0f); } else { mDoMtx_stack_c::transM(500.0f, 50.0f, 0.0f); } mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 10.0f, 5.0f); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 10.0f, 5.0f); - cLib_chaseF(&field_0x6d4, 70.0f, 1.0f); + cLib_chaseF(&mDemoCamFovy, 70.0f, 1.0f); - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); mGroundHeight = checkGroundHeight(current.pos, NULL); mRoofHeight = checkRoofHeight(current.pos); - cLib_chaseF(&field_0x6f8, 30.0f, 1.0f); + cLib_chaseF(&mFlySpeed, 30.0f, 1.0f); cLib_addCalcAngleS(¤t.angle.x, 0, 8, 0x200, 0x80); shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - if (field_0x744 == 0) { + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); + if (mMode == 0) { cLib_addCalcAngleS(&shape_angle.x, 0x2000, 8, 0x200, 0x40); } else { cLib_addCalcAngleS(&shape_angle.x, 0, 8, 0x200, 0x40); } - if (field_0x728 == 0x14 && field_0x744 == 0) { - if (field_0x6e7 == 1) { + if (field_0x728 == 20 && mMode == 0) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -2167,90 +2175,89 @@ bool daKago_c::PerchDemoAwayForward() { } if (field_0x728 == 0) { - if (field_0x744 == 0) { - field_0x744 = 1; - field_0x728 = 0x1e; + if (mMode == 0) { + mMode = 1; + field_0x728 = 30; setPlayerRideOn(); dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); - } else if (field_0x73c != 0) { + } else if (mSceneType != SCENE_TYPE_LAKE_HYLIA) { field_0x728 = 60; - field_0x744 = 2; + mMode = 2; } else { field_0x728 = 90; - field_0x744 = 3; + mMode = 3; field_0x6cc = 1.0f; } } - break; } case 2: { if (field_0x728 > 10) { - field_0x68c += speed; - field_0x698 += speed; + mDemoCamCenter += speed; + mDemoCamEye += speed; - s16 targetYaw = cLib_targetAngleY(&field_0x698, &field_0x68c); + s16 targetYaw = cLib_targetAngleY(&mDemoCamEye, &mDemoCamCenter); if (abs((s16)(midnaYaw - targetYaw)) < 0x2000) { - cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, 5.0f, 10.0f); + cLib_addCalcPos(&mDemoCamCenter, midnaPos, 0.5f, 5.0f, 10.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(0.0f, 50.0f, -800.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 20.0f, 10.0f); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 20.0f, 10.0f); } else { - cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, 5.0f, 10.0f); + cLib_addCalcPos(&mDemoCamCenter, midnaPos, 0.5f, 5.0f, 10.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(300.0f, 50.0f, -500.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 20.0f, 10.0f); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 20.0f, 10.0f); } } else { - cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, 50.0f, 10.0f); + cLib_addCalcPos(&mDemoCamCenter, midnaPos, 0.5f, 50.0f, 10.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(playerYaw); mDoMtx_stack_c::transM(0.0f, 50.0f, -800.0f); mDoMtx_stack_c::multVecZero(&unkXyz1); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 50.0f, 10.0f); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 50.0f, 10.0f); } - cLib_chaseF(&field_0x6d4, 70.0f, 1.0f); - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + cLib_chaseF(&mDemoCamFovy, 70.0f, 1.0f); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); mGroundHeight = checkGroundHeight(current.pos, NULL); mRoofHeight = checkRoofHeight(current.pos); - cLib_chaseF(&field_0x6f8, l_HIO.mFlightSpeed, 2.0f); + cLib_chaseF(&mFlySpeed, l_HIO.mFlightSpeed, 2.0f); if (field_0x728 < 30) { cLib_addCalcAngleS(¤t.angle.x, 0, 8, 0x100, 0x40); } else { - cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x40); + cLib_addCalcAngleS(¤t.angle.x, -0x2000, 8, 0x100, 0x40); } shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 == 0) { - if (field_0x73c == 2) { + if (mSceneType == SCENE_TYPE_BOARD_HOUSE) { if (setSceneChange(3)) { - field_0x748 = 5; + mDemoMode = 5; field_0x6cc = 1.0f; } } else { field_0x6dc = 0; - setActionMode(0, 0); + setActionMode(ACTION_FLY_e, 0); - camera->Reset(field_0x68c, field_0x698); + camera->Reset(mDemoCamCenter, mDemoCamEye); camera->Start(); camera->SetTrimSize(0); @@ -2259,37 +2266,35 @@ bool daKago_c::PerchDemoAwayForward() { Z2GetAudioMgr()->setDemoName(NULL); } } - break; } case 3: { cLib_chaseF(&field_0x6cc, 0.0f, 0.1f); - field_0x68c += speed; - field_0x698 += speed * field_0x6cc; + mDemoCamCenter += speed; + mDemoCamEye += speed * field_0x6cc; unkXyz1.set(playerPos.x, playerPos.y + 100.0f, playerPos.z); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 10.0f, 3.0f); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 10.0f, 3.0f); - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); - cLib_chaseF(&field_0x6f8, 30.0f, 1.0f); + cLib_chaseF(&mFlySpeed, 30.0f, 1.0f); - cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x40); + cLib_addCalcAngleS(¤t.angle.x, -0x2000, 8, 0x100, 0x40); shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 == 0) { - setActionMode(7, 0); - field_0x748 = 8; + setActionMode(ACTION_PERCH2_e, 0); + mDemoMode = 8; return true; } - break; } } @@ -2310,14 +2315,14 @@ void daKago_c::executePerch() { void daKago_c::executeEvent2() { dCamera_c* camera = dCam_getBody(); if (!eventInfo.checkCommandDemoAccrpt()) { - fopAcM_orderPotentialEvent(this,2,0xffff,3); + fopAcM_orderPotentialEvent(this, 2, 0xffff, 3); eventInfo.onCondition(2); } else { camera->Stop(); camera->SetTrimSize(3); - field_0x748 = 0; + mDemoMode = 0; field_0x74c = 0; - setActionMode(7,0); + setActionMode(ACTION_PERCH2_e, 0); field_0x6dc = 1; field_0x6de = 0xff; } @@ -2327,47 +2332,51 @@ void daKago_c::initFirstDemo() { dCamera_c* camera = dCam_getBody(); cXyz acStack_28; cXyz cStack_34; + daPy_py_c* player = daPy_getPlayerActorClass(); s16 playerYaw = player->shape_angle.y; cXyz playerPos = player->current.pos; + daMidna_c* midna = daPy_py_c::getMidnaActor(); cXyz midnaPos; - if (midna != 0) { + if (midna != NULL) { midnaPos = midna->current.pos; } s16 targetYaw; - switch (field_0x748) { + switch (mDemoMode) { case 0: { - Z2GetAudioMgr()->setDemoName(field_0x760); - field_0x718 = -0x800; + Z2GetAudioMgr()->setDemoName(mDemoName); + mHeadRotZ = -0x800; player->changeOriginalDemo(); - player->changeDemoMode(0x17, 0, 0, 0); + player->changeDemoMode(daPy_demo_c::DEMO_UNK_23_e, 0, 0, 0); + playerPos.set(-103292.0f, -23437.0f, 39925.0f); field_0x6a4.set(-60000.0f, -11000.0f, 28000.0f); shape_angle.y = current.angle.y = cLib_targetAngleY(&playerPos, &field_0x6a4); cStack_34.set(-300.0f, 400.0f, -1000.0f); cLib_offsetPos(¤t.pos, &playerPos, shape_angle.y, &cStack_34); targetYaw = cLib_targetAngleY(&playerPos, ¤t.pos); + player->setPlayerPosAndAngle(&playerPos, targetYaw, 0); if (midna != NULL) { midna->current.pos = playerPos; midnaPos = midna->current.pos; } + field_0x680.set(0.0f, 0.0f, 0.0f); - field_0x68c = current.pos; + mDemoCamCenter = current.pos; field_0x6bc = 0x3000; field_0x6cc = 500.0f; field_0x6d0 = 400.0f; cStack_34.set(0.0f, field_0x6d0, field_0x6cc); - cLib_offsetPos(&field_0x698, ¤t.pos, shape_angle.y + field_0x6bc, - &cStack_34); - field_0x6d4 = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); - field_0x728 = 0xa0; - setBck(15, 2, 10.0f, 1.0f); - field_0x6e4 = 0; + cLib_offsetPos(&mDemoCamEye, ¤t.pos, shape_angle.y + field_0x6bc, &cStack_34); + mDemoCamFovy = 70.0f; + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); + field_0x728 = 160; + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); + field_0x6e4 = 0; break; } case 1: { @@ -2375,37 +2384,33 @@ void daKago_c::initFirstDemo() { midna->current.pos = playerPos; midnaPos = midna->current.pos; } - field_0x68c = current.pos; + + mDemoCamCenter = current.pos; field_0x6bc = 0x800; field_0x6cc = 700.0f; cStack_34.set(0.0f, 0.0f, field_0x6cc); - cLib_offsetPos(&field_0x698, ¤t.pos, shape_angle.y + field_0x6bc, - &cStack_34); - field_0x6d4 = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); - field_0x728 = 0x50; - + cLib_offsetPos(&mDemoCamEye, ¤t.pos, shape_angle.y + field_0x6bc, &cStack_34); + mDemoCamFovy = 70.0f; + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); + field_0x728 = 80; break; } case 2: { field_0x728 = 60; mMsgFlow.init(this, 0x7d3, 0, NULL); - break; } case 3: { - field_0x718 = cLib_targetAngleX(¤t.pos, &playerPos) / 4; + mHeadRotZ = cLib_targetAngleX(¤t.pos, &playerPos) / 4; targetYaw = cLib_targetAngleY(¤t.pos, &playerPos) - shape_angle.y; - field_0x71a = targetYaw / 4; + mHeadRotY = targetYaw / 4; cStack_34.set(50.0f, 150.0f, -200.0f); - cLib_offsetPos(&field_0x698, &midnaPos, shape_angle.y, &cStack_34); + cLib_offsetPos(&mDemoCamEye, &midnaPos, shape_angle.y, &cStack_34); cStack_34.set(50.0f, 0.0f, 50.0f); - cLib_offsetPos(&field_0x68c, &midnaPos, shape_angle.y, &cStack_34); - field_0x6d4 = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); - targetYaw = cLib_targetAngleY(&playerPos, (Vec*)¤t); - player->setPlayerPosAndAngle(&playerPos, targetYaw, 0); - + cLib_offsetPos(&mDemoCamCenter, &midnaPos, shape_angle.y, &cStack_34); + mDemoCamFovy = 70.0f; + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); + player->setPlayerPosAndAngle(&playerPos, cLib_targetAngleY(&playerPos, ¤t.pos), 0); break; } case 4: { @@ -2416,8 +2421,7 @@ void daKago_c::initFirstDemo() { mDoMtx_stack_c::YrotM(field_0x6bc); mDoMtx_stack_c::transM(0.0f, 300.0f, field_0x6cc); mDoMtx_stack_c::multVecZero(&field_0x6a4); - field_0x6f8 = 0.0f; - + mFlySpeed = 0.0f; break; } case 5: { @@ -2426,68 +2430,66 @@ void daKago_c::initFirstDemo() { mDoMtx_stack_c::YrotM(field_0x6bc); mDoMtx_stack_c::transM(0.0f, 300.0f, 200.0f); mDoMtx_stack_c::multVecZero(&field_0x6a4); - break; } case 6: { player->cancelOriginalDemo(); setPlayerRideOn(); dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); - field_0x728 = 0x96; + field_0x728 = 150; field_0x6cc = 1.0f; - break; } case 7: { field_0x6e8 = 0; } case 8: { - setBck(15, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); + if (field_0x6e8 != 0) { - mpMorf->setFrame(0.0f); + mAnm_p->setFrame(0.0f); field_0x6a4.set(-67000.0f, -13000.0f, 28000.0f); current.pos.set(-76600.0f, -15500.0f, 37340.0f); shape_angle.y = current.angle.y = -0x8000; shape_angle.x = current.angle.x = -0x1000; - field_0x6f8 = 50.0f; - field_0x698.set(-75232.0f, -14685.0f, 34417.0f); - field_0x68c.set(current.pos.x, current.pos.y + 100.0f, current.pos.z); - field_0x6d4 = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + mFlySpeed = 50.0f; + mDemoCamEye.set(-75232.0f, -14685.0f, 34417.0f); + mDemoCamCenter.set(current.pos.x, current.pos.y + 100.0f, current.pos.z); + mDemoCamFovy = 70.0f; + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); field_0x728 = 200; } else { field_0x6a4.set(-60000.0f, -11000.0f, 28000.0f); current.pos.set(-90000.0f, -16000.0f, 40000.0f); shape_angle.y = current.angle.y = cLib_targetAngleY(¤t.pos, &field_0x6a4); shape_angle.x = current.angle.x = -0x2000; - field_0x6f8 = 50.0f; + mFlySpeed = 50.0f; cStack_34.set(-500.0f, 1000.0f, 5000.0f); - cLib_offsetPos(&field_0x698, ¤t.pos, shape_angle.y, &cStack_34); - field_0x68c.set(current.pos.x, current.pos.y + 100.0f, current.pos.z); - field_0x6d4 = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + cLib_offsetPos(&mDemoCamEye, ¤t.pos, shape_angle.y, &cStack_34); + mDemoCamCenter.set(current.pos.x, current.pos.y + 100.0f, current.pos.z); + mDemoCamFovy = 70.0f; + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); field_0x728 = 200; } - break; } } field_0x74c = 1; - field_0x744 = 0; + mMode = 0; } bool daKago_c::executeFirstDemo() { dCamera_c* camera = dCam_getBody(); cXyz unkXyz1; - cXyz unkXyz2; + cXyz offset; cXyz midnaPos; daPy_py_c* player = daPy_getPlayerActorClass(); daMidna_c* midna = daPy_py_c::getMidnaActor(); - if (midna != 0) { + if (midna != NULL) { midnaPos = midna->current.pos; } @@ -2495,8 +2497,8 @@ bool daKago_c::executeFirstDemo() { cXyz playerPos = player->current.pos; int unkFlag1; - int switchVal = field_0x748; - switch (switchVal) { + int mode = mDemoMode; // fakematch + switch (mode) { case 0: dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); @@ -2504,21 +2506,21 @@ bool daKago_c::executeFirstDemo() { cLib_chaseF(&field_0x6cc, 1250.0f, 6.7f); cLib_chaseF(&field_0x6d0, -400.0f, 7.1f); - unkXyz2.set(0.0f, field_0x6d0, field_0x6cc); - cLib_offsetPos(&field_0x698, ¤t.pos, shape_angle.y + field_0x6bc, &unkXyz2); + offset.set(0.0f, field_0x6d0, field_0x6cc); + cLib_offsetPos(&mDemoCamEye, ¤t.pos, shape_angle.y + field_0x6bc, &offset); unkXyz1.set(0.0f, -200.0f, 400.0f); cLib_chasePos(&field_0x680, unkXyz1, 4.0f); - cLib_offsetPos(&field_0x68c, ¤t.pos, shape_angle.y, &field_0x680); + cLib_offsetPos(&mDemoCamCenter, ¤t.pos, shape_angle.y, &field_0x680); - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); if (field_0x728 < 10) { setMidnaTagPos(); if (field_0x728 == 0) { - field_0x748 = 1; + mDemoMode = 1; return 1; } } @@ -2529,35 +2531,35 @@ bool daKago_c::executeFirstDemo() { cLib_chaseAngleS(&field_0x6bc, 0x1000, 0x20); - unkXyz2.set(0.0f, 0.0f, field_0x6cc); - cLib_offsetPos(&field_0x698, ¤t.pos, shape_angle.y + field_0x6bc, &unkXyz2); + offset.set(0.0f, 0.0f, field_0x6cc); + cLib_offsetPos(&mDemoCamEye, ¤t.pos, shape_angle.y + field_0x6bc, &offset); - if (field_0x728 < 0x46) { - cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, 10.0f, 10.0f); + if (field_0x728 < 70) { + cLib_addCalcPos(&mDemoCamCenter, midnaPos, 0.5f, 10.0f, 10.0f); } else { - field_0x68c = current.pos; + mDemoCamCenter = current.pos; } - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); setMidnaTagPos(); if (field_0x728 == 30) { - setBck(0x14, 0x02, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_HANGED_WAIT_e, 2, 10.0f, 1.0f); } if (field_0x728 > 30) { cLib_chaseF(&field_0x6cc, 350.0f, 4.0f); - cLib_addCalcAngleS(&field_0x718, -2048, 8, 0x100, 0x10); + cLib_addCalcAngleS(&mHeadRotZ, -0x800, 8, 0x100, 0x10); } else { cLib_chaseF(&field_0x6cc, 350.0f, 6.0f); - cLib_addCalcAngleS(&field_0x718, 0x400, 8, 0x200, 0x10); + cLib_addCalcAngleS(&mHeadRotZ, 0x400, 8, 0x200, 0x10); if (field_0x728 == 30) { setMidnaRideOn(); } - if (field_0x728 == 0x14) { - if (field_0x6e7 == 1) { + if (field_0x728 == 20) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -2565,7 +2567,7 @@ bool daKago_c::executeFirstDemo() { } if (field_0x728 == 0) { - field_0x748 = 2; + mDemoMode = 2; return true; } @@ -2575,25 +2577,24 @@ bool daKago_c::executeFirstDemo() { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 3); setMidnaTagPos(); - cLib_addCalcPos(&field_0x68c, midnaPos, 0.5f, 10.0f, 10.0f); - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + cLib_addCalcPos(&mDemoCamCenter, midnaPos, 0.5f, 10.0f, 10.0f); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); mMsgFlow.doFlow(this, NULL, 0); if (field_0x728 != 0) { if (field_0x728 == 1) { - setBck(0xf, 0x02, 20.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 20.0f, 1.0f); } if (mMsgFlow.getNowMsgNo() == 0x1774) { - setBck(0xf, 0x02, 20.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 20.0f, 1.0f); field_0x728 = 0; } } if (mMsgFlow.getNowMsgNo() == 0x1775) { - field_0x748 = 3; - + mDemoMode = 3; return true; } @@ -2603,18 +2604,17 @@ bool daKago_c::executeFirstDemo() { setMidnaTagPos(); cLib_addCalcAngleS( - &field_0x718, cLib_targetAngleX(¤t.pos, &playerPos) / 4, + &mHeadRotZ, cLib_targetAngleX(¤t.pos, &playerPos) / 4, 8, 0x100, 0x10); // adding braces to the switch case for this decl regresses debug match s16 targetYaw = cLib_targetAngleY(¤t.pos, &playerPos) - shape_angle.y; cLib_addCalcAngleS( - &field_0x71a, targetYaw / 4, + &mHeadRotY, targetYaw / 4, 8, 0x100, 0x10); if (mMsgFlow.doFlow(this, NULL, 0)) { - field_0x748 = 4; - + mDemoMode = 4; return true; } @@ -2623,8 +2623,8 @@ bool daKago_c::executeFirstDemo() { case 4: dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); - cLib_addCalcAngleS(&field_0x718, 0, 8, 0x100, 0x10); - cLib_addCalcAngleS(&field_0x71a, 0, 8, 0x100, 0x10); + cLib_addCalcAngleS(&mHeadRotZ, 0, 8, 0x100, 0x10); + cLib_addCalcAngleS(&mHeadRotY, 0, 8, 0x100, 0x10); cLib_chaseF(&field_0x6cc, -300.0f, 10.0f); @@ -2638,27 +2638,27 @@ bool daKago_c::executeFirstDemo() { shape_angle.y = current.angle.y; shape_angle.x = current.angle.x; - cLib_chaseF(&field_0x6f8, 20.0f, 1.0f); + cLib_chaseF(&mFlySpeed, 20.0f, 1.0f); - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - field_0x68c += speed; - field_0x698 += speed; + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); + mDemoCamCenter += speed; + mDemoCamEye += speed; - unkXyz2.set(0.0f, 200.0f, -500.0f); - cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 10.0f, 3.0f); - unkXyz2.set(0.0f, 0.0f, 0.0f); + offset.set(0.0f, 200.0f, -500.0f); + cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 10.0f, 3.0f); + offset.set(0.0f, 0.0f, 0.0f); - cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 10.0f, 3.0f); + cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 10.0f, 3.0f); - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); if (field_0x6a4.abs(current.pos) < 100.0f) { - field_0x748 = 5; + mDemoMode = 5; return true; } @@ -2671,87 +2671,84 @@ bool daKago_c::executeFirstDemo() { shape_angle.y = current.angle.y; shape_angle.x = current.angle.x; - cLib_chaseF(&field_0x6f8, 20.0f, 1.0f); - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); + cLib_chaseF(&mFlySpeed, 20.0f, 1.0f); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - field_0x68c += speed; - field_0x698 += speed; + speed.y = -mFlySpeed * cM_ssin(current.angle.x); + mDemoCamCenter += speed; + mDemoCamEye += speed; - unkXyz2.set(400.0f, 50.0f, -300.0f); - cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 10.0f, 3.0f); + offset.set(400.0f, 50.0f, -300.0f); + cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 10.0f, 3.0f); - unkXyz2.set(0.0f, 50.0f, 0.0f); - cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 10.0f, 3.0f); + offset.set(0.0f, 50.0f, 0.0f); + cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 10.0f, 3.0f); - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); if (field_0x6a4.abs(current.pos) < 100.0f) { - field_0x748 = 6; - + mDemoMode = 6; return true; } break; case 6: dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); - cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x40); + cLib_addCalcAngleS(¤t.angle.x, -0x2000, 8, 0x100, 0x40); shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 > 120) { - field_0x68c += speed; - field_0x698 += speed; + mDemoCamCenter += speed; + mDemoCamEye += speed; - unkXyz2.set(400.0f, 100.0f, -300.0f); - cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x698, unkXyz1, 0.5f, 10.0f, 3.0f); + offset.set(400.0f, 100.0f, -300.0f); + cLib_offsetPos(&unkXyz1, &midnaPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamEye, unkXyz1, 0.5f, 10.0f, 3.0f); - unkXyz2.set(0.0f, 100.0f, 0.0f); - cLib_offsetPos(&unkXyz1, &playerPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 10.0f, 3.0f); + offset.set(0.0f, 100.0f, 0.0f); + cLib_offsetPos(&unkXyz1, &playerPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 10.0f, 3.0f); } else { cLib_chaseF(&field_0x6cc, 0.0f, 0.1f); - field_0x68c += speed; - field_0x698 += speed * field_0x6cc; + mDemoCamCenter += speed; + mDemoCamEye += speed * field_0x6cc; - unkXyz2.set(0.0f, 100.0f, 0.0f); - cLib_offsetPos(&unkXyz1, &playerPos, shape_angle.y, &unkXyz2); - cLib_addCalcPos(&field_0x68c, unkXyz1, 0.5f, 10.0f, 3.0f); + offset.set(0.0f, 100.0f, 0.0f); + cLib_offsetPos(&unkXyz1, &playerPos, shape_angle.y, &offset); + cLib_addCalcPos(&mDemoCamCenter, unkXyz1, 0.5f, 10.0f, 3.0f); } - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); if (field_0x728 == 0) { - field_0x748 = 7; - + mDemoMode = 7; return true; } - break; case 7: case 8: unkFlag1 = 0; - if (switchVal == 7 || field_0x6e8 == 0) { + if (mode == 7 || field_0x6e8 == 0) { if (field_0x728 == 110) { unkFlag1 = 1; } - } else if (switchVal == 8 && field_0x728 == 140) { + } else if (mode == 8 && field_0x728 == 140) { unkFlag1 = 1; } if (unkFlag1 != 0) { - if (field_0x6e7 == 1) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -2761,8 +2758,8 @@ bool daKago_c::executeFirstDemo() { if (field_0x728 != 0) { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 1); } else { - if (field_0x73c == 0 && setSceneChange(0)) { - field_0x748 = 9; + if (mSceneType == SCENE_TYPE_LAKE_HYLIA && setSceneChange(0)) { + mDemoMode = 9; } } case 9: @@ -2771,16 +2768,15 @@ bool daKago_c::executeFirstDemo() { shape_angle.y = current.angle.y; shape_angle.x = current.angle.x; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); - unkXyz2.set(0.0f, 100.0f, 0.0f); - cLib_offsetPos(&field_0x68c, ¤t.pos, shape_angle.y, &unkXyz2); + offset.set(0.0f, 100.0f, 0.0f); + cLib_offsetPos(&mDemoCamCenter, ¤t.pos, shape_angle.y, &offset); - field_0x6d4 = 70.0f; - - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + mDemoCamFovy = 70.0f; + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); break; } @@ -2802,13 +2798,13 @@ void daKago_c::executeLandingLakeHairia() { cXyz unkXyz1; cXyz unkXyz2(-700.0f, 0.0f, -300.0f); - switch (field_0x744) { + switch (mMode) { case 0: current.pos.set(-74500.0f, -12775.0f, 31400.0f); if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 3); - eventInfo.onCondition(2); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); return; } @@ -2816,38 +2812,37 @@ void daKago_c::executeLandingLakeHairia() { camera->SetTrimSize(3); current.pos.set(-74500.0f, -12775.0f, 31400.0f); - field_0x698.set(-79460.0f, -13000.0f, 34200.0f); - field_0x68c = current.pos; + mDemoCamEye.set(-79460.0f, -13000.0f, 34200.0f); + mDemoCamCenter = current.pos; - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; - current.angle.x = 0; - shape_angle.x = 0; - shape_angle.y = current.angle.y = cLib_targetAngleY(¤t.pos, &field_0x698); + shape_angle.x = current.angle.x = 0; + shape_angle.y = current.angle.y = cLib_targetAngleY(¤t.pos, &mDemoCamEye); field_0x716 = shape_angle.y + 0x2000; field_0x6a4.set(-77615.0f, -18500.0f, 41400.0f); field_0x6a4 += unkXyz2; - field_0x744 = 1; + mMode = 1; field_0x712 = 0; field_0x728 = 150; - field_0x6f8 = 50.0f; + mFlySpeed = 50.0f; break; case 1: - Z2GetAudioMgr()->setDemoName(field_0x760); - field_0x744 = 2; + Z2GetAudioMgr()->setDemoName(mDemoName); + mMode = 2; case 2: - if (field_0x728 == 0x8c) { - if (field_0x6e7 == 0x01) { + if (field_0x728 == 140) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); } } - field_0x68c = current.pos; + mDemoCamCenter = current.pos; cLib_chaseAngleS(&field_0x712, 0x80, 4); @@ -2856,17 +2851,16 @@ void daKago_c::executeLandingLakeHairia() { cLib_chaseAngleS(&shape_angle.x, 0x1000, 0x20); current.angle.x = shape_angle.x; - field_0x6f8 = 50.0f; + mFlySpeed = 50.0f; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 == 0) { - field_0x744 = 3; + mMode = 3; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 7); - break; case 3: current.pos.set(-76600.0f, -15500.0f, 37340.0f); @@ -2875,37 +2869,36 @@ void daKago_c::executeLandingLakeHairia() { field_0x6a4.set(-77615.0f, -18500.0f, 41400.0f); field_0x6a4 += unkXyz2; - field_0x698.set(-76900.0f, -18550.0f, 41660.0f); - field_0x698 += unkXyz2; + mDemoCamEye.set(-76900.0f, -18550.0f, 41660.0f); + mDemoCamEye += unkXyz2; - field_0x68c = current.pos; + mDemoCamCenter = current.pos; - field_0x6d4 = 70.0f; + mDemoCamFovy = 70.0f; shape_angle.x = current.angle.x = -cLib_targetAngleX(¤t.pos, &field_0x6a4); shape_angle.y = current.angle.y = cLib_targetAngleY(¤t.pos, &field_0x6a4); - field_0x744 = 4; + mMode = 4; field_0x728 = 60; - setBck(13, 2, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e, 2, 10.0f, 1.0f); case 4: - field_0x68c = current.pos; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + mDemoCamCenter = current.pos; + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 == 0) { - field_0x744 = 5; - field_0x728 = 0x28; + mMode = 5; + field_0x728 = 40; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 7); - break; case 5: - field_0x68c = current.pos; + mDemoCamCenter = current.pos; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); cLib_chaseAngleS(&shape_angle.x, 0, 0x80); current.angle.x = shape_angle.x; @@ -2913,10 +2906,10 @@ void daKago_c::executeLandingLakeHairia() { if (field_0x728 == 0) { setRideOff(); - field_0x744 = 6; + mMode = 6; field_0x728 = 100; - setBck(0xf, 0x02, 10.0f, 1.0f); + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 2, 10.0f, 1.0f); } else { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 7); } @@ -2927,28 +2920,29 @@ void daKago_c::executeLandingLakeHairia() { case 6: unkXyz1.set(-77875.0f, -18287.0f, 42000.0f); unkXyz1 += unkXyz2; - cLib_chasePos(&field_0x68c, unkXyz1, field_0x6cc); - if (field_0x68c.abs(unkXyz1) < 500.0f) { + cLib_chasePos(&mDemoCamCenter, unkXyz1, field_0x6cc); + if (mDemoCamCenter.abs(unkXyz1) < 500.0f) { cLib_chaseF(&field_0x6cc, 0.0f, 3.0f); } unkXyz1.set(-77275.0f, -18500.0f, 41090.0f); unkXyz1 += unkXyz2; - cLib_chasePos(&field_0x698, unkXyz1, field_0x6d0); - if (field_0x698.abs(unkXyz1) < 200.0f) { + cLib_chasePos(&mDemoCamEye, unkXyz1, field_0x6d0); + + if (mDemoCamEye.abs(unkXyz1) < 200.0f) { cLib_chaseF(&field_0x6d0, 0.0f, 1.0f); } else { cLib_chaseF(&field_0x6d0, 20.0f, 1.0f); } - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); - cLib_chaseAngleS(&shape_angle.x, -8192, 0x100); + cLib_chaseAngleS(&shape_angle.x, -0x2000, 0x100); current.angle.x = shape_angle.x; if (field_0x728 == 90) { - if (field_0x6e7 == 0x01) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -2956,7 +2950,7 @@ void daKago_c::executeLandingLakeHairia() { } if (field_0x728 == 0) { - setActionMode(4, 0); + setActionMode(ACTION_WAIT_e, 0); camera->Reset(); camera->Start(); @@ -2965,91 +2959,87 @@ void daKago_c::executeLandingLakeHairia() { dComIfGp_event_reset(); Z2GetAudioMgr()->setDemoName(NULL); - return; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 8); } - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); } void daKago_c::executeLandingBoartHouse() { dCamera_c* camera = dCam_getBody(); cXyz unkXyz1; - switch (field_0x744) { + switch (mMode) { case 0: { current.pos.set(5750.0f, 1600.0f, 6100.0f); if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 3); eventInfo.onCondition(2); - return; } camera->Stop(); camera->SetTrimSize(3); - field_0x744 = 10; - + mMode = 10; break; } case 10: { - Z2GetAudioMgr()->setDemoName(field_0x760); + Z2GetAudioMgr()->setDemoName(mDemoName); current.pos.set(5750.0f, 1600.0f, 6100.0f); - setBck(0xf, 0x02, 10.0f, 1.0f); - field_0x698.set(2900.0f, 300.0f, 500.0f); - field_0x68c = current.pos; - field_0x6d4 = 70.0f; + setBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e, 0x02, 10.0f, 1.0f); + mDemoCamEye.set(2900.0f, 300.0f, 500.0f); + mDemoCamCenter = current.pos; + mDemoCamFovy = 70.0f; field_0x6a4.set(3630.0f, 300.0f, 600.0f); shape_angle.x = current.angle.x = -cLib_targetAngleX(¤t.pos, &field_0x6a4); shape_angle.y = current.angle.y = cLib_targetAngleY(¤t.pos, &field_0x6a4); - field_0x744 = 1; + mMode = 1; field_0x712 = 0; - field_0x728 = 0x50; - field_0x6f8 = 50.0f; + field_0x728 = 80; + mFlySpeed = 50.0f; } case 1: { - if (field_0x728 == 0x46) { - if (field_0x6e7 == 0x01) { + if (field_0x728 == 70) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); } } - field_0x68c = current.pos; + mDemoCamCenter = current.pos; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); if (field_0x728 == 0) { - field_0x744 = 2; - field_0x728 = 0x28; + mMode = 2; + field_0x728 = 40; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 9); - break; } case 2: { - field_0x68c = current.pos; + mDemoCamCenter = current.pos; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); cLib_chaseAngleS(&shape_angle.x, 0, 0x80); current.angle.x = shape_angle.x; if (field_0x728 == 0) { setRideOff(); - field_0x744 = 3; + mMode = 3; field_0x728 = 90; } else { dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 9); @@ -3057,32 +3047,31 @@ void daKago_c::executeLandingBoartHouse() { field_0x6cc = 40.0f; field_0x6d0 = 15.0f; - break; } case 3: { unkXyz1.set(3440.0f, 500.0f, 400.0f); - cLib_chasePos(&field_0x68c, unkXyz1, field_0x6cc); - if (field_0x68c.abs(unkXyz1) < 500.0f) { + cLib_chasePos(&mDemoCamCenter, unkXyz1, field_0x6cc); + if (mDemoCamCenter.abs(unkXyz1) < 500.0f) { cLib_chaseF(&field_0x6cc, 0.0f, 3.0f); } unkXyz1.set(3584.0f, 270.0f, 1007.0f); - cLib_chasePos(&field_0x698, unkXyz1, field_0x6d0); - if (field_0x698.abs(unkXyz1) < 200.0f) { + cLib_chasePos(&mDemoCamEye, unkXyz1, field_0x6d0); + if (mDemoCamEye.abs(unkXyz1) < 200.0f) { cLib_chaseF(&field_0x6d0, 0.0f, 1.0f); } else { cLib_chaseF(&field_0x6d0, 15.0f, 1.0f); } - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); - cLib_chaseAngleS(&shape_angle.x, -8192, 0x100); + cLib_chaseAngleS(&shape_angle.x, -0x2000, 0x100); current.angle.x = shape_angle.x; - if (field_0x728 == 0x50) { - if (field_0x6e7 == 0x01) { + if (field_0x728 == 80) { + if (mType == TYPE_NORMAL) { mSound.startCreatureVoice(Z2SE_EN_KC_V_NAKU, -1); } else { mSound.startCreatureVoice(Z2SE_EN_YC_V_NAKU, -1); @@ -3090,10 +3079,10 @@ void daKago_c::executeLandingBoartHouse() { } if (field_0x728 == 0) { - setActionMode(4, 0); + setActionMode(ACTION_WAIT_e, 0); - if (field_0x6e7 == 0x01) { - field_0x728 = 0x78; + if (mType == TYPE_NORMAL) { + field_0x728 = 120; } camera->Reset(); @@ -3103,44 +3092,42 @@ void daKago_c::executeLandingBoartHouse() { dComIfGp_event_reset(); Z2GetAudioMgr()->setDemoName(NULL); - return; } dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 10); - break; } } - camera->Set(field_0x68c, field_0x698, field_0x6d4, 0); + camera->Set(mDemoCamCenter, mDemoCamEye, mDemoCamFovy, 0); } void daKago_c::executeLanding() { - if (this->field_0x73c == 0) { + if (mSceneType == SCENE_TYPE_LAKE_HYLIA) { executeLandingLakeHairia(); - } else if (this->field_0x73c == 2) { + } else if (mSceneType == SCENE_TYPE_BOARD_HOUSE) { executeLandingBoartHouse(); } else { setRideOff(); - setActionMode(4, 0); + setActionMode(ACTION_WAIT_e, 0); } } void daKago_c::moveDemoFly() { - if (field_0x744 == 0) { - cLib_chaseF(&field_0x6f8, l_HIO.mFlightSpeed, 2.0f); + if (mMode == 0) { + cLib_chaseF(&mFlySpeed, l_HIO.mFlightSpeed, 2.0f); if (!eventInfo.checkCommandDemoAccrpt()) { fopAcM_orderPotentialEvent(this, 2, 0xffff, 3); - eventInfo.onCondition(2); + eventInfo.onCondition(dEvtCnd_CANDEMO_e); } else { setPlayerRideOn(); mDashCooldownTime = (int)l_HIO.mDashCooldownTime; mDashTime = (int)l_HIO.mDashTime; - field_0x744 = 1; + mMode = 1; setDashBlurEffect(0); - setBck(11, 0, 5.0f, l_HIO.mDashTimeMultiplier); + setBck(dRes_ID_E_YC_BCK_YC_FLY_DASH_WL_e, 0, 5.0f, l_HIO.mDashTimeMultiplier); dComIfGp_getVibration().StartShock(1, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); mpLockActor = NULL; @@ -3148,9 +3135,8 @@ void daKago_c::moveDemoFly() { mGroundHeight = checkGroundHeight(current.pos, NULL); mRoofHeight = checkRoofHeight(current.pos); - if (mCurrentAction == 9) { + if (mAction == ACTION_DEMO_FLY_e) { dComIfGs_onSaveSwitch(9); - mMsgFlow.init(this, 0xbbf, 0, NULL); } } @@ -3159,75 +3145,72 @@ void daKago_c::moveDemoFly() { mIsFlying = true; - if (mCurrentAction == 9) { + if (mAction == ACTION_DEMO_FLY_e) { mMsgFlow.doFlow(this, NULL, 0); } - if (field_0x744 < 6) { + + if (mMode < 6) { setDashEffect(); - - field_0x6dd = 0x01; - - dComIfGp_setAStatusForce(0x27, 0); + mIsAttack = TRUE; + dComIfGp_setAStatusForce(BUTTON_STATUS_UNK_39, 0); } - switch (field_0x744) { + switch (mMode) { case 1: { - Z2GetAudioMgr()->setDemoName(field_0x760); - - field_0x744 = 2; + Z2GetAudioMgr()->setDemoName(mDemoName); + mMode = 2; } case 2: { - cLib_chaseF(&field_0x6f8, 30.0f, l_HIO.mDashTimeMultiplier * 3.0f); - if (mpMorf->checkFrame(9.0f)) { - if (field_0x6e7 == 0) { + cLib_chaseF(&mFlySpeed, 30.0f, l_HIO.mDashTimeMultiplier * 3.0f); + if (mAnm_p->checkFrame(9.0f)) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSound(Z2SE_EN_YC_DASH, 0, -1); } else { mSound.startCreatureSound(Z2SE_EN_KC_DASH, 0, -1); } } - if (mpMorf->checkFrame(12.0f)) { - field_0x744 = 3; - field_0x728 = 0x14; + + if (mAnm_p->checkFrame(12.0f)) { + mMode = 3; + field_0x728 = 20; dComIfGp_getVibration().StartShock(2, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); dComIfGp_getVibration().StartQuake(1, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); field_0x6e6 = 0; } - break; } case 3: case 4: { - cLib_chaseF(&field_0x6f8, 100.0f, 5.0f); + cLib_chaseF(&mFlySpeed, 100.0f, 5.0f); if (field_0x728 == 0) { - if (field_0x744 == 3) { - field_0x744 = 4; - field_0x728 = 0xf; + if (mMode == 3) { + mMode = 4; + field_0x728 = 15; } else { - field_0x744 = 5; + mMode = 5; dComIfGp_getVibration().StopQuake(0x1f); } } - break; } case 5: { - cLib_chaseF(&field_0x6f8, l_HIO.mFlightSpeed, 5.0f); - if (field_0x6f8 <= l_HIO.mFlightSpeed) { + cLib_chaseF(&mFlySpeed, l_HIO.mFlightSpeed, 5.0f); + if (mFlySpeed <= l_HIO.mFlightSpeed) { field_0x6c8 = 0; field_0x6c4 = 8000.0f; field_0x710 = field_0x712 = 0; -#if VERSION == VERSION_WII_USA_R0 + #if VERSION == VERSION_WII_USA_R0 field_0x72c = 30; -#else + #else if (dComIfGp_getStartStagePoint() == 0) { field_0x72c = 30; } else { field_0x72c = 60 + nREG_S(1); } -#endif + #endif shape_angle.y = current.angle.y; @@ -3237,9 +3220,8 @@ void daKago_c::moveDemoFly() { setFlyAnime(); field_0x710 = field_0x712 = 0; - field_0x744 = 6; + mMode = 6; } - break; } case 6: { @@ -3249,32 +3231,30 @@ void daKago_c::moveDemoFly() { f32 fVar11 = 0.0f; if (cM_ssin(current.angle.x) > 0.0f) { - fVar11 = - l_HIO.mFlightSpeed + l_HIO.mDescentRateIncrement * cM_ssin(current.angle.x); + fVar11 = l_HIO.mFlightSpeed + l_HIO.mDescentRateIncrement * cM_ssin(current.angle.x); } else { fVar11 = l_HIO.mFlightSpeed + l_HIO.mAscentRateDecel * cM_ssin(current.angle.x); } - if (std::abs(field_0x6f8 - fVar11) > 10.0f) { - cLib_chaseF(&field_0x6f8, fVar11, 2.0f); + if (std::abs(mFlySpeed - fVar11) > 10.0f) { + cLib_chaseF(&mFlySpeed, fVar11, 2.0f); } else { - cLib_chaseF(&field_0x6f8, fVar11, 1.0f); + cLib_chaseF(&mFlySpeed, fVar11, 1.0f); } if (field_0x72c == 0) { - setActionMode(0, 0); + setActionMode(ACTION_FLY_e, 0); dComIfGp_event_reset(); Z2GetAudioMgr()->setDemoName(NULL); return; } - break; } } } - cXyz unkXyz1 = dPath_GetPnt(mpPath1, mPathIdx)->m_position; - cXyz unkXyz2 = dPath_GetPnt(mpPath1, mPathIdx - mPathIdxOffset)->m_position; + cXyz unkXyz1 = (Vec)dPath_GetPnt(mpPath1, mPathCurrentPointNo)->m_position; + cXyz unkXyz2 = (Vec)dPath_GetPnt(mpPath1, mPathCurrentPointNo - mPathStep)->m_position; s16 targetYaw = field_0x714 = cLib_targetAngleY(&unkXyz2, &unkXyz1); if (dComIfGp_getStartStagePoint() == 0) { @@ -3288,13 +3268,13 @@ void daKago_c::moveDemoFly() { cLib_addCalcAngleS(¤t.angle.y, cLib_targetAngleY(&unkXyz2, &unkXyz1), 8, 0x40, 0x10); shape_angle.y = current.angle.y; - speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); - speed.y = -field_0x6f8 * cM_ssin(current.angle.x); + speedF = mFlySpeed * std::abs(cM_scos(current.angle.x)); + speed.y = -mFlySpeed * cM_ssin(current.angle.x); f32 nextPath = checkNextPath(unkXyz1); if (nextPath < 0.0f) { if (abs((s16)(targetYaw - cLib_targetAngleY(&unkXyz2, ¤t.pos))) < 0x4000) { - mPathIdx += this->mPathIdxOffset; + mPathCurrentPointNo += mPathStep; if (checkFlySceneChange()) { return; } @@ -3303,41 +3283,41 @@ void daKago_c::moveDemoFly() { } void daKago_c::setFlyEffect() { - if (field_0x6e7 == 1) { + if (mType == TYPE_NORMAL) { return; } - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); JPABaseEmitter* emitter; - field_0xb30 = dComIfGp_particle_set(field_0xb30, 0x8607, ¤t.pos, &tevStr); + field_0xb30 = dComIfGp_particle_set(field_0xb30, dPa_RM(ID_ZF_S_YCFLY_HANDLR2), ¤t.pos, &tevStr); emitter = dComIfGp_particle_getEmitter(field_0xb30); if (emitter != NULL) { - emitter->setGlobalSRTMatrix(model->getAnmMtx(13)); + emitter->setGlobalSRTMatrix(model->getAnmMtx(YC_JNT_HANDL_2_e)); } - field_0xb34 = dComIfGp_particle_set(field_0xb34, 0x8607, ¤t.pos, &tevStr); + field_0xb34 = dComIfGp_particle_set(field_0xb34, dPa_RM(ID_ZF_S_YCFLY_HANDLR2), ¤t.pos, &tevStr); emitter = dComIfGp_particle_getEmitter(field_0xb34); if (emitter != NULL) { - emitter->setGlobalSRTMatrix(model->getAnmMtx(18)); + emitter->setGlobalSRTMatrix(model->getAnmMtx(YC_JNT_HANDR_2_e)); } } void daKago_c::setDashEffect() { - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); JPABaseEmitter* emitter; - if (field_0x6e7 == 0) { - field_0xb38 = dComIfGp_particle_set(field_0xb38, 0x8609, ¤t.pos, &tevStr); - emitter = dComIfGp_particle_getEmitter(this->field_0xb38); + if (mType == TYPE_TWILIGHT) { + field_0xb38 = dComIfGp_particle_set(field_0xb38, dPa_RM(ID_ZF_S_YCDASH_HANDL2), ¤t.pos, &tevStr); + emitter = dComIfGp_particle_getEmitter(field_0xb38); if (emitter != NULL) { - emitter->setGlobalSRTMatrix(model->getAnmMtx(13)); + emitter->setGlobalSRTMatrix(model->getAnmMtx(YC_JNT_HANDL_2_e)); } - field_0xb3c = dComIfGp_particle_set(field_0xb3c, 0x860a, ¤t.pos, &tevStr); + field_0xb3c = dComIfGp_particle_set(field_0xb3c, dPa_RM(ID_ZF_S_YCDASH_HANDR2), ¤t.pos, &tevStr); emitter = dComIfGp_particle_getEmitter(field_0xb3c); if (emitter != NULL) { - emitter->setGlobalSRTMatrix(model->getAnmMtx(18)); + emitter->setGlobalSRTMatrix(model->getAnmMtx(YC_JNT_HANDR_2_e)); } } @@ -3345,25 +3325,27 @@ void daKago_c::setDashEffect() { } void daKago_c::setDamageEffect() { - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); JPABaseEmitter* emitter; - if (field_0x6e7 != 1) { - field_0xb38 = dComIfGp_particle_set(field_0xb38, 0x8603, ¤t.pos, &tevStr); - emitter = dComIfGp_particle_getEmitter(this->field_0xb38); + if (mType != TYPE_NORMAL) { + field_0xb38 = dComIfGp_particle_set(field_0xb38, dPa_RM(ID_ZF_S_YCDAMAGE00_HANDLR2), ¤t.pos, &tevStr); + emitter = dComIfGp_particle_getEmitter(field_0xb38); if (emitter != NULL) { - emitter->setGlobalSRTMatrix(model->getAnmMtx(13)); + emitter->setGlobalSRTMatrix(model->getAnmMtx(YC_JNT_HANDL_2_e)); } - field_0xb3c = dComIfGp_particle_set(field_0xb3c, 0x8603, ¤t.pos, &tevStr); + field_0xb3c = dComIfGp_particle_set(field_0xb3c, dPa_RM(ID_ZF_S_YCDAMAGE00_HANDLR2), ¤t.pos, &tevStr); emitter = dComIfGp_particle_getEmitter(field_0xb3c); if (emitter != NULL) { - emitter->setGlobalSRTMatrix(model->getAnmMtx(18)); + emitter->setGlobalSRTMatrix(model->getAnmMtx(YC_JNT_HANDR_2_e)); } } } void daKago_c::setDashBlurEffect(int param_0) { + UNUSED(param_0); + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); cXyz cameraEye = dCam_getBody()->Eye(); cXyz cameraEyeOffset; @@ -3381,51 +3363,53 @@ void daKago_c::setDashBlurEffect(int param_0) { cameraEyeOffset = cameraEye + local_78; - local_94.set((s16)cLib_targetAngleX(&field_0x6b0, &cameraEye), (s16)cLib_targetAngleY(&field_0x6b0, &cameraEye), 0); + local_94.set((s16)cLib_targetAngleX(&mPrevCamEye, &cameraEye), (s16)cLib_targetAngleY(&mPrevCamEye, &cameraEye), 0); if (l_HIO.mAngleTrackingMode == 0) { field_0x6be.x = -local_94.x; field_0x6be.y = local_94.y; field_0x6be.z = 0; } else { - field_0x6be.x = shape_angle.x * (0.5f + XREG_F(0x13)); + field_0x6be.x = shape_angle.x * (0.5f + XREG_F(19)); field_0x6be.y = shape_angle.y; field_0x6be.z = 0; } - field_0xb40 = dComIfGp_particle_set(field_0xb40, 0x860f, &cameraEyeOffset, &tevStr, &field_0x6be, 0, 0xff, 0, -1, 0, 0, 0); + + field_0xb40 = dComIfGp_particle_set(field_0xb40, dPa_RM(ID_ZF_S_YCSPEED), &cameraEyeOffset, &tevStr, &field_0x6be, NULL, 0xff, NULL, -1, NULL, NULL, NULL); } -void daKago_c::setWallHitEffect(cXyz param_0, int param_1) { +void daKago_c::setWallHitEffect(cXyz i_pos, int i_effType) { // might be a 2D array? static u16 kago_wall_hit_id[6] = { - 0x8658, - 0x86F9, - 0x86FA, - 0x8659, - 0x86FB, - 0x86FC, + dPa_RM(ID_ZF_S_YCHITA), + dPa_RM(ID_ZF_S_YCHITA_1), + dPa_RM(ID_ZF_S_YCHITA_2), + + dPa_RM(ID_ZF_S_YCHITB), + dPa_RM(ID_ZF_S_YCHITB_1), + dPa_RM(ID_ZF_S_YCHITB_2), }; for (int i = 0; i < 3; i++) { - dComIfGp_particle_set(kago_wall_hit_id[i + param_1 * 3], ¶m_0, &tevStr, 0, 0); + dComIfGp_particle_set(kago_wall_hit_id[i + i_effType * 3], &i_pos, &tevStr, NULL, NULL); } } void daKago_c::setSibukiEffect() { static u16 kago_wave_id[3] = { - 0x865A, - 0x865B, - 0x865C, + dPa_RM(ID_ZF_S_YCWAVE00_WAVE), + dPa_RM(ID_ZF_S_YCWAVE01_SPLASH), + dPa_RM(ID_ZF_S_YCWAVE02_DROP), }; - cXyz acStack_28(current.pos.x, field_0x70c + l_HIO.mYOffsetFromWaterSurface, current.pos.z); - csXyz cStack_30(0, shape_angle.y, 0); + cXyz effpos(current.pos.x, field_0x70c + l_HIO.mYOffsetFromWaterSurface, current.pos.z); + csXyz effrot(0, shape_angle.y, 0); for (int i = 0; i < 3; i++) { - field_0xb44[i] = - dComIfGp_particle_set(field_0xb44[i], kago_wave_id[i], &acStack_28, &tevStr, &cStack_30, - 0, 0xff, 0, -1, 0, 0, 0); + mSibukiEmitterIDs[i] = + dComIfGp_particle_set(mSibukiEmitterIDs[i], kago_wave_id[i], &effpos, &tevStr, &effrot, + NULL, 0xff, NULL, -1, NULL, NULL, NULL); } - if (field_0x6e7 == 0) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSoundLevel(Z2SE_EN_YC_SPLASH, 0, -1); } else { mSound.startCreatureSoundLevel(Z2SE_EN_KC_SPLASH, 0, -1); @@ -3433,40 +3417,40 @@ void daKago_c::setSibukiEffect() { } void daKago_c::setDashSibukiEffect() { - cXyz acStack_20(current.pos.x, field_0x70c + l_HIO.mYOffsetFromWaterSurface, current.pos.z); - csXyz cStack_28(0, shape_angle.y, 0); - field_0xb50 = dComIfGp_particle_set(field_0xb50, 0x86fe, &acStack_20, &tevStr, &cStack_28, 0, - 0xff, 0, -1, 0, 0, 0); + cXyz effpos(current.pos.x, field_0x70c + l_HIO.mYOffsetFromWaterSurface, current.pos.z); + csXyz effrot(0, shape_angle.y, 0); + mDashSibukiEmitterID = dComIfGp_particle_set(mDashSibukiEmitterID, dPa_RM(ID_ZF_S_YCWAVE03_SPLASH), &effpos, &tevStr, &effrot, NULL, + 0xff, NULL, -1, NULL, NULL, NULL); } void daKago_c::setWaterFallEffect() { static u16 kago_wave_id[2] = { - 0x865B, - 0x865C, + dPa_RM(ID_ZF_S_YCWAVE01_SPLASH), + dPa_RM(ID_ZF_S_YCWAVE02_DROP), }; - cXyz acStack_28(current.pos.x, current.pos.y, current.pos.z); - csXyz cStack_30(0, shape_angle.y, 0); + cXyz effpos(current.pos.x, current.pos.y, current.pos.z); + csXyz effrot(0, shape_angle.y, 0); for (int i = 0; i < 2; i++) { - field_0xb44[i] = - dComIfGp_particle_set(field_0xb44[i], kago_wave_id[i], &acStack_28, &tevStr, &cStack_30, - 0, 0xff, 0, -1, 0, 0, 0); + mSibukiEmitterIDs[i] = + dComIfGp_particle_set(mSibukiEmitterIDs[i], kago_wave_id[i], &effpos, &tevStr, &effrot, + NULL, 0xFF, NULL, -1, NULL, NULL, NULL); } - if (field_0x6e7 == 0) { + + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSoundLevel(Z2SE_EN_YC_SPLASH, 0, -1); } else { mSound.startCreatureSoundLevel(Z2SE_EN_KC_SPLASH, 0, -1); } } -static void* s_waterfall(void* param_0, void* param_1) { - if (fopAcM_IsActor(param_0) && fopAcM_GetName(param_0) == PROC_Tag_WaterFall) { - if (!fpcM_IsCreating(fopAcM_GetID(param_0))) { - if (((daTagWaterFall_c*)param_0) - ->checkHitWaterFall(((fopAc_ac_c*)param_1)->current.pos)) +static void* s_waterfall(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_Tag_WaterFall) { + if (!fpcM_IsCreating(fopAcM_GetID(i_actor))) { + if (((daTagWaterFall_c*)i_actor)->checkHitWaterFall(((fopAc_ac_c*)i_data)->current.pos)) { - ((daKago_c*)param_1)->onWaterFall(); - return param_0; + ((daKago_c*)i_data)->onWaterFall(); + return i_actor; } } } @@ -3475,44 +3459,46 @@ static void* s_waterfall(void* param_0, void* param_1) { } void daKago_c::setFlySound() { + BOOL isPlayWingSound; + if (field_0x6de != 0) { - BOOL unkFlag1 = FALSE; - if (checkBck(9) || checkBck(15)) { - if (field_0x6e7 == 0) { - if (mpMorf->checkFrame(27.0f)) { - unkFlag1 = TRUE; + isPlayWingSound = FALSE; + if (checkBck(dRes_ID_E_YC_BCK_YC_FLY_e) || checkBck(dRes_ID_E_YC_BCK_YC_FLY_WL_e)) { + if (mType == TYPE_TWILIGHT) { + if (mAnm_p->checkFrame(27.0f)) { + isPlayWingSound = TRUE; } } else { - if (mpMorf->checkFrame(29.0f)) { - unkFlag1 = TRUE; + if (mAnm_p->checkFrame(29.0f)) { + isPlayWingSound = TRUE; } } - } else if (checkBck(21)) { - if (mpMorf->checkFrame(10.0f)) { - unkFlag1 = TRUE; + } else if (checkBck(dRes_ID_E_YC_BCK_YC_HOVERING_e)) { + if (mAnm_p->checkFrame(10.0f)) { + isPlayWingSound = TRUE; } - } else if (checkBck(6)) { - if (mpMorf->checkFrame(26.0f)) { - unkFlag1 = TRUE; + } else if (checkBck(dRes_ID_E_YC_BCK_YC_CATCH_START_e)) { + if (mAnm_p->checkFrame(26.0f)) { + isPlayWingSound = TRUE; } - } else if (checkBck(5)) { - if (mpMorf->checkFrame(10.0f)) { - unkFlag1 = TRUE; + } else if (checkBck(dRes_ID_E_YC_BCK_YC_CATCH_MIDDLE_e)) { + if (mAnm_p->checkFrame(10.0f)) { + isPlayWingSound = TRUE; } - } else if (checkBck(4)) { - if (mpMorf->checkFrame(10.0f) || mpMorf->checkFrame(35.0f)) { - unkFlag1 = TRUE; + } else if (checkBck(dRes_ID_E_YC_BCK_YC_CATCH_END_e)) { + if (mAnm_p->checkFrame(10.0f) || mAnm_p->checkFrame(35.0f)) { + isPlayWingSound = TRUE; } - } else if (checkBck(12) || checkBck(13)) { - if (field_0x6e7 == 0) { + } else if (checkBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_e) || checkBck(dRes_ID_E_YC_BCK_YC_FLY_GLIDE_WL_e)) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSoundLevel(Z2SE_EN_YC_GLIDE, 0, -1); } else { mSound.startCreatureSoundLevel(Z2SE_EN_KC_GLIDE, 0, -1); } } - if (unkFlag1) { - if (field_0x6e7 == 0) { + if (isPlayWingSound) { + if (mType == TYPE_TWILIGHT) { mSound.startCreatureSound(Z2SE_EN_YC_WING, 0, -1); } else { mSound.startCreatureSound(Z2SE_EN_KC_WING, 0, -1); @@ -3526,78 +3512,78 @@ void daKago_c::action() { checkSizeBg(); setFlyEffect(); - field_0x6f0 = mDoCPd_c::getStickX3D(0); - field_0x6f4 = mDoCPd_c::getStickY(0); + mStickX = mDoCPd_c::getStickX3D(PAD_1); + mStickY = mDoCPd_c::getStickY(PAD_1); - u32 unkInt1 = field_0x6ea; - field_0x6ea = 0; + u8 prevIsWaterfall = mIsWaterfall; + mIsWaterfall = FALSE; fpcM_Search(s_waterfall, this); - if (field_0x6ea != 0) { - if (unkInt1 == 0) { + if (mIsWaterfall) { + if (!prevIsWaterfall) { current.angle.x = 0x1000; dComIfGp_getVibration().StartQuake(3, 0x1f, cXyz(0.0f, 1.0f, 0.0f)); } - field_0x6f0 = field_0x6f0 * 0.5f; + mStickX = mStickX * 0.5f; - if (field_0x6f4 < 0.0f) { - field_0x6f4 = field_0x6f4 * 0.5f; + if (mStickY < 0.0f) { + mStickY = mStickY * 0.5f; } else { - field_0x6f4 = field_0x6f4 * 1.5f; + mStickY = mStickY * 1.5f; } setWaterFallEffect(); - } else if (unkInt1 != 0) { + } else if (prevIsWaterfall) { dComIfGp_getVibration().StopQuake(0x1f); } - field_0x6dd = 0; + mIsAttack = FALSE; - switch (mCurrentAction) { - case 0: + switch (mAction) { + case ACTION_FLY_e: executeFly(); break; - case 1: + case ACTION_STAGGER_e: executeStagger(); break; - case 2: + case ACTION_EVENT_e: executeEvent(); break; - case 3: + case ACTION_PERCH_e: executePerch(); break; - case 4: + case ACTION_WAIT_e: executeWait(); break; - case 5: + case ACTION_ATTACK_e: executeAttack(); break; - case 6: + case ACTION_EVENT2_e: executeEvent2(); break; - case 7: + case ACTION_PERCH2_e: executePerch2(); break; - case 8: + case ACTION_LANDING_e: executeLanding(); break; - case 9: + case ACTION_DEMO_FLY_e: moveDemoFly(); break; - case 10: + case ACTION_DEMO_FLY2_e: moveDemoFly(); break; } - if (field_0x6e7 == 1 && (mCurrentAction == 0 || mCurrentAction == 5)) { + if (mType == TYPE_NORMAL && (mAction == ACTION_FLY_e || mAction == ACTION_ATTACK_e)) { mSph.OnAtSetBit(); } setFlySound(); if (daPy_getPlayerActorClass()->checkCargoCarry()) { - if (mCurrentAction == 9 || mCurrentAction == 10) { + if (mAction == ACTION_DEMO_FLY_e || mAction == ACTION_DEMO_FLY2_e) { dCam_getBody()->SetTrimTypeForce(2); } else if (isAttack()) { dCam_getBody()->SetTrimTypeForce(0); @@ -3605,19 +3591,20 @@ void daKago_c::action() { } } - fopAcM_posMoveF(this, 0); + fopAcM_posMoveF(this, NULL); + if (field_0x6dc == 0) { mObjAcch.CrrPos(dComIfG_Bgsp()); } - if (mpMorf != NULL) { - mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); + if (mAnm_p != NULL) { + mAnm_p->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); } field_0x674 = current.pos; if (cLib_chaseF(&field_0x6c4, 0.0f, 60.0f) == 0) { - field_0x6c8 = field_0x6c8 + 0x800; + ANGLE_ADD(field_0x6c8, 0x800); } field_0x6ca = field_0x6c4 * cM_ssin(field_0x6c8); @@ -3628,11 +3615,11 @@ void daKago_c::mtx_set() { mDoMtx_stack_c::ZXYrotM(shape_angle); mDoMtx_stack_c::scaleM(l_HIO.mBasicSize,l_HIO.mBasicSize,l_HIO.mBasicSize); - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); model->setBaseTRMtx(mDoMtx_stack_c::get()); - mpMorf->modelCalc(); + mAnm_p->modelCalc(); - mDoMtx_stack_c::copy(mpMorf->getModel()->getAnmMtx(0x1c)); + mDoMtx_stack_c::copy(mAnm_p->getModel()->getAnmMtx(YC_JNT_LEGR_3_e)); mDoMtx_stack_c::ZrotM(field_0x6ca); cMtx_copy(mDoMtx_stack_c::get(), mLegR3Mtx); } @@ -3654,7 +3641,7 @@ void daKago_c::cc_set() { int daKago_c::execute() { if (executeBalloonMenu()) { #if VERSION != VERSION_SHIELD_DEBUG - dComIfGp_setAStatusForce(0x27, 0); + dComIfGp_setAStatusForce(BUTTON_STATUS_UNK_39, 0); #endif return 1; } @@ -3667,24 +3654,27 @@ int daKago_c::execute() { field_0x72c--; } - if (field_0x720 != 0) { - field_0x720--; + if (mWallHitInvulnTimer != 0) { + mWallHitInvulnTimer--; } + if (mDashCooldownTime != 0) { mDashCooldownTime--; } - if (field_0x71c != 0) { - field_0x71c--; + + if (mWaterSplashTimer != 0) { + mWaterSplashTimer--; } - if (field_0x6ed != 0) { - field_0x6ed--; + + if (unk_0x6ed != 0) { + unk_0x6ed--; } action(); mtx_set(); cc_set(); - field_0x6b0 = dCam_getBody()->Eye(); + mPrevCamEye = dCam_getBody()->Eye(); return 1; } @@ -3698,9 +3688,9 @@ static int daKago_IsDelete(daKago_c* i_this) { } int daKago_c::_delete() { - dComIfG_resDelete(&mPhase, field_0x75c); + dComIfG_resDelete(&mPhase, mArcName); - if (field_0xb54 != 0) { + if (mIsHioSet != 0) { hio_set = false; mDoHIO_DELETE_CHILD(l_HIO.mChild); } @@ -3717,65 +3707,64 @@ static int daKago_Delete(daKago_c* i_this) { return i_this->_delete(); } -int daKago_c::ctrlJoint(J3DJoint* param_0, J3DModel* param_1) { - J3DJoint* joint = param_0; +int daKago_c::ctrlJoint(J3DJoint* i_joint, J3DModel* param_1) { + J3DJoint* joint = i_joint; int jointNo = joint->getJntNo(); mDoMtx_stack_c::copy(param_1->getAnmMtx(jointNo)); - if (jointNo == 3 || jointNo == 5 || jointNo == 6) { - mDoMtx_stack_c::YrotM(field_0x71a); - mDoMtx_stack_c::ZrotM(field_0x718); + if (jointNo == YC_JNT_NECK1_e || jointNo == YC_JNT_NECK2_e || jointNo == YC_JNT_HEAD_e) { + mDoMtx_stack_c::YrotM(mHeadRotY); + mDoMtx_stack_c::ZrotM(mHeadRotZ); } param_1->setAnmMtx(jointNo,mDoMtx_stack_c::get()); cMtx_copy(mDoMtx_stack_c::get(),J3DSys::mCurrentMtx); - return 1; } -int daKago_c::JointCallBack(J3DJoint* param_0, int param_1) { +int daKago_c::JointCallBack(J3DJoint* i_joint, int param_1) { if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daKago_c* kago = (daKago_c*)model->getUserArea(); if (kago != NULL) { - kago->ctrlJoint(param_0, model); + kago->ctrlJoint(i_joint, model); } } + return 1; } int daKago_c::CreateHeap() { J3DModelData* modelData; - if (field_0x6e7 == 0) { - modelData = (J3DModelData*)dComIfG_getObjectRes(field_0x75c, 0x18); + if (mType == TYPE_TWILIGHT) { + modelData = (J3DModelData*)dComIfG_getObjectRes(mArcName, dRes_ID_E_YC_BMD_YC_e); } else { - modelData = (J3DModelData*)dComIfG_getObjectRes(field_0x75c, 0x10); + modelData = (J3DModelData*)dComIfG_getObjectRes(mArcName, dRes_ID_E_KC_BMD_KC_e); } - JUT_ASSERT(0x139f, modelData != NULL); + JUT_ASSERT(5023, modelData != NULL); - mpMorf = new mDoExt_McaMorfSO( - modelData, NULL, NULL, - (J3DAnmTransform*)dComIfG_getObjectRes(field_0x75c, getBckName(9)), 2, 1.0f, 0, -1, &this->mSound, 0x80000, 0x11000084); - - if (mpMorf == NULL || mpMorf->getModel() == NULL) { + mAnm_p = new mDoExt_McaMorfSO(modelData, NULL, NULL, + (J3DAnmTransform*)dComIfG_getObjectRes(mArcName, getBckName(dRes_ID_E_YC_BCK_YC_FLY_e)), 2, 1.0f, 0, -1, &mSound, 0x80000, 0x11000084); + if (mAnm_p == NULL || mAnm_p->getModel() == NULL) { return 0; } - J3DModel* model = mpMorf->getModel(); + J3DModel* model = mAnm_p->getModel(); model->setUserArea((uintptr_t)this); for (u16 i = 1; i < model->getModelData()->getJointNum(); i++) { - if (i == 3 || i == 5 || i == 6) { + if (i == YC_JNT_NECK1_e || i == YC_JNT_NECK2_e || i == YC_JNT_HEAD_e) { model->getModelData()->getJointNodePointer(i)->setCallBack(JointCallBack); } } + return 1; } -static int useHeapInit(fopAc_ac_c* param_0) { - daKago_c* kago = (daKago_c*)param_0; - return kago->CreateHeap(); +static int useHeapInit(fopAc_ac_c* actor) { + daKago_c* i_this = (daKago_c*)actor; + return i_this->CreateHeap(); } int daKago_c::create() { @@ -3786,39 +3775,40 @@ int daKago_c::create() { mpPath1 = dPath_GetRoomPath(param & 0xff, fopAcM_GetRoomNo(this)); if (mpPath1 == NULL) { OS_REPORT("KAGO ......NONONONONONO PATH !!!!\n"); - return 5; + return cPhs_ERROR_e; } } - field_0x6e7 = (fopAcM_GetParam(this) >> 16) & 0xff; - if (field_0x6e7 == 0xff) { - field_0x6e7 = 0; - } - if (field_0x6e7 == 0) { - field_0x75c = "E_YC"; - field_0x760 = "KAGO_YAMI"; - } else { - field_0x75c = "E_KC"; - field_0x760 = "KAGO_HIKARI"; + mType = (fopAcM_GetParam(this) >> 16) & 0xff; + if (mType == 0xFF) { + mType = TYPE_TWILIGHT; } - int phase_state = dComIfG_resLoad(&mPhase, field_0x75c); + if (mType == TYPE_TWILIGHT) { + mArcName = "E_YC"; + mDemoName = "KAGO_YAMI"; + } else { + mArcName = "E_KC"; + mDemoName = "KAGO_HIKARI"; + } + + int phase_state = dComIfG_resLoad(&mPhase, mArcName); if (phase_state == cPhs_COMPLEATE_e) { OS_REPORT("Kago PARAM %x \n", fopAcM_GetParam(this)); - if (fopAcM_entrySolidHeap(this, useHeapInit, 0x23a0) == 0) { + if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x23a0)) { return cPhs_ERROR_e; } - if (hio_set == 0) { - field_0xb54 = 1; - hio_set = 1; - l_HIO.mChild = mDoHIO_CREATE_CHILD("", &l_HIO); + if (!hio_set) { + mIsHioSet = TRUE; + hio_set = TRUE; + l_HIO.mChild = mDoHIO_CREATE_CHILD("カーゴロック(いい奴)", &l_HIO); } attention_info.flags = 0; - fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMtx(this, mAnm_p->getModel()->getBaseTRMtx()); fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f); fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f); @@ -3841,16 +3831,16 @@ int daKago_c::create() { maxFallSpeed = -100.0f; gravity = 0.0f; - mPathIdxOffset = 0x01; + mPathStep = 1; - setActionMode(4, 0); + setActionMode(ACTION_WAIT_e, 0); #if DEBUG - if (mDoCPd_c::getHoldL(0) && mDoCPd_c::getHoldR(0)) { - dComIfGs_offSwitch(0x2d, fopAcM_GetRoomNo(this)); - dComIfGs_offSwitch(0x32, fopAcM_GetRoomNo(this)); + if (mDoCPd_c::getHoldL(PAD_1) && mDoCPd_c::getHoldR(PAD_1)) { + dComIfGs_offSwitch(45, fopAcM_GetRoomNo(this)); + dComIfGs_offSwitch(50, fopAcM_GetRoomNo(this)); - setActionMode(8, 0); + setActionMode(ACTION_LANDING_e, 0); setMidnaRideOn(); setPlayerRideOn(); @@ -3860,19 +3850,19 @@ int daKago_c::create() { } #endif - field_0x73c = 3; + mSceneType = SCENE_TYPE_DEFAULT; if (strcmp("F_SP115", dComIfGp_getStartStageName()) == 0) { if (dComIfGp_getStartStageRoomNo() == 0) { - field_0x73c = 0; + mSceneType = SCENE_TYPE_LAKE_HYLIA; } } else if (strcmp("F_SP112", dComIfGp_getStartStageName()) == 0) { if (dComIfGp_getStartStageRoomNo() == 1) { - field_0x73c = 1; + mSceneType = SCENE_TYPE_RIVER; } } else if (strcmp("F_SP126", dComIfGp_getStartStageName()) == 0 && dComIfGp_getStartStageRoomNo() == 0) { - field_0x73c = 2; + mSceneType = SCENE_TYPE_BOARD_HOUSE; } mBalloon2DId = fpcM_ERROR_PROCESS_ID_e; @@ -3885,8 +3875,8 @@ int daKago_c::create() { return phase_state; } -static int daKago_Create(daKago_c* param_0) { - return param_0->create(); +static int daKago_Create(daKago_c* i_this) { + return i_this->create(); } static actor_method_class l_daKago_Method = { diff --git a/src/d/actor/d_a_kytag03.cpp b/src/d/actor/d_a_kytag03.cpp index b1a5c745ea..84de5f2b46 100644 --- a/src/d/actor/d_a_kytag03.cpp +++ b/src/d/actor/d_a_kytag03.cpp @@ -28,7 +28,12 @@ static void dEnvSe_getNearPathPos(cXyz* param_0, cXyz* param_1, dPath* i_path) { cM3dGLin sp14; for (i = 0; i < i_path->m_num; i++) { +#if TARGET_LITTLE_ENDIAN + Vec copy = point_p->m_position; + sp8 = cM3d_LenSq(param_1, ©); +#else sp8 = cM3d_LenSq(param_1, &point_p->m_position); +#endif if (var_f31 > sp8) { var_f31 = sp8; var_r31 = i; diff --git a/src/d/actor/d_a_mant.cpp b/src/d/actor/d_a_mant.cpp index 006851e017..5d8f0027e0 100644 --- a/src/d/actor/d_a_mant.cpp +++ b/src/d/actor/d_a_mant.cpp @@ -268,9 +268,9 @@ void daMant_packet_c::draw() { GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0); - GXSetArray(GX_VA_POS, this->getPos(), 12); - GXSetArray(GX_VA_NRM, this->getNrm(), 12); - GXSetArray(GX_VA_TEX0, &l_texCoord, 8); + GXSETARRAY(GX_VA_POS, this->getPos(), sizeof(mPos[0]), 12); + GXSETARRAY(GX_VA_NRM, this->getNrm(), sizeof(mNrm[0]), 12); + GXSETARRAY(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord), 8); GXSetZCompLoc(0); GXSetZMode(GX_ENABLE, GX_LEQUAL, GX_ENABLE); diff --git a/src/d/actor/d_a_mg_fish.cpp b/src/d/actor/d_a_mg_fish.cpp index c0034bec30..6c15c9b0d8 100644 --- a/src/d/actor/d_a_mg_fish.cpp +++ b/src/d/actor/d_a_mg_fish.cpp @@ -120,7 +120,7 @@ static void* s_hitfish_sub(void* a, void* b) { if (fopAc_IsActor(a)) { mg_fish_class* fish = (mg_fish_class*)a; if (fopAcM_GetName(fish) == PROC_MG_FISH && fish->mCurAction == ACTION_MG_FISH_MF_HIT) { - return &fish->actor.base; + return &LEAFDRAW_BASE(&fish->actor); } } return NULL; @@ -678,7 +678,7 @@ s32 daMg_Fish_Draw(mg_fish_class* i_this) { &i_this->actor.tevStr, 0, 1.0f, &dDlst_shadowControl_c::mSimpleTexObj); } if (i_this->mKind2 == 3) { - _GXColor color; + GXColor color; color.r = 0x32; color.g = 0x2d; color.b = 0x14; @@ -4061,7 +4061,7 @@ static actor_method_class l_daMg_Fish_Method = { }; actor_process_profile_definition g_profile_MG_FISH = { - (uint)fpcLy_CURRENT_e, // mLayerID + (u32)fpcLy_CURRENT_e, // mLayerID 7, // mListID fpcPi_CURRENT_e, // mListPrio PROC_MG_FISH, // mProcName diff --git a/src/d/actor/d_a_mg_fshop.cpp b/src/d/actor/d_a_mg_fshop.cpp index f24db03e89..cd3ff1ef19 100644 --- a/src/d/actor/d_a_mg_fshop.cpp +++ b/src/d/actor/d_a_mg_fshop.cpp @@ -1778,7 +1778,7 @@ actor_process_profile_definition g_profile_FSHOP = { fpcPi_CURRENT_e, // mListPrio PROC_FSHOP, // mProcName &g_fpcLf_Method.base, // sub_method - 0x00006B80, // mSize + sizeof(fshop_class), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_mg_rod.cpp b/src/d/actor/d_a_mg_rod.cpp index c849337c1e..6ea11af8ea 100644 --- a/src/d/actor/d_a_mg_rod.cpp +++ b/src/d/actor/d_a_mg_rod.cpp @@ -3298,7 +3298,7 @@ static void lure_main(dmg_rod_class* i_this) { actor->speed.y = 0.0f; } - dKy_Sound_set(actor->current.pos, 5, fopAcM_GetID(i_this), 5); + dKy_Sound_set(actor->current.pos, 5, fopAcM_GetID(actor), 5); if (actor->speedF > 5.0f) { actor->speedF = 5.0f; } diff --git a/src/d/actor/d_a_mirror.cpp b/src/d/actor/d_a_mirror.cpp index 5dc2f871df..e3c0332925 100644 --- a/src/d/actor/d_a_mirror.cpp +++ b/src/d/actor/d_a_mirror.cpp @@ -10,8 +10,8 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" -#include -#include +#include +#include #include "m_Do/m_Do_lib.h" #ifndef __MWERKS__ diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp index 9907fcc299..2af71470c2 100644 --- a/src/d/actor/d_a_npc4.cpp +++ b/src/d/actor/d_a_npc4.cpp @@ -614,7 +614,7 @@ BOOL daNpcF_c::execute() { return true; } -int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, _GXColorS10* i_fogColor, +int daNpcF_c::draw(BOOL i_isTest, BOOL param_1, f32 i_shadowDepth, GXColorS10* i_fogColor, BOOL i_hideDamage) { f32 damage_ratio, frame; J3DModel* model = mAnm_p->getModel(); diff --git a/src/d/actor/d_a_npc_cd2.cpp b/src/d/actor/d_a_npc_cd2.cpp index 503bff2d3f..c3bfee4aff 100644 --- a/src/d/actor/d_a_npc_cd2.cpp +++ b/src/d/actor/d_a_npc_cd2.cpp @@ -1025,7 +1025,12 @@ void PathTrace_c::setAvoidPoint() { JUT_ASSERT(1604, mObstacle != NULL); cXyz& selfPos = fopAcM_GetPosition(mMyself); s16 obstacleAngle = cLib_targetAngleY(&selfPos, &fopAcM_GetPosition(mObstacle)); +#if TARGET_LITTLE_ENDIAN + Vec copy = dPath_GetPnt(mPath, field_0x20)->m_position; + s16 diff = (s16)obstacleAngle - cLib_targetAngleY(&selfPos, ©); +#else s16 diff = (s16)obstacleAngle - cLib_targetAngleY(&selfPos, &dPath_GetPnt(mPath, field_0x20)->m_position); +#endif s16 rot; if (diff > 0) { rot = (s16)obstacleAngle + 0x4000; diff --git a/src/d/actor/d_a_npc_chat.cpp b/src/d/actor/d_a_npc_chat.cpp index 2099c572f1..80beb543f1 100644 --- a/src/d/actor/d_a_npc_chat.cpp +++ b/src/d/actor/d_a_npc_chat.cpp @@ -2809,7 +2809,7 @@ int daNpcChat_c::Draw() { return 1; } -int daNpcChat_c::draw(int param_1, int param_2, f32 param_3, _GXColorS10* i_color, int param_5) { +int daNpcChat_c::draw(int param_1, int param_2, f32 param_3, GXColorS10* i_color, int param_5) { J3DModel* model = mAnm_p->getModel(); J3DModelData* a_mdlData_p = model->getModelData(); diff --git a/src/d/actor/d_a_npc_gwolf.cpp b/src/d/actor/d_a_npc_gwolf.cpp index 75a68afda6..33eddd3c07 100644 --- a/src/d/actor/d_a_npc_gwolf.cpp +++ b/src/d/actor/d_a_npc_gwolf.cpp @@ -408,7 +408,7 @@ int daNpc_GWolf_c::Draw() { ); } -int daNpc_GWolf_c::draw(int param_1, int param_2, f32 param_3, _GXColorS10* i_color, int param_5) { +int daNpc_GWolf_c::draw(int param_1, int param_2, f32 param_3, GXColorS10* i_color, int param_5) { J3DModel* model = mAnm_p->getModel(); J3DModelData* mdlData_p = model->getModelData(); diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index e80428e355..e9dac046ab 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -199,7 +199,7 @@ int daNpc_Hanjo_c::create() { mTwilight = 0; int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { - OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, + OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (u32)mType, mFlowNodeNo, getPathID(), fopAcM_GetParam(this)); if (isDelete()) { OS_REPORT("===>isDelete:TRUE\n"); diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index cc26d8172f..730c0674f7 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -18,7 +18,7 @@ #include "d/d_msg_object.h" #include "f_op/f_op_actor.h" #include "f_op/f_op_camera_mng.h" -#include +#include #include static daNpc_Maro_c::actionFunc dummy_lit_3931() { diff --git a/src/d/actor/d_a_npc_tk.cpp b/src/d/actor/d_a_npc_tk.cpp index 8b83afb997..2f3adf6e0f 100644 --- a/src/d/actor/d_a_npc_tk.cpp +++ b/src/d/actor/d_a_npc_tk.cpp @@ -1970,8 +1970,8 @@ void daNPC_TK_c::calcWolfDemoCam() { void daNPC_TK_c::calcWolfDemoCam2() { cXyz targetPos; - cXyz curPos = dPath_GetPnt(mWolfPathData, mPathStep2)->m_position; - cXyz prevPos = dPath_GetPnt(mWolfPathData, mPathStep2 - 1)->m_position; + cXyz curPos = (Vec)dPath_GetPnt(mWolfPathData, mPathStep2)->m_position; + cXyz prevPos = (Vec)dPath_GetPnt(mWolfPathData, mPathStep2 - 1)->m_position; cLib_addCalcPos2(&field_0x6fc, curPos, 0.2f, field_0x714); cXyz offset(0.0f, 0.0f, 400.0f); @@ -2273,11 +2273,11 @@ void daNPC_TK_c::executeWolfPerch() { field_0x6e0 = field_0x6e0 + field_0x6e4; } - cXyz pathPnt3 = dPath_GetPnt(mWolfPathData, mWolfPathData->m_num - 1)->m_position; + cXyz pathPnt3 = (Vec)dPath_GetPnt(mWolfPathData, mWolfPathData->m_num - 1)->m_position; if (pathPnt3.abs(current.pos) < 500.0f) { cXyz cStack_8c; - cXyz cStack_98 = dPath_GetPnt(mWolfPathData, mWolfPathData->m_num - 2)->m_position; - cXyz cStack_a4 = dPath_GetPnt(mWolfPathData, mWolfPathData->m_num - 1)->m_position; + cXyz cStack_98 = (Vec)dPath_GetPnt(mWolfPathData, mWolfPathData->m_num - 2)->m_position; + cXyz cStack_a4 = (Vec)dPath_GetPnt(mWolfPathData, mWolfPathData->m_num - 1)->m_position; mDoMtx_stack_c::YrotS(-cLib_targetAngleY(&cStack_98, &cStack_a4)); mDoMtx_stack_c::transM(-current.pos.x, -current.pos.y, -current.pos.z); mDoMtx_stack_c::multVec(&cStack_98, &cStack_8c); @@ -2368,8 +2368,14 @@ void daNPC_TK_c::executeWolfPerch() { pathPnt2 = dPath_GetPnt(mWolfPathData, mPathStep2)->m_position; cLib_addCalcPos2(&field_0x6fc, pathPnt2, 0.1f, 3.0f); +#if TARGET_LITTLE_ENDIAN + Vec copy = dPath_GetPnt(mWolfPathData, mPathStep2 - 1)->m_position; + s16 angleY = cLib_targetAngleY(¤t.pos, + ©); +#else s16 angleY = cLib_targetAngleY(¤t.pos, &dPath_GetPnt(mWolfPathData, mPathStep2 - 1)->m_position); +#endif cLib_addCalcAngleS(&shape_angle.y, angleY + 0x2000, 8, 0x100, 0x10); cLib_chaseF(&speed.y, field_0x678, 0.5f); diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index e385f97b43..f57c4c34a7 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -7,7 +7,7 @@ #include "d/actor/d_a_npc_wrestler.h" #include "d/d_timer.h" -#include +#include #include #include "d/actor/d_a_tag_arena.h" #include "d/actor/d_a_npc_gra.h" @@ -5226,7 +5226,7 @@ actor_process_profile_definition g_profile_NPC_WRESTLER = { fpcPi_CURRENT_e, // mListPrio PROC_NPC_WRESTLER, // mProcName &g_fpcLf_Method.base, // sub_method - 0xEA0, // mSize (fix this) + sizeof(daNpcWrestler_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_npc_zrz.cpp b/src/d/actor/d_a_npc_zrz.cpp index 6adc1e99d7..a811e4b326 100644 --- a/src/d/actor/d_a_npc_zrz.cpp +++ b/src/d/actor/d_a_npc_zrz.cpp @@ -330,7 +330,7 @@ int daNpc_zrZ_c::Draw() { } } -int daNpc_zrZ_c::draw(int i_isTest, int param_1, f32 i_shadowDepth, _GXColorS10* i_fogColor, +int daNpc_zrZ_c::draw(int i_isTest, int param_1, f32 i_shadowDepth, GXColorS10* i_fogColor, int i_hideDamage) { f32 damage_ratio, frame; J3DModel* model = mAnm_p->getModel(); diff --git a/src/d/actor/d_a_obj_bemos.cpp b/src/d/actor/d_a_obj_bemos.cpp index 3db66c6352..2bbd723340 100644 --- a/src/d/actor/d_a_obj_bemos.cpp +++ b/src/d/actor/d_a_obj_bemos.cpp @@ -1198,7 +1198,7 @@ void daObjBm_c::Bgc_c::wall_pos(fopAc_ac_c const* i_actor, daObjBm_c::BgcSrc_c c sp54 = sp48 + sp6C; M_wall_work[i].Set(&sp48, &sp54, i_actor); - M_wall_work[i].SetActorPid(i_actor->base.base.id); + M_wall_work[i].SetActorPid(fopAcM_GetID(i_actor)); if (dComIfG_Bgsp().LineCross(&M_wall_work[i])) { field_0x64[i] = M_wall_work[i].GetCross(); diff --git a/src/d/actor/d_a_obj_digsnow.cpp b/src/d/actor/d_a_obj_digsnow.cpp index 7eca2582c9..0357ac1dbc 100644 --- a/src/d/actor/d_a_obj_digsnow.cpp +++ b/src/d/actor/d_a_obj_digsnow.cpp @@ -103,7 +103,7 @@ void daObjDigSnow_c::mode_wait() { void daObjDigSnow_c::mode_init_dig() { dBgS_ObjGndChk obj_gnd_chk; - obj_gnd_chk.SetActorPid(base.base.id); + obj_gnd_chk.SetActorPid(fopAcM_GetID(this)); obj_gnd_chk.SetPos(¤t.pos); f32 gnd_height = dComIfG_Bgsp().GroundCross(&obj_gnd_chk); diff --git a/src/d/actor/d_a_obj_dmelevator.cpp b/src/d/actor/d_a_obj_dmelevator.cpp index 2e89ee2f85..e37490fbbf 100644 --- a/src/d/actor/d_a_obj_dmelevator.cpp +++ b/src/d/actor/d_a_obj_dmelevator.cpp @@ -609,7 +609,7 @@ int daObjDmElevator_c::moveProc() { if (field_0x5e0 + (int)(char)field_0x5e1 == 1) { const float fVar6 = current.pos.abs(path_point); - uVar1 = ((uint)(char)((fVar6 < 200.0f) << 3) << 0x1c) >> 0x1f; + uVar1 = ((u32)(char)((fVar6 < 200.0f) << 3) << 0x1c) >> 0x1f; } int ret; diff --git a/src/d/actor/d_a_obj_flag2.cpp b/src/d/actor/d_a_obj_flag2.cpp index 3f805d7c00..8eb95c1302 100644 --- a/src/d/actor/d_a_obj_flag2.cpp +++ b/src/d/actor/d_a_obj_flag2.cpp @@ -274,9 +274,9 @@ void FlagCloth_c::draw() { GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0); - GXSetArray(GX_VA_POS, getPos(), sizeof(cXyz)); - GXSetArray(GX_VA_NRM, getNormal(), sizeof(cXyz)); - GXSetArray(GX_VA_TEX0, mpTexCoord, 8); + GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz)); + GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz)); + GXSETARRAY(GX_VA_TEX0, mpTexCoord, sizeof(mpTexCoord), 8); GXSetZCompLoc(GX_FALSE); GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); GXLoadTexObj(&mTexObj, GX_TEXMAP0); @@ -304,7 +304,7 @@ void FlagCloth_c::draw() { GXSetClipMode(GX_CLIP_ENABLE); GXSetCullMode(GX_CULL_BACK); GXCallDisplayList(l_pennant_flagDL, 0x80); - GXSetArray(GX_VA_NRM, getNormalBack(), sizeof(cXyz)); + GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz)); GXSetCullMode(GX_CULL_FRONT); GXCallDisplayList(l_pennant_flagDL, 0x80); J3DShape::resetVcdVatCache(); diff --git a/src/d/actor/d_a_obj_flag3.cpp b/src/d/actor/d_a_obj_flag3.cpp index 0978924c28..c4431e388b 100644 --- a/src/d/actor/d_a_obj_flag3.cpp +++ b/src/d/actor/d_a_obj_flag3.cpp @@ -233,9 +233,9 @@ inline void FlagCloth2_c::draw() { GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0); - GXSetArray(GX_VA_POS, getPos(), sizeof(cXyz)); - GXSetArray(GX_VA_NRM, getNormal(), sizeof(cXyz)); - GXSetArray(GX_VA_TEX0, mTexCoord, 8); + GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz)); + GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz)); + GXSETARRAY(GX_VA_TEX0, mTexCoord, sizeof(mTexCoord), 8); GXSetZCompLoc(GX_FALSE); GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); GXLoadTexObj(&mTexObj, GX_TEXMAP0); @@ -276,7 +276,7 @@ inline void FlagCloth2_c::draw() { GXEnd(); } - GXSetArray(GX_VA_NRM, getNormalBack(), sizeof(cXyz)); + GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz)); GXSetCullMode(GX_CULL_FRONT); for (int i = 0; i < 5; i++) { diff --git a/src/d/actor/d_a_obj_gra2_soldier.inc b/src/d/actor/d_a_obj_gra2_soldier.inc index b94a6117e6..39c74ac179 100644 --- a/src/d/actor/d_a_obj_gra2_soldier.inc +++ b/src/d/actor/d_a_obj_gra2_soldier.inc @@ -899,7 +899,7 @@ int daObj_GrA_c::rollAttack(void* param_1) { cXyz sp54(current.pos); sp54.y += 100.0f; field_0x1f4c.Set(&sp54, &player->eyePos, this); - field_0x1f4c.SetActorPid(base.base.id); + field_0x1f4c.SetActorPid(fopAcM_GetID(this)); s16 sVar1 = cLib_targetAngleX(&sp54, &player->eyePos); if (isFirstGra() || !dComIfG_Bgsp().LineCross(&field_0x1f4c)) { @@ -924,7 +924,7 @@ int daObj_GrA_c::rollAttack(void* param_1) { cXyz sp60(current.pos); sp60.y += 100.0f; field_0x1f4c.Set(&sp60, &player->eyePos, this); - field_0x1f4c.SetActorPid(base.base.id); + field_0x1f4c.SetActorPid(fopAcM_GetID(this)); if (player->checkPlayerFly() == 0 && (player->current.pos.y - current.pos.y) > 50.0f) { player->offGoronSideMove(); diff --git a/src/d/actor/d_a_obj_hakai_ftr.cpp b/src/d/actor/d_a_obj_hakai_ftr.cpp index e1f42e611b..95fcf1acca 100644 --- a/src/d/actor/d_a_obj_hakai_ftr.cpp +++ b/src/d/actor/d_a_obj_hakai_ftr.cpp @@ -27,7 +27,7 @@ static u32 const l_bmdIdx[3] = {4, 4, 4}; static u32 const l_dzbIdx[3] = {7, 7, 7}; int daObjHFtr_c::createHeap() { - uint nameId = getNameId(); + u32 nameId = getNameId(); J3DModelData* a_model_data_p = (J3DModelData*)dComIfG_getObjectRes(l_arcName[nameId], l_bmdIdx[nameId]); diff --git a/src/d/actor/d_a_obj_hbombkoya.cpp b/src/d/actor/d_a_obj_hbombkoya.cpp index c701ffbf0e..de659ec008 100644 --- a/src/d/actor/d_a_obj_hbombkoya.cpp +++ b/src/d/actor/d_a_obj_hbombkoya.cpp @@ -273,18 +273,18 @@ static actor_method_class daObjHBombkoya_METHODS = { }; actor_process_profile_definition g_profile_Obj_HBombkoya = { - fpcLy_CURRENT_e, // mLayerID - 3, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_Obj_HBombkoya, // mProcName - &g_fpcLf_Method.base, // sub_method - 0x000007C0, // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopAc_Method.base, // sub_method - 675, // mPriority - &daObjHBombkoya_METHODS, // sub_method - 0x00040100, // mStatus - fopAc_ACTOR_e, // mActorType - fopAc_CULLBOX_CUSTOM_e, // cullType + fpcLy_CURRENT_e, // mLayerID + 3, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_Obj_HBombkoya, // mProcName + &g_fpcLf_Method.base, // sub_method + sizeof(daObjHBombkoya_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // sub_method + 675, // mPriority + &daObjHBombkoya_METHODS, // sub_method + 0x00040100, // mStatus + fopAc_ACTOR_e, // mActorType + fopAc_CULLBOX_CUSTOM_e, // cullType }; diff --git a/src/d/actor/d_a_obj_ice_l.cpp b/src/d/actor/d_a_obj_ice_l.cpp index 7048eb3a18..69d53f653a 100644 --- a/src/d/actor/d_a_obj_ice_l.cpp +++ b/src/d/actor/d_a_obj_ice_l.cpp @@ -261,7 +261,7 @@ actor_process_profile_definition g_profile_Obj_Ice_l = { fpcPi_CURRENT_e, // mListPrio PROC_Obj_Ice_l, // mProcName &g_fpcLf_Method.base, // sub_method - 0x00000640, // mSize + sizeof(daObjIce_l_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_obj_iceblock.cpp b/src/d/actor/d_a_obj_iceblock.cpp index 43a078154c..0e16af5ec4 100644 --- a/src/d/actor/d_a_obj_iceblock.cpp +++ b/src/d/actor/d_a_obj_iceblock.cpp @@ -604,7 +604,7 @@ int daObjIceBlk_c::checkWallPre(s16 i_angle) { int var_r29 = -1; - linchk.SetActorPid(base.base.id); + linchk.SetActorPid(fopAcM_GetID(this)); mDoMtx_stack_c::YrotS(i_angle); mDoMtx_stack_c::multVec(&cXyz::BaseZ, &spBC); @@ -639,7 +639,7 @@ int daObjIceBlk_c::checkBgHit() { int var_r29 = -1; - mGndChk.SetActorPid(base.base.id); + mGndChk.SetActorPid(fopAcM_GetID(this)); for (int i = 0; i < 5; i++) { static const Vec l_check_offsetXZ[] = { @@ -703,7 +703,7 @@ BOOL daObjIceBlk_c::checkFall() { cXyz end; dBgS_ObjLinChk linchk; - linchk.SetActorPid(base.base.id); + linchk.SetActorPid(fopAcM_GetID(this)); for (int i = 0; i < 5; i++) { static const Vec l_check_offsetXZ[] = { diff --git a/src/d/actor/d_a_obj_kbacket.cpp b/src/d/actor/d_a_obj_kbacket.cpp index 2abed0f54b..5168288b3c 100644 --- a/src/d/actor/d_a_obj_kbacket.cpp +++ b/src/d/actor/d_a_obj_kbacket.cpp @@ -530,7 +530,7 @@ int daObj_KBacket_c::Draw() { } else { cM3dGPla plane; if (dComIfG_Bgsp().GetTriPla(mGndChk, &plane) != 0) { - _GXTexObj* p_Var4 = dDlst_shadowControl_c::getSimpleTex(); + GXTexObj* p_Var4 = dDlst_shadowControl_c::getSimpleTex(); dComIfGd_setSimpleShadow(¤t.pos, field_0xa00, 50.0f, &plane.mNormal, 0, 1.0f, p_Var4); } diff --git a/src/d/actor/d_a_obj_ladder.cpp b/src/d/actor/d_a_obj_ladder.cpp index 52310f15e0..0003afebd3 100644 --- a/src/d/actor/d_a_obj_ladder.cpp +++ b/src/d/actor/d_a_obj_ladder.cpp @@ -193,7 +193,7 @@ int Act_c::Create() { mDoMtx_stack_c::multVecZero(&gndVec); mDoMtx_stack_c::pop(); mGndChk.SetPos(&gndVec); - mGndChk.SetActorPid(base.base.id); + mGndChk.SetActorPid(fopAcM_GetID(this)); mHeight = dComIfG_Bgsp().GroundCross(&mGndChk); mInDemo = false; mEventIdx = dComIfGp_getEventManager().getEventIdx(this, prm_get_evId()); diff --git a/src/d/actor/d_a_obj_laundry_rope.cpp b/src/d/actor/d_a_obj_laundry_rope.cpp index 080f45915b..33c186529b 100644 --- a/src/d/actor/d_a_obj_laundry_rope.cpp +++ b/src/d/actor/d_a_obj_laundry_rope.cpp @@ -26,8 +26,8 @@ void daObjLndRope_c::create_init() { dPath* roomPath = dPath_GetRoomPath(getPathId(), fopAcM_GetRoomNo(this)); dPnt* pathPoints = roomPath->m_points; - cXyz startPoint = pathPoints[0].m_position; - cXyz endPoint = pathPoints[1].m_position; + cXyz startPoint = (Vec)pathPoints[0].m_position; + cXyz endPoint = (Vec)pathPoints[1].m_position; current.pos = (startPoint + endPoint) * 0.5f; mPos = endPoint - startPoint; @@ -230,7 +230,7 @@ static int createSolidHeap(fopAc_ac_c* i_this) { } int daObjLndRope_c::draw() { - static _GXColor l_color = {20, 15, 0, 255}; + static GXColor l_color = {20, 15, 0, 255}; g_env_light.settingTevStruct(16, ¤t.pos, &tevStr); mRopeMat.update(15, l_color, &tevStr); dComIfGd_set3DlineMat(&mRopeMat); diff --git a/src/d/actor/d_a_obj_lp.cpp b/src/d/actor/d_a_obj_lp.cpp index 77011548d5..76a2412d91 100644 --- a/src/d/actor/d_a_obj_lp.cpp +++ b/src/d/actor/d_a_obj_lp.cpp @@ -18,7 +18,7 @@ static int daObj_Lp_Draw(obj_lp_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)&i_this->mActor; wd_ss* mWdSs = i_this->mWdSs; int roomNo = fopAcM_GetRoomNo(a_this); - static _GXColor l_color = { + static GXColor l_color = { 0x14, 0x0A, 0x0A, diff --git a/src/d/actor/d_a_obj_lv4chandelier.cpp b/src/d/actor/d_a_obj_lv4chandelier.cpp index 918cd4da77..f34da80ddf 100644 --- a/src/d/actor/d_a_obj_lv4chandelier.cpp +++ b/src/d/actor/d_a_obj_lv4chandelier.cpp @@ -429,7 +429,7 @@ void daObjLv4Chan_c::chkGnd() { cStack_18 = field_0x23bc; cStack_18.y += 300.0f; mGndChk.SetPos(&cStack_18); - mGndChk.SetActorPid(base.base.id); + mGndChk.SetActorPid(fopAcM_GetID(this)); field_0x247c = dComIfG_Bgsp().GroundCross(&mGndChk); } diff --git a/src/d/actor/d_a_obj_lv4digsand.cpp b/src/d/actor/d_a_obj_lv4digsand.cpp index 2cda594ce7..feb4dbd8ca 100644 --- a/src/d/actor/d_a_obj_lv4digsand.cpp +++ b/src/d/actor/d_a_obj_lv4digsand.cpp @@ -100,7 +100,7 @@ void daObjL4DigSand_c::mode_wait() { void daObjL4DigSand_c::mode_init_dig() { dBgS_ObjGndChk gndchk; - gndchk.SetActorPid(base.base.id); + gndchk.SetActorPid(fopAcM_GetID(this)); gndchk.SetPos(¤t.pos); f32 gnd_y = dComIfG_Bgsp().GroundCross(&gndchk); diff --git a/src/d/actor/d_a_obj_magLiftRot.cpp b/src/d/actor/d_a_obj_magLiftRot.cpp index ce64f16e90..9f07a93386 100644 --- a/src/d/actor/d_a_obj_magLiftRot.cpp +++ b/src/d/actor/d_a_obj_magLiftRot.cpp @@ -367,8 +367,8 @@ actor_process_profile_definition g_profile_Obj_MagLiftRot = { 3, // mListID fpcPi_CURRENT_e, // mListPrio PROC_Obj_MagLiftRot, // mProcName - &g_fpcLf_Method.base, // sub_method - 0x00000634, // mSize + &g_fpcLf_Method.base, // sub_method + sizeof(daMagLiftRot_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_obj_maki.cpp b/src/d/actor/d_a_obj_maki.cpp index c079a2a000..a36f20c2dd 100644 --- a/src/d/actor/d_a_obj_maki.cpp +++ b/src/d/actor/d_a_obj_maki.cpp @@ -19,7 +19,7 @@ #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_mtx.h" -#include +#include #include daObj_Maki_HIO_c::daObj_Maki_HIO_c() { diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index 2c19743070..bd9acf4305 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -154,7 +154,7 @@ void daObjMovebox::Bgc_c::gnd_pos(const daObjMovebox::Act_c* i_actor, mDoMtx_stack_c::multVec(&sp50, &sp5C); M_gnd_work[i].SetPos(&sp5C); - M_gnd_work[i].SetActorPid(i_actor->base.base.id); + M_gnd_work[i].SetActorPid(fopAcM_GetID(i_actor)); field_0x0[i] = dComIfG_Bgsp().GroundCross(&M_gnd_work[i]); #if DEBUG L_gnd_start[i_actor->mType][i].set(sp50); @@ -234,7 +234,7 @@ void daObjMovebox::Bgc_c::wall_pos(daObjMovebox::Act_c const* i_actor, sp54 = sp48 + sp6C; M_wall_work[i].Set(&sp48, &sp54, i_actor); - M_wall_work[i].SetActorPid(i_actor->base.base.id); + M_wall_work[i].SetActorPid(fopAcM_GetID(i_actor)); #if DEBUG L_wall_start[i_actor->mType][i].set(sp48); L_wall_end[i_actor->mType][i].set(sp54); @@ -338,7 +338,7 @@ bool daObjMovebox::Bgc_c::chk_wall_touch(daObjMovebox::Act_c const* i_actor, sp38 += i_actor->current.pos; sp44 = sp38 + sp68; - touch_work.SetActorPid(i_actor->base.base.id); + touch_work.SetActorPid(fopAcM_GetID(i_actor)); #if DEBUG if (field_0xA28 != g_Counter.mCounter0) { diff --git a/src/d/actor/d_a_obj_nameplate.cpp b/src/d/actor/d_a_obj_nameplate.cpp index fc9e9074ab..586d6451a1 100644 --- a/src/d/actor/d_a_obj_nameplate.cpp +++ b/src/d/actor/d_a_obj_nameplate.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_obj_nameplate.h" #include "d/actor/d_a_alink.h" #include "d/d_a_obj.h" -#include +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_math.h" diff --git a/src/d/actor/d_a_obj_pdtile.cpp b/src/d/actor/d_a_obj_pdtile.cpp index dde20c199e..8159fecb41 100644 --- a/src/d/actor/d_a_obj_pdtile.cpp +++ b/src/d/actor/d_a_obj_pdtile.cpp @@ -421,7 +421,7 @@ int daObjPDtile_c::Execute(Mtx** param_1) { -1.0f, 0); } dBgS_ObjGndChk adStack_e4; - adStack_e4.SetActorPid(base.base.id); + adStack_e4.SetActorPid(fopAcM_GetID(this)); adStack_e4.SetPos(¤t.pos); dComIfG_Bgsp().GroundCross(&adStack_e4); if (home.pos.y - current.pos.y < -3000.0f) { diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index fcf5bf8107..b29714116e 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -6,7 +6,7 @@ #include "d/actor/d_a_obj_smtile.h" #include "d/actor/d_a_tag_evtarea.h" #include "d/actor/d_a_tag_kmsg.h" -#include +#include #include #include "f_op/f_op_actor_mng.h" #include "f_op/f_op_msg.h" diff --git a/src/d/actor/d_a_obj_smtile.cpp b/src/d/actor/d_a_obj_smtile.cpp index ebe2baaffa..6738908a2f 100644 --- a/src/d/actor/d_a_obj_smtile.cpp +++ b/src/d/actor/d_a_obj_smtile.cpp @@ -278,7 +278,7 @@ void daObj_SMTile_c::touchPrtcls(f32 param_1) { for (int i = 0; i < 21; i++) { if ((field_0xa28[i] == 1) || (field_0xa28[i] == 2)) { mParticleIds[i] = - dComIfGp_particle_set(mParticleIds[i], id[field_0xa28[i]], &field_0x788[i], 0, 0); + dComIfGp_particle_set(mParticleIds[i], ::id[field_0xa28[i]], &field_0x788[i], 0, 0); JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(mParticleIds[i]); if (emitter != NULL) { f32 dVar6 = mpHIO->m.field_0x4 - mParticleTimers[i]; diff --git a/src/d/actor/d_a_obj_sw.cpp b/src/d/actor/d_a_obj_sw.cpp index 4f5209e7bc..d3ee3f170b 100644 --- a/src/d/actor/d_a_obj_sw.cpp +++ b/src/d/actor/d_a_obj_sw.cpp @@ -16,7 +16,7 @@ #include "m_Do/m_Do_ext.h" static int daObj_Sw_Draw(obj_sw_class* i_this) { - static _GXColor l_color = { + static GXColor l_color = { 0x14, 0x0F, 0x00, diff --git a/src/d/actor/d_a_obj_szbridge.cpp b/src/d/actor/d_a_obj_szbridge.cpp index d12efae324..e66eb5c1a8 100644 --- a/src/d/actor/d_a_obj_szbridge.cpp +++ b/src/d/actor/d_a_obj_szbridge.cpp @@ -62,7 +62,7 @@ void daObjSZbridge_c::chkBg() { chk_pos.y += 700.0f; gnd_chk.SetPos(&chk_pos); - gnd_chk.SetActorPid(base.base.id); + gnd_chk.SetActorPid(fopAcM_GetID(this)); mGroundY = dComIfG_Bgsp().GroundCross(&gnd_chk); chk_pos.y = mGroundY; diff --git a/src/d/actor/d_a_obj_tornado.cpp b/src/d/actor/d_a_obj_tornado.cpp index 6761f0a329..9f996ccab1 100644 --- a/src/d/actor/d_a_obj_tornado.cpp +++ b/src/d/actor/d_a_obj_tornado.cpp @@ -231,8 +231,8 @@ actor_process_profile_definition g_profile_Obj_Tornado = { 7, // mListID fpcPi_CURRENT_e, // mListPrio PROC_Obj_Tornado, // mProcName - &g_fpcLf_Method.base, // sub_method - 0x00000770, // mSize + &g_fpcLf_Method.base, // sub_method + sizeof(daObjTrnd_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_obj_volcball.cpp b/src/d/actor/d_a_obj_volcball.cpp index faad909e12..6c02a2311b 100644 --- a/src/d/actor/d_a_obj_volcball.cpp +++ b/src/d/actor/d_a_obj_volcball.cpp @@ -618,7 +618,7 @@ actor_process_profile_definition g_profile_Obj_VolcanicBall = { fpcPi_CURRENT_e, // mListPrio PROC_Obj_VolcanicBall, // mProcName &g_fpcLf_Method.base, // sub_method - 0x00002928, // mSize + sizeof(daObjVolcBall_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_obj_wchain.cpp b/src/d/actor/d_a_obj_wchain.cpp index d812cc0040..1200d62938 100644 --- a/src/d/actor/d_a_obj_wchain.cpp +++ b/src/d/actor/d_a_obj_wchain.cpp @@ -388,8 +388,8 @@ actor_process_profile_definition g_profile_Obj_Wchain = { 7, // mListID fpcPi_CURRENT_e, // mListPrio PROC_Obj_Wchain, // mProcName - &g_fpcLf_Method.base, // sub_method - 0x000007BC, // mSize + &g_fpcLf_Method.base, // sub_method + sizeof(daObjWchain_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_obj_wind_stone.cpp b/src/d/actor/d_a_obj_wind_stone.cpp index 5a1c51639f..bdbd66e198 100644 --- a/src/d/actor/d_a_obj_wind_stone.cpp +++ b/src/d/actor/d_a_obj_wind_stone.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_obj_wind_stone.h" #include "d/actor/d_a_alink.h" #include "d/d_meter2_info.h" -#include +#include static int daWindStone_c_createHeap(fopAc_ac_c* i_this) { return static_cast(i_this)->createHeap(); diff --git a/src/d/actor/d_a_scene_exit.cpp b/src/d/actor/d_a_scene_exit.cpp index 846b833faa..80c3a11f21 100644 --- a/src/d/actor/d_a_scene_exit.cpp +++ b/src/d/actor/d_a_scene_exit.cpp @@ -110,7 +110,7 @@ actor_process_profile_definition2 g_profile_SCENE_EXIT = { fpcPi_CURRENT_e, // mListPrio PROC_SCENE_EXIT, // mProcName &g_fpcLf_Method.base, // sub_method - 0x0000059C, // mSize + sizeof(daScex_c), // mSize 0, // mSizeOther 0, // mParameters &g_fopAc_Method.base, // sub_method diff --git a/src/d/actor/d_a_spinner.cpp b/src/d/actor/d_a_spinner.cpp index 497f8a75d5..9d43468e1f 100644 --- a/src/d/actor/d_a_spinner.cpp +++ b/src/d/actor/d_a_spinner.cpp @@ -223,8 +223,8 @@ int daSpinner_c::posMove() { cXyz sp54; while (var_f31 > 0.0f) { - Vec* curr_path_pos = &mpPathMove->m_points[mPathNo].m_position; - Vec* next_path_pos = getPathNextPos(); + BE(Vec)* curr_path_pos = &mpPathMove->m_points[mPathNo].m_position; + BE(Vec)* next_path_pos = getPathNextPos(); cXyz sp48(current.pos.x, current.pos.y - -20.0f, current.pos.z); cXyz sp3C(curr_path_pos->x - next_path_pos->x, curr_path_pos->y - next_path_pos->y, curr_path_pos->z - next_path_pos->z); @@ -420,8 +420,13 @@ void daSpinner_c::setAnm() { mButtonJump = true; } - if (mpPathMove != NULL) { + if (mpPathMove != NULL) { +#if TARGET_PC + Vec copy = mpPathMove->m_points[mPathNo].m_position; + s16 targetAngle = cLib_targetAngleY(©, ¤t.pos); +#else s16 targetAngle = cLib_targetAngleY(&mpPathMove->m_points[mPathNo].m_position, ¤t.pos); +#endif if (s16(targetAngle - current.angle.y) > 0) { current.angle.y += 0x3000; } else { @@ -447,7 +452,7 @@ int daSpinner_c::setNextPathNum() { return 0; } -Vec* daSpinner_c::getPathNextPos() { +BE(Vec)* daSpinner_c::getPathNextPos() { int next_point_no = mPathNo + mPathDirection; if (next_point_no < 0) { return &(mpPathMove->m_points + mpPathMove->m_num - 1)->m_position; diff --git a/src/d/actor/d_a_tag_Lv7Gate.cpp b/src/d/actor/d_a_tag_Lv7Gate.cpp index 7571fd2cae..f622fff77d 100644 --- a/src/d/actor/d_a_tag_Lv7Gate.cpp +++ b/src/d/actor/d_a_tag_Lv7Gate.cpp @@ -77,8 +77,8 @@ int daTagLv7Gate_c::setPath(int i_path_ID) { return 0; } - cXyz pos1 = dPath_GetPnt(mRoomPath, 0)->m_position; - cXyz pos2 = dPath_GetPnt(mRoomPath, 1)->m_position; + cXyz pos1 = (Vec)dPath_GetPnt(mRoomPath, 0)->m_position; + cXyz pos2 = (Vec)dPath_GetPnt(mRoomPath, 1)->m_position; mPos1.set(pos1); diff --git a/src/d/actor/d_a_tag_guard.cpp b/src/d/actor/d_a_tag_guard.cpp index 661a907e70..7b28c3df1a 100644 --- a/src/d/actor/d_a_tag_guard.cpp +++ b/src/d/actor/d_a_tag_guard.cpp @@ -54,7 +54,13 @@ void daTagGuard_c::create_init() { current.pos.z = pnt1->m_position.z; #endif +#if TARGET_LITTLE_ENDIAN + Vec copy1 = pnt1->m_position; + Vec copy2 = pnt1->m_position; + current.angle.y = cLib_targetAngleY(©1, ©2); +#else current.angle.y = cLib_targetAngleY(&pnt1->m_position, &pnt2->m_position); +#endif } static int daTagGuard_Create(fopAc_ac_c* i_this) { diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index 12b0d6468e..2b5e8bb69e 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -643,7 +643,7 @@ void daTbox_c::dropProcInit() { JUT_ASSERT(0x56A, path_p != NULL); cXyz pos = current.pos; - cXyz pnt1 = path_p->m_points[1].m_position; + cXyz pnt1 = (Vec)path_p->m_points[1].m_position; f32 var_f30; if (path_p->m_num == 2) { @@ -682,7 +682,7 @@ int daTbox_c::calcJumpGoalAndAngle(cXyz* i_pos, s16* i_angle) { dPath* path_p = dPath_GetRoomPath(getPathId(), -1); if (path_p != NULL) { cXyz home_pos = home.pos; - cXyz vec2 = path_p->m_points[1].m_position; + cXyz vec2 = (Vec)path_p->m_points[1].m_position; f32 dist_xz = home_pos.absXZ(vec2); s16 angle; @@ -749,7 +749,7 @@ void daTbox_c::dropProcInit2() { f32 temp; if (path_p->m_num == 2) { cXyz vec1 = current.pos; - cXyz vec2 = path_p->m_points[1].m_position; + cXyz vec2 = (Vec)path_p->m_points[1].m_position; field_0x97c = false; f32 delta_y = vec1.y - vec2.y; f32 abs_gravity = fabsf(fopAcM_GetGravity(this)); @@ -795,7 +795,7 @@ void daTbox_c::dropProc() { dBgS_ObjGndChk gnd_chk; gnd_chk.SetPos(&chkpos); - gnd_chk.SetActorPid(base.base.id); + gnd_chk.SetActorPid(fopAcM_GetID(this)); dComIfG_Bgsp().GroundCross(&gnd_chk); int bg_index = gnd_chk.GetBgIndex(); diff --git a/src/d/actor/d_a_vrbox.cpp b/src/d/actor/d_a_vrbox.cpp index 681ed0ed92..24fa1fb9d3 100644 --- a/src/d/actor/d_a_vrbox.cpp +++ b/src/d/actor/d_a_vrbox.cpp @@ -43,6 +43,9 @@ static int daVrbox_Draw(vrbox_class* i_this) { soraModel_p->setBaseTRMtx(mDoMtx_stack_c::get()); dKy_GxFog_set(); +#if !TARGET_PC + // This code is broken but happens to not do anything on the real game. + // these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData? for (int i = ((J3DModelData*)soraModel_p)->getMaterialNum() - 1; i >= 0; i--) { J3DMaterial* material_p = ((J3DModelData*)soraModel_p)->getMaterialNodePointer(i); @@ -54,6 +57,7 @@ static int daVrbox_Draw(vrbox_class* i_this) { fogInfo_p->mType = 2; } +#endif dComIfGd_setListSky(); mDoExt_modelUpdateDL(soraModel_p); diff --git a/src/d/actor/d_a_vrbox2.cpp b/src/d/actor/d_a_vrbox2.cpp index 33d9a27762..5644ddd5a0 100644 --- a/src/d/actor/d_a_vrbox2.cpp +++ b/src/d/actor/d_a_vrbox2.cpp @@ -51,6 +51,9 @@ static int daVrbox2_Draw(vrbox2_class* i_this) { filelist_p = NULL; dKy_GxFog_set(); +#if !TARGET_PC + // Code is broken but does nothing on real hardware. + // these casts look like fake matches, but this ptr is used as both J3DModel and J3DModelData? sp38 = (J3DModelData*)kumo_model_p; sp34 = (J3DModelData*)sun_model_p; @@ -87,6 +90,7 @@ static int daVrbox2_Draw(vrbox2_class* i_this) { fogInfo_p->mType = 2; } +#endif if ((g_env_light.vrbox_kasumi_outer_col.r + g_env_light.vrbox_kasumi_outer_col.g + g_env_light.vrbox_kasumi_outer_col.b + g_env_light.vrbox_sky_col.r + g_env_light.vrbox_sky_col.g + diff --git a/src/d/actor/d_flower.inc b/src/d/actor/d_flower.inc index ccd874c21f..c738c22510 100644 --- a/src/d/actor/d_flower.inc +++ b/src/d/actor/d_flower.inc @@ -527,10 +527,10 @@ void dFlower_packet_c::draw() { GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); - GXSetArray(GX_VA_POS, &l_flowerPos, 0xC); - GXSetArray(GX_VA_NRM, &l_flowerNormal, 0xC); - GXSetArray(GX_VA_CLR0, &l_flowerColor, 4); - GXSetArray(GX_VA_TEX0, &l_flowerTexCoord, 8); + GXSETARRAY(GX_VA_POS, &l_flowerPos, sizeof(l_flowerPos), 0xC); + GXSETARRAY(GX_VA_NRM, &l_flowerNormal, sizeof(l_flowerNormal), 0xC); + GXSETARRAY(GX_VA_CLR0, &l_flowerColor, sizeof(l_flowerColor), 4); + GXSETARRAY(GX_VA_TEX0, &l_flowerTexCoord, sizeof(l_flowerTexCoord), 8); GXColor sp64; dFlower_room_c* sp5C = m_room; @@ -622,10 +622,10 @@ void dFlower_packet_c::draw() { sp5C++; } - GXSetArray(GX_VA_POS, mp_pos, 0xC); - GXSetArray(GX_VA_NRM, &l_flowerNormal2, 0xC); - GXSetArray(GX_VA_CLR0, mp_colors, 4); - GXSetArray(GX_VA_TEX0, mp_texCoords, 8); + GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_flowerPos2), 0xC); + GXSETARRAY(GX_VA_NRM, &l_flowerNormal2, sizeof(l_flowerNormal2), 0xC); + GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_flowerColor2), 4); + GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_flowerTexCoord2), 8); sp5C = m_room; diff --git a/src/d/actor/d_grass.inc b/src/d/actor/d_grass.inc index b78ccd8112..ea68b43705 100644 --- a/src/d/actor/d_grass.inc +++ b/src/d/actor/d_grass.inc @@ -5,7 +5,7 @@ #include "JSystem/J3DGraphBase/J3DDrawBuffer.h" #include "SSystem/SComponent/c_lib.h" #include "f_op/f_op_overlap_mng.h" -#include +#include #include #include "d/d_camera.h" @@ -511,10 +511,10 @@ void dGrass_packet_c::draw() { GXSetVtxDescv(l_vtxDescList); GXSetVtxAttrFmtv(GX_VTXFMT0, l_vtxAttrFmtList); - GXSetArray(GX_VA_POS, mp_pos, sizeof(Vec)); - GXSetArray(GX_VA_NRM, mp_normal, sizeof(Vec)); - GXSetArray(GX_VA_CLR0, mp_colors, sizeof(GXColor)); - GXSetArray(GX_VA_TEX0, mp_texCoords, 8); + GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_pos), sizeof(Vec)); + GXSETARRAY(GX_VA_NRM, mp_normal, sizeof(l_normal), sizeof(Vec)); + GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_color), sizeof(GXColor)); + GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_texCoord), 8); GXColorS10 spA0 = {0, 0, 0, 0}; GXColorS10 sp98 = {0, 0, 0, 0}; diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index f3318b63c2..1a2385821f 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -173,6 +173,7 @@ dAttention_c::dAttention_c(fopAc_ac_c* i_player, u32 i_padNo) { mAttnBlockTimer = 0; heap = mDoExt_createSolidHeapFromGameToCurrent(0x9000, 0); + JKRHEAP_NAME(heap, "dAttention_c::heap"); JUT_ASSERT(0x198, heap != NULL); J3DModelData* modelDataR = (J3DModelData*)dComIfG_getObjectRes("Always", 0x25); diff --git a/src/d/d_bg_s.cpp b/src/d/d_bg_s.cpp index 7295126a6b..44cf033a9b 100644 --- a/src/d/d_bg_s.cpp +++ b/src/d/d_bg_s.cpp @@ -10,6 +10,7 @@ #include "d/d_bg_w.h" #include "d/d_com_inf_game.h" #include "f_op/f_op_actor_mng.h" +#include "dusk/offset_ptr.h" void cBgS_ChkElm::Init() { m_bgw_base_ptr = NULL; @@ -141,34 +142,34 @@ f32 cBgS::GroundCross(cBgS_GndChk* p_gnd) { // u32 is needed to match in ConvDzb ? struct cBgD_t_ { // Vertex Info - /* 0x00 */ int m_v_num; - /* 0x04 */ u32 m_v_tbl; + /* 0x00 */ BE(int) m_v_num; + /* 0x04 */ OFFSET_PTR_RAW m_v_tbl; // Triangle Info - /* 0x08 */ int m_t_num; - /* 0x0C */ u32 m_t_tbl; + /* 0x08 */ BE(int) m_t_num; + /* 0x0C */ OFFSET_PTR_RAW m_t_tbl; // Spatial List Info - /* 0x10 */ int m_b_num; - /* 0x14 */ u32 m_b_tbl; + /* 0x10 */ BE(int) m_b_num; + /* 0x14 */ OFFSET_PTR_RAW m_b_tbl; // Face Group Data Info - /* 0x18 */ int m_tree_num; - /* 0x1C */ u32 m_tree_tbl; + /* 0x18 */ BE(int) m_tree_num; + /* 0x1C */ OFFSET_PTR_RAW m_tree_tbl; // String Group Info - /* 0x20 */ int m_g_num; - /* 0x24 */ u32 m_g_tbl; + /* 0x20 */ BE(int) m_g_num; + /* 0x24 */ OFFSET_PTR_RAW m_g_tbl; // Surface Property Info - /* 0x28 */ int m_ti_num; - /* 0x2C */ u32 m_ti_tbl; + /* 0x28 */ BE(int) m_ti_num; + /* 0x2C */ OFFSET_PTR_RAW m_ti_tbl; /* 0x30 */ u32 m_flags; }; // Size: 0x34 struct cBgD_Grp_t_ { - u32 strOffset; + OFFSET_PTR_RAW strOffset; u8 data[0x30]; }; @@ -181,6 +182,18 @@ void* cBgS::ConvDzb(void* p_dzb) { return p_dzb; } +#if TARGET_PC + pbgd->m_v_tbl.setBase(p_dzb); + pbgd->m_t_tbl.setBase(p_dzb); + pbgd->m_b_tbl.setBase(p_dzb); + pbgd->m_tree_tbl.setBase(p_dzb); + pbgd->m_g_tbl.setBase(p_dzb); + pbgd->m_ti_tbl.setBase(p_dzb); + + for (int i = 0; i < pbgd->m_g_num; i++) { + ((cBgD_Grp_t_*)pbgd->m_g_tbl)[i].strOffset.setBase(p_dzb); + } +#else if (pbgd->m_v_tbl != 0) { pbgd->m_v_tbl += (uintptr_t)p_dzb; } @@ -195,6 +208,7 @@ void* cBgS::ConvDzb(void* p_dzb) { ((cBgD_Grp_t_*)pbgd->m_g_tbl)[i].strOffset = (uintptr_t)p_dzb + ((cBgD_Grp_t_*)pbgd->m_g_tbl)[i].strOffset; } +#endif return p_dzb; } diff --git a/src/d/d_bg_w.cpp b/src/d/d_bg_w.cpp index d0f5a718eb..7fb93080a2 100644 --- a/src/d/d_bg_w.cpp +++ b/src/d/d_bg_w.cpp @@ -60,12 +60,25 @@ void cBgW::GlobalVtx() { if (pm_base != NULL) { if (!mNeedsFullTransform) { for (int i = 0; i < pm_bgd->m_v_num; i++) { - Vec* vtx = &pm_vtx_tbl[i]; + BE(Vec)* vtx = &pm_vtx_tbl[i]; +#if TARGET_LITTLE_ENDIAN + Vec copy = *vtx; + VECAdd(©, &mTransVel, ©); + *vtx = copy; +#else VECAdd(vtx, &mTransVel, vtx); +#endif } } else { for (int i = 0; i < pm_bgd->m_v_num; i++) { +#if TARGET_LITTLE_ENDIAN + Vec copy1 = pm_bgd->m_v_tbl[i]; + Vec copy2; + MTXMultVec(pm_base, ©1, ©2); + *(BE(Vec)*)&pm_vtx_tbl[i] = copy2; +#else MTXMultVec(pm_base, &pm_bgd->m_v_tbl[i], &pm_vtx_tbl[i]); +#endif } } } @@ -107,9 +120,19 @@ void cBgW::CalcPlane() { } } else { for (int i = 0; i < pm_bgd->m_t_num; i++) { +#if TARGET_LITTLE_ENDIAN + Vec copy1 = pm_vtx_tbl[tri[i].m_vtx_idx0]; + Vec copy2 = pm_vtx_tbl[tri[i].m_vtx_idx1]; + Vec copy3 = pm_vtx_tbl[tri[i].m_vtx_idx2]; + pm_tri[i].m_plane.SetupFrom3Vtx( + ©1, + ©2, + ©3); +#else pm_tri[i].m_plane.SetupFrom3Vtx(&pm_vtx_tbl[tri[i].m_vtx_idx0], &pm_vtx_tbl[tri[i].m_vtx_idx1], &pm_vtx_tbl[tri[i].m_vtx_idx2]); +#endif } } } @@ -190,7 +213,7 @@ void cBgW::MakeBlckTransMinMax(cXyz* i_min, cXyz* i_max) { } void cBgW::MakeBlckMinMax(int vtx_index, cXyz* i_min, cXyz* i_max) { - Vec* vtx = &pm_vtx_tbl[vtx_index]; + BE(Vec)* vtx = &pm_vtx_tbl[vtx_index]; if (i_min->x > vtx->x) { i_min->x = vtx->x; diff --git a/src/d/d_bg_w_kcol.cpp b/src/d/d_bg_w_kcol.cpp index e7b5c76ebd..17ec0298c1 100644 --- a/src/d/d_bg_w_kcol.cpp +++ b/src/d/d_bg_w_kcol.cpp @@ -20,10 +20,40 @@ dBgWKCol::dBgWKCol() { dBgWKCol::~dBgWKCol() {} void* dBgWKCol::initKCollision(void* i_kclData) { +#if TARGET_PC + KC_Header* kcl = (KC_Header*)i_kclData; + kcl->m_pos_data.setBase(kcl); + kcl->m_nrm_data.setBase(kcl); + kcl->m_prism_data.setBase(kcl); + kcl->m_block_data.setBase(kcl); + + be_swap(kcl->m_prism_thickness); + be_swap(kcl->m_area_min_pos); + be_swap(kcl->m_area_x_width_mask); + be_swap(kcl->m_area_y_width_mask); + be_swap(kcl->m_area_z_width_mask); + be_swap(kcl->m_block_width_shift); + be_swap(kcl->m_area_x_blocks_shift); + be_swap(kcl->m_area_xy_blocks_shift); + + Vec* p_pos = kcl->m_pos_data; + Vec* p_nrm = kcl->m_nrm_data; + KC_PrismData* p_prism = kcl->m_prism_data; + BE(u32)* p_block = kcl->m_block_data; + int np = 0, nn = 0; + for (Vec* pw = p_pos; pw < p_nrm; pw++, np++) + be_swap(*pw); + for (Vec* pw = p_nrm; (uintptr_t)pw < (uintptr_t)p_prism; pw++, nn++) + be_swap(*pw); + // for (KC_PrismData* pw = p_prism; (uintptr_t)pw < (uintptr_t)p_block; pw++) + // be_swap(*pw); + +#else ((KC_Header*)i_kclData)->m_pos_data = (Vec*)((uintptr_t)((KC_Header*)i_kclData) + (uintptr_t)((KC_Header*)i_kclData)->m_pos_data); ((KC_Header*)i_kclData)->m_nrm_data = (Vec*)((uintptr_t)((KC_Header*)i_kclData) + (uintptr_t)((KC_Header*)i_kclData)->m_nrm_data); ((KC_Header*)i_kclData)->m_prism_data = (KC_PrismData*)((uintptr_t)((KC_Header*)i_kclData) + (uintptr_t)((KC_Header*)i_kclData)->m_prism_data); - ((KC_Header*)i_kclData)->m_block_data = (KC_PrismData*)((uintptr_t)((KC_Header*)i_kclData) + (uintptr_t)((KC_Header*)i_kclData)->m_block_data); + ((KC_Header*)i_kclData)->m_block_data = (u16*)((uintptr_t)((KC_Header*)i_kclData) + (uintptr_t)((KC_Header*)i_kclData)->m_block_data); +#endif return i_kclData; } @@ -35,7 +65,7 @@ void dBgWKCol::create(void* pprism, void* plc) { ClrDBgWBase(); m_pkc_head = (KC_Header*)pprism; - u32 poly_num = ((uintptr_t)m_pkc_head->m_block_data - (uintptr_t)m_pkc_head->m_prism_data) / 0xC; + u32 poly_num = ((uintptr_t)(u16*)m_pkc_head->m_block_data - (uintptr_t)(u16*)m_pkc_head->m_prism_data) / 0xC; poly_num++; JUT_ASSERT(0x50, poly_num <= 0x4000); @@ -339,12 +369,12 @@ bool dBgWKCol::LineCheck(cBgS_LinChk* plinchk) { int sp64; int sp60; int sp5C; - u16* sp58 = NULL; - u16* sp54 = NULL; - u16* sp50 = NULL; - u16* sp4C = NULL; - u16* sp48 = NULL; - u16* sp44 = NULL; + BE(u16)* sp58 = NULL; + BE(u16)* sp54 = NULL; + BE(u16)* sp50 = NULL; + BE(u16)* sp4C = NULL; + BE(u16)* sp48 = NULL; + BE(u16)* sp44 = NULL; int z_sp40 = sp88; do { @@ -358,21 +388,21 @@ bool dBgWKCol::LineCheck(cBgS_LinChk* plinchk) { int x_sp38 = sp90; do { - u16* block = (u16*)m_pkc_head->m_block_data; + BE(u16)* block = (BE(u16)*)m_pkc_head->m_block_data; u32 shift = m_pkc_head->m_block_width_shift; int offset = (((u32)z_sp40 >> shift) << m_pkc_head->m_area_xy_blocks_shift | ((u32)y_sp3C >> shift) << m_pkc_head->m_area_x_blocks_shift | (u32)x_sp38 >> shift) << 2; - while ((offset = *(int*)((intptr_t)block + offset)) >= 0) { - block = (u16*)((intptr_t)block + offset); + while ((offset = *(BE(u32)*)((intptr_t)block + offset)) >= 0) { + block = (BE(u16)*)((intptr_t)block + offset); shift--; offset = (((u32)z_sp40 >> shift & 1) << 2 | ((u32)y_sp3C >> shift & 1) << 1 | ((u32)x_sp38 >> shift & 1) << 0) << 2; } - u16* sp28 = (u16*)((intptr_t)block + (offset & 0x7FFFFFFF)); + BE(u16)* sp28 = (BE(u16)*)((intptr_t)block + (offset & 0x7FFFFFFF)); shift = 1 << shift; int cellSize = shift - 1; @@ -548,20 +578,21 @@ bool dBgWKCol::GroundCross(cBgS_GndChk* i_chk) { cXyz sp4C; int sp2C = 0; do { - uintptr_t block = (uintptr_t)m_pkc_head->m_block_data; + uintptr_t block = (uintptr_t)(BE(u32)*)m_pkc_head->m_block_data; u32 shift = m_pkc_head->m_block_width_shift; - int sp20 = 4 * (((u32)sp34 >> shift) << m_pkc_head->m_area_xy_blocks_shift | + int idx = 4 * (((u32)sp34 >> shift) << m_pkc_head->m_area_xy_blocks_shift | ((u32)sp30 >> shift) << m_pkc_head->m_area_x_blocks_shift | (u32)sp38 >> shift); - while ((sp20 = (*(int*)((int)block + sp20))) >= 0) { - block = (int)block + sp20; + + while ((idx = (*(BE(u32)*)(block + idx))) >= 0) { + block += idx; shift--; - sp20 = (((u32)sp34 >> shift & 1) << 2 | + idx = (((u32)sp34 >> shift & 1) << 2 | ((u32)sp30 >> shift & 1) << 1 | ((u32)sp38 >> shift & 1) << 0) << 2; } - u16* sp1C = (u16*)(block + (sp20 & 0x7FFFFFFF)); + BE(u16)* sp1C = (BE(u16)*)(block + (idx & 0x7FFFFFFF)); while (*++sp1C != 0) { KC_PrismData* sp18 = getPrismData(sp1C[0]); @@ -657,10 +688,7 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { } if (minZ_sp90 < maxZ_sp8C) { - u32 drawBits_sp140[512]; - for (u32* el_sp88 = drawBits_sp140; el_sp88 < drawBits_sp140 + 512; el_sp88++) { - *el_sp88 = 0; - } + u32 drawBits_sp140[512] = {}; int remX_sp84; int remY_sp80; @@ -673,13 +701,13 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { int best2_sp6C; int best3_sp68; - u16* topPrism1_sp64 = NULL; - u16* topPrism2_sp60 = NULL; - u16* topPrism3_sp5C = NULL; + BE(u16)* topPrism1_sp64 = NULL; + BE(u16)* topPrism2_sp60 = NULL; + BE(u16)* topPrism3_sp5C = NULL; - u16* prev1_sp58 = NULL; - u16* prev2_sp54 = NULL; - u16* prev3_sp50; + BE(u16)* prev1_sp58 = NULL; + BE(u16)* prev2_sp54 = NULL; + BE(u16)* prev3_sp50; prev3_sp50 = NULL; int z_sp4C = minZ_sp90; @@ -695,28 +723,28 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { int x_sp44 = minX_spA0; do { - u32 block_sp40 = (uintptr_t) m_pkc_head->m_block_data; - u32 shift_sp3C = m_pkc_head->m_block_width_shift; - int offset_sp38 = - 4 * (((u32)z_sp4C >> shift_sp3C) << m_pkc_head->m_area_xy_blocks_shift | - ((u32)y_sp48 >> shift_sp3C) << m_pkc_head->m_area_x_blocks_shift | - (u32)x_sp44 >> shift_sp3C); + uintptr_t block = (uintptr_t)(BE(u32)*)m_pkc_head->m_block_data; + u32 shift = m_pkc_head->m_block_width_shift; + int idx = + 4 * (((u32)z_sp4C >> shift) << m_pkc_head->m_area_xy_blocks_shift | + ((u32)y_sp48 >> shift) << m_pkc_head->m_area_x_blocks_shift | + (u32)x_sp44 >> shift); - while ((offset_sp38 = *(u32*)((int)block_sp40 + offset_sp38)) >= 0) { - block_sp40 = (int)block_sp40 + offset_sp38; - shift_sp3C--; - offset_sp38 = (((u32)z_sp4C >> shift_sp3C & 1) << 2 | - ((u32)y_sp48 >> shift_sp3C & 1) << 1 | - ((u32)x_sp44 >> shift_sp3C & 1) << 0) << 2; + while ((idx = (*(BE(u32)*)(block + idx))) >= 0) { + block += idx; + shift--; + idx = (((u32)z_sp4C >> shift & 1) << 2 | + ((u32)y_sp48 >> shift & 1) << 1 | + ((u32)x_sp44 >> shift & 1) << 0) << 2; } - u16* prism_sp34 = (u16*)(block_sp40 + (offset_sp38 & 0x7fffffff)); + BE(u16) * p_prismList = (BE(u16)*)(block + (idx & 0x7fffffff)); - shift_sp3C = 1 << shift_sp3C; - u32 mask_sp30 = shift_sp3C - 1; - remX_sp84 = shift_sp3C - (x_sp44 & mask_sp30); - remY_sp80 = shift_sp3C - (y_sp48 & mask_sp30); - remZ_sp7C = shift_sp3C - (z_sp4C & mask_sp30); + shift = 1 << shift; + u32 mask_sp30 = shift - 1; + remX_sp84 = shift - (x_sp44 & mask_sp30); + remY_sp80 = shift - (y_sp48 & mask_sp30); + remZ_sp7C = shift - (z_sp4C & mask_sp30); if (remZ_sp7C < stepZ_sp74) { stepZ_sp74 = remZ_sp7C; @@ -725,7 +753,7 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { stepY_sp78 = remY_sp80; } - if (prism_sp34[1] != 0 && remY_sp80 > best3_sp68) { + if (p_prismList[1] != 0 && remY_sp80 > best3_sp68) { if (remY_sp80 > best2_sp6C) { if (remY_sp80 > best1_sp70) { best3_sp68 = best2_sp6C; @@ -733,30 +761,32 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { best1_sp70 = remY_sp80; topPrism3_sp5C = topPrism2_sp60; topPrism2_sp60 = topPrism1_sp64; - topPrism1_sp64 = prism_sp34; + topPrism1_sp64 = p_prismList; } else { best3_sp68 = best2_sp6C; best2_sp6C = remY_sp80; topPrism3_sp5C = topPrism2_sp60; - topPrism2_sp60 = prism_sp34; + topPrism2_sp60 = p_prismList; } } else { best3_sp68 = remY_sp80; - topPrism3_sp5C = prism_sp34; + topPrism3_sp5C = p_prismList; } } - if (prism_sp34 == prev1_sp58 || prism_sp34 == prev2_sp54 || prism_sp34 == prev3_sp50) { + if (p_prismList == prev1_sp58 || p_prismList == prev2_sp54 || + p_prismList == prev3_sp50) + { } else { - while (*++prism_sp34 != 0) { + while (*++p_prismList != 0) { #if PLATFORM_GCN - u32 bitMask_sp28 = 1 << (prism_sp34[0] & 0x1f); - s32 sp2c = *(prism_sp34) >> 5; + u32 bitMask_sp28 = 1 << (p_prismList[0] & 0x1f); + s32 sp2c = *(p_prismList) >> 5; #else - s32 sp2c = *(prism_sp34) >> 5; - u32 bitMask_sp28 = 1 << (prism_sp34[0] & 0x1f); + s32 sp2c = *(p_prismList) >> 5; + u32 bitMask_sp28 = 1 << (p_prismList[0] & 0x1f); #endif - void* unk_sp24; + u32* unk_sp24; KC_PrismData* prismData_sp20; Vec* nrm1_sp1C; @@ -778,16 +808,16 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { } unk_sp24 = drawBits_sp140 + sp2c; - if ((*(u32*)((uintptr_t)unk_sp24 + 0) & bitMask_sp28) == 0) { - *(u32*)((uintptr_t)unk_sp24 + 0) |= bitMask_sp28; + if ((unk_sp24[0] & bitMask_sp28) == 0) { + unk_sp24[0] |= bitMask_sp28; - getPolyCode(prism_sp34[0], &polyCode_sp108); + getPolyCode(p_prismList[0], &polyCode_sp108); Vec cross1_spBC; Vec cross2_spB0; if (!ChkShdwDrawThrough(&polyCode_sp108)) { - prismData_sp20 = getPrismData(prism_sp34[0]); + prismData_sp20 = getPrismData(p_prismList[0]); sp11C[0] = m_pkc_head->m_pos_data[prismData_sp20->pos_i]; @@ -822,7 +852,7 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) { &sp11C[1]); cM3dGPla pla_spF4; - pla_spF4 = GetTriPla(prism_sp34[0]); + pla_spF4 = GetTriPla(p_prismList[0]); (param_0->mCallbackFun)( param_0, (cBgD_Vtx_t*)&sp11C, 0, 1, 2, &pla_spF4); @@ -1064,12 +1094,12 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { return false; } - u16* sp_120 = NULL; - u16* sp_11c = NULL; - u16* sp_118 = NULL; - u16* sp_114 = NULL; - u16* sp_110 = NULL; - u16* sp_10c = NULL; + BE(u16)* sp_120 = NULL; + BE(u16)* sp_11c = NULL; + BE(u16)* sp_118 = NULL; + BE(u16)* sp_114 = NULL; + BE(u16)* sp_110 = NULL; + BE(u16)* sp_10c = NULL; int sp_108; int sp_104; int sp_100; @@ -1092,14 +1122,14 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { sp_ec = 0; int sp_d8 = sp_138; do { - u16* block_d4 = (u16*)m_pkc_head->m_block_data; + BE(u16)* block_d4 = (BE(u16)*)m_pkc_head->m_block_data; int shift_d0 = m_pkc_head->m_block_width_shift; int sp_cc = 4 * ( ((u32)sp_e0 >> shift_d0) << m_pkc_head->m_area_xy_blocks_shift | ((u32)sp_dc >> shift_d0) << m_pkc_head->m_area_x_blocks_shift | ((u32)sp_d8 >> shift_d0)); - while ((sp_cc = *(int*)((intptr_t)block_d4 + sp_cc)) >= 0) { - block_d4 = (u16*)((intptr_t)block_d4 + sp_cc); + while ((sp_cc = *(BE(int)*)((intptr_t)block_d4 + sp_cc)) >= 0) { + block_d4 = (BE(u16)*)((intptr_t)block_d4 + sp_cc); shift_d0--; sp_cc = 4 * ( ((((u32)sp_e0 >> shift_d0) & 1) << 2) | @@ -1107,7 +1137,7 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { ((((u32)sp_d8 >> shift_d0) & 1) << 0) ); } - u16* sp_c8 = (u16*)((intptr_t)block_d4 + (sp_cc & 0x7fffffff)); + BE(u16)* sp_c8 = (BE(u16)*)((intptr_t)block_d4 + (sp_cc & 0x7fffffff)); shift_d0 = 1 << shift_d0; int sp_c4 = shift_d0 - 1; sp_108 = shift_d0 - (sp_d8 & sp_c4); @@ -1461,7 +1491,6 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { bool sp10 = false; - cM3dGCyl* sp114 = pwi->GetWallBmdCylP(); cXyz sp16C; cXyz sp160; @@ -1518,12 +1547,12 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { return false; } - u16* spF4 = NULL; - u16* spF0 = NULL; - u16* spEC = NULL; - u16* spE8 = NULL; - u16* spE4 = NULL; - u16* spE0 = NULL; + BE(u16)* spF4 = NULL; + BE(u16)* spF0 = NULL; + BE(u16)* spEC = NULL; + BE(u16)* spE8 = NULL; + BE(u16)* spE4 = NULL; + BE(u16)* spE0 = NULL; Vec sp154; sp154.y = 0.0f; @@ -1549,27 +1578,27 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { int spB4 = sp10C; do { - u16* spB0 = (u16*)m_pkc_head->m_block_data; - int spAC = m_pkc_head->m_block_width_shift; - int spA8 = - 4 * (((u32)spBC >> spAC) << m_pkc_head->m_area_xy_blocks_shift | - ((u32)spB8 >> spAC) << m_pkc_head->m_area_x_blocks_shift | - (u32)spB4 >> spAC); + uintptr_t block = (uintptr_t)(BE(u32)*)m_pkc_head->m_block_data; + int shift = m_pkc_head->m_block_width_shift; + int idx = + 4 * (((u32)spBC >> shift) << m_pkc_head->m_area_xy_blocks_shift | + ((u32)spB8 >> shift) << m_pkc_head->m_area_x_blocks_shift | + (u32)spB4 >> shift); - while ((spA8 = *(int*)((intptr_t)spB0 + spA8)) >= 0) { - spB0 = (u16*)((intptr_t)spB0 + spA8); - spAC--; - spA8 = ((((u32)spBC >> spAC) & 1) << 2 | - (((u32)spB8 >> spAC) & 1) << 1 | - (((u32)spB4 >> spAC) & 1) << 0) * 4; + while ((idx = *(BE(u32)*)(block + idx)) >= 0) { + block += idx; + shift--; + idx = ((((u32)spBC >> idx) & 1) << 2 | + (((u32)spB8 >> idx) & 1) << 1 | + (((u32)spB4 >> idx) & 1) << 0) * 4; } - u16* spA4 = (u16*)((intptr_t)spB0 + (spA8 & 0x7FFFFFFF)); - spAC = 1 << spAC; - u32 spA0 = spAC - 1; - spDC = spAC - (spB4 & spA0); - spD8 = spAC - (spB8 & spA0); - spD4 = spAC - (spBC & spA0); + BE(u16)* p_prismlist = (BE(u16)*)(block + (idx & 0x7FFFFFFF)); + shift = 1 << shift; // mask + u32 spA0 = shift - 1; + spDC = shift - (spB4 & spA0); + spD8 = shift - (spB8 & spA0); + spD4 = shift - (spBC & spA0); if (spD4 < spCC) { spCC = spD4; @@ -1579,7 +1608,7 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { spD0 = spD8; } - if (spA4[1] != 0 && spD8 > spC0) { + if (p_prismlist[1] != 0 && spD8 > spC0) { if (spD8 > spC4) { if (spD8 > spC8) { spC0 = spC4; @@ -1587,26 +1616,25 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { spC8 = spD8; spE0 = spE4; spE4 = spE8; - spE8 = spA4; - } - else { + spE8 = p_prismlist; + } else { spC0 = spC4; spC4 = spD8; spE0 = spE4; - spE4 = spA4; + spE4 = p_prismlist; } } else { spC0 = spD8; - spE0 = spA4; + spE0 = p_prismlist; } } - if (spA4 == spF4 || spA4 == spF0 || spA4 == spEC) { + if (p_prismlist == spF4 || p_prismlist == spF0 || p_prismlist == spEC) { continue; } - while (*++spA4 != 0) { - KC_PrismData* sp9C = (KC_PrismData*)getPrismData(*spA4); + while (*++p_prismlist != 0) { + KC_PrismData* sp9C = (KC_PrismData*)getPrismData(*p_prismlist); Vec* sp98 = m_pkc_head->m_nrm_data + sp9C->fnrm_i; if (cBgW_CheckBGround(sp98->y)) { continue; @@ -1618,7 +1646,7 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { } dBgPc adStack_58; - getPolyCode(*spA4, &adStack_58); + getPolyCode(*p_prismlist, &adStack_58); cXyz cStack_88 = *sp98; if (chkPolyThrough(&adStack_58, pwi->GetPolyPassChk(), pwi->GetGrpPassChk(), cStack_88)) { @@ -1760,8 +1788,7 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { JUT_ASSERT(0x98f, -INF < pwi->GetPos()->z && pwi->GetPos()->z < INF); pwi->CalcMovePosWork(); pwi->SetWallCirHit(cir_index); - pwi->SetWallPolyIndex(cir_index, - *spA4); + pwi->SetWallPolyIndex(cir_index, *p_prismlist); s16 sp16 = cM_atan2s(sp98->x, sp98->z); pwi->SetWallAngleY(cir_index, sp16); sp10 = true; @@ -1799,7 +1826,7 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { pwi->CalcMovePosWork(); pwi->SetWallCirHit(cir_index); - pwi->SetWallPolyIndex(cir_index, *spA4); + pwi->SetWallPolyIndex(cir_index, *p_prismlist); s16 sp14 = cM_atan2s(sp98->x, sp98->z); pwi->SetWallAngleY(cir_index, sp14); sp10 = true; @@ -1825,7 +1852,7 @@ bool dBgWKCol::WallCorrect(dBgS_Acch* pwi) { pwi->CalcMovePosWork(); pwi->SetWallCirHit(cir_index); - pwi->SetWallPolyIndex(cir_index, *spA4); + pwi->SetWallPolyIndex(cir_index, *p_prismlist); s16 sp12 = cM_atan2s(sp98->x, sp98->z); pwi->SetWallAngleY(cir_index, sp12); sp10 = true; @@ -1853,49 +1880,50 @@ bool dBgWKCol::RoofChk(dBgS_RoofChk* param_0) { cXyz sp74; PSVECSubtract(sp40, &m_pkc_head->m_area_min_pos, &sp74); - u32 sp3C = sp74.x; - if ((int)sp3C < 0) { + u32 x = sp74.x; + if ((int)x < 0) { return false; } - if ((int)sp3C > (int)~m_pkc_head->m_area_x_width_mask) { + if ((int)x > (int)~m_pkc_head->m_area_x_width_mask) { return false; } - u32 sp38 = sp74.z; - if ((int)sp38 < 0) { + u32 z = sp74.z; + if ((int)z < 0) { return false; } - if ((int)sp38 > (int)~m_pkc_head->m_area_z_width_mask) { + if ((int)z > (int)~m_pkc_head->m_area_z_width_mask) { return false; } - u32 sp34 = sp74.y; - if ((int)sp34 < 0) { - sp34 = 0; + u32 y = sp74.y; + if ((int)y < 0) { + y = 0; } - if ((int)sp34 > (int)~m_pkc_head->m_area_y_width_mask) { + if ((int)y > (int)~m_pkc_head->m_area_y_width_mask) { return false; } bool sp0A = false; u32 sp30 = ~m_pkc_head->m_area_y_width_mask; do { - uintptr_t sp2C = (uintptr_t)m_pkc_head->m_block_data; - u32 sp28 = m_pkc_head->m_block_width_shift; - int sp24 = 4 * (((u32)sp38 >> sp28) << m_pkc_head->m_area_xy_blocks_shift | - ((u32)sp34 >> sp28) << m_pkc_head->m_area_x_blocks_shift | - (u32)sp3C >> sp28); - while ((sp24 = (*(int*)(sp2C + (sp24 & 0x7fffffff)))) >= 0) { - sp2C += sp24; - sp28--; - sp24 = (((u32)sp38 >> sp28 & 1) << 2 | - ((u32)sp34 >> sp28 & 1) << 1 | - ((u32)sp3C >> sp28 & 1) << 0) << 2; + uintptr_t block = (uintptr_t)(BE(u32)*)m_pkc_head->m_block_data; + u32 shift = m_pkc_head->m_block_width_shift; + int idx = 4 * (((u32)z >> shift) << m_pkc_head->m_area_xy_blocks_shift | + ((u32)y >> shift) << m_pkc_head->m_area_x_blocks_shift | + (u32)x >> shift); + + while ((idx = (*(BE(u32)*)(block + (idx & 0x7fffffff)))) >= 0) { + block += idx; + shift--; + idx = (((u32)z >> shift & 1) << 2 | ((u32)y >> shift & 1) << 1 | + ((u32)z >> shift & 1) << 0) + << 2; } - u16* sp20 = (u16*)(sp2C + (sp24 & 0x7fffffff)); + BE(u16)* p_prismlist = (BE(u16)*)(block + (idx & 0x7fffffff)); KC_PrismData* sp1C; Vec* sp18; @@ -1903,8 +1931,8 @@ bool dBgWKCol::RoofChk(dBgS_RoofChk* param_0) { int sp10; int sp0C; - while (*++sp20 != 0) { - sp1C = getPrismData(*sp20); + while (*++p_prismlist != 0) { + sp1C = getPrismData(p_prismlist[0]); sp18 = m_pkc_head->m_nrm_data + sp1C->fnrm_i; if (cBgW_CheckBRoof(sp18->y)) { sp14 = m_pkc_head->m_pos_data + sp1C->pos_i; @@ -1937,12 +1965,12 @@ bool dBgWKCol::RoofChk(dBgS_RoofChk* param_0) { continue; } - getPolyCode(*sp20, &adStack_4c); + getPolyCode(p_prismlist[0], &adStack_4c); cXyz sp44 = *sp18; if (!chkPolyThrough(&adStack_4c, param_0->GetPolyPassChk(), param_0->GetGrpPassChk(), sp44)) { f32 tmp_height_kcw = sp5C.y + sp14->y; if (param_0->GetNowY() > tmp_height_kcw && sp40->y < tmp_height_kcw) { - param_0->SetPolyIndex(*sp20); + param_0->SetPolyIndex(p_prismlist[0]); param_0->SetNowY(tmp_height_kcw); sp0A = true; JUT_ASSERT(0xac8, !isnan(tmp_height_kcw)); @@ -1961,10 +1989,10 @@ bool dBgWKCol::RoofChk(dBgS_RoofChk* param_0) { } } - sp28 = 1 << sp28; - sp10 = sp28 - 1; - sp34 += sp28 - (sp34 & sp10); - } while ((int)sp34 <= (int)sp30); + shift = 1 << shift; + sp10 = shift - 1; + y += shift - (y & sp10); + } while ((int)y <= (int)sp30); return sp0A; } @@ -1974,60 +2002,59 @@ bool dBgWKCol::SplGrpChk(dBgS_SplGrpChk* param_0) { cXyz sp54; PSVECSubtract(sp3C, &m_pkc_head->m_area_min_pos, &sp54); - u32 sp38 = sp54.x; - if ((int)sp38 < 0) { + u32 x = sp54.x; + if ((int)x < 0) { return false; } - if ((int)sp38 > (int)~m_pkc_head->m_area_x_width_mask) { + if ((int)x > (int)~m_pkc_head->m_area_x_width_mask) { return false; } - u32 sp34 = sp54.z; - if ((int)sp34 < 0) { + u32 z = sp54.z; + if ((int)z < 0) { return false; } - if ((int)sp34 > (int)~m_pkc_head->m_area_z_width_mask) { + if ((int)z > (int)~m_pkc_head->m_area_z_width_mask) { return false; } - u32 sp30 = sp54.y; - if ((int)sp30 < 0) { - sp30 = 0; + u32 y = sp54.y; + if ((int)y < 0) { + y = 0; } - u32 sp2C = param_0->GetRoof() - m_pkc_head->m_area_min_pos.y; - if ((int)sp2C > (int)~m_pkc_head->m_area_y_width_mask) { - sp2C = ~m_pkc_head->m_area_y_width_mask; + u32 ymin = param_0->GetRoof() - m_pkc_head->m_area_min_pos.y; + if ((int)ymin > (int)~m_pkc_head->m_area_y_width_mask) { + ymin = ~m_pkc_head->m_area_y_width_mask; } - if ((int)sp30 >= (int)sp2C) { + if ((int)y >= (int)ymin) { return false; } bool sp09 = false; do { - u32 sp28 = (uintptr_t) m_pkc_head->m_block_data; - u32 sp24 = m_pkc_head->m_block_width_shift; - int sp20 = 4 * (((u32)sp34 >> sp24) << m_pkc_head->m_area_xy_blocks_shift | - ((u32)sp2C >> sp24) << m_pkc_head->m_area_x_blocks_shift | - (u32)sp38 >> sp24); - while ((sp20 = *(int*)((intptr_t)sp28 + sp20)) >= 0) { - sp28 = ((intptr_t)sp28 + sp20); - sp24--; - sp20 = 4 * - (((u32)sp34 >> sp24 & 1) << 2 | - ((u32)sp2C >> sp24 & 1) << 1 | - ((u32)sp38 >> sp24 & 1) << 0); + uintptr_t block = (uintptr_t)(BE(u32)*)m_pkc_head->m_block_data; + u32 shift = m_pkc_head->m_block_width_shift; + int idx = 4 * (((u32)z >> shift) << m_pkc_head->m_area_xy_blocks_shift | + ((u32)ymin >> shift) << m_pkc_head->m_area_x_blocks_shift | (u32)x >> shift); + + while ((idx = (*(BE(u32)*)(block + (idx & 0x7fffffff)))) >= 0) { + block += idx; + shift--; + idx = (((u32)z >> shift & 1) << 2 | ((u32)ymin >> shift & 1) << 1 | + ((u32)x >> shift & 1) << 0) + << 2; } - u16* sp1C = (u16*)(sp28 + (sp20 & 0x7fffffff)); - while (*++sp1C != 0) { - KC_PrismData* sp18 = getPrismData(*sp1C); + BE(u16)* p_prismlist = (BE(u16)*)(block + (idx & 0x7fffffff)); + while (*++p_prismlist != 0) { + KC_PrismData* sp18 = getPrismData(*p_prismlist); Vec* sp14 = m_pkc_head->m_nrm_data + sp18->fnrm_i; if (!(sp14->y <= 0.0f) && !cM3d_IsZero(sp14->y)) { dBgPc sp64; - getPolyCode(*sp1C, &sp64); + getPolyCode(*p_prismlist, &sp64); cXyz sp4C = *sp14; if (!chkPolyThrough(&sp64, param_0->GetPolyPassChk(), param_0->GetGrpPassChk(), sp4C)) @@ -2059,7 +2086,7 @@ bool dBgWKCol::SplGrpChk(dBgS_SplGrpChk* param_0) { param_0->GetRoof() > tmp_height_kcw) { param_0->SetHeight(tmp_height_kcw); - param_0->SetPolyIndex(*sp1C); + param_0->SetPolyIndex(*p_prismlist); sp09 = true; @@ -2073,11 +2100,11 @@ bool dBgWKCol::SplGrpChk(dBgS_SplGrpChk* param_0) { //sp28 = 1 << sp28; //sp10 = sp28 - 1; //sp34 += sp28 - (sp34 & sp10); - sp24 = 1 << sp24; - u32 sp0C = sp24 - 1; - sp2C = sp2C & ~sp0C; - sp2C--; - } while ((int)sp2C >= (int)sp30); + shift = 1 << shift; + u32 sp0C = shift - 1; + ymin = ymin & ~sp0C; + ymin--; + } while ((int)ymin >= (int)y); return sp09; } @@ -2155,8 +2182,8 @@ bool dBgWKCol::SphChk(dBgS_SphChk* param_0, void* param_1) { int sp40; int sp3C; int sp38; - u16* sp34 = NULL; - u16* sp30 = NULL; + BE(u16)* sp34 = NULL; + BE(u16)* sp30 = NULL; bool sp0C = false; int sp2C = sp5C; do { @@ -2167,20 +2194,20 @@ bool dBgWKCol::SphChk(dBgS_SphChk* param_0, void* param_1) { sp38 = 0; int sp24 = sp64; do { - u16* sp20 = (u16*)m_pkc_head->m_block_data; + BE(u16)* sp20 = (BE(u16)*)m_pkc_head->m_block_data; u32 var_r29 = m_pkc_head->m_block_width_shift; int sp1C = (((u32)sp2C >> var_r29 << m_pkc_head->m_area_xy_blocks_shift) | ((u32)sp28 >> var_r29 << m_pkc_head->m_area_x_blocks_shift) | ((u32)sp24 >> var_r29)) * 4; - while ((sp1C = *(int*)((intptr_t)sp20 + sp1C)) >= 0) { - sp20 = (u16*)((intptr_t)sp20 + sp1C); + while ((sp1C = *(BE(int)*)((intptr_t)sp20 + sp1C)) >= 0) { + sp20 = (BE(u16)*)((intptr_t)sp20 + sp1C); var_r29--; sp1C = (((u32)sp2C >> var_r29 & 1) << 2 | ((u32)sp28 >> var_r29 & 1) << 1 | ((u32)sp24 >> var_r29 & 1)) * 4; } - u16* var_r28 = (u16*)((intptr_t)sp20 + (sp1C & 0x7fffffff)); + BE(u16)* var_r28 = (BE(u16)*)((intptr_t)sp20 + (sp1C & 0x7fffffff)); var_r29 = 1 << var_r29; int sp18 = var_r29 - 1; sp4C = var_r29 - (sp24 & sp18); diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index d724fb65ed..b09b9a45f0 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -7432,7 +7432,7 @@ bool dCamera_c::towerCamera(s32 param_0) { tower->field_0x54.x = mRoomMapTool.mArrowData.posX; tower->field_0x54.y = mRoomMapTool.mArrowData.posY; tower->field_0x54.z = mRoomMapTool.mArrowData.posZ; - tower->field_0x60 = mRoomMapTool.mArrowData.angleY; + tower->field_0x60 = (s16)mRoomMapTool.mArrowData.angleY; tower->field_0x64 = stack_454 <= cSAngle::_90 ? 1 : 0; } @@ -8014,8 +8014,8 @@ bool dCamera_c::railCamera(s32 param_0) { rail->field_0x20.z = mRoomMapTool.mArrowData.posZ; if (mCamParam.Flag(param_0, 0x800)) { cXyz attnPos = attentionPos(mpPlayerActor); - cXyz curPointPos = roomPath->m_points->m_position; - cXyz prevPointPos = roomPath->m_points[roomPathLen - 1].m_position; + cXyz curPointPos = (Vec)roomPath->m_points->m_position; + cXyz prevPointPos = (Vec)roomPath->m_points[roomPathLen - 1].m_position; f32 horDist1 = dCamMath::xyzHorizontalDistance(curPointPos, attnPos); f32 horDist2 = dCamMath::xyzHorizontalDistance(prevPointPos, attnPos); if (horDist1 < horDist2) { @@ -8344,8 +8344,8 @@ bool dCamera_c::paraRailCamera(s32 param_0) { if (!unkFlag2) { cXyz sp1F4 = attentionPos(mpPlayerActor); - cXyz sp1E8 = path->m_points->m_position; - cXyz sp1DC = path->m_points[pathLen - 1].m_position; + cXyz sp1E8 = (Vec)path->m_points->m_position; + cXyz sp1DC = (Vec)path->m_points[pathLen - 1].m_position; f32 horDist1 = dCamMath::xyzHorizontalDistance(sp1E8, sp1F4); f32 horDist2 = dCamMath::xyzHorizontalDistance(sp1DC, sp1F4); if (horDist1 < horDist2) { @@ -11212,7 +11212,7 @@ camera_process_profile_definition g_profile_CAMERA = { fpcPi_CURRENT_e, PROC_CAMERA, &g_fpcLf_Method.base, - sizeof(dCamera_c), + sizeof(camera_class), 0, 0, &g_fopVw_Method, @@ -11233,7 +11233,7 @@ camera_process_profile_definition g_profile_CAMERA2 = { fpcPi_CURRENT_e, PROC_CAMERA2, &g_fpcLf_Method.base, - sizeof(dCamera_c), + sizeof(camera_class), 0, 0, &g_fopVw_Method, diff --git a/src/d/d_com_inf_actor.cpp b/src/d/d_com_inf_actor.cpp index e9f7bd97f9..772ad8542a 100644 --- a/src/d/d_com_inf_actor.cpp +++ b/src/d/d_com_inf_actor.cpp @@ -6,7 +6,7 @@ #include "d/dolzel.h" // IWYU pragma: keep #include "d/d_com_inf_actor.h" -#include +#include dComIfAc_info_c g_dComIfAc_gameInfo = { 0, // field_0x0 diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index b7180656db..4ad58e66fa 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -1287,7 +1287,7 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* i_arcNa static int (*l_method[3])(void*) = {(int (*)(void*))phase_1, (int (*)(void*))phase_2, (int (*)(void*))phase_3}; - if (i_phase->id == cPhs_NEXT_e) { + if (i_phase->id == 2) { return cPhs_COMPLEATE_e; } @@ -1335,7 +1335,7 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* i_resNa static int (*l_method[3])(void*) = {(int (*)(void*))phase_01, (int (*)(void*))phase_02, (int (*)(void*))phase_03}; - if (i_phase->id == cPhs_NEXT_e) { + if (i_phase->id == 2) { return cPhs_COMPLEATE_e; } @@ -1352,12 +1352,12 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* i_resNa */ int dComIfG_resDelete(request_of_phase_process_class* i_phase, char const* i_resName) { JUT_ASSERT(1889, i_phase->id != 1); - if (i_phase->id != cPhs_NEXT_e) { + if (i_phase->id != 2) { return 0; } int r30 = dComIfG_deleteObjectResMain(i_resName); - i_phase->id = cPhs_INIT_e; + i_phase->id = 0; return 1; } @@ -2256,7 +2256,7 @@ void dComIfGp_addSelectItemNum(int i_selItemIdx, s16 i_num) { int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3, f32 param_4, f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8, - dKy_tevstr_c* param_9, s16 param_10, f32 param_11, _GXTexObj* param_12) { + dKy_tevstr_c* param_9, s16 param_10, f32 param_11, GXTexObj* param_12) { if (param_7 <= -G_CM3D_F_INF) { return 0; } else { @@ -2433,12 +2433,12 @@ u32 dComIfG_getTrigA(u32 i_padNo) { } struct field_data_header { - /* 0x00 */ u32 field_0x0; - /* 0x04 */ u32 field_0x4; - /* 0x08 */ u32 field_0x8; - /* 0x0C */ u32 field_0xc; - /* 0x10 */ u32 field_0x10; - /* 0x14 */ u32 field_0x14; + /* 0x00 */ BE(u32) field_0x0; + /* 0x04 */ BE(u32) field_0x4; + /* 0x08 */ BE(u32) field_0x8; + /* 0x0C */ BE(u32) field_0xc; + /* 0x10 */ BE(u32) field_0x10; + /* 0x14 */ BE(u32) field_0x14; }; struct field_data { diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index c46656d882..8310f54847 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -851,7 +851,9 @@ int dDemo_system_c::JSGFindObject(JStage::TObject** p_TObj, char const* actorNam *p_TObj = mpObject->appendActor(actor); } else if (objType == JStage::OBJECT_CAMERA) { if (DEBUG && !strcmp(actorName, "EditCam")) { +#if DEBUG *p_TObj = mpObject->createEditorCamera(); +#endif } else { *p_TObj = mpObject->createCamera(); } diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp index 087b38f52d..71794623eb 100644 --- a/src/d/d_drawlist.cpp +++ b/src/d/d_drawlist.cpp @@ -964,7 +964,7 @@ void dDlst_effectLine_c::draw() { } } -void dDlst_effectLine_c::update(cXyz& param_0, _GXColor& i_lineColor, u16 param_2, u16 param_3, +void dDlst_effectLine_c::update(cXyz& param_0, GXColor& i_lineColor, u16 param_2, u16 param_3, u16 param_4, u16 param_5, f32 param_6, f32 param_7, f32 param_8, f32 param_9) { field_0x10 = param_0; @@ -998,9 +998,18 @@ int dDlst_shadowPoly_c::set(cBgD_Vtx_t* i_vtx, u16 param_1, u16 param_2, u16 par b.z *= temp_f3; b *= 2.0f; +#if TARGET_LITTLE_ENDIAN + Vec copy1 = vtx[param_1]; + Vec copy2 = vtx[param_2]; + Vec copy3 = vtx[param_3]; + PSVECAdd(©1, &b, &dst->mPos[0]); + PSVECAdd(©2, &b, &dst->mPos[1]); + PSVECAdd(©3, &b, &dst->mPos[2]); +#else PSVECAdd(&vtx[param_1], &b, &dst->mPos[0]); PSVECAdd(&vtx[param_2], &b, &dst->mPos[1]); PSVECAdd(&vtx[param_3], &b, &dst->mPos[2]); +#endif mCount++; return 1; } @@ -1330,7 +1339,7 @@ void dDlst_shadowSimple_c::draw() { } void dDlst_shadowSimple_c::set(cXyz* param_0, f32 param_1, f32 param_2, cXyz* param_3, - s16 param_4, f32 param_5, _GXTexObj* param_6) { + s16 param_4, f32 param_5, GXTexObj* param_6) { if (param_5 < 0.0f) { mAlpha = param_5 * -255.0f; param_5 = 1.0f; @@ -1491,7 +1500,7 @@ void dDlst_shadowControl_c::draw(Mtx param_0) { dKy_GxFog_set(); GXSetChanCtrl(GX_ALPHA0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE); - GXSetArray(GX_VA_POS, l_shadowVolPos, 12); + GXSETARRAY(GX_VA_POS, l_shadowVolPos, sizeof(l_shadowVolPos), sizeof(l_shadowVolPos[0])); GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX3x4, GX_TG_POS, GX_TEXMTX0); GXSetNumTevStages(1); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); @@ -1523,7 +1532,7 @@ void dDlst_shadowControl_c::draw(Mtx param_0) { GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB8, 0); - GXSetArray(GX_VA_POS, l_simpleShadowPos, 12); + GXSETARRAY(GX_VA_POS, l_simpleShadowPos, sizeof(l_simpleShadowPos), sizeof(l_simpleShadowPos[0])); GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY); GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL); GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_OR, GX_ALWAYS, 0); diff --git a/src/d/d_envse.cpp b/src/d/d_envse.cpp index 734ed221e7..67bd1de067 100644 --- a/src/d/d_envse.cpp +++ b/src/d/d_envse.cpp @@ -29,7 +29,12 @@ static void dEnvSe_getNearPathPos(cXyz* param_0, cXyz* param_1, dPath* i_path) { cM3dGLin sp14; for (i = 0; i < i_path->m_num; i++) { +#if TARGET_PC + Vec posCopy = point_p->m_position; + sp8 = cM3d_LenSq(param_1, &posCopy); +#else sp8 = cM3d_LenSq(param_1, &point_p->m_position); +#endif if (var_f31 > sp8) { var_f31 = sp8; var_r31 = i; @@ -88,9 +93,16 @@ int dEnvSe_c::execute_common(dStage_SoundInfo_c* i_soundInf, s8* param_1, u8 par if (memcmp(data_p->field_0x0, "sndtag", 6) == 0) { if (!(*param_1 & 1)) { if (data_p->field_0x17 != 0) { +#if TARGET_LITTLE_ENDIAN + Vec copy = data_p->field_0x8; + mDoAud_mEnvse_initStaticEnvSe(data_p->field_0x17, data_p->field_0x14, + data_p->field_0x19, data_p->field_0x1a, + ©); +#else mDoAud_mEnvse_initStaticEnvSe(data_p->field_0x17, data_p->field_0x14, data_p->field_0x19, data_p->field_0x1a, &data_p->field_0x8); +#endif } *param_1 |= 1; } diff --git a/src/d/d_event_data.cpp b/src/d/d_event_data.cpp index 421ab79c73..6aafea605e 100644 --- a/src/d/d_event_data.cpp +++ b/src/d/d_event_data.cpp @@ -1072,7 +1072,7 @@ void dEvDtStaff_c::specialProcDirector() { dStage_MapEvent_dt_c* mapEvent = dEvt_control_c::searchMapEventData(data->unk); if (mapEvent != NULL) { if (mapEvent->type == dStage_MapEvent_dt_TYPE_MAPTOOLCAMERA) { - data->unk2 = mapEvent->data.maptool.field_0x14; + data->unk2 = (s16)mapEvent->data.maptool.field_0x14; } else { data->unk2 = -1; } @@ -1554,11 +1554,28 @@ int dEvDtBase_c::init(char* i_data, int i_roomNo) { } if (getFDataNum() > 0) { +#if TARGET_PC + auto data = (f32*)(i_data + getFDataTop()); + int num = getFDataNum(); + for (int i = 0; i < num; i++) + be_swap(data[i]); + setFDataP(data); +#else setFDataP((f32*)(i_data + getFDataTop())); +#endif } if (getIDataNum() > 0) { +#if TARGET_PC + // endian swap here + auto data = (int*)(i_data + getIDataTop()); + int num = getIDataNum(); + for (int i = 0; i < num; i++) + be_swap(data[i]); + setIDataP(data); +#else setIDataP((int*)(i_data + getIDataTop())); +#endif } if (getSDataNum() > 0) { diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index 7b9f3516c2..b391c3acfb 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -1,8 +1,12 @@ #include "d/dolzel.h" // IWYU pragma: keep #include "d/d_kankyo.h" -#include -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif +#include #include "JSystem/JHostIO/JORFile.h" #include "JSystem/JHostIO/JORServer.h" @@ -24,6 +28,7 @@ #include "f_op/f_op_kankyo.h" #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_lib.h" +#include "JSystem/JKernel/JKRSolidHeap.h" #include #include @@ -1168,6 +1173,7 @@ static void undwater_init() { JUT_ASSERT(1867, modelData2 != NULL); g_env_light.undwater_ef_heap = mDoExt_createSolidHeapFromGameToCurrent(0x600, 0x20); + JKRHEAP_NAME(g_env_light.undwater_ef_heap, "g_env_light.undwater_ef_heap"); if (g_env_light.undwater_ef_heap != NULL) { g_env_light.undwater_ef_model = mDoExt_J3DModel__create(modelData2, 0x80000, 0x11020202); diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index 1ed5f78130..0d123f9c3c 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -731,7 +731,7 @@ const GXColor* renderingAmap_c::getDecoLineColor(int param_0, int param_1) { } } -const Vec* dMap_c::getIconPosition(dTres_c::typeGroupData_c* i_data) const { +const BE(Vec)* dMap_c::getIconPosition(dTres_c::typeGroupData_c* i_data) const { #if DEBUG if (dMap_HIO_prm_res_dst_s::m_other.field_0x8a && i_data) { u8 r29 = i_data->getTypeGroupNo(); diff --git a/src/d/d_map_path.cpp b/src/d/d_map_path.cpp index 2ddd0815ec..709c4f8aa1 100644 --- a/src/d/d_map_path.cpp +++ b/src/d/d_map_path.cpp @@ -37,7 +37,7 @@ void dMpath_n::dTexObjAggregate_c::remove() { } } -void dMpath_ColorCnv_n::convertRGB5A3_To_GXColor(_GXColor& color32, const dMpath_RGB5A3_s& color16) { +void dMpath_ColorCnv_n::convertRGB5A3_To_GXColor(GXColor& color32, const dMpath_RGB5A3_s& color16) { int r, g, b, a; u16 color = color16.color; if (color & 0x8000) { @@ -238,7 +238,7 @@ void dDrawPath_c::rendering(dDrawPath_c::line_class const* p_line) { GXSetTevColor(GX_TEVREG0, *getLineColor(p_line->field_0x0 & 0x3F, p_line->field_0x1)); GXBegin(GX_LINESTRIP, GX_VTXFMT0, p_line->mDataNum); - u16* tmp = p_line->mpData; + BE(u16)* tmp = p_line->mpData; for (int i = 0; i < p_line->mDataNum; i++) { GXPosition1x16(*tmp); tmp++; @@ -255,7 +255,7 @@ void dDrawPath_c::rendering(dDrawPath_c::poly_class const* p_poly) { if (p_poly->mDataNum >= 3) { GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, p_poly->mDataNum); - u16* tmp = p_poly->mpData; + BE(u16)* tmp = p_poly->mpData; for (int i = 0; i < p_poly->mDataNum; i++) { GXPosition1x16(*tmp); tmp++; @@ -295,7 +295,8 @@ void dDrawPath_c::rendering(dDrawPath_c::floor_class const* p_floor) { void dDrawPath_c::rendering(dDrawPath_c::room_class const* room) { JUT_ASSERT(1043, room != NULL); if (room != NULL) { - GXSetArray(GX_VA_POS, room->mpFloatData, 8); + // TODO: FILL IN SIZE. + GXSETARRAY(GX_VA_POS, room->mpFloatData, 0, 8); floor_class* floor = room->mpFloor; if (floor != NULL) { @@ -460,7 +461,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li GXSetNumTevStages(1); GXLoadTexObj(dMpath_n::m_texObjAgg.getTexObjPointer(6), GX_TEXMAP0); - u16* data_p = p_line->mpData; + BE(u16)* data_p = p_line->mpData; s32 data_num = p_line->mDataNum; GXSetLineWidth(width, GX_TO_ONE); GXSetPointSize(width, GX_TO_ONE); diff --git a/src/d/d_map_path_dmap.cpp b/src/d/d_map_path_dmap.cpp index 4f45717806..3e587fcce8 100644 --- a/src/d/d_map_path_dmap.cpp +++ b/src/d/d_map_path_dmap.cpp @@ -24,7 +24,7 @@ bool dMapInfo_n::isVisitedRoom(int i_roomNo) { return g_fmapHIO.mAllRegionsUnlocked || dComIfGs_isVisitedRoom(i_roomNo); } -void dMapInfo_n::correctionOriginPos(s8 i_roomNo, Vec* o_pos) { +void dMapInfo_n::correctionOriginPos(s8 i_roomNo, BE(Vec)* o_pos) { dStage_FileList2_dt_c* filelist = dStage_roomControl_c::getFileList2(i_roomNo); if (o_pos != NULL) { @@ -33,7 +33,7 @@ void dMapInfo_n::correctionOriginPos(s8 i_roomNo, Vec* o_pos) { } } -void dMapInfo_n::offsetPlus(dStage_FileList2_dt_c const* filelist, Vec* o_pos) { +void dMapInfo_n::offsetPlus(dStage_FileList2_dt_c const* filelist, BE(Vec)* o_pos) { if (filelist == NULL) { return; } @@ -42,7 +42,7 @@ void dMapInfo_n::offsetPlus(dStage_FileList2_dt_c const* filelist, Vec* o_pos) { o_pos->z += filelist->field_0x18; } -void dMapInfo_n::rotAngle(dStage_FileList2_dt_c const* filelist, Vec* o_pos) { +void dMapInfo_n::rotAngle(dStage_FileList2_dt_c const* filelist, BE(Vec)* o_pos) { s16 rot = 0; if (filelist != NULL) { @@ -57,7 +57,7 @@ void dMapInfo_n::rotAngle(dStage_FileList2_dt_c const* filelist, Vec* o_pos) { } Vec dMapInfo_n::getMapPlayerPos() { - Vec pos; + BE(Vec) pos; fopAc_ac_c* player = daPy_getPlayerActorClass(); if (player != NULL) { pos = player->current.pos; @@ -117,7 +117,7 @@ const dTres_c::typeGroupData_c* dMapInfo_n::getConstRestartIconPointer() { } Vec dMapInfo_n::getMapRestartPos() { - Vec pos; + BE(Vec) pos; const dTres_c::typeGroupData_c* icon_data = getConstRestartIconPointer(); if (icon_data != NULL) { @@ -389,8 +389,12 @@ void dMpath_c::createWork() { } int dMpath_c::setPointer(dDrawPath_c::room_class* i_room, s8* param_1, s8* param_2) { - int var_r6 = 0; + intptr_t var_r6 = 0; +#if TARGET_PC + if (i_room->mpFloor.isRelocated()) { +#else if ((uintptr_t)i_room->mpFloor >= 0x80000000) { +#endif dDrawPath_c::floor_class* floor_p = i_room->mpFloor; for (int i = 0; i < i_room->mFloorNum; i++) { if (floor_p->mFloorNo < *param_1) { @@ -415,33 +419,58 @@ int dMpath_c::setPointer(dDrawPath_c::room_class* i_room, s8* param_1, s8* param dDrawPath_c::line_class* line_e = &group_e->mpLine[group_e->mLineNum - 1]; return (uintptr_t)(line_e->mpData + line_e->mDataNum) - (uintptr_t)i_room; } - + +#if TARGET_PC + i_room->mpFloor.setBase(i_room); + i_room->mpFloatData.setBase(i_room); +#else i_room->mpFloor = (dDrawPath_c::floor_class*)((uintptr_t)i_room + (uintptr_t)i_room->mpFloor); i_room->mpFloatData = (f32*)((uintptr_t)i_room + (uintptr_t)i_room->mpFloatData); +#endif dDrawPath_c::floor_class* floor_p = i_room->mpFloor; - int room = (intptr_t)i_room; + intptr_t room = (intptr_t)i_room; for (int i = 0; i < i_room->mFloorNum; i++) { +#if TARGET_PC + floor_p->mpGroup.setBase((void*) room); +#else floor_p->mpGroup = (dDrawPath_c::group_class*)(room + (uintptr_t)floor_p->mpGroup); +#endif dDrawPath_c::group_class* group_p = floor_p->mpGroup; for (int j = 0; j < floor_p->mGroupNum; j++) { - var_r6 = (uintptr_t)group_p->mpPoly; + var_r6 = (intptr_t)(void*)group_p->mpPoly; +#if TARGET_PC + group_p->mpLine.setBase((void*) room); +#else group_p->mpLine = (dDrawPath_c::line_class*)(room + (uintptr_t)group_p->mpLine); +#endif dDrawPath_c::line_class* line_p = group_p->mpLine; for (int k = 0; k < group_p->mLineNum; k++) { var_r6 = (uintptr_t)(line_p->mpData + line_p->mDataNum); +#if TARGET_PC + line_p->mpData.setBase((void*)room); +#else line_p->mpData = (u16*)(room + (uintptr_t)line_p->mpData); +#endif line_p++; } +#if TARGET_PC + group_p->mpPoly.setBase((void*)room); +#else group_p->mpPoly = (dDrawPath_c::poly_class*)(room + (uintptr_t)group_p->mpPoly); - +#endif + dDrawPath_c::poly_class* poly_p = group_p->mpPoly; for (int l = 0; l < group_p->mPolyNum; l++) { var_r6 = (uintptr_t)(poly_p->mpData + poly_p->mDataNum); +#if TARGET_PC + poly_p->mpData.setBase((void*)room); +#else poly_p->mpData = (u16*)(room + (uintptr_t)poly_p->mpData); +#endif poly_p++; } @@ -819,7 +848,7 @@ void renderingPlusDoor_c::drawDoorCommon(stage_tgsc_data_class const* i_doorData GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0); - GXSetArray(GX_VA_TEX0, (void*)l_tex0, 2); + GXSETARRAY(GX_VA_TEX0, (void*)l_tex0, sizeof(l_tex0), 2); setTevSettingIntensityTextureToCI(); @@ -874,7 +903,7 @@ void renderingPlusDoor_c::drawNormalDoorS(stage_tgsc_data_class const* i_doorDat GXSetTevColor(GX_TEVREG2, l_doorWhiteNoStay2); } - Vec spC; + BE(Vec) spC; spC.x = i_doorData->base.position.x; spC.y = i_doorData->base.position.y; spC.z = i_doorData->base.position.z; @@ -903,7 +932,7 @@ bool renderingDAmap_c::isDrawRoomIcon(int param_0, int param_1) const { } bool renderingDAmap_c::isDrawIconSingle(dTres_c::data_s const* data, int param_1, int param_2, - bool param_3, bool param_4, Vec const* param_5) const { + bool param_3, bool param_4, BE(Vec) const* param_5) const { bool draw_room_icon = isDrawRoomIcon(data->mRoomNo, param_1); bool tmp = false; @@ -926,7 +955,7 @@ renderingPlusDoorAndCursor_c::getNextData(dTres_c::typeGroupData_c* param_0) { return dTres_c::getNextData(param_0); } -const Vec* +const BE(Vec)* renderingPlusDoorAndCursor_c::getIconPosition(dTres_c::typeGroupData_c* i_typeGroupData) const { return i_typeGroupData->getPos(); } @@ -978,7 +1007,7 @@ void renderingPlusDoorAndCursor_c::drawTreasure() { GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0); - GXSetArray(GX_VA_TEX0, (void*)l_iconTex0, 2); + GXSETARRAY(GX_VA_TEX0, (void*)l_iconTex0, sizeof(l_iconTex0), 2); setTevSettingIntensityTextureToCI(); @@ -1005,7 +1034,7 @@ void renderingPlusDoorAndCursor_c::drawTreasure() { GXSetTevColor(GX_TEVREG2, sp18); for (int j = 0; j < group_num && typeGroupData_p != NULL; j++) { - const Vec* icon_pos = getIconPosition(typeGroupData_p); + const BE(Vec)* icon_pos = getIconPosition(typeGroupData_p); if (tmp == 0) { if (mRoomNoSingle != typeGroupData_p->getRoomNo()) { @@ -1052,7 +1081,7 @@ void renderingPlusDoorAndCursor_c::drawTreasureAfterPlayer() { GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0); - GXSetArray(GX_VA_TEX0, (void*)l_iconTex0, 2); + GXSETARRAY(GX_VA_TEX0, (void*)l_iconTex0, sizeof(l_iconTex0), 2); setTevSettingIntensityTextureToCI(); @@ -1079,7 +1108,7 @@ void renderingPlusDoorAndCursor_c::drawTreasureAfterPlayer() { GXSetTevColor(GX_TEVREG2, sp18); for (int j = 0; j < group_num && typeGroupData_p != NULL; j++) { - const Vec* icon_pos = getIconPosition(typeGroupData_p); + const BE(Vec)* icon_pos = getIconPosition(typeGroupData_p); if (tmp == 0) { if (mRoomNoSingle != typeGroupData_p->getRoomNo()) { diff --git a/src/d/d_map_path_fmap.cpp b/src/d/d_map_path_fmap.cpp index 8cf6a4a580..13eba6d653 100644 --- a/src/d/d_map_path_fmap.cpp +++ b/src/d/d_map_path_fmap.cpp @@ -131,12 +131,12 @@ dMenu_Fmap_stage_data_c* dMenu_Fmap_region_data_c::getMenuFmapStageData(int para int dMenu_Fmap_region_data_c::getPointStagePathInnerNo(f32 i_pointX, f32 i_pointZ, int i_stageNo, int* o_stageNo, int* o_roomNo) { int line_num, group_num, floor_num; - f32* point; - u16* point_index; + BE(f32)* point; + BE(u16)* point_index; dDrawPath_c::line_class* line; dDrawPath_c::group_class* group; dDrawPath_c::floor_class* floor; - f32* points; + BE(f32)* points; dMenu_Fmap_room_data_c* room; dMenu_Fmap_stage_data_c* stage; int point_num, point_no; @@ -192,7 +192,7 @@ int dMenu_Fmap_region_data_c::getPointStagePathInnerNo(f32 i_pointX, f32 i_point outside = false; point_index = line->mpData; - f32* prev_point = &points[point_index[0] * 2]; + BE(f32)* prev_point = &points[point_index[0] * 2]; point = &points[point_index[1] * 2]; point_no = 2; point_index += 2; diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 0cdfcde90b..6536067bcf 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -27,7 +27,7 @@ #include "d/d_item.h" #include "d/d_lib.h" #include "d/d_meter2_info.h" -#include +#include #include #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_mtx.h" diff --git a/src/d/d_menu_dmap_map.cpp b/src/d/d_menu_dmap_map.cpp index e2f157ff88..1f5e43dd49 100644 --- a/src/d/d_menu_dmap_map.cpp +++ b/src/d/d_menu_dmap_map.cpp @@ -366,7 +366,7 @@ bool dMenu_StageMapCtrl_c::getTreasureList(f32* o_posX, f32* o_posY, s8* param_2 bool var_r30 = false; while (field_0xe4 != 0 && !var_r30) { - Vec sp10; + BE(Vec) sp10; sp10 = *field_0x8c->getPos(); if (getRendPointer(0)->isDrawIconSingle(field_0x8c->getDataPointer(), (s8)dComIfGp_roomControl_getStayNo(), field_0xf7, 1, true, &sp10)) { diff --git a/src/d/d_menu_letter.cpp b/src/d/d_menu_letter.cpp index 0ac02bdfac..32947bb6a3 100644 --- a/src/d/d_menu_letter.cpp +++ b/src/d/d_menu_letter.cpp @@ -10,7 +10,7 @@ #include "d/d_meter2_info.h" #include "d/d_meter_HIO.h" #include "d/d_msg_string.h" -#include +#include #include #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index cc34f26938..32762905d9 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -4,7 +4,7 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include +#include #include "JSystem/J2DGraph/J2DAnmLoader.h" #include "JSystem/JKernel/JKRMemArchive.h" #include "d/d_com_inf_game.h" @@ -18,7 +18,7 @@ #include "d/d_meter_haihai.h" #include "d/d_msg_string.h" #include "d/d_select_cursor.h" -#include +#include #include "f_op/f_op_msg_mng.h" #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" diff --git a/src/d/d_meter2_info.cpp b/src/d/d_meter2_info.cpp index dba0acf6fb..a0963a31a5 100644 --- a/src/d/d_meter2_info.cpp +++ b/src/d/d_meter2_info.cpp @@ -369,8 +369,8 @@ void dMeter2Info_c::getString(u32 i_stringID, char* o_string, JMSMesgEntry_c* i_ u8* entry = ((u8*)bmg_inf + (i * sizeof(JMSMesgEntry_c))); // check if i_stringID equals the message entry "Message ID" - if (i_stringID == *(u16*)(entry + 0x14)) { - string_ptr = (char*)(bmg_data + *(u32*)(entry + 0x10)); // use entry "String Offset" to get string pointer + if (i_stringID == *(BE(u16)*)(entry + 0x14)) { + string_ptr = (char*)(bmg_data + *(BE(u32)*)(entry + 0x10)); // use entry "String Offset" to get string pointer strcpy(o_string, string_ptr); if (i_msgEntry != NULL) { diff --git a/src/d/d_msg_flow.cpp b/src/d/d_msg_flow.cpp index ef60b8ab69..243cba9535 100644 --- a/src/d/d_msg_flow.cpp +++ b/src/d/d_msg_flow.cpp @@ -2102,7 +2102,12 @@ int dMsgFlow_c::event020(mesg_flow_node_event* i_flowNode_p, fopAc_ac_c* i_speak for (int i = 0; i < room->getPlayerNum(); i++, actor_data++) { if ((u8)actor_data->base.angle.z == prm0) { +#if TARGET_LITTLE_ENDIAN + cXyz copy = actor_data->base.position; + player->setPlayerPosAndAngle(©, player->current.angle.y, 0); +#else player->setPlayerPosAndAngle(&actor_data->base.position, player->current.angle.y, 0); +#endif break; } } diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 0a169d2546..c7354678b1 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -214,7 +214,7 @@ static void dPa_group_id_change(u32* param_0, u8* param_1) { } } -static void initiateLighting8(_GXColor& param_0, s16 param_1) { +static void initiateLighting8(GXColor& param_0, s16 param_1) { GXSetChanCtrl(GX_COLOR0, true, GX_SRC_REG, GX_SRC_VTX, 0xfe, GX_DF_CLAMP, GX_AF_SPOT); GXSetChanCtrl(GX_ALPHA0, false, GX_SRC_REG, GX_SRC_VTX, 0xfe, GX_DF_CLAMP, GX_AF_SPOT); s32 r,g,b; @@ -246,7 +246,7 @@ static void initiateLighting8(_GXColor& param_0, s16 param_1) { GXSetChanMatColor(GX_COLOR0A0, g_whiteColor); } -static void initiate_b_Lighting8(_GXColor& param_0) { +static void initiate_b_Lighting8(GXColor& param_0) { GXSetChanCtrl(GX_COLOR0, true, GX_SRC_REG, GX_SRC_VTX, 0xfe, GX_DF_CLAMP, GX_AF_SPOT); GXSetChanCtrl(GX_ALPHA0, false, GX_SRC_REG, GX_SRC_VTX, 0xfe, GX_DF_CLAMP, GX_AF_SPOT); GXSetChanAmbColor(GX_COLOR0A0, param_0); @@ -804,7 +804,7 @@ JPABaseEmitter* dPa_simpleEcallBack::createEmitter(JPAEmitterManager* param_0) { } u32 dPa_simpleEcallBack::set(cXyz const* i_pos, dKy_tevstr_c const* param_2, u8 param_3, - _GXColor const& param_4, _GXColor const& param_5, int param_6, + GXColor const& param_4, GXColor const& param_5, int param_6, f32 param_7) { f32 fVar1; f32 dVar7 = param_7; @@ -1201,6 +1201,7 @@ void dPa_control_c::createCommon(void const* param_0) { OS_REPORT("常駐パーティクルリソースサイズ<%d>\n", heapSize); #endif mHeap = mDoExt_createSolidHeapFromSystem(0, 0); + JKRHEAP_NAME(mHeap, "dPa_control_c::mHeap"); JUT_ASSERT(2518, mHeap != NULL); mCommonResMng = new (mHeap, 0) JPAResourceManager(param_0, mHeap); JUT_ASSERT(2521, mCommonResMng != NULL); @@ -1226,6 +1227,7 @@ void dPa_control_c::createCommon(void const* param_0) { void dPa_control_c::createRoomScene() { mSceneHeap = mDoExt_createSolidHeapFromGame(0, 0); + JKRHEAP_NAME(mSceneHeap, "dPa_control_c::mSceneHeap"); JUT_ASSERT(2573, mSceneHeap != NULL); mSceneResMng = new (mSceneHeap, 0) JPAResourceManager(m_sceneRes, mSceneHeap); JUT_ASSERT(2576, mSceneResMng != NULL); @@ -1459,7 +1461,7 @@ void dPa_control_c::setWaterRipple(u32* param_0, cBgS_PolyInfo& param_1, cXyz co JPABaseEmitter* dPa_control_c::set(u8 param_0, u16 param_1, cXyz const* i_pos, dKy_tevstr_c const* param_3, csXyz const* i_rotation, cXyz const* i_scale, u8 i_alpha, dPa_levelEcallBack* param_7, - s8 param_8, _GXColor const* param_9, _GXColor const* param_10, + s8 param_8, GXColor const* param_9, GXColor const* param_10, cXyz const* param_11, f32 param_12) { u8 local_e0 = getRM_ID(param_1); JPAResourceManager* local_a8 = mEmitterMng->getResourceManager(local_e0); @@ -1596,8 +1598,8 @@ JPABaseEmitter* dPa_control_c::set(u8 param_0, u16 param_1, cXyz const* i_pos, return this_00; } -s32 dPa_control_c::getPolyColor(cBgS_PolyInfo& param_0, int param_1, _GXColor* param_2, - _GXColor* param_3, u8* param_4, f32* param_5) { +s32 dPa_control_c::getPolyColor(cBgS_PolyInfo& param_0, int param_1, GXColor* param_2, + GXColor* param_3, u8* param_4, f32* param_5) { if (!dComIfG_Bgsp().ChkPolySafe(param_0)) { return 0; } @@ -1654,7 +1656,7 @@ bool dPa_control_c::newSimple(u16 param_0, u8 param_1, u32* param_2) { } u32 dPa_control_c::setSimple(u16 param_0, cXyz const* i_pos, dKy_tevstr_c const* param_2, - u8 param_3, _GXColor const& param_4, _GXColor const& param_5, + u8 param_3, GXColor const& param_4, GXColor const& param_5, int param_6, f32 param_7) { dPa_simpleEcallBack* cb = getSimple(param_0); if (cb == NULL) { @@ -1679,7 +1681,7 @@ dPa_simpleEcallBack* dPa_control_c::getSimple(u16 param_0) { static void dPa_kankyocolor_set(f32 param_0, JPABaseEmitter* param_1, dKy_tevstr_c const* param_2, u32 param_3, cXyz const* param_4, - _GXColor const* param_5, _GXColor const* param_6) { + GXColor const* param_5, GXColor const* param_6) { f32 fVar1 = param_0; if ((param_3 & 0xef0000) >> 0x10 < 100) { fVar1 = ((param_3 & 0xef0000) >> 0x10) / 99.0f; @@ -1723,8 +1725,8 @@ static void dPa_kankyocolor_set(f32 param_0, JPABaseEmitter* param_1, u32 dPa_control_c::set(u32 param_0, u8 param_1, u16 param_2, cXyz const* pos, dKy_tevstr_c const* param_4, csXyz const* i_rotation, cXyz const* i_scale, - u8 alpha, dPa_levelEcallBack* param_8, s8 param_9, _GXColor const* param_10, - _GXColor const* param_11, cXyz const* param_12, f32 param_13) { + u8 alpha, dPa_levelEcallBack* param_8, s8 param_9, GXColor const* param_10, + GXColor const* param_11, cXyz const* param_12, f32 param_13) { level_c::emitter_c* this_00 = field_0x210.get(param_0); u8 uVar7 = getRM_ID(param_2); JPAResourceManager* this_01 = mEmitterMng->getResourceManager(uVar7); diff --git a/src/d/d_path.cpp b/src/d/d_path.cpp index fb15758e06..a01cfdc8a6 100644 --- a/src/d/d_path.cpp +++ b/src/d/d_path.cpp @@ -111,3 +111,22 @@ u8 dPath_GetPolyRoomPathVec(cBgS_PolyInfo const& poly, cXyz* p_pathVec, int* par return 1; } + +#if VERSION == VERSION_SHIELD_DEBUG +void dPath_Ct() { + #if DEBUG + #endif +} + +void dPath_Dt() { + #if DEBUG + #endif +} + +void dPath_Move() {} + +void dPath_Draw() { + #if DEBUG + #endif +} +#endif diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index 40c94e7e51..2ffc64253f 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -640,6 +640,12 @@ int dRes_info_c::setRes() { u32 heapSize = mDataHeap->getHeapSize(); DCStoreRangeNoSync(mDataHeap->getStartAddr(), heapSize); + +#if TARGET_PC + char buf[32]; + snprintf(buf, sizeof(buf), "Arc %s", mArchiveName); + JKRHEAP_NAME(mDataHeap, buf); +#endif } return 0; diff --git a/src/d/d_s_logo.cpp b/src/d/d_s_logo.cpp index a7821acfe4..95d884d9c1 100644 --- a/src/d/d_s_logo.cpp +++ b/src/d/d_s_logo.cpp @@ -20,12 +20,32 @@ #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_machine.h" #include +#include "m_Do/m_Do_main.h" +#include "JSystem/JUtility/JUTConsole.h" -#if PLATFORM_WII -#include "d/d_cursor_mng.h" +#if !PLATFORM_GCN +#include +#include +#include "m_Do/m_Do_Reset.h" + +#include "res/Object/LogoUsWii.h" #endif -#if VERSION == VERSION_GCN_JPN +#if PLATFORM_WII || VERSION == VERSION_SHIELD +#include "m_Re/m_Re_controller_pad.h" +#include "d/d_cursor_mng.h" +#include "d/d_home_button.h" + +struct homeBtnData { + /* 0x0 */ int region; + /* 0x4 */ const char* path; +}; +#endif + +#if VERSION == VERSION_SHIELD +#define LOGO_ARC "LogoUs" +#define MSG_PATH "/res/Msgcn/bmgres.arc" +#elif VERSION == VERSION_GCN_JPN #define LOGO_ARC "Logo" #define MSG_PATH "/res/Msgjp/bmgres.arc" #elif VERSION == VERSION_GCN_PAL @@ -44,22 +64,70 @@ #define PROGRESSIVE_MODE_ON OS_PROGRESSIVE_MODE_ON #endif -static dLog_HIO_c g_LogHIO; +#if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG +#define FMAP_RES_PATH "/res/LayoutRevo/fmapresR.arc" +#define DMAP_RES_PATH "/res/LayoutRevo/dmapresR.arc" +#define COLLECT_RES_PATH "/res/LayoutRevo/clctresR.arc" -typedef void (dScnLogo_c::*execFunc)(); -static execFunc l_execFunc[16] = { - &dScnLogo_c::warningInDraw, &dScnLogo_c::warningDispDraw, &dScnLogo_c::warningOutDraw, - &dScnLogo_c::nintendoInDraw, &dScnLogo_c::nintendoOutDraw, &dScnLogo_c::dolbyInDraw, - &dScnLogo_c::dolbyOutDraw, &dScnLogo_c::dolbyOutDraw2, &dScnLogo_c::progInDraw, - &dScnLogo_c::progSelDraw, &dScnLogo_c::progOutDraw, &dScnLogo_c::progSetDraw, - &dScnLogo_c::progSet2Draw, &dScnLogo_c::progChangeDraw, &dScnLogo_c::dvdWaitDraw, - &dScnLogo_c::nextSceneChange, -}; +#define MSG_COM_PATH "/res/LayoutRevo/msgcomR.arc" +#define MSG_RES0_PATH "/res/LayoutRevo/msgres00R.arc" +#define MSG_RES1_PATH "/res/LayoutRevo/msgres01R.arc" +#define MSG_RES2_PATH "/res/LayoutRevo/msgres02R.arc" +#define MSG_RES3_PATH "/res/LayoutRevo/msgres03R.arc" +#else +#define FMAP_RES_PATH "/res/Layout/fmapres.arc" +#define DMAP_RES_PATH "/res/Layout/dmapres.arc" +#define COLLECT_RES_PATH "/res/Layout/clctres.arc" + +#define MSG_COM_PATH "/res/Layout/msgcom.arc" +#define MSG_RES0_PATH "/res/Layout/msgres00.arc" +#define MSG_RES1_PATH "/res/Layout/msgres01.arc" +#define MSG_RES2_PATH "/res/Layout/msgres02.arc" +#define MSG_RES3_PATH "/res/Layout/msgres03.arc" +#endif + +#if PLATFORM_WII || PLATFORM_SHIELD +#define ICON_RES_PATH "/res/WiiBannerIcon/bannerIcon.arc" +#define PARTICLE_COM_PATH "/res/Particle/common-r.jpc" +#else +#define ICON_RES_PATH "/res/CardIcon/cardicon.arc" +#define PARTICLE_COM_PATH "/res/Particle/common.jpc" +#endif + +#if PLATFORM_WII +#define RING_RES_PATH "/res/LayoutRevo/ringresR.arc" +#define ITEM_INF_RES_PATH "/res/LayoutRevo/itmInfResR.arc" +#define BUTTON_RES_PATH "/res/LayoutRevo/buttonR.arc" +#define MAIN2D_PATH "/res/LayoutRevo/main2DR.arc" +#else +#define RING_RES_PATH "/res/Layout/ringres.arc" +#define ITEM_INF_RES_PATH "/res/Layout/itmInfRes.arc" +#define BUTTON_RES_PATH "/res/Layout/button.arc" +#define MAIN2D_PATH "/res/Layout/main2D.arc" +#endif + +class dLog_HIO_c : public JORReflexible { +public: + dLog_HIO_c(); + virtual ~dLog_HIO_c() {} + + void genMessage(JORMContext*); + + u8 field_0x4[0x8 - 0x4]; +}; // Size: 0x8 + +static dLog_HIO_c g_LogHIO; dLog_HIO_c::dLog_HIO_c() {} +#if DEBUG +void dLog_HIO_c::genMessage(JORMContext*) {} +#endif + void dScnLogo_c::preLoad_dyl_create() { m_preLoad_dylPhase = new request_of_phase_process_class[14]; + JUT_ASSERT(194, m_preLoad_dylPhase != NULL); + memset(m_preLoad_dylPhase, 0, sizeof(request_of_phase_process_class) * 14); } @@ -67,15 +135,54 @@ void dScnLogo_c::preLoad_dyl_remove() { delete[] m_preLoad_dylPhase; } +typedef void (dScnLogo_c::*execFunc)(); +static execFunc l_execFunc[] = { + &dScnLogo_c::warningInDraw, &dScnLogo_c::warningDispDraw, &dScnLogo_c::warningOutDraw, + &dScnLogo_c::nintendoInDraw, &dScnLogo_c::nintendoOutDraw, &dScnLogo_c::dolbyInDraw, + &dScnLogo_c::dolbyOutDraw, &dScnLogo_c::dolbyOutDraw2, &dScnLogo_c::progInDraw, + &dScnLogo_c::progSelDraw, &dScnLogo_c::progOutDraw, &dScnLogo_c::progSetDraw, + &dScnLogo_c::progSet2Draw, &dScnLogo_c::progChangeDraw, &dScnLogo_c::dvdWaitDraw, + &dScnLogo_c::nextSceneChange, + + #if PLATFORM_WII || PLATFORM_SHIELD + &dScnLogo_c::strapInDraw, + &dScnLogo_c::strapDispDraw, + &dScnLogo_c::strapOutDraw, + &dScnLogo_c::strapOut2Draw, + #endif + + #if VERSION == VERSION_SHIELD + &dScnLogo_c::mocInDraw, + &dScnLogo_c::mocDispDraw, + &dScnLogo_c::mocOutDraw, + &dScnLogo_c::nvLogoInDraw, + &dScnLogo_c::nvLogoDispDraw, + &dScnLogo_c::nvLogoOutDraw, + #endif +}; + static s16 const l_preLoad_dylKeyTbl[14] = { - 0x02DC, 0x02CE, 0x0221, 0x00F2, 0x021B, 0x02F4, 0x0139, - 0x015A, 0x02E4, 0x00FE, 0x0308, 0x030F, 0x00FF, 0x013F, + PROC_BG, + PROC_DEMO00, + PROC_NBOMB, + PROC_SPINNER, + PROC_Obj_LifeContainer, + PROC_CROD, + PROC_DISAPPEAR, + PROC_Tag_Attp, + PROC_MG_ROD, + PROC_BOOMERANG, + PROC_ARROW, + PROC_SUSPEND, + PROC_MIDNA, + PROC_Obj_Yousei, }; bool dScnLogo_c::preLoad_dyl() { bool ret = true; + int var_r28 = 14; - for (int i = 0; i < 14; i++) { + for (int i = 0; i < var_r28; i++) { int phase_state = cDylPhs::Link(&m_preLoad_dylPhase[i], l_preLoad_dylKeyTbl[i]); if (phase_state != cPhs_COMPLEATE_e) { @@ -86,6 +193,10 @@ bool dScnLogo_c::preLoad_dyl() { return ret; } +#if DEBUG +u8 dScnLogo_c::mOpeningCut; +#endif + void dScnLogo_c::checkProgSelect() { #if VERSION == VERSION_GCN_PAL if (mDoRst::getProgSeqFlag() == 0) { @@ -141,16 +252,34 @@ void dScnLogo_c::progSelDraw() { if (field_0x20b == 0) { if (field_0x209 == 0) { - if (mDoCPd_c::getHoldRight(PAD_1) || mDoCPd_c::getStickX(PAD_1) > 0.5f) { + #if PLATFORM_WII + if (mReCPd::getTrigRight(PAD_1) || mReCPd::getStickX(PAD_1) > 0.5f) + #else + if (mDoCPd_c::getHoldRight(PAD_1) || mDoCPd_c::getStickX(PAD_1) > 0.5f) + #endif + { + #if PLATFORM_WII || PLATFORM_SHIELD + mDoAud_seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0); + #else mDoAud_seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0); + #endif field_0x209 = 1; field_0x20e = 30; field_0x210 = field_0x20e; field_0x212 = 0; } } else { - if (mDoCPd_c::getHoldLeft(PAD_1) || mDoCPd_c::getStickX(PAD_1) < -0.5f) { + #if PLATFORM_WII + if (mReCPd::getTrigLeft(PAD_1) || mReCPd::getStickX(PAD_1) < -0.5f) + #else + if (mDoCPd_c::getHoldLeft(PAD_1) || mDoCPd_c::getStickX(PAD_1) < -0.5f) + #endif + { + #if PLATFORM_WII || PLATFORM_SHIELD + mDoAud_seStart(Z2SE_SY_CURSOR_OPTION, NULL, 0, 0); + #else mDoAud_seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0); + #endif field_0x209 = 0; field_0x20e = 30; field_0x210 = field_0x20e; @@ -158,16 +287,40 @@ void dScnLogo_c::progSelDraw() { } } - if (mDoCPd_c::getTrigA(PAD_1) || mTimer == 0) { + #if PLATFORM_WII + if (cAPICPad_A_TRIGGER(PAD_1) || mTimer == 0) + #else + if (mDoCPd_c::getTrigA(PAD_1) || mTimer == 0) + #endif + { if (field_0x209 == 0) { - mProgressiveSel->getPicture()->changeTexture(mProgressivePro, 0); + J2DPicture* pic = mProgressiveSel->getPicture(); + pic->changeTexture(mProgressivePro, 0); + + #if VERSION != VERSION_SHIELD setProgressiveMode(PROGRESSIVE_MODE_ON); + #endif + mDoRst::setProgChgFlag(1); + + #if PLATFORM_WII || PLATFORM_SHIELD + mDoAud_seStart(Z2SE_SY_TALK_WIN_CLOSE, NULL, 0, 0); + #else mDoAud_seStart(Z2SE_SY_CURSOR_OK, NULL, 0, 0); + #endif } else { - mProgressiveSel->getPicture()->changeTexture(mProgressiveInter, 0); + J2DPicture* pic = mProgressiveSel->getPicture(); + pic->changeTexture(mProgressiveInter, 0); + + #if VERSION != VERSION_SHIELD setProgressiveMode(PROGRESSIVE_MODE_OFF); + #endif + + #if PLATFORM_WII || PLATFORM_SHIELD + mDoAud_seStart(Z2SE_SY_CURSOR_CANCEL, NULL, 0, 0); + #else mDoAud_seStart(Z2SE_SY_CURSOR_OK, NULL, 0, 0); + #endif } if (mTimer > 540) { @@ -181,7 +334,12 @@ void dScnLogo_c::progSelDraw() { field_0x210 = field_0x20e; field_0x212 = 0; } + + #if PLATFORM_WII || PLATFORM_SHIELD + mDoRst::setProgSeqFlag(0); + #else mDoRst::setProgSeqFlag(1); + #endif } } else { if (field_0x214 == 0) { @@ -232,13 +390,18 @@ void dScnLogo_c::progOutDraw() { if (mTimer == 0) { #if VERSION == VERSION_GCN_PAL - if (field_0x218 == 1 && field_0x209 == 0) { + if (field_0x218 == 1 && field_0x209 == 0) #else - if (field_0x218 != 0 && field_0x209 == 0) { + if (field_0x218 != 0 && field_0x209 == 0) #endif + { mExecCommand = EXEC_PROG_CHANGE; mTimer = 150; } else if (field_0x218 == 0 && field_0x209 != 0) { + #if PLATFORM_WII || PLATFORM_SHIELD + mTimer = 90; + mExecCommand = EXEC_NINTENDO_IN; + #else if (mDoRst::getWarningDispFlag() != 0) { mTimer = 90; mExecCommand = EXEC_NINTENDO_IN; @@ -246,12 +409,13 @@ void dScnLogo_c::progOutDraw() { mTimer = 120; mExecCommand = EXEC_WARNING_IN; } + #endif - mDoGph_gInf_c::startFadeIn(30); + mDoGph_gInf_c::startFadeIn(1); } else { mExecCommand = EXEC_PROG_SET; mTimer = 150; - mDoGph_gInf_c::startFadeIn(30); + mDoGph_gInf_c::startFadeIn(1); } } } @@ -262,7 +426,7 @@ void dScnLogo_c::progSetDraw() { if (mTimer == 0) { mExecCommand = EXEC_PROG_SET2; mTimer = 30; - mDoGph_gInf_c::startFadeOut(30); + mDoGph_gInf_c::startFadeOut(1); } } @@ -281,20 +445,32 @@ void dScnLogo_c::progSet2Draw() { } void dScnLogo_c::progChangeDraw() { + #if PLATFORM_SHIELD + OSReport("progChangeDraw"); + #endif + if (getProgressiveMode() != 0 && mTimer == 90 && field_0x209 == 0) { setRenderMode(); } if (mTimer == 0) { + #if VERSION == VERSION_SHIELD_DEBUG + mExecCommand = EXEC_STRAP_IN; + mTimer = 0; + #elif PLATFORM_WII || PLATFORM_SHIELD + mExecCommand = EXEC_STRAP_IN; + mTimer = 90; + #else if (mDoRst::getWarningDispFlag() != 0) { - mTimer = 90; + mTimer = 1; mExecCommand = EXEC_NINTENDO_IN; } else { - mTimer = 120; + mTimer = 1; mExecCommand = EXEC_WARNING_IN; } + #endif - mDoGph_gInf_c::startFadeIn(30); + mDoGph_gInf_c::startFadeIn(1); } } @@ -303,7 +479,7 @@ void dScnLogo_c::warningInDraw() { if (mTimer == 0) { mExecCommand = EXEC_WARNING_DISP; - mTimer = 3510; + mTimer = 30; field_0x20e = 30; field_0x210 = field_0x20e; field_0x212 = 1; @@ -314,12 +490,14 @@ void dScnLogo_c::warningDispDraw() { dComIfGd_set2DOpa(mWarning); dComIfGd_set2DOpa(mWarningStart); - f32 alpha = (f32)field_0x210 / (f32)field_0x20e; + f32 alphaf = (f32)field_0x210 / (f32)field_0x20e; if (field_0x212 != 0) { - alpha = 1.0f - alpha; + alphaf = 1.0f - alphaf; } - mWarningStart->setAlpha(255.0f * alpha); + u8 alpha = 255.0f * alphaf; + mWarningStart->setAlpha(alpha); + if (field_0x210 == 0) { field_0x210 = field_0x20e; field_0x212 ^= 1; @@ -327,14 +505,18 @@ void dScnLogo_c::warningDispDraw() { field_0x210--; } + #if PLATFORM_WII + if (mTimer == 0 || cAPICPad_A_TRIGGER(PAD_1) || cAPICPad_B_TRIGGER(PAD_1) || cAPICPad_START_TRIGGER(PAD_1)) + #else if (mTimer == 0 || mDoCPd_c::getTrig(PAD_1) & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y | PAD_BUTTON_START | PAD_TRIGGER_Z | PAD_TRIGGER_L | PAD_TRIGGER_R | PAD_BUTTON_LEFT | PAD_BUTTON_RIGHT | PAD_BUTTON_DOWN | PAD_BUTTON_UP)) + #endif { mExecCommand = EXEC_WARNING_OUT; - mTimer = 30; - mDoGph_gInf_c::startFadeOut(30); + mTimer = 1; + mDoGph_gInf_c::startFadeOut(1); mDoRst::setWarningDispFlag(1); } } @@ -343,9 +525,9 @@ void dScnLogo_c::warningOutDraw() { dComIfGd_set2DOpa(mWarning); if (mTimer == 0) { - mTimer = 90; + mTimer = 1; mExecCommand = EXEC_NINTENDO_IN; - mDoGph_gInf_c::startFadeIn(30); + mDoGph_gInf_c::startFadeIn(1); } } @@ -354,8 +536,8 @@ void dScnLogo_c::nintendoInDraw() { if (mTimer == 0) { mExecCommand = EXEC_NINTENDO_OUT; - mTimer = 30; - mDoGph_gInf_c::startFadeOut(30); + mTimer = 1; + mDoGph_gInf_c::startFadeOut(1); } } @@ -364,8 +546,8 @@ void dScnLogo_c::nintendoOutDraw() { if (mTimer == 0) { mExecCommand = EXEC_DOLBY_IN; - mTimer = 90; - mDoGph_gInf_c::startFadeIn(30); + mTimer = 1; + mDoGph_gInf_c::startFadeIn(1); } } @@ -374,8 +556,8 @@ void dScnLogo_c::dolbyInDraw() { if (mTimer == 0) { mExecCommand = EXEC_DOLBY_OUT; - mTimer = 30; - mDoGph_gInf_c::startFadeOut(30); + mTimer = 1; + mDoGph_gInf_c::startFadeOut(1); } } @@ -384,8 +566,8 @@ void dScnLogo_c::dolbyOutDraw() { if (mTimer == 0) { mExecCommand = EXEC_DOLBY_OUT2; - mTimer = 30; - mDoGph_gInf_c::startFadeIn(30); + mTimer = 1; + mDoGph_gInf_c::startFadeIn(1); } } @@ -395,40 +577,208 @@ void dScnLogo_c::dolbyOutDraw2() { } } +#if PLATFORM_WII || PLATFORM_SHIELD +void dScnLogo_c::strapInDraw() { + dComIfGd_set2DOpa(mStrapImg); + if (mTimer == 0) { + mExecCommand = EXEC_STRAP_DISP; + + #if VERSION == VERSION_SHIELD_DEBUG + mTimer = 0; + #elif VERSION == VERSION_SHIELD + mTimer = 60; + #else + mTimer = 840; + #endif + } +} + +void dScnLogo_c::strapDispDraw() { + dComIfGd_set2DOpa(mStrapImg); + + #if VERSION == VERSION_SHIELD_DEBUG + if (mTimer == 0) + #elif VERSION == VERSION_SHIELD + if (mTimer == 0 || cAPICPad_ANY_BUTTON(PAD_1)) + #else + if (mTimer == 0 || mReCPd::getTrig(PAD_1) & ~WPAD_BUTTON_HOME) + #endif + { + mExecCommand = EXEC_DVD_WAIT; + } +} + +void dScnLogo_c::strapOutDraw() { + dComIfGd_set2DOpa(mStrapImg); + if (mTimer == 0) { + #if VERSION == VERSION_SHIELD + mExecCommand = EXEC_NVLOGO_IN; + #else + mExecCommand = EXEC_STRAP_OUT2; + #endif + + mTimer = 30; + mDoGph_gInf_c::startFadeIn(30); + } +} + +void dScnLogo_c::strapOut2Draw() { + if (mTimer == 0) { + mExecCommand = EXEC_SCENE_CHANGE; + } +} +#endif + +#if VERSION == VERSION_SHIELD +void dScnLogo_c::mocInDraw() { + dComIfGd_set2DOpa(mMocImg); + + if (mTimer == 0) { + mExecCommand = EXEC_MOC_DISP; + mTimer = 120; + } +} + +void dScnLogo_c::mocDispDraw() { + dComIfGd_set2DOpa(mMocImg); + + if (mTimer == 0 || cAPICPad_ANY_BUTTON(PAD_1)) { + mExecCommand = EXEC_MOC_OUT; + mTimer = 30; + mDoGph_gInf_c::startFadeOut(30); + } +} + +void dScnLogo_c::mocOutDraw() { + dComIfGd_set2DOpa(mMocImg); + + if (mTimer == 0) { + mExecCommand = EXEC_STRAP_IN; + mTimer = 90; + mDoGph_gInf_c::startFadeIn(30); + } +} + +void dScnLogo_c::nvLogoInDraw() { + dComIfGd_set2DOpa(mNvLogo); + + if (mTimer == 0) { + mExecCommand = EXEC_NVLOGO_DISP; + mTimer = 120; + } +} + +void dScnLogo_c::nvLogoDispDraw() { + dComIfGd_set2DOpa(mNvLogo); + + if (mTimer == 0 || cAPICPad_ANY_BUTTON(PAD_1)) { + mExecCommand = EXEC_NVLOGO_OUT; + mTimer = 30; + mDoGph_gInf_c::startFadeOut(30); + } +} + +void dScnLogo_c::nvLogoOutDraw() { + dComIfGd_set2DOpa(mNvLogo); + + if (mTimer == 0) { + mExecCommand = EXEC_STRAP_OUT2; + mTimer = 30; + mDoGph_gInf_c::startFadeIn(30); + } +} +#endif + void dScnLogo_c::dvdWaitDraw() { + #if PLATFORM_WII || PLATFORM_SHIELD + dComIfGd_set2DOpa(mStrapImg); + #endif + if (!dComIfG_syncAllObjectRes()) { - if (mpField0Command->sync() && mpAlAnmCommand->sync() && mpFmapResCommand->sync() && - mpDmapResCommand->sync() && mpCollectResCommand->sync() && mpItemIconCommand->sync() && - mpRingResCommand->sync() && mpPlayerNameCommand->sync() && - mpItemInfResCommand->sync() && mpButtonCommand->sync() && mpCardIconCommand->sync() && - mpBmgResCommand->sync() && mpMsgComCommand->sync() && mpMsgResCommand[0]->sync() && - mpMsgResCommand[1]->sync() && mpMsgResCommand[2]->sync() && - mpMsgResCommand[3]->sync() && mpMsgResCommand[4]->sync() && - mpMsgResCommand[5]->sync() && mpMsgResCommand[6]->sync() && mpFontResCommand->sync() && - mpMain2DCommand->sync() && mpRubyResCommand->sync() && mParticleCommand->sync() && - mItemTableCommand->sync() && mEnemyItemCommand->sync() && preLoad_dyl()) + if ( + #if PLATFORM_WII || VERSION == VERSION_SHIELD + mpHomeBtnCommand->sync() && + #endif + mpField0Command->sync() + && mpAlAnmCommand->sync() + && mpFmapResCommand->sync() + && mpDmapResCommand->sync() + && mpCollectResCommand->sync() + && mpItemIconCommand->sync() + && mpRingResCommand->sync() + && mpPlayerNameCommand->sync() + && mpItemInfResCommand->sync() + && mpButtonCommand->sync() + && mpCardIconCommand->sync() + && mpBmgResCommand->sync() + && mpMsgComCommand->sync() + && mpMsgResCommand[0]->sync() + && mpMsgResCommand[1]->sync() + && mpMsgResCommand[2]->sync() + && mpMsgResCommand[3]->sync() + && mpMsgResCommand[4]->sync() + && mpMsgResCommand[5]->sync() + && mpMsgResCommand[6]->sync() + && mpFontResCommand->sync() + && mpMain2DCommand->sync() + && mpRubyResCommand->sync() + && mParticleCommand->sync() + && mItemTableCommand->sync() + && mEnemyItemCommand->sync() + && preLoad_dyl()) { mDoRst::setLogoScnFlag(0); + + #if PLATFORM_WII || PLATFORM_SHIELD + mDoRst::setProgSeqFlag(0); + #endif + mDoRst::setProgChgFlag(0); + + #if PLATFORM_WII || PLATFORM_SHIELD + mExecCommand = EXEC_STRAP_OUT; + mTimer = 30; + mDoGph_gInf_c::startFadeOut(30); + #else mExecCommand = EXEC_SCENE_CHANGE; + #endif } } } void dScnLogo_c::nextSceneChange() { if (!mDoRst::isReset()) { - dComIfG_changeOpeningScene(this, PROC_OPENING_SCENE); + if (!isOpeningCut()) + { + dComIfG_changeOpeningScene(this, PROC_OPENING_SCENE); + } else { + #if DEBUG + fopScnM_ChangeReq(this, PROC_MENU_SCENE, 0, 30); + dComIfGs_init(); + dComIfG_playerStatusD(); + return; + #endif + } } } dScnLogo_c::~dScnLogo_c() { if (mDoRst::isReset()) { - if (mDoAud_zelAudio_c::isInitFlag()) { + #if !(PLATFORM_WII || PLATFORM_SHIELD) + if (mDoAud_zelAudio_c::isInitFlag()) + #endif + { Z2AudioMgr::getInterface()->resetProcess(5, true); } + mDoRst_reset(0, 0x80000000, 0); } + #if PLATFORM_WII || PLATFORM_SHIELD + delete mStrapImg; + #endif + + #if !(PLATFORM_WII || PLATFORM_SHIELD) delete mNintendoLogo; delete mWarning; delete mWarningStart; @@ -443,14 +793,41 @@ dScnLogo_c::~dScnLogo_c() { mpPalLogoResCommand->getArchive()->unmount(); mpPalLogoResCommand->destroy(); #endif + #endif + + #if VERSION == VERSION_SHIELD + delete mNvLogo; + delete mMocImg; + #endif preLoad_dyl_remove(); - dComIfG_deleteObjectResMain(LOGO_ARC); - field_0x1d4->destroy(); - field_0x1d0->destroy(); + #if PLATFORM_WII || PLATFORM_SHIELD + switch (getPalLanguage()) { + case 2: + dComIfG_deleteObjectResMain("LogoFrWii"); + break; + case 3: + dComIfG_deleteObjectResMain("LogoSpWii"); + break; + case 0: + default: + dComIfG_deleteObjectResMain("LogoUsWii"); + break; + } + #else + dComIfG_deleteObjectResMain(LOGO_ARC); + #endif + + mLogo01Heap->destroy(); + mLogoHeap->destroy(); JKRFree(dummyGameAlloc); + #if PLATFORM_WII || VERSION == VERSION_SHIELD + dHomeButton_c::create(mHomeBtnRegion, mpHomeBtnCommand->getMemAddress()); + mpHomeBtnCommand->destroy(); + #endif + dComIfGp_particle_createCommon(mParticleCommand->getMemAddress()); dComIfGp_setFieldMapArchive2(mpField0Command->getArchive()); dComIfGp_setAnmArchive(mpAlAnmCommand->getArchive()); @@ -462,7 +839,17 @@ dScnLogo_c::~dScnLogo_c() { dComIfGp_setRingResArchive(mpRingResCommand->getArchive()); dComIfGp_setNameResArchive(mpPlayerNameCommand->getArchive()); dComIfGp_setDemoMsgArchive(mpItemInfResCommand->getArchive()); + dComIfGp_setMeterButtonArchive(mpButtonCommand->getArchive()); + #if DEBUG + JKRArchive* button = mpButtonCommand->getArchive(); + if (button != NULL) { + OS_REPORT("button not nullptr\n"); + } else { + OS_REPORT("button nullptr\n"); + } + #endif + dComIfGp_setErrorResArchive(NULL); dComIfGp_setCardIconResArchive(mpCardIconCommand->getArchive()); dComIfGp_setMsgDtArchive(0, mpBmgResCommand->getArchive()); @@ -493,7 +880,12 @@ dScnLogo_c::~dScnLogo_c() { mpFontResCommand->destroy(); mpMain2DCommand->destroy(); mpRubyResCommand->destroy(); + + #if !PLATFORM_SHIELD mParticleCommand->destroy(); + #else + delete mParticleCommand; + #endif JKRAramHeap* aram_heap = JKRAram::getAramHeap(); u32 free_size = aram_heap->getTotalFreeSize(); @@ -510,15 +902,30 @@ dScnLogo_c::~dScnLogo_c() { #endif dComIfGp_setItemTable(mItemTableCommand->getMemAddress()); + #if !PLATFORM_SHIELD mItemTableCommand->destroy(); + #else + delete mItemTableCommand; + #endif dEnemyItem_c::setItemData((u8*)mEnemyItemCommand->getMemAddress()); + #if !PLATFORM_SHIELD mEnemyItemCommand->destroy(); + #else + delete mEnemyItemCommand; + #endif dDlst_shadowControl_c::setSimpleTex((ResTIMG*)dComIfG_getObjectRes("Always", 0x4A)); + + #if PLATFORM_WII || PLATFORM_SHIELD + dComIfG_inf_c::createBaseCsr(); + #endif + dTres_c::createWork(); dMpath_c::createWork(); + OS_REPORT("\x1b[31m%d gameHeap->getFreeSize %08x(%d)\n\x1b[m", 1479, mDoExt_getGameHeap()->getFreeSize(), mDoExt_getGameHeap()->getFreeSize()); + #if PLATFORM_WII data_8053a730 = 0; #endif @@ -528,10 +935,18 @@ static int phase_0(dScnLogo_c* i_this) { mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_blackColor); dComIfGp_particle_create(); - i_this->dummyGameAlloc = mDoExt_getGameHeap()->alloc(0x340000, -0x10); + OS_REPORT("\x1b[31m%d gameHeap->getFreeSize %08x(%d)\n\x1b[m", 1497, mDoExt_getGameHeap()->getFreeSize(), mDoExt_getGameHeap()->getFreeSize()); + u32 var_r29 = 0x340000; + u32 var_r28 = 0x130000; + + i_this->dummyGameAlloc = mDoExt_getGameHeap()->alloc(var_r29, -0x10); JUT_ASSERT(1523, i_this->dummyGameAlloc != NULL); - i_this->field_0x1d0 = JKRExpHeap::create(i_this->dummyGameAlloc, 0x340000, NULL, false); - i_this->field_0x1d4 = JKRExpHeap::create(0x130000, i_this->field_0x1d0, false); + + i_this->mLogoHeap = JKRExpHeap::create(i_this->dummyGameAlloc, var_r29, NULL, false); + JUT_ASSERT(1525, i_this->mLogoHeap != NULL); + + i_this->mLogo01Heap = JKRCreateExpHeap(var_r28, i_this->mLogoHeap, false); + JUT_ASSERT(1528, i_this->mLogo01Heap != NULL); #if VERSION == VERSION_GCN_PAL switch (i_this->getPalLanguage()) { @@ -554,6 +969,10 @@ static int phase_0(dScnLogo_c* i_this) { } #endif + #if PLATFORM_WII || PLATFORM_SHIELD + OSSetPowerCallback(mDoRst_shutdownCallBack); + #endif + return cPhs_NEXT_e; } @@ -562,9 +981,11 @@ static int phase_1(dScnLogo_c* i_this) { return cPhs_INIT_e; } + #if !(PLATFORM_WII || PLATFORM_SHIELD) if (!mDoAud_zelAudio_c::isInitFlag() || Z2AudioMgr::getInterface()->checkFirstWaves()) { return cPhs_INIT_e; } + #endif #if VERSION == VERSION_GCN_PAL if (!mDoDvdThd::SyncWidthSound) { @@ -576,8 +997,29 @@ static int phase_1(dScnLogo_c* i_this) { } #endif - dComIfG_setObjectRes(LOGO_ARC, (u8)0, i_this->field_0x1d0); + int rt; + #if PLATFORM_WII || PLATFORM_SHIELD + switch (i_this->getPalLanguage()) { + case 0: + default: + rt = dComIfG_setObjectRes("LogoUsWii", (u8)0, i_this->mLogoHeap); + break; + case 2: + rt = dComIfG_setObjectRes("LogoFrWii", (u8)0, i_this->mLogoHeap); + break; + case 3: + rt = dComIfG_setObjectRes("LogoSpWii", (u8)0, i_this->mLogoHeap); + break; + } + #else + rt = dComIfG_setObjectRes(LOGO_ARC, (u8)0, i_this->mLogoHeap); + #endif + + JUT_ASSERT(1652, rt == 1); + mDoRst::setLogoScnFlag(1); + + OS_REPORT("\x1b[32m%d archiveHeap->getTotalFreeSize %08x\n\x1b[m", 1667, archiveHeap->getTotalFreeSize()); archiveHeap->dump_sort(); return cPhs_NEXT_e; } @@ -617,28 +1059,56 @@ int dScnLogo_c::create() { data_8053a730 = 1; #endif - mpHeap = mDoExt_setCurrentHeap(field_0x1d4); + mpHeap = mDoExt_setCurrentHeap(mLogo01Heap); + + #if PLATFORM_WII || PLATFORM_SHIELD + logoInitWii(); + #else logoInitGC(); - mpHeap->becomeCurrentHeap(); + #endif + + JKRSetCurrentHeap(mpHeap); + + OS_REPORT("\x1b[31m%d gameHeap->getFreeSize %08x(%d)\n\x1b[m", 1732, mDoExt_getGameHeap()->getFreeSize(), mDoExt_getGameHeap()->getFreeSize()); dvdDataLoad(); - Z2AudioMgr::getInterface()->loadStaticWaves(); - mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 60); - mDoGph_gInf_c::waitBlanking(0); - field_0x20a = 0; - mDoGph_gInf_c::startFadeIn(30); + OS_REPORT("\x1b[31m%d gameHeap->getFreeSize %08x(%d)\n\x1b[m", 1738, mDoExt_getGameHeap()->getFreeSize(), mDoExt_getGameHeap()->getFreeSize()); + + #if !(PLATFORM_WII || PLATFORM_SHIELD) + Z2AudioMgr::getInterface()->loadStaticWaves(); + #endif + + mDoGph_gInf_c::setTickRate(OS_TIMER_CLOCK / 60); + mDoGph_gInf_c::waitBlanking(0); + + field_0x20a = 0; + + #if VERSION == VERSION_SHIELD_DEBUG + mExecCommand = EXEC_STRAP_IN; + mTimer = 0; + #elif VERSION == VERSION_SHIELD + mExecCommand = EXEC_MOC_IN; + mTimer = 30; + #elif PLATFORM_WII + mExecCommand = EXEC_STRAP_IN; + mTimer = 90; + #endif + + mDoGph_gInf_c::startFadeIn(1); + + #if !(PLATFORM_WII || PLATFORM_SHIELD) checkProgSelect(); if (field_0x20a != 0) { mExecCommand = EXEC_PROG_IN; - mTimer = 30; + mTimer = 1; field_0x218 = getProgressiveMode(); } else { if (mDoRst::getWarningDispFlag()) { - mTimer = 90; + mTimer = 1; // 90; mExecCommand = EXEC_NINTENDO_IN; } else { - mTimer = 120; + mTimer = 1; mExecCommand = EXEC_WARNING_IN; } mDoRst::setProgSeqFlag(1); @@ -646,12 +1116,92 @@ int dScnLogo_c::create() { JUTGamePad::clearResetOccurred(); JUTGamePad::setResetCallback(mDoRst_resetCallBack, NULL); + #endif + mDoRst::offReset(); mDoRst::offResetPrepare(); + #if PLATFORM_WII || VERSION == VERSION_SHIELD + dHomeButton_c::lbl_8053A724 = 0; + #endif + return phase_state; } +#if PLATFORM_WII || PLATFORM_SHIELD +void dScnLogo_c::logoInitWii() { + u8 language = getPalLanguage(); + if (language > 5) { + language = 0; + } + + ResTIMG* timg; + s16 width; + s16 height; + if (mDoGph_gInf_c::isWide()) { + switch (language) { + case 0: + default: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", dRes_ID_LOGOUSWII_BTI_STRAP_16_9_832X456_US_e); + break; + case 2: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoFrWii", 3); + break; + case 3: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoSpWii", 3); + break; + } + + width = 832; + height = 456; + } else { + switch (language) { + case 0: + default: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", dRes_ID_LOGOUSWII_BTI_STRAP_608X456_US_e); + break; + case 2: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoFrWii", 4); + break; + case 3: + timg = (ResTIMG*)dComIfG_getObjectRes("LogoSpWii", 4); + break; + } + + width = 608; + height = 456; + } + + JUT_ASSERT(2309, timg != NULL); + mStrapImg = new dDlst_2D_c(timg, 304 - (width / 2), 224 - (height / 2), width, height, 255); + + #if VERSION == VERSION_SHIELD + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", 5); + mNvLogo = new dDlst_2D_c(timg, 304 - (width / 2), 224 - (height / 2), width, height, 255); + + timg = (ResTIMG*)dComIfG_getObjectRes("LogoUsWii", 4); + mMocImg = new dDlst_2D_c(timg, 304 - (width / 2), 224 - (height / 2), width, height, 255); + #endif + + OS_REPORT("\x1b[32m%d archiveHeap->getTotalFreeSize %08x\n\x1b[m", 2316, archiveHeap->getTotalFreeSize()); + + JUT_ASSERT(2319, mStrapImg != NULL); + + mNintendoLogo = NULL; + mDolbyLogo = NULL; + mWarning = NULL; + mWarningStart = NULL; + mProgressiveChoice = NULL; + mProgressiveYes = NULL; + mProgressiveNo = NULL; + mProgressivePro = NULL; + mProgressiveInter = NULL; + mProgressiveSel = NULL; + + OS_REPORT("\x1b[32m%d archiveHeap->getTotalFreeSize %08x\n\x1b[m", 2341, archiveHeap->getTotalFreeSize()); + OS_REPORT("%d mLogo01Heap->getTotalFreeSize %08x\n\x1b[m", 2344, mLogo01Heap->getTotalFreeSize()); +} +#else void dScnLogo_c::logoInitGC() { ResTIMG* nintendoImg = (ResTIMG*)dComIfG_getObjectRes(LOGO_ARC, 4); mNintendoLogo = new dDlst_2D_c(nintendoImg, 117, 154, 376, 104, 255); @@ -769,103 +1319,133 @@ void dScnLogo_c::logoInitGC() { mProgressiveSel = new dDlst_2D_c(mProgressivePro, 153, 309, 336, 88, 255); #endif } +#endif void dScnLogo_c::dvdDataLoad() { - dComIfG_setObjectRes("Always", (u8)0, NULL); + int rt; + + #if PLATFORM_WII || VERSION == VERSION_SHIELD + rt = dComIfG_setObjectRes("HomeBtn", (u8)0, NULL); + JUT_ASSERT(__LINE__, rt == 1); + + static const homeBtnData l_homeBtnData[] = { + {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, + {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, + {SC_LANG_FRENCH, "/res/HomeBtn/homeBtn_FRA.arc"}, + {SC_LANG_SPANISH, "/res/HomeBtn/homeBtn_SPA.arc"}, + {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, + {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, + {SC_LANG_ENGLISH, "/res/HomeBtn/homeBtn_ENG.arc"}, + }; + + u8 language = getPalLanguage(); + const homeBtnData* data = &l_homeBtnData[language]; + mpHomeBtnCommand = mDoDvdThd_toMainRam_c::create(data->path, 0, NULL); + mHomeBtnRegion = data->region; + #endif + + rt = dComIfG_setObjectRes("Always", (u8)0, NULL); + JUT_ASSERT(2420, rt == 1); + + OS_REPORT("\x1b[32m%d archiveHeap->getTotalFreeSize %08x\n\x1b[m", 2421, archiveHeap->getTotalFreeSize()); archiveHeap->dump_sort(); - dComIfG_setObjectRes("Alink", (u8)0, NULL); + rt = dComIfG_setObjectRes("Alink", (u8)0, NULL); + JUT_ASSERT(2429, rt == 1); - mpField0Command = mDoDvdThd_mountXArchive_c::create( - "/res/FieldMap/Field0.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpAlAnmCommand = - mDoDvdThd_mountXArchive_c::create("/res/Object/AlAnm.arc", 0, JKRArchive::MOUNT_ARAM, NULL); - mpFmapResCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/fmapres.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpDmapResCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/dmapres.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpCollectResCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/clctres.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpItemIconCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/itemicon.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpRingResCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/ringres.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpPlayerNameCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/playerName.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpItemInfResCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/itmInfRes.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpButtonCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/button.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpCardIconCommand = mDoDvdThd_mountXArchive_c::create( - "/res/CardIcon/cardicon.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); + #if PLATFORM_WII || PLATFORM_SHIELD + rt = dComIfG_setObjectRes("NNGC", (u8)0, NULL); + JUT_ASSERT(2433, rt == 1); + #endif + + OS_REPORT("\x1b[32m%d archiveHeap->getTotalFreeSize %08x\n\x1b[m", 2436, archiveHeap->getTotalFreeSize()); + + mpField0Command = aramMount("/res/FieldMap/Field0.arc", mDoExt_getJ2dHeap()); + mpAlAnmCommand = aramMount("/res/Object/AlAnm.arc", NULL); + mpFmapResCommand = aramMount(FMAP_RES_PATH, mDoExt_getJ2dHeap()); + mpDmapResCommand = aramMount(DMAP_RES_PATH, mDoExt_getJ2dHeap()); + mpCollectResCommand = aramMount(COLLECT_RES_PATH, mDoExt_getJ2dHeap()); + mpItemIconCommand = aramMount("/res/Layout/itemicon.arc", mDoExt_getJ2dHeap()); + mpRingResCommand = aramMount(RING_RES_PATH, mDoExt_getJ2dHeap()); + mpPlayerNameCommand = aramMount("/res/Layout/playerName.arc", mDoExt_getJ2dHeap()); + mpItemInfResCommand = aramMount(ITEM_INF_RES_PATH, mDoExt_getJ2dHeap()); + mpButtonCommand = aramMount(BUTTON_RES_PATH, mDoExt_getJ2dHeap()); + mpCardIconCommand = aramMount(ICON_RES_PATH, mDoExt_getJ2dHeap()); #if VERSION == VERSION_GCN_PAL switch (getPalLanguage()) { case 1: - mpBmgResCommand = mDoDvdThd_mountXArchive_c::create("/res/Msgde/bmgres.arc", 0, JKRArchive::MOUNT_MEM, NULL); + mpBmgResCommand = onMemMount("/res/Msgde/bmgres.arc"); break; case 2: - mpBmgResCommand = mDoDvdThd_mountXArchive_c::create("/res/Msgfr/bmgres.arc", 0, JKRArchive::MOUNT_MEM, NULL); + mpBmgResCommand = onMemMount("/res/Msgfr/bmgres.arc"); break; case 3: - mpBmgResCommand = mDoDvdThd_mountXArchive_c::create("/res/Msgsp/bmgres.arc", 0, JKRArchive::MOUNT_MEM, NULL); + mpBmgResCommand = onMemMount("/res/Msgsp/bmgres.arc"); break; case 4: - mpBmgResCommand = mDoDvdThd_mountXArchive_c::create("/res/Msgit/bmgres.arc", 0, JKRArchive::MOUNT_MEM, NULL); + mpBmgResCommand = onMemMount("/res/Msgit/bmgres.arc"); break; case 0: default: - mpBmgResCommand = mDoDvdThd_mountXArchive_c::create("/res/Msguk/bmgres.arc", 0, JKRArchive::MOUNT_MEM, NULL); + mpBmgResCommand = onMemMount("/res/Msguk/bmgres.arc"); + break; + } + #elif VERSION == VERSION_SHIELD_DEBUG + switch (getPalLanguage()) { + case 2: + mpBmgResCommand = onMemMount("/res/Msgfr/bmgres.arc"); + break; + case 3: + mpBmgResCommand = onMemMount("/res/Msgsp/bmgres.arc"); + break; + default: + mpBmgResCommand = onMemMount("/res/Msgus/bmgres.arc"); break; } #else - mpBmgResCommand = mDoDvdThd_mountXArchive_c::create(MSG_PATH, 0, JKRArchive::MOUNT_MEM, NULL); + mpBmgResCommand = onMemMount(MSG_PATH); #endif - mpMsgComCommand = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgcom.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpMsgResCommand[0] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres00.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpMsgResCommand[1] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres01.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpMsgResCommand[2] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres02.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpMsgResCommand[3] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres03.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); + mpMsgComCommand = aramMount(MSG_COM_PATH, mDoExt_getJ2dHeap()); + mpMsgResCommand[0] = aramMount(MSG_RES0_PATH, mDoExt_getJ2dHeap()); + mpMsgResCommand[1] = aramMount(MSG_RES1_PATH, mDoExt_getJ2dHeap()); + mpMsgResCommand[2] = aramMount(MSG_RES2_PATH, mDoExt_getJ2dHeap()); + mpMsgResCommand[3] = aramMount(MSG_RES3_PATH, mDoExt_getJ2dHeap()); #if VERSION == VERSION_GCN_JPN - mpMsgResCommand[4] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres04.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); + mpMsgResCommand[4] = aramMount("/res/Layout/msgres04.arc", mDoExt_getJ2dHeap()); #else - mpMsgResCommand[4] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres04F.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); + mpMsgResCommand[4] = aramMount("/res/Layout/msgres04F.arc", mDoExt_getJ2dHeap()); #endif - mpMsgResCommand[5] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres05.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpMsgResCommand[6] = mDoDvdThd_mountXArchive_c::create( - "/res/Layout/msgres06.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap()); - mpMain2DCommand = - mDoDvdThd_mountXArchive_c::create("/res/Layout/main2D.arc", 0, JKRArchive::MOUNT_MEM, NULL); + mpMsgResCommand[5] = aramMount("/res/Layout/msgres05.arc", mDoExt_getJ2dHeap()); + mpMsgResCommand[6] = aramMount("/res/Layout/msgres06.arc", mDoExt_getJ2dHeap()); + + mpMain2DCommand = onMemMount(MAIN2D_PATH); #if VERSION == VERSION_GCN_JPN - mpFontResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fontjp/fontres.arc", 1, - JKRArchive::MOUNT_MEM, NULL); - mpRubyResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fontjp/rubyres.arc", 0, - JKRArchive::MOUNT_MEM, NULL); + mpFontResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fontjp/fontres.arc", 1, JKRArchive::MOUNT_MEM, NULL); + mpRubyResCommand = onMemMount("/res/Fontjp/rubyres.arc"); #elif VERSION == VERSION_GCN_PAL - mpFontResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fonteu/fontres.arc", 0, - JKRArchive::MOUNT_MEM, NULL); - mpRubyResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fonteu/rubyres.arc", 0, - JKRArchive::MOUNT_MEM, NULL); + mpFontResCommand = onMemMount("/res/Fonteu/fontres.arc"); + mpRubyResCommand = onMemMount("/res/Fonteu/rubyres.arc"); +#elif VERSION == VERSION_SHIELD_DEBUG + mpFontResCommand = onMemMount("/res/Fonteu/fontres.arc"); + mpRubyResCommand = onMemMount("/res/Fontus/rubyres.arc"); +#elif VERSION == VERSION_SHIELD + mpFontResCommand = onMemMount("/res/Fontcn/fontres.arc"); + mpRubyResCommand = onMemMount("/res/Fontcn/rubyres.arc"); #else - mpFontResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fontus/fontres.arc", 0, - JKRArchive::MOUNT_MEM, NULL); - mpRubyResCommand = mDoDvdThd_mountXArchive_c::create("/res/Fontus/rubyres.arc", 0, - JKRArchive::MOUNT_MEM, NULL); + mpFontResCommand = onMemMount("/res/Fontus/fontres.arc"); + mpRubyResCommand = onMemMount("/res/Fontus/rubyres.arc"); #endif - mParticleCommand = mDoDvdThd_toMainRam_c::create("/res/Particle/common.jpc", 0, - dComIfGp_particle_getResHeap()); + + mParticleCommand = mDoDvdThd_toMainRam_c::create(PARTICLE_COM_PATH, 0, dComIfGp_particle_getResHeap()); + mItemTableCommand = mDoDvdThd_toMainRam_c::create("/res/ItemTable/item_table.bin", 0, NULL); + JUT_ASSERT(2620, mItemTableCommand != NULL); + mEnemyItemCommand = mDoDvdThd_toMainRam_c::create("/res/ItemTable/enemy_table.bin", 0, NULL); + JUT_ASSERT(2624, mEnemyItemCommand != NULL); preLoad_dyl_create(); preLoad_dyl(); @@ -877,13 +1457,58 @@ static int dScnLogo_Create(scene_class* i_this) { } static int dScnLogo_Execute(dScnLogo_c* i_this) { + fpc_ProcID id = fpcM_GetID(i_this); + if (mDoRst::isReset()) { fopScnM_ChangeReq(i_this, PROC_LOGO_SCENE, 0, 5); } + return 1; } +#if DEBUG +static u8 lbl_8074CA49; +#endif + static int dScnLogo_Draw(dScnLogo_c* i_this) { + #if DEBUG + int x = 36; + int y = 40; + + y += 12; + JUTReport(x, y, "COPYDATE %s", mDoMain::COPYDATE_STRING); + + y += 12; + JUTReport(x, y, "Build by %s", "Authorized User"); + + y += 12; + JUTReport(x, y, "_DEBUG/Debug version"); + + if (!lbl_8074CA49) { + lbl_8074CA49 = 1; + JUTReportConsole_f("COPYDATE %s\n", mDoMain::COPYDATE_STRING); + JUTReportConsole_f("Build by %s\n", "Authorized User"); + JUTReportConsole_f("_DEBUG/Debug version\n"); + JUTReportConsole_f("SDKVersion %s\n", "11Dec2009Patch02"); + + #if PLATFORM_WII || PLATFORM_SHIELD + JUTReportConsole_f("ConsoleSimMem %08x\n", OSGetConsoleSimulatedMem1Size()); + JUTReportConsole_f("PhysicalMemory %08x\n", OSGetPhysicalMem1Size()); + JUTReportConsole_f("ConsoleType %08x\n", OSGetConsoleType()); + JUTReportConsole_f("Language(PAL) %1x\n", SCGetLanguage()); + JUTReportConsole_f("Progressive %1x\n", SCGetProgressiveMode()); + JUTReportConsole_f("SoundMode %1x\n", SCGetSoundMode()); + #else + JUTReportConsole_f("ConsoleSimMem %08x\n", OSGetConsoleSimulatedMemSize()); + JUTReportConsole_f("PhysicalMemory %08x\n", OSGetPhysicalMemSize()); + JUTReportConsole_f("ConsoleType %08x\n", OSGetConsoleType()); + JUTReportConsole_f("Language(PAL) %1x\n", OSGetLanguage()); + JUTReportConsole_f("Progressive %1x\n", OSGetProgressiveMode()); + JUTReportConsole_f("SoundMode %1x\n", OSGetSoundMode()); + #endif + } + #endif + i_this->draw(); return 1; } @@ -897,9 +1522,35 @@ static int dScnLogo_IsDelete(dScnLogo_c* i_this) { return 1; } -#if VERSION == VERSION_GCN_PAL +#if VERSION == VERSION_GCN_PAL || PLATFORM_WII || PLATFORM_SHIELD u8 dScnLogo_c::getPalLanguage() { u8 language; + + #if PLATFORM_WII || PLATFORM_SHIELD + switch (SCGetLanguage()) { + case SC_LANG_JAPANESE: + language = 6; + break; + case SC_LANG_ENGLISH: + language = 0; + break; + case SC_LANG_GERMAN: + language = 1; + break; + case SC_LANG_FRENCH: + language = 2; + break; + case SC_LANG_SPANISH: + language = 3; + break; + case SC_LANG_ITALIAN: + language = 4; + break; + case SC_LANG_DUTCH: + language = 5; + break; + } + #else switch (OSGetLanguage()) { case OS_LANGUAGE_ENGLISH: language = 0; @@ -920,13 +1571,20 @@ u8 dScnLogo_c::getPalLanguage() { language = 5; break; } + #endif return language; } #endif void dScnLogo_c::setProgressiveMode(u8 mode) { - #if VERSION == VERSION_GCN_PAL + #if VERSION == VERSION_SHIELD_DEBUG + return; + #endif + + #if PLATFORM_WII + SCSetProgressiveMode(mode); + #elif VERSION == VERSION_GCN_PAL OSSetEuRgb60Mode(mode); #else OSSetProgressiveMode(mode); @@ -934,6 +1592,10 @@ void dScnLogo_c::setProgressiveMode(u8 mode) { } u8 dScnLogo_c::getProgressiveMode() { + #if PLATFORM_WII || PLATFORM_SHIELD + return SCGetProgressiveMode(); + #endif + #if VERSION == VERSION_GCN_PAL return OSGetEuRgb60Mode(); #else @@ -953,8 +1615,6 @@ void dScnLogo_c::setRenderMode() { mDoMch_render_c::setProgressiveMode(); } -dLog_HIO_c::~dLog_HIO_c() {} - static scene_method_class l_dScnLogo_Method = { (process_method_func)dScnLogo_Create, (process_method_func)dScnLogo_Delete, diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp index 1e4636c457..070d198824 100644 --- a/src/d/d_s_play.cpp +++ b/src/d/d_s_play.cpp @@ -26,13 +26,33 @@ #include "m_Do/m_Do_graphic.h" #include "d/actor/d_a_suspend.h" #include "d/actor/d_a_ykgr.h" +#include "JSystem/JHostIO/JORFile.h" +#include "JSystem/JHostIO/JORServer.h" +#include "JSystem/JKernel/JKRExpHeap.h" +#include "JSystem/JFramework/JFWSystem.h" +#include "f_ap/f_ap_game.h" +#include "d/d_bg_parts.h" +#include "f_op/f_op_kankyo_mng.h" +#include "d/actor/d_a_alink.h" +#include "d/actor/d_a_midna.h" +#include "JSystem/JKernel/JKRAram.h" +#include "JSystem/JKernel/JKRAramArchive.h" + +#if DEBUG +#include "d/d_s_menu.h" +#include "d/d_debug_pad.h" +#include "d/d_jpreviewer.h" +#include "d/d_jcam_editor.h" +#include "d/d_a_obj.h" +#include "d/d_debug_viewer.h" +#endif #include #if PLATFORM_WII #include "d/d_cursor_mng.h" #endif -static void dScnPly_Create(scene_class*); +static int dScnPly_Create(scene_class*); static int dScnPly_Delete(dScnPly_c*); static int dScnPly_IsDelete(dScnPly_c); static int dScnPly_Execute(dScnPly_c*); @@ -54,6 +74,10 @@ static request_of_phase_process_class resPhase[1]; static request_of_phase_process_class dylPhase[1]; +#if DEBUG +static OSTime dylPreLoadTime0; +#endif + static OSTime dylPreLoadTime1; static OSTime resPreLoadTime0; @@ -66,6 +90,47 @@ s8 dScnPly_c::pauseTimer; s8 dScnPly_c::nextPauseTimer; +#if DEBUG +u8 dScnPly_c::debugPause; +#endif + +static const s16 T_JOINT_dylKeyTbl[1] = { + PROC_COW, +}; + +static const char* T_JOINT_resName[1] = {"Always"}; + +struct PreLoadInfo { + const char* stageName; + const s16* profNameTbl; + const char** resNameTbl; + u8 dylKeyTblNum; + u8 resNameNum; +}; + +static PreLoadInfo const PreLoadInfoT[1] = { + { + "T_JOINT", + T_JOINT_dylKeyTbl, + T_JOINT_resName, + ARRAY_SIZE(T_JOINT_dylKeyTbl), + ARRAY_SIZE(T_JOINT_resName), + }, +}; + +static s8 preLoadNo = -1; + +static u8 doPreLoad = 1; + +#if DEBUG +void dScnPly_preLoad_HIO_c::genMessage(JORMContext* mctx) { + mctx->startComboBox("プリロード", &doPreLoad); + mctx->genComboBoxItem("しない", 0); + mctx->genComboBoxItem("する", 1); + mctx->endComboBox(); +} +#endif + s8 dScnPly_c::calcPauseTimer() { if (nextPauseTimer != 0) { pauseTimer = nextPauseTimer; @@ -76,19 +141,282 @@ s8 dScnPly_c::calcPauseTimer() { } } -static const s16 T_JOINT_dylKeyTbl[1] = { - 0x0106, -}; +#if DEBUG +dScnPly_reg_childHIO_c::dScnPly_reg_childHIO_c() { + for (int i = 0; i < 30; i++) { + mFloatReg[i] = 0.0f; + } + + for (int i = 0; i < 10; i++) { + mShortReg[i] = 0; + } +} + +void dScnPly_reg_childHIO_c::genMessage(JORMContext* mctx) { + char textbuf[8]; + + for (int i = 0; i < 20; i++) { + sprintf(textbuf, " F(%02d)", i); + mctx->genSlider(textbuf, &mFloatReg[i], -100000.0f, 100000.0f); + } + + for (int i = 20; i < 25; i++) { + sprintf(textbuf, " F(%02d)", i); + mctx->genSlider(textbuf, &mFloatReg[i], 0.0f, 1.0f); + } + + for (int i = 25; i < 30; i++) { + sprintf(textbuf, " F(%02d)", i); + mctx->genSlider(textbuf, &mFloatReg[i], -1.0f, 1.0f); + } + + for (int i = 0; i < 10; i++) { + sprintf(textbuf, " S(%02d)", i); + mctx->genSlider(textbuf, &mShortReg[i], -0x8000, 0x7FFF); + } +} + +void dScnPly_reg_HIO_c::genMessage(JORMContext* mctx) { + static const char l_nodeName[][20] = { + "森田(T)", + "まつたに(D)", + "イワワキ(I)", + "ささ(S)", + "うめみや(U)", + "おがわ(O)", + "坂口(Y)", + "さかい(K)", + "ハラ(B)", + "すみよし(M)", + "(空)-たけした(A)", + "吉田茂樹(P)", + "(空)-のま(N)", + "(空)-にしわき(W)", + "(空)-榊原政郎(J)", + "はやかわ(H)", + "(空)-定本(V)", + "(空)-西川(X)", + "(空)-鈴木(ゆ)(Z)", + "なかにし(n)", + "くわじま(k)", + "おかじま(o)", + "山崎(y)", + "芦田(a)", + "岡田(h)", + "高橋(t)", + }; + + // "Example usage" + mctx->genLabel("使い方例", 0); + mctx->genLabel("R_HS(00-09) ... はやかわレジスタ -32768 - +32767(short)", 0); + mctx->genLabel("R_HF(00-19) ... はやかわレジスタ -100000.0 - +100000.0", 0); + mctx->genLabel("R_HF(20-24) ... はやかわレジスタ 0.0f - 1.0f", 0); + mctx->genLabel("R_HF(25-29) ... はやかわレジスタ -1.0f - 1.0f", 0); + + for (int i = 0; i < 26; i++) { + mctx->genNode(l_nodeName[i], &mChildReg[i], 0, 0); + } +} + +dScnPly_preset_HIO_c::dScnPly_preset_HIO_c() { + field_0x5 = 0; + memset(mPresetData, 0, sizeof(mPresetData)); + memset(filename_buf, 0, sizeof(filename_buf)); + field_0x2716 = 0; + field_0x2717 = 0; +} + +void dScnPly_preset_HIO_c::exePreset() { + JORFile file; + + if (g_presetHIO.filename_buf[0] != 0) { + if (file.open((char*)filename_buf, 1, "", NULL, NULL, NULL)) { + memset(mPresetData, 0, sizeof(mPresetData)); + field_0x2716 = 0; + field_0x2717 = 1; + + file.readData(mPresetData, 0); + file.close(); + + if (dSm_read_stageset(mPresetData)) { + field_0x2717 = 2; + } + } else { + // "\nLoading error loop" + OS_REPORT("\n読み込みしっぱいのまきまき"); + } + + g_presetHIO.filename_buf[0] = 0; + } +} + +void dScnPly_preset_HIO_c::genMessage(JORMContext* mctx) { + // "Load situation file" + mctx->genLabel("【状況ファイルを読みこみ】", 0x80000001); + // "Items and Status can be set in a file" + mctx->genLabel(" アイテムやステータスの状態をファイルで指定することが出来ます。", 0x80000001); + mctx->genLabel("", 0x80000001); + + // "Click here to select a file to load!" + mctx->genButton("ここを押して読込ファイルを指定して下さい!", 0x40000001); + mctx->genLabel("", 0x80000001); + + // "- Loading during gameplay will automatically return you to the debug menu." + mctx->genLabel("・ゲーム中に読み込むと自動的にデバッグメニューへ戻ります。", 0x80000001); + // "- When loading a file from the debug menu," + mctx->genLabel("・デバッグメニューでファイルを読み込んだ際", 0x80000001); + // " if a stage command exists the game will temporarily load then return to the menu." + mctx->genLabel(" stage命令がある場合は一旦ゲームに入りメニューへと戻ります。", 0x80000001); + // " (To position the cursor)" + mctx->genLabel(" (カーソルを合わせる為)", 0x80000001); + mctx->genLabel("", 0x80000001); + + // "Reset state to before loading situation file" + mctx->genButton("状況ファイルを読み込んでいない状態に戻す", 0x40000003); + mctx->genLabel("", 0x80000001); + mctx->genLabel("", 0x80000001); + + // "Click here for the situation file location!" + mctx->genButton("状況ファイルの格納場所はコチラを押下!", 0x40000005); + mctx->genLabel("\\\\10.121.2.9\\zelda$\\JMAP_FOLDER\\situation", 0x80000001); + // "For details about the situation file contents, please refer to Nakamura-san's website" + mctx->genLabel("ファイルの内容については中村さんのHPをご参照ください", 0x80000001); + // "Click here to launch browser and view webpage." + mctx->genButton("ここを押すとブラウザが起動し表示されます。", 0x40000004); + mctx->genLabel("http://www-ead/~nakamuh/gc-zelda_2/misc/spec-situation_file.html", 0x80000001); +} + +void dScnPly_preset_HIO_c::listenPropertyEvent(const JORPropertyEvent* event) { + JORReflexible::listenPropertyEvent(event); + JORFile file; + + switch ((int)event->id) { + case 0x40000001: + if (file.open(1, "すべてのファイル(*.*)\0*.*", NULL, NULL, NULL)) { + memset(mPresetData, 0, sizeof(mPresetData)); + field_0x2716 = 0; + field_0x2717 = 1; + + file.readData(mPresetData, 0); + file.close(); + + if (dSm_read_stageset(mPresetData)) { + field_0x2717 = 2; + } + } + break; + case 0x40000003: + memset(mPresetData, 0, sizeof(mPresetData)); + break; + case 0x40000004: + JORShellExecute(NULL, "http://www-ead/~nakamuh/gc-zelda_2/misc/spec-situation_file.html", NULL, NULL, 1); + break; + case 0x40000005: + JORShellExecute(NULL, "\\\\10.121.2.9\\zelda$\\ZELDA2_JMAP_FOLDER\\situation", NULL, NULL, 1); + break; + } +} +#endif dScnPly_env_otherHIO_c::dScnPly_env_otherHIO_c() { mShadowDensity = 255.0f; - mAdjustLODBias = 1; - mDisplayTransparentCyl = false; + mAdjustLODBias = TRUE; + mDisplayTransparentCyl = FALSE; + + #if DEBUG + mAdjustCullFar = FALSE; + mCullFarValue = 4000.0f; + mDisplayShadows = TRUE; + mDisplayShadowImage = FALSE; + mDisplayShadowPoly = FALSE; + mDisplayCullBox = FALSE; + mLoadAllRooms = FALSE; + mDepthOfField = TRUE; + + mRailSize = 5.0f; + mRailColorR = 0x50; + mRailColorG = 0x50; + mRailColorB = 0x50; + + field_0x1a = 0xFF; + mDisplayParticleInfo = 0; + field_0x4e = 0; + field_0x4f = 0; + + for (int i = 0; i < 20; i++) { + field_0x1c[i] = -1; + } + #endif } -void dScnPly_env_otherHIO_c::genMessage(JORMContext* ctx) { +void dScnPly_env_otherHIO_c::genMessage(JORMContext* mctx) { + #if DEBUG + mctx->genCheckBox("影表示", &mDisplayShadows, 1); + mctx->genSlider("影濃さ", &mShadowDensity, 0.0f, 255.0f); + mctx->genCheckBox("被写界深度", &mDepthOfField, 1); + mctx->genCheckBox("LODバイアス変更", &mAdjustLODBias, 1); + mctx->genCheckBox("カリングFar変更", &mAdjustCullFar, 1); + mctx->genSlider("カリングFar値", &mCullFarValue, 0.0f, 50000.0f); + mctx->genCheckBox("影イメージ表示", &mDisplayShadowImage, 1); + mctx->genCheckBox("影ポリゴン表示", &mDisplayShadowPoly, 1); + mctx->genCheckBox("透明円柱表示", &mDisplayTransparentCyl, 1); + mctx->genCheckBox("カリングボックス表示", &mDisplayCullBox, 1); + mctx->genCheckBox("パーティクル情報表示", &mDisplayParticleInfo, 1); + mctx->genButton("パーティクル履歴", 0x4000003); + mctx->genCheckBox("全部屋読み込み", &mLoadAllRooms, 1); + mctx->genButton("部屋メモリ", 0x4000001); + mctx->genButton("草、花、低木本数", 0x4000002); + mctx->genSlider("レールサイズ", &mRailSize, 0.0f, 100.0f); + mctx->genSlider("レールカラー(R)", &mRailColorR, 0, 0xff); + mctx->genSlider("レールカラー(G)", &mRailColorG, 0, 0xff); + mctx->genSlider("レールカラー(B)", &mRailColorB, 0, 0xff); + #endif } +#if DEBUG +void dScnPly_env_otherHIO_c::listenPropertyEvent(const JORPropertyEvent* event) { + JORReflexible::listenPropertyEvent(event); + JORFile file; + + switch ((int)event->id) { + case 0x4000001: + OS_REPORT("#############################################\n"); + break; + case 0x4000002: + break; + case 0x4000003: + g_envHIO.mOther.field_0x4e = 1; + break; + } +} + +void dScnPly_env_otherHIO_c::printParticle() { + dDbVw_Report(20, 100, "Emitter Num <%d> X=<%d>", dComIfGp_particle_getEmitterNum(), dComIfGp_particle_getHeapSize()); + dDbVw_Report(20, 120, "Particle Num <%d> Y=<%d>", dComIfGp_particle_getParticleNum(), dComIfGp_particle_getSceneHeapSize() - 0x180000); + + int var_r26 = 0xA0; + int var_r28 = field_0x4f; + if (field_0x4e != 0) { + OS_REPORT("Particle Error !!\n"); + + for (int i = 0; i < 20; i++) { + var_r28--; + if (var_r28 < 0) { + var_r28= 19; + } + + if (field_0x1c[var_r28] != 0xFFFF) { + OS_REPORT(" \n", field_0x1c[var_r28], dPa_name::getName(field_0x1c[var_r28])); + } + + var_r26 += 20; + } + + field_0x4e = 0; + } +} +#endif + dScnPly_env_debugHIO_c::dScnPly_env_debugHIO_c() { mBoxCullMinSize.set(-100.0f, -100.0f, -100.0f); mBoxCullMaxSize.set(100.0f, 100.0f, 100.0f); @@ -96,31 +424,152 @@ dScnPly_env_debugHIO_c::dScnPly_env_debugHIO_c() { mSphereCullRadius = 100.0f; } -void dScnPly_env_debugHIO_c::genMessage(JORMContext* ctx) { +void dScnPly_env_debugHIO_c::genMessage(JORMContext* mctx) { + #if DEBUG + mctx->genLabel("【ボックスカリング(CULLSIZE_DEBUG)サイズ】", 0x80000001); + mctx->genSlider("最小X", &mBoxCullMinSize.x, -10000.0f, 10000.0f); + mctx->genSlider("最小Y", &mBoxCullMinSize.y, -10000.0f, 10000.0f); + mctx->genSlider("最小Z", &mBoxCullMinSize.z, -10000.0f, 10000.0f); + mctx->genSlider("最大X", &mBoxCullMaxSize.x, -10000.0f, 10000.0f); + mctx->genSlider("最大Y", &mBoxCullMaxSize.y, -10000.0f, 10000.0f); + mctx->genSlider("最大Z", &mBoxCullMaxSize.z, -10000.0f, 10000.0f); + + mctx->genLabel("【球カリング(CULLSIZE_Q_DEBUG)サイズ】", 0x80000001); + mctx->genSlider("中心X", &mSphereCullCenter.x, -10000.0f, 10000.0f); + mctx->genSlider("中心Y", &mSphereCullCenter.y, -10000.0f, 10000.0f); + mctx->genSlider("中心Z", &mSphereCullCenter.z, -10000.0f, 10000.0f); + mctx->genSlider("半径", &mSphereCullRadius, -10000.0f, 10000.0f); + #endif } +#if DEBUG +void dScnPly_env_debugHIO_c::listenPropertyEvent(const JORPropertyEvent* event) { + JORReflexible::listenPropertyEvent(event); + + l_cullSizeBox[fopAc_CULLBOX_14_e].min = mBoxCullMinSize; + l_cullSizeBox[fopAc_CULLBOX_14_e].max = mBoxCullMaxSize; + l_cullSizeSphere[fopAc_CULLSPHERE_8_e - fopAc_CULLSPHERE_0_e].center = mSphereCullCenter; + l_cullSizeSphere[fopAc_CULLSPHERE_8_e - fopAc_CULLSPHERE_0_e].radius = mSphereCullRadius; +} + +void dScnPly_env_HIO_c::genMessage(JORMContext* mctx) { + mctx->genNode("デバッグ用", &mDebug, 0, 0); + mctx->genNode("その他", &mOther, 0, 0); +} + +static u32 l_usedMemoryBlockSize = 0xFFFFFFFF; + +static int checkObjectSize(void* i_process, void* i_data) { + s16 profname = fpcM_GetProfName(i_process); + if (profname == PROC_BG) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_process; + *((u32*)i_data) += ((l_usedMemoryBlockSize != 0 && actor->heap == NULL) ? 0 : actor->heap->getHeapSize()) + actor->base.base.profile->process_size; + } else if (profname == PROC_PLAY_SCENE || profname == PROC_ROOM_SCENE) { + *((u32*)i_data) += ((base_process_class*)i_process)->profile->process_size; + } else if (fopKyM_IsKy(i_process)) { + *((u32*)i_data + 1) += ((base_process_class*)i_process)->profile->process_size; + } else if (fopAcM_IsActor(i_process)) { + fopAc_ac_c* actor = (fopAc_ac_c*)i_process; + *((u32*)i_data + 1) += (actor->heap == NULL ? 0 : actor->heap->getHeapSize()) + actor->base.base.profile->process_size; + + if (profname == PROC_ALINK) { + daAlink_c* alink = (daAlink_c*)actor; + *((u32*)i_data + 1) += alink->getOtherHeapSize(); + } else if (profname == PROC_MIDNA) { + daMidna_c* midna = (daMidna_c*)actor; + *((u32*)i_data + 1) += midna->getOtherHeapSize(); + } + } + + return 1; +} + +static void initUsedHeapSize() { + l_usedMemoryBlockSize = 0; + for (int i = 0; i < 19; i++) { + JKRHeap* heap = dStage_roomControl_c::getMemoryBlockHeap(i); + if (heap != NULL) { + l_usedMemoryBlockSize += heap->getHeapSize(); + } + } +} + +static bool lbl_8074CADB; + +static void drawUsedHeapSize() { + if (mDoCPd_c::getHoldL(PAD_3) && mDoCPd_c::getHoldR(PAD_3) && mDoCPd_c::getTrigZ(PAD_3)) { + lbl_8074CADB = !lbl_8074CADB; + } + + if (lbl_8074CADB) { + int gameSize = mDoExt_getSafeGameHeapSize() - mDoExt_getGameHeap()->getTotalFreeSize(); + int zeldaSize = mDoExt_getSafeZeldaHeapSize() - mDoExt_getZeldaHeap()->getTotalFreeSize(); + int archiveSize = mDoExt_getSafeArchiveHeapSize() - mDoExt_getArchiveHeap()->getTotalFreeSize(); + int j2dSize = mDoExt_getSafeJ2dHeapSize() - mDoExt_getJ2dHeap()->getTotalFreeSize(); + + u32 sizes[2]; + sizes[0] = dComIfG_getStageAllSize(); + sizes[1] = dComIfG_getObjectAllSize() - (dComIfG_getObjectSize("CamParam") + + dComIfG_getObjectSize("Event") + + dComIfG_getObjectSize("Always") + + dComIfG_getObjectSize("Alink") + + dComIfG_getObjectSize("Midna")); + + fpcLyIt_All(checkObjectSize, sizes); + if (l_usedMemoryBlockSize != 0) { + sizes[0] = l_usedMemoryBlockSize + dComIfG_getStageSize("Stg_00") + dComIfG_getStageSize("Xtg_00"); + } + + int var_r25 = JKRGetAramFreeSize() / 1024; + JUTReport(380, 300, "Stage : %d(K)", (sizes[0] + 0x3FF) / 1024); + JUTReport(380, 316, "Obj : %d(K)", (sizes[1] + 0x3FF) / 1024); + JUTReport(380, 332, "C-ARAM : %d(K)", var_r25); + JUTReport(380, 348, ">Game : %d(K)", (gameSize + 0x3FF) / 1024); + JUTReport(380, 364, ">Zelda : %d(K)", (zeldaSize + 0x3FF) / 1024); + JUTReport(380, 380, ">Archive : %d(K)", (archiveSize + 0x3FF) / 1024); + JUTReport(380, 380, ">J2d : %d(K)", (j2dSize + 0x3FF) / 1024); + } +} +#endif + static int dScnPly_Draw(dScnPly_c* i_this) { static s16 l_wipeType[] = { - 0x0000, 0x0000, 0x0011, 0x0002, 0x0002, 0x0001, 0x0003, 0x0001, 0x0004, 0x0004, 0x0005, 0x0005, - 0x0006, 0x0007, 0x0000, 0x0000, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0008, 0x0008, + 0, 0, 17, 2, 2, 1, 3, 1, 4, 4, 5, 5, 6, 7, 0, 0, 2, 2, 2, 2, 2, 8, 8, }; + #if DEBUG + fapGm_HIO_c::startCpuTimer(); + fpc_ProcID id = fpcM_GetID(i_this); + drawUsedHeapSize(); + dStage_DebugDisp(); + #endif + dComIfG_Ccsp()->Move(); dComIfG_Bgsp().ClrMoveFlag(); - u8 useWhiteColor; if (!fopOvlpM_IsPeek() && !dComIfG_resetToOpening(i_this)) { - if (dComIfGp_isEnableNextStage()) { + if (dComIfGp_isEnableNextStage() + #if DEBUG + && !dScnMenu_c::isAutoSelect() + #endif + ) { + JUT_ASSERT(1019, dComIfGp_getNextStageWipe() < ARRAY_SIZEU(l_wipeType)); + u8 wipe = dComIfGp_getNextStageWipe(); - fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, l_wipeType[wipe], 5); + #if DEBUG + if (g_kankyoHIO.navy.wipe_test_ON != 0xFF) { + wipe = g_kankyoHIO.navy.wipe_test_ON; + } + #endif + + int rt = fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, l_wipeType[wipe], 5); int hour = dKy_getdaytime_hour(); - useWhiteColor = hour >= 6 && hour < 18 ? true : false; - BOOL tmp = useWhiteColor == 0 ? 1 : 0; + BOOL isDaytime = (hour >= 6 && hour < 18) ? FALSE : TRUE; if (wipe == 1 || wipe == 2 || wipe == 7 || wipe == 17 || wipe == 21 || - ((wipe == 8 || wipe == 10 || wipe == 18) && tmp) || - ((wipe == 9 || wipe == 11 || wipe == 19) && !tmp)) + ((wipe == 8 || wipe == 10 || wipe == 18) && isDaytime) || + ((wipe == 9 || wipe == 11 || wipe == 19) && !isDaytime)) { mDoGph_gInf_c::setFadeColor(*(JUtility::TColor*)&g_saftyWhiteColor); } else if (wipe == 14 || wipe == 20) { @@ -136,42 +585,142 @@ static int dScnPly_Draw(dScnPly_c* i_this) { } } } + dMdl_mng_c::reset(); - if (!dComIfGp_isPauseFlag() && dScnPly_c::pauseTimer == 0) { + if (!dComIfGp_isPauseFlag() && !dScnPly_c::isPause() + #if DEBUG + && !fapGm_HIO_c::isCaptureScreen() + #endif + ) { if (fpcM_GetName(i_this) == PROC_PLAY_SCENE) { dComIfGp_getVibration().Run(); } daSus_c::execute(); dComIfG_Bgsp().Move(); + #if VERSION == VERSION_SHIELD_DEBUG + dPath_Move(); + #endif dComIfGp_particle_calc3D(); dComIfGp_particle_calc2D(); cCt_execCounter(); } else { dPa_control_c::onStatus(1); - if (dScnPly_c::pauseTimer == 0) { + + if (!dScnPly_c::isPause()) { dPa_control_c::onStatus(2); } + if (dScnPly_c::pauseTimer == 0) { dComIfGp_getVibration().Pause(); } } - for (create_tag_class* i = fopDwIt_Begin(); i != NULL; i = fopDwIt_Next(i)) { - fpcM_Draw(i->mpTagData); + #if DEBUG + if (fopOvlpM_IsDoingReq() != TRUE) { + if (dScnMenu_c::isAutoSelect() || dComIfG_isSceneResetButton() || g_presetHIO.field_0x2717 != 0) { + if (g_presetHIO.field_0x2717 != 0) { + dSm_read_stageset(g_presetHIO.mPresetData); + g_presetHIO.field_0x2717 = 0; + } + + s16 spA = 0; + if (dDemo_c::getMode() == 1) { + dDemo_c::end(); + spA = 7; + } + + fopScnM_ChangeReq(i_this, PROC_MENU_SCENE, spA, 5); + mDoAud_bgmStop(30); + + if (fpcM_GetName(i_this) != PROC_PLAY_SCENE) { + dComIfG_playerStatusD(); + } + } } + dDebugPad.Update(); + + fapGm_HIO_c::printCpuTimer(""); + fapGm_HIO_c::stopCpuTimer("ゲーム管理(計算処理2)"); + fapGm_HIO_c::printCpuTimer(""); + #endif + + for (create_tag_class* i = fopDwIt_Begin(); i != NULL; i = fopDwIt_Next(i)) { + void* process = i->mpTagData; + fpcM_Draw(process); + } + + #if DEBUG + fapGm_HIO_c::startCpuTimer(); + #endif + if (!dComIfGp_isPauseFlag()) { dEyeHL_mng_c::update(); + + #if VERSION == VERSION_SHIELD_DEBUG + dBgp_c::drawShare(); + #endif + #if DEBUG + daSus_c::draw(); + #endif + dComIfG_Ccsp()->Draw(); - dComIfGp_getAttention()->Draw(); + #if DEBUG + dComIfG_Bgsp().Draw(); + dPath_Draw(); + #endif + + dAttention_c* attention = dComIfGp_getAttention(); + attention->Draw(); } + #if DEBUG + if (g_envHIO.mOther.mDisplayParticleInfo) { + g_envHIO.mOther.printParticle(); + } + + fapGm_HIO_c::printCpuTimer(""); + fapGm_HIO_c::stopCpuTimer("ゲーム管理(描画処理)"); + #endif + return 1; } +#if DEBUG +static BOOL l_pause; +static f32 l_pauseFrame; +static u8 lbl_8074CAE4; +static u32 l_sceneChangeStartTick; +#endif + static int dScnPly_Execute(dScnPly_c* i_this) { + #if DEBUG + fapGm_HIO_c::startCpuTimer(); + #endif + i_this->offReset(); + + #if DEBUG + if (lbl_8074CAE4) { + u32 var_r27 = OSGetTick() - l_sceneChangeStartTick; + OS_REPORT("\x1b[33m"); + // "Scene transition time: %f seconds\n" + OS_REPORT("シーン切り替え時間 %f秒\n\x1B[m", (f32)OSTicksToMicroseconds(var_r27) / 1000000.0f); + lbl_8074CAE4 = 0; + + initUsedHeapSize(); + OS_REPORT("Game Heap <%d,%d,%d>\n", mDoExt_getGameHeap()->getTotalUsedSize(), mDoExt_getGameHeap()->getTotalFreeSize(), mDoExt_getGameHeap()->getFreeSize()); + OS_REPORT("Zelda Heap <%d,%d,%d>\n", mDoExt_getZeldaHeap()->getTotalUsedSize(), mDoExt_getZeldaHeap()->getTotalFreeSize(), mDoExt_getZeldaHeap()->getFreeSize()); + OS_REPORT("Archive Heap <%d,%d,%d>\n", mDoExt_getArchiveHeap()->getTotalUsedSize(), mDoExt_getArchiveHeap()->getTotalFreeSize(), mDoExt_getArchiveHeap()->getFreeSize()); + OS_REPORT("最終残り %d(%fM)\n", JFWSystem::getRootHeap()->getTotalFreeSize(), (f32)JFWSystem::getRootHeap()->getTotalFreeSize() / (f32)0x100000); + OS_REPORT("拡張最終残り %d(%fM)\n", JKRGetRootHeap2()->getTotalFreeSize(), (f32)JKRGetRootHeap2()->getTotalFreeSize() / (f32)0x100000); + OS_REPORT("\x1b[m"); + } + #endif + + BOOL comboTrig = FALSE; + dStage_roomControl_c::offNoChangeRoom(); dStage_roomControl_c::setRoomReadId(0xFF); @@ -188,11 +737,63 @@ static int dScnPly_Execute(dScnPly_c* i_this) { } dKy_itudemo_se(); + + #if DEBUG + if (mDoCPd_c::isConnect(PAD_3)) { + if (mDoCPd_c::getTrigStart(PAD_1) && !fapGmHIO_get2Ddraw()) { + comboTrig = TRUE; + } else if (mDoCPd_c::getHoldR(PAD_2) && mDoCPd_c::getTrigStart(PAD_2)) { + comboTrig = TRUE; + } + + if (comboTrig == TRUE) { + if (l_pause) { + l_pause = FALSE; + } else { + l_pause = TRUE; + l_pauseFrame = 0.0f; + } + } + + if (l_pause) { + l_pauseFrame += mDoCPd_c::getAnalogR(PAD_2); + if (!mDoCPd_c::getTrigZ(PAD_2) && l_pauseFrame < 1.0f) { + i_this->onDebugPause(); + return 1; + } + + l_pauseFrame -= 1.0f; + } + + i_this->offDebugPause(); + } + #endif + if (!dComIfGp_isPauseFlag()) { + #if DEBUG + dJprev_c::get()->update(); + #endif + dDemo_c::update(); + + #if DEBUG + dJcame_c::get()->update(); + #endif + + #if VERSION == VERSION_SHIELD_DEBUG + dBgp_c::executeShare(); + #endif + dComIfGp_getEvent()->Step(); dComIfGp_getAttention()->Run(); } + + #if DEBUG + fapGm_HIO_c::printCpuTimer(""); + fapGm_HIO_c::stopCpuTimer("ゲーム管理(計算処理1)"); + fapGm_HIO_c::printCpuTimer(""); + #endif + return 1; } @@ -201,40 +802,34 @@ static int dScnPly_IsDelete(dScnPly_c i_this) { return 1; } -struct PreLoadInfo { - const char* stageName; - const s16* profNameTbl; - const char** resNameTbl; - u8 dylKeyTblNum; - u8 resNameNum; -}; - -static const char* T_JOINT_resName[1] = {"Always"}; - -static PreLoadInfo const PreLoadInfoT[1] = { - { - "T_JOINT", - T_JOINT_dylKeyTbl, - T_JOINT_resName, - 1, - 1, - }, -}; - -static s8 preLoadNo = -1; - -static u8 doPreLoad = 1; - static int dScnPly_Delete(dScnPly_c* i_this) { + UNUSED(i_this); + + #if VERSION == VERSION_SHIELD_DEBUG + for (int i = 0; i < 32; i++) { + char* bank = dStage_roomControl_c::getArcBank(i); + if (strcmp(bank, "") != 0) { + int rt = dComIfG_syncObjectRes(bank); + if (rt > 0) { + return 0; + } + } + } + #endif + daSus_c::reset(); dMpath_c::remove(); dTres_c::remove(); - dComIfGp_getAttention()->~dAttention_c(); + dAttention_c* attention = dComIfGp_getAttention(); + attention->~dAttention_c(); dComIfGp_getVibration().Remove(); dComIfG_Bgsp().Dt(); dComIfG_Ccsp()->Dt(); + #if VERSION == VERSION_SHIELD_DEBUG + dPath_Dt(); + #endif dStage_Delete(); dComIfGp_event_remove(); @@ -244,6 +839,11 @@ static int dScnPly_Delete(dScnPly_c* i_this) { dComIfGp_getMsgDtArchive(1)->removeResourceAll(); JKRUnmountArchive(dComIfGp_getMsgDtArchive(1)); + #if DEBUG + dJcame_c::remove(); + dJprev_c::remove(); + #endif + dDemo_c::remove(); fopMsgM_destroyExpHeap(dComIfGp_getExpHeap2D()); @@ -256,11 +856,25 @@ static int dScnPly_Delete(dScnPly_c* i_this) { mDoGph_gInf_c::getBloom()->remove(); + #if VERSION == VERSION_SHIELD_DEBUG + dBgp_c::removeShare(); + #endif + dComIfGs_offPlayerFieldLastStayFieldDataExistFlag(); + + #if DEBUG + daObj::HioObj_c::clean(); + mDoHIO_deleteChild(g_envHIO.field_0x4); + mDoHIO_deleteChild(g_save_bit_HIO.field_0x4); + g_preLoadHIO.removeHIO(); + #endif + dComIfGp_setWindowNum(0); dComIfGd_setView(NULL); if (preLoadNo >= 0) { + OS_REPORT("\x1b[32mプリロード解放\n\x1b[m"); + const char** resname_table = PreLoadInfoT[preLoadNo].resNameTbl; int res_num = PreLoadInfoT[preLoadNo].resNameNum; if (resname_table != NULL && (*resname_table != NULL)) { @@ -288,6 +902,113 @@ static int dScnPly_Delete(dScnPly_c* i_this) { return 1; } +#if DEBUG +static u32 getArchiveHeapSize(JKRHeap* i_heap, dRes_info_c* i_resInfo) { + if (i_resInfo == NULL) { + return 0; + } + + u32 size = 0; + int var_r29; + JKRArchive* archive = i_resInfo->getArchive(); + if (archive != NULL) { + var_r29 = i_heap->getSize(archive); + if (var_r29 > 0) { + size += var_r29 + 0x10; + } + + var_r29 = i_heap->getSize(((JKRAramArchive*)archive)->mBlock); + if (var_r29 > 0) { + size += var_r29 + 0x10; + } + } + + JKRSolidHeap* dataHeap = i_resInfo->getDataHeap(); + if (dataHeap != NULL) { + int var_r26 = i_heap->getSize(dataHeap); + if (var_r26 > 0) { + size += var_r26 + 0x10; + } + } + + return size; +} + +static u32 getArchiveBankHeapSize(JKRHeap* i_heap) { + u32 size = 0; + for (int i = 0; i < 32; i++) { + char* bank = dStage_roomControl_c::getArcBank(i); + if (strcmp(bank, "") != 0) { + size += getArchiveHeapSize(i_heap, dComIfG_getObjectResInfo(bank)); + } + } + + return size; +} + +static u32 getStageHeapSize(JKRHeap* i_heap) { + u32 size = 0; + for (int i = 0; i < 19; i++) { + JKRHeap* heap = dStage_roomControl_c::getMemoryBlockHeap(i); + if (heap != NULL) { + int var_r26 = i_heap->getSize(heap); + if (var_r26 > 0) { + size += var_r26 + 0x10; + } + } + } + + if (size == 0) { + for (int i = 0; i < 64; i++) { + size += getArchiveHeapSize(i_heap, dComIfG_getStageResInfo(dComIfG_getRoomArcName(i))); + } + } + + size += getArchiveHeapSize(i_heap, dComIfG_getStageResInfo("Stg_00")) + getArchiveHeapSize(i_heap, dComIfG_getStageResInfo("Xtg_00")); + return size; +} + +static BOOL heapSizeCheck(const char* i_label, JKRExpHeap* i_heap, s32 i_base, BOOL param_3) { + s32 free = i_heap->getFreeSize(); + s32 total = i_heap->getTotalUsedSize(); + + if (param_3) { + total -= getArchiveBankHeapSize(i_heap); + total -= getStageHeapSize(i_heap); + } + + s32 archiveHeapSize = mDoExt_getSafeArchiveHeapSize(); + f32 totalRatio = (f32)total / (f32)archiveHeapSize; + f32 freeRatio = (f32)free / (f32)total; + OS_REPORT("%s Free<%d> Total<%d> Base<%d> TotalRatio<%f> FreeRatio<%f>\n", + i_label, + free, + total, + i_base, + totalRatio, + freeRatio + ); + + int var_r30 = std::abs(total - i_base); + if (var_r30 > 64) { + // "%d (0x%x) byte difference!\n" + OS_REPORT("%d (0x%x) バイトの差があります!\n", var_r30, var_r30); + i_heap->dump(); + return FALSE; + } + + return TRUE; +} + +static BOOL heapSizeCheck() { + return heapSizeCheck("ArchiveHeap", mDoExt_getArchiveHeap(), mDoExt_getSafeArchiveHeapSize(), TRUE) + && heapSizeCheck("J2dHeap", mDoExt_getJ2dHeap(), mDoExt_getSafeJ2dHeapSize(), FALSE) + && heapSizeCheck("GameHeap", mDoExt_getGameHeap(), mDoExt_getSafeGameHeapSize(), TRUE) + && heapSizeCheck("ZeldaHeap", mDoExt_getZeldaHeap(), mDoExt_getSafeZeldaHeapSize(), FALSE) + && heapSizeCheck("CommandHeap", mDoExt_getCommandHeap(), mDoExt_getSafeCommandHeapSize(), FALSE); +} +#endif + bool dScnPly_c::resetGame() { if (fpcM_GetName(this) == PROC_OPENING_SCENE) { if (!dStage_roomControl_c::resetArchiveBank(0)) { @@ -302,6 +1023,7 @@ bool dScnPly_c::resetGame() { field_0x1d4 = 1; } } else { + #if VERSION != VERSION_SHIELD_DEBUG if (dComIfGp_getNextStagePoint() == -4 || (dComIfGs_getLastSceneMode() & 0xF) == 0xC || !strcmp(dComIfGp_getNextStageName(), "F_SP109") || (!strcmp(dComIfGp_getNextStageName(), "F_SP116") && @@ -311,6 +1033,7 @@ bool dScnPly_c::resetGame() { return false; } } + #endif } dComIfG_setBrightness(255); @@ -323,8 +1046,10 @@ void dScnPly_c::offReset() { if (field_0x1d4 != 0 && !fopOvlpM_IsPeek()) { mDoRst::offReset(); mDoRst::offResetPrepare(); + #if VERSION != VERSION_SHIELD_DEBUG JUTGamePad::C3ButtonReset::sResetOccurred = false; JUTGamePad::setResetCallback(mDoRst_resetCallBack, NULL); + #endif field_0x1d4 = 0; } } @@ -332,14 +1057,35 @@ void dScnPly_c::offReset() { static int phase_00(dScnPly_c* i_this) { if (!i_this->resetGame()) { return cPhs_INIT_e; - } else { - #if PLATFORM_WII - data_8053a730 = 1; - #endif - - mDoGph_gInf_c::offBlure(); - return cPhs_NEXT_e; } + + #if PLATFORM_WII + data_8053a730 = 1; + #endif + + #if DEBUG + l_sceneChangeStartTick = OSGetTick(); + lbl_8074CAE4 = 1; + + mDoExt_setSafeGameHeapSize(); + mDoExt_setSafeZeldaHeapSize(); + mDoExt_setSafeCommandHeapSize(); + mDoExt_setSafeArchiveHeapSize(); + mDoExt_setSafeJ2dHeapSize(); + #endif + + mDoGph_gInf_c::offBlure(); + + #if DEBUG + if (!heapSizeCheck()) { + BOOL isDispWarning = mDoCPd_c::isConnect(PAD_3); + if (isDispWarning) { + JUT_WARN(2046, "%s", "Memory Danger !!"); + } + } + #endif + + return cPhs_NEXT_e; } static int phase_01(dScnPly_c* i_this) { @@ -353,6 +1099,7 @@ static int phase_01(dScnPly_c* i_this) { mDoAud_setInDarkness(false); } + mDoAud_setSceneName(dComIfGp_getStartStageName(), dComIfGp_getStartStageRoomNo(), dComIfG_play_c::getLayerNo_common(dComIfGp_getStartStageName(), dComIfGp_getStartStageRoomNo(), @@ -370,19 +1117,17 @@ static int phase_0(dScnPly_c* i_this) { } static int phase_1(dScnPly_c* i_this) { - u32 id = fopScnM_GetID(i_this); - dStage_roomControl_c::setProcID(id); + dStage_roomControl_c::setProcID(fopScnM_GetID(i_this)); dComIfGp_setStartStage(dComIfGp_getNextStartStage()); if (dComIfGp_getStartStageLayer() < 0 && daPy_py_c::checkRoomRestartStart()) { - const char* stage = dComIfGp_getStartStageName(); - s8 room = dComIfGp_getStartStageRoomNo(); - s8 layer = dComIfGp_getStartStageLayer(); - if (dComIfG_play_c::getLayerNo_common_common(stage, room, layer) < 0) { + int layer = dComIfG_play_c::getLayerNo_common_common(dComIfGp_getStartStageName(), dComIfGp_getStartStageRoomNo(), dComIfGp_getStartStageLayer()); + if (layer < 0) { dComIfGp_setStartStageLayer(dComIfGp_getLayerOld()); } } + dComIfGp_offEnableNextStage(); // Stage: Faron Woods, Room: Faron Spring @@ -431,14 +1176,32 @@ static int phase_1(dScnPly_c* i_this) { dComIfGp_world_dark_set(0); } + #if DEBUG + if (dKy_darkworld_check()) { + if (dComIfGp_getStartStageLayer() != -1 && dComIfGp_getStartStageLayer() < 10 && dComIfG_play_c::getLayerNo(0) < 10) { + if (strcmp(dComIfGp_getStartStageName(), "D_MN08") != 0) { + // "Twilight layer spec error! sasaki" + OSReport_Error("\nトワイライトのレイヤー指定異常です! sasaki"); + // "(If loaded from the debug menu, you can directly specify layers, so I can't tell if it's invalid.)" + OSReport_Error("\n(デバグメニューからの場合はレイヤー直指定できるので危険なのかは予測つきません。)"); + + OSReport_Error("\nstage[%s]", dComIfGp_getStartStageName()); + OSReport_Error("\nroom[%d]", dComIfGp_getStartStageRoomNo()); + OSReport_Error("\nlayer[%d]", dComIfG_play_c::getLayerNo(0)); + OSReport_Error("\nTW1[%d]", dComIfGs_isDarkClearLV(0)); + OSReport_Error("\nTW2[%d]", dComIfGs_isDarkClearLV(1)); + OSReport_Error("\nTW3[%d]", dComIfGs_isDarkClearLV(2)); + OSReport_Error("\nTW4[%d]", dComIfGs_isDarkClearLV(3)); + } + } + } + #endif + // Stage: Lake Hylia, Room: Fountain if (!strcmp(dComIfGp_getStartStageName(), "F_SP115") && dComIfGp_getStartStageRoomNo() == 1 && dComIfGp_getStartStageLayer() < 0) { - const char* stage = dComIfGp_getStartStageName(); - s8 room = dComIfGp_getStartStageRoomNo(); - s8 layer = dComIfGp_getStartStageLayer(); - if (dComIfG_play_c::getLayerNo_common(stage, room, layer) == 9) { + if (dComIfG_play_c::getLayerNo_common(dComIfGp_getStartStageName(), dComIfGp_getStartStageRoomNo(), dComIfGp_getStartStageLayer()) == 9) { dComIfGp_setStartStageLayer(9); } } @@ -467,6 +1230,14 @@ static int phase_1(dScnPly_c* i_this) { dComIfGs_onSaveDunSwitch(30); } + #if DEBUG + if (!strcmp(dComIfGp_getStartStageName(), "NPC_GND") && dComIfGp_getStartStageRoomNo() == 0 && + dComIfGp_getStartStageLayer() >= 12) + { + dComIfGp_world_dark_set(1); + } + #endif + dKy_darkworld_Area_set(dComIfGp_getStartStageName(), dComIfGp_getStartStageRoomNo()); // Stage: Hyrule Castle Sewers, Room: Prison Cell @@ -507,21 +1278,36 @@ static int phase_1(dScnPly_c* i_this) { } dComIfGs_BossLife_public_Set(0xFF); + + #if DEBUG + if (g_env_light.light_mask_type & 0xF0) { + g_env_light.light_mask_type = g_env_light.light_mask_type & 0xF; + } else { + g_env_light.light_mask_type = 0; + } + #else g_env_light.light_mask_type = 0; + #endif JUTReportConsole_f("Start StageName:RoomNo [%s:%d]\n", dComIfGp_getStartStageName(), dComIfGp_getStartStageRoomNo()); dComIfGp_setStatus(0); + if (dComIfG_syncStageRes("Stg_00") < 0) { - dComIfG_setStageRes("Stg_00", NULL); + int rt = dComIfG_setStageRes("Stg_00", NULL); + JUT_ASSERT(2442, rt == 1); } + return cPhs_NEXT_e; } static int phase_1_0(dScnPly_c* i_this) { static char camparamarc[10] = "CamParam"; - if (dComIfG_syncStageRes("Stg_00")) { + int rt = dComIfG_syncStageRes("Stg_00"); + JUT_ASSERT(2469, rt >= 0); + + if (rt != 0) { return cPhs_INIT_e; } else { dStage_infoCreate(); @@ -533,8 +1319,8 @@ static int phase_1_0(dScnPly_c* i_this) { } static int phase_2(dScnPly_c* i_this) { - int tmp = dComIfG_syncAllObjectRes(); - if (tmp >= 0 && tmp != 0) { + int rt = dComIfG_syncAllObjectRes(); + if (rt >= 0 && rt != 0) { return cPhs_INIT_e; } @@ -544,6 +1330,13 @@ static int phase_2(dScnPly_c* i_this) { particle_no = dStage_stagInfo_GetParticleNo(dComIfGp_getStage()->getStagInfo()); } + #if DEBUG + if (fapGm_HIO_c::mParticle254Fix) { + particle_no = 0xFE; + } + #endif + + OS_REPORT("============== sceneParticleNo=%d\n", particle_no); dComIfGp_particle_readScene(particle_no, &i_this->sceneCommand); dMsgObject_readMessageGroup(&i_this->field_0x1d0); return cPhs_NEXT_e; @@ -558,6 +1351,10 @@ static int phase_3(dScnPly_c* i_this) { return cPhs_INIT_e; } + #if VERSION == VERSION_SHIELD_DEBUG + dBgp_c::createShare(); + #endif + return cPhs_NEXT_e; } @@ -570,9 +1367,16 @@ dScnPly_preset_HIO_c g_presetHIO; #endif static int phase_4(dScnPly_c* i_this) { + #if VERSION == VERSION_SHIELD_DEBUG + if (!dBgp_c::executeShare()) { + return cPhs_INIT_e; + } + #endif + if (i_this->sceneCommand) { + JUT_ASSERT(2610, i_this->sceneCommand->getMemAddress() != NULL); dComIfGp_particle_createScene(i_this->sceneCommand->getMemAddress()); - i_this->sceneCommand->destroy(); + delete i_this->sceneCommand; } else { dComIfGp_particle_createScene(NULL); } @@ -583,13 +1387,25 @@ static int phase_4(dScnPly_c* i_this) { } dComIfGp_calcNowRegion(); + #if DEBUG + dComIfG_initStopwatch(); + #endif dComIfG_Bgsp().Ct(); fopAcM_lc_c::getLineCheck()->ClearPi(); fopAcM_gc_c::getGroundCheck()->ClearPi(); fopAcM_rc_c::getRoofCheck()->ClearPi(); fopAcM_wt_c::getWaterCheck()->ClearPi(); dComIfG_Ccsp()->Ct(); + #if VERSION == VERSION_SHIELD_DEBUG + dPath_Ct(); + #endif dDemo_c::create(); + dEyeHL_mng_c::create(); + + #if DEBUG + dJcame_c::create(dDemo_c::getSystem(), 0.03333334f, *mDoCPd_c::getGamePad(PAD_4)); + dJprev_c::create((JStudio::TControl*)dDemo_c::getControl(), *mDoCPd_c::getGamePad(PAD_4)); + #endif dComIfGp_setPlayerInfo(0, NULL, 0); for (int i = 0; i < 2; i++) { @@ -602,11 +1418,19 @@ static int phase_4(dScnPly_c* i_this) { dComIfGd_setViewport(NULL); dComIfGd_setView(NULL); - dComIfGp_setExpHeap2D(fopMsgM_createExpHeap(0xBB800, NULL)); - dComIfGp_setMsgExpHeap(fopMsgM_createExpHeap(0xA800, NULL)); + JKRExpHeap* heap = fopMsgM_createExpHeap(0xBB800, NULL); + JUT_ASSERT(2704, heap != NULL); + dComIfGp_setExpHeap2D(heap); + + JKRExpHeap* heap2 = fopMsgM_createExpHeap(0xA800, NULL); + JUT_ASSERT(2709, heap2 != NULL); + dComIfGp_setMsgExpHeap(heap2); if (fpcM_GetName(i_this) == PROC_OPENING_SCENE) { fopAcM_create(PROC_TITLE, 0, NULL, -1, NULL, NULL, -1); + #if DEBUG + g_playerKind = 0; + #endif dComIfGs_init(); dComIfGs_setOptPointer(0); dComIfGs_setLife(12); @@ -622,10 +1446,20 @@ static int phase_4(dScnPly_c* i_this) { dComIfGp_createSimpleModel(); dMdl_mng_c::create(); - mDoGph_gInf_c::setTickRate((OS_BUS_CLOCK / 4) / 30); - g_envHIO.field_0x4 = -1; - g_save_bit_HIO.field_0x4 = -1; - new (dComIfGp_getAttention()) dAttention_c(dComIfGp_getPlayer(0), 0); + mDoGph_gInf_c::setTickRate(OS_TIMER_CLOCK / 30); + + #if DEBUG + g_preLoadHIO.entryHIO("プリロード制御"); + #endif + g_envHIO.field_0x4 = mDoHIO_CREATE_CHILD("描画設定", &g_envHIO); + g_save_bit_HIO.field_0x4 = mDoHIO_CREATE_CHILD("記録ビット", &g_save_bit_HIO); + + #if DEBUG + daObj::HioObj_c::init(); + #endif + + dAttention_c* attention = dComIfGp_getAttention(); + new (attention) dAttention_c(dComIfGp_getPlayer(0), 0); dComIfGp_getVibration().Init(); daYkgr_c::init(); @@ -650,6 +1484,7 @@ static int phase_4(dScnPly_c* i_this) { return cPhs_COMPLEATE_e; } + OS_REPORT("\x1b[32mプリロードやります\n\x1b[m"); resPreLoadTime0 = OSGetTime(); return cPhs_NEXT_e; } @@ -657,25 +1492,30 @@ static int phase_4(dScnPly_c* i_this) { static int phase_5(dScnPly_c* i_this) { if (preLoadNo >= 0) { int phase_state = cPhs_NEXT_e; + int goodLoads = 0; + int loadNum = 0; const char** resNames = PreLoadInfoT[preLoadNo].resNameTbl; s32 resNameNum = PreLoadInfoT[preLoadNo].resNameNum; if (resNames != NULL && *resNames != NULL) { JUT_ASSERT(2830, resNameNum <= ARRAY_SIZEU(resPhase)); - int goodLoads = 0; - int loadNum = 0; + for (int i = 0; i < resNameNum; i++) { - if (dComIfG_resLoad(&resPhase[i], resNames[i]) == 4) { - goodLoads++; - } else { + int load_phase = dComIfG_resLoad(&resPhase[i], resNames[i]); + if (load_phase != cPhs_COMPLEATE_e) { phase_state = cPhs_INIT_e; + } else { + goodLoads++; } loadNum++; } + + OS_REPORT("\x1b[32mリソースプリロード %d/%d\n\x1b[m", goodLoads, loadNum); } if (phase_state == cPhs_COMPLEATE_e) { resPreLoadTime1 = OSGetTime(); + OS_REPORT("\x1b[32mリソースプリロード %lld ms\n\x1b[m", OSTicksToMilliseconds(resPreLoadTime1 - resPreLoadTime0)); } return phase_state; @@ -687,25 +1527,30 @@ static int phase_5(dScnPly_c* i_this) { static int phase_6(dScnPly_c* i_this) { if (preLoadNo >= 0) { int phase_state = cPhs_NEXT_e; + int goodLoads = 0; + int loadNum = 0; const s16* dylKeyTbl = PreLoadInfoT[preLoadNo].profNameTbl; s32 dylKeyTblNum = PreLoadInfoT[preLoadNo].dylKeyTblNum; if (dylKeyTbl != NULL && *dylKeyTbl != 0) { JUT_ASSERT(2864, dylKeyTblNum <= ARRAY_SIZEU(dylPhase)); - int goodLoads = 0; - int loadNum = 0; + for (int i = 0; i < dylKeyTblNum; i++) { - if (cDylPhs::Link(&dylPhase[i], dylKeyTbl[i]) == cPhs_COMPLEATE_e) { - goodLoads++; - } else { + int load_phase = cDylPhs::Link(&dylPhase[i], dylKeyTbl[i]); + if (load_phase != cPhs_COMPLEATE_e) { phase_state = cPhs_INIT_e; + } else { + goodLoads++; } loadNum++; } + + OS_REPORT("\x1b[32mダイナミックリンクプリロード %d/%d\n\x1b[m", goodLoads, loadNum); } if (phase_state == cPhs_COMPLEATE_e) { dylPreLoadTime1 = OSGetTime(); + OS_REPORT("\x1b[32mダイナミックリンクプリロード %lld ms\n\x1b[m", OSTicksToMilliseconds(dylPreLoadTime1 - dylPreLoadTime0)); } return phase_state; @@ -718,17 +1563,24 @@ static int phase_compleate(void* i_this) { return cPhs_COMPLEATE_e; } -static void dScnPly_Create(scene_class* i_this) { +static int dScnPly_Create(scene_class* i_this) { static request_of_phase_process_fn l_method[] = { - (request_of_phase_process_fn)phase_00, (request_of_phase_process_fn)phase_1, - (request_of_phase_process_fn)phase_1_0, (request_of_phase_process_fn)phase_01, - (request_of_phase_process_fn)phase_0, (request_of_phase_process_fn)phase_2, - (request_of_phase_process_fn)phase_3, (request_of_phase_process_fn)phase_4, - (request_of_phase_process_fn)phase_5, (request_of_phase_process_fn)phase_6, + (request_of_phase_process_fn)phase_00, + (request_of_phase_process_fn)phase_1, + (request_of_phase_process_fn)phase_1_0, + (request_of_phase_process_fn)phase_01, + (request_of_phase_process_fn)phase_0, + (request_of_phase_process_fn)phase_2, + (request_of_phase_process_fn)phase_3, + (request_of_phase_process_fn)phase_4, + (request_of_phase_process_fn)phase_5, + (request_of_phase_process_fn)phase_6, (request_of_phase_process_fn)phase_compleate, }; - dComLbG_PhaseHandler(&static_cast(i_this)->field_0x1c4, l_method, i_this); + dScnPly_c* a_this = (dScnPly_c*)i_this; + int phase_state = dComLbG_PhaseHandler(&a_this->field_0x1c4, l_method, a_this); + return phase_state; } static scene_method_class l_dScnPly_Method = { diff --git a/src/d/d_spline_path.cpp b/src/d/d_spline_path.cpp index 40b0b61300..5e27450a2a 100644 --- a/src/d/d_spline_path.cpp +++ b/src/d/d_spline_path.cpp @@ -99,7 +99,7 @@ cXyz dPathCurve::bSpline2(f32 param_0) { cXyz local_7c; int uVar12 = mpPath->m_num; if (uVar12 <= 1) { - return mpPath->m_points[0].m_position; + return (Vec)mpPath->m_points[0].m_position; } else if (uVar12 == 2) { local_7c.x = param_0 * (mpPath->m_points[1].m_position.x - mpPath->m_points[0].m_position.x); @@ -134,9 +134,9 @@ cXyz dPathCurve::bSpline2(f32 param_0) { uVar9 = uVar4; iVar8 = uVar4 + 1; } - Vec* point11 = &mpPath->m_points[iVar10].m_position; - Vec* point10 = &mpPath->m_points[uVar9].m_position; - Vec* point8 = &mpPath->m_points[iVar8].m_position; + BE(Vec)* point11 = &mpPath->m_points[iVar10].m_position; + BE(Vec)* point10 = &mpPath->m_points[uVar9].m_position; + BE(Vec)* point8 = &mpPath->m_points[iVar8].m_position; local_7c.x = point11->x * fVar7 + point10->x * fVar6 + point8->x * fVar5; local_7c.y = point11->y * fVar7 + point10->y * fVar6 + point8->y * fVar5; local_7c.z = point11->z * fVar7 + point10->z * fVar6 + point8->z * fVar5; diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index cd0fcd0958..e60ca18a7e 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -1552,7 +1552,7 @@ u8 data_8074C56A_debug; u8 data_8074C56B_debug; u8 data_8074C56C_debug; -u32 dStage_roomControl_c::mProcID; +fpc_ProcID dStage_roomControl_c::mProcID; s8 dStage_roomControl_c::mStayNo; @@ -2065,15 +2065,20 @@ static int dStage_doorInfoInit(dStage_dt_c* i_stage, void* i_data, int entryNum, static int dStage_roomReadInit(dStage_dt_c* i_stage, void* i_data, int param_2, void* param_3) { UNUSED(param_2); roomRead_class* p_node = (roomRead_class*)((int*)i_data + 1); - roomRead_data_class** rtbl = p_node->m_entries; + OFFSET_PTR(roomRead_data_class)* rtbl = p_node->m_entries; i_stage->setRoom(p_node); for (int i = 0; i < p_node->num; i++) { +#if TARGET_PC + rtbl[i].setBase(param_3); + rtbl[i]->m_rooms.setBase(param_3); +#else if ((intptr_t)rtbl[i] < 0x80000000) { rtbl[i] = (roomRead_data_class*)((intptr_t)rtbl[i] + (intptr_t)param_3); rtbl[i]->m_rooms = (u8*)((intptr_t)rtbl[i]->m_rooms + (intptr_t)param_3); } +#endif } return 1; @@ -2105,9 +2110,13 @@ static int dStage_pathInfoInit(dStage_dt_c* i_stage, void* i_data, int entryNum, i_stage->setPathInfo(path_c); for (int i = 0; i < path_c->m_num; i++) { +#if TARGET_PC + path->m_points.setBase(i_stage->getPntInf()->m_pnt_offset); +#else if ((uintptr_t)path->m_points < 0x80000000) { path->m_points = (dPnt*)((uintptr_t)path->m_points + i_stage->getPntInf()->m_pnt_offset); } +#endif path++; } @@ -2130,10 +2139,14 @@ static int dStage_rpatInfoInit(dStage_dt_c* i_stage, void* i_data, int i_num, vo i_stage->setPath2Info(pStagePath); for (s32 i = 0; i < pStagePath->m_num; pPath++, i++, (void)0) { +#if TARGET_PC + pPath->m_points.setBase(i_stage->getPnt2Inf()->m_pnt_offset); +#else if ((uintptr_t)pPath->m_points >= 0x80000000) { continue; } pPath->m_points = (dPnt*)((uintptr_t)pPath->m_points + i_stage->getPnt2Inf()->m_pnt_offset); +#endif } return 1; } @@ -2227,7 +2240,7 @@ static int dStage_memaInfoInit(dStage_dt_c* i_stage, void* i_data, int param_2, if (pd != NULL) { OS_REPORT("Memory Block Create !\n"); - u32* entry_p = pd->field_0x4; + BE(u32)* entry_p = pd->field_0x4; JUT_ASSERT(3208, pd->m_num <= dStage_roomControl_c::MEMORY_BLOCK_MAX); for (int i = 0; i < pd->m_num; i++) { @@ -2283,10 +2296,14 @@ static void dStage_dt_c_offsetToPtr(void* i_data) { dStage_nodeHeader* p_tno = file->m_nodes; for (int i = 0; i < file->m_chunkCount; i++) { +#if TARGET_PC + p_tno->m_offset.setBase(i_data); +#else JUT_ASSERT(3381, p_tno->m_offset != 0); if (p_tno->m_offset != 0 && p_tno->m_offset < 0x80000000) { p_tno->m_offset += (uintptr_t)i_data; } +#endif p_tno++; } } @@ -2485,7 +2502,7 @@ static void dStage_dt_c_stageInitLoader(void* i_data, dStage_dt_c* i_stage) { } #if DEBUG -static void dStage_DebugDisp() { +void dStage_DebugDisp() { if (data_8074C569_debug) { JUTReport(30, 270, "envLayerSet: EnvRoom None"); } diff --git a/src/d/d_tresure.cpp b/src/d/d_tresure.cpp index b6083b6294..b00dc294dd 100644 --- a/src/d/d_tresure.cpp +++ b/src/d/d_tresure.cpp @@ -213,7 +213,7 @@ void dTres_c::setPosition(int dataNo, u8 listIdx, Vec const* i_pos, int i_roomNo for (int i = getTypeGroupNumber(listIdx); i > 0; i--) { if (dataNo == groupData->getNo()) { - Vec pos; + BE(Vec) pos; pos.x = i_pos->x; pos.y = i_pos->y; pos.z = i_pos->z; diff --git a/src/dolphin/os/OSContext.cpp b/src/dusk/OSContext.cpp similarity index 100% rename from src/dolphin/os/OSContext.cpp rename to src/dusk/OSContext.cpp diff --git a/src/dolphin/os/OSMutex.cpp b/src/dusk/OSMutex.cpp similarity index 100% rename from src/dolphin/os/OSMutex.cpp rename to src/dusk/OSMutex.cpp diff --git a/src/dolphin/os/OSThread.cpp b/src/dusk/OSThread.cpp similarity index 100% rename from src/dolphin/os/OSThread.cpp rename to src/dusk/OSThread.cpp diff --git a/src/dusk/imgui.cpp b/src/dusk/imgui.cpp index 0a42e87191..245941a3e9 100644 --- a/src/dusk/imgui.cpp +++ b/src/dusk/imgui.cpp @@ -1,10 +1,8 @@ #include "dusk/imgui.h" +#include "imgui/imgui.hpp" #include -#include #include -#include -#include #include #include #include @@ -13,157 +11,31 @@ #include "Windows.h" #endif -static bool m_frameRate = true; -static bool m_pipelineInfo = true; -static bool m_graphicsBackend = true; -static int m_debugOverlayCorner = 0; // top-left - -using namespace std::string_literals; -using namespace std::string_view_literals; - -namespace aurora::gfx -{ -extern std::atomic_uint32_t queuedPipelines; -extern std::atomic_uint32_t createdPipelines; - -extern size_t g_drawCallCount; -extern size_t g_mergedDrawCallCount; -extern size_t g_lastVertSize; -extern size_t g_lastUniformSize; -extern size_t g_lastIndexSize; -extern size_t g_lastStorageSize; -} // namespace aurora::gfx - -static void SetOverlayWindowLocation(int corner) -{ - const ImGuiViewport *viewport = ImGui::GetMainViewport(); - ImVec2 workPos = viewport->WorkPos; // Use work area to avoid menu-bar/task-bar, if any! - ImVec2 workSize = viewport->WorkSize; - ImVec2 windowPos; - ImVec2 windowPosPivot; - constexpr float padding = 10.0f; - windowPos.x = (corner & 1) != 0 ? (workPos.x + workSize.x - padding) : (workPos.x + padding); - windowPos.y = (corner & 2) != 0 ? (workPos.y + workSize.y - padding) : (workPos.y + padding); - windowPosPivot.x = (corner & 1) != 0 ? 1.0f : 0.0f; - windowPosPivot.y = (corner & 2) != 0 ? 1.0f : 0.0f; - ImGui::SetNextWindowPos(windowPos, ImGuiCond_Always, windowPosPivot); -} - -static void ImGuiStringViewText(std::string_view text) -{ - // begin()/end() do not work on MSVC - ImGui::TextUnformatted(text.data(), text.data() + text.size()); -} - -static std::string BytesToString(size_t bytes) -{ - constexpr std::array suffixes{"B"sv, "KB"sv, "MB"sv, "GB"sv, "TB"sv, "PB"sv, "EB"sv}; - uint32_t s = 0; - auto count = static_cast(bytes); - while (count >= 1024.0 && s < 7) - { - s++; - count /= 1024.0; - } - if (count - floor(count) == 0.0) - { - return fmt::format(FMT_STRING("{}{}"), static_cast(count), suffixes[s]); - } - return fmt::format(FMT_STRING("{:.1f}{}"), count, suffixes[s]); -} +static bool ImguiHidden = false; void imgui_main(const AuroraInfo *info) { - - ImGuiIO &io = ImGui::GetIO(); - ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoDecoration | - ImGuiWindowFlags_AlwaysAutoResize | - ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav; - if (m_debugOverlayCorner != -1) - { - SetOverlayWindowLocation(m_debugOverlayCorner); - windowFlags |= ImGuiWindowFlags_NoMove; + if (ImGui::IsKeyPressed(ImGuiKey_F1)) { + ImguiHidden = !ImguiHidden; } - ImGui::SetNextWindowBgAlpha(0.65f); - if (ImGui::Begin("Debug Overlay", nullptr, windowFlags)) - { - bool hasPrevious = false; - if (m_frameRate) - { - if (hasPrevious) - { - ImGui::Separator(); - } - hasPrevious = true; - ImGuiStringViewText(fmt::format(FMT_STRING("FPS: {:.1f}\n"), io.Framerate)); - } - if (m_graphicsBackend) - { - if (hasPrevious) - { - ImGui::Separator(); - } - hasPrevious = true; - - std::string_view backendString = "Unknown"sv; - switch (info->backend) - { - case BACKEND_D3D12: - backendString = "D3D12"sv; - break; - case BACKEND_METAL: - backendString = "Metal"sv; - break; - case BACKEND_VULKAN: - backendString = "Vulkan"sv; - break; - case BACKEND_OPENGL: - backendString = "OpenGL"sv; - break; - case BACKEND_OPENGLES: - backendString = "OpenGL ES"sv; - break; - case BACKEND_WEBGPU: - backendString = "WebGPU"sv; - break; - case BACKEND_NULL: - backendString = "Null"sv; - break; - } - ImGuiStringViewText(fmt::format(FMT_STRING("Backend: {}\n"), backendString)); - } - if (m_pipelineInfo) - { - if (hasPrevious) - { - ImGui::Separator(); - } - hasPrevious = true; - - ImGuiStringViewText( - fmt::format(FMT_STRING("Queued pipelines: {}\n"), aurora::gfx::queuedPipelines.load())); - ImGuiStringViewText( - fmt::format(FMT_STRING("Done pipelines: {}\n"), aurora::gfx::createdPipelines.load())); - ImGuiStringViewText( - fmt::format(FMT_STRING("Draw call count: {}\n"), aurora::gfx::g_drawCallCount)); - ImGuiStringViewText(fmt::format(FMT_STRING("Merged draw calls: {}\n"), - aurora::gfx::g_mergedDrawCallCount)); - ImGuiStringViewText(fmt::format(FMT_STRING("Vertex size: {}\n"), - BytesToString(aurora::gfx::g_lastVertSize))); - ImGuiStringViewText(fmt::format(FMT_STRING("Uniform size: {}\n"), - BytesToString(aurora::gfx::g_lastUniformSize))); - ImGuiStringViewText(fmt::format(FMT_STRING("Index size: {}\n"), - BytesToString(aurora::gfx::g_lastIndexSize))); - ImGuiStringViewText(fmt::format(FMT_STRING("Storage size: {}\n"), - BytesToString(aurora::gfx::g_lastStorageSize))); - ImGuiStringViewText(fmt::format( - FMT_STRING("Total: {}\n"), - BytesToString(aurora::gfx::g_lastVertSize + aurora::gfx::g_lastUniformSize + - aurora::gfx::g_lastIndexSize + aurora::gfx::g_lastStorageSize))); - } + if (ImguiHidden) { + return; } - ImGui::End(); + + if (ImGui::BeginMainMenuBar()) { + if (ImGui::BeginMenu(MenuView)) { + ImGui::MenuItem("Hide UI", "F1", &ImguiHidden); + ImGui::EndMenu(); + } + + DuskImguiDebugOverlay(info); + DuskImguiProcesses(); + DuskImguiHeaps(); + + ImGui::EndMainMenuBar(); + } + } class Limiter diff --git a/src/dusk/imgui/debug_overlay.cpp b/src/dusk/imgui/debug_overlay.cpp new file mode 100644 index 0000000000..ae97dbd0a8 --- /dev/null +++ b/src/dusk/imgui/debug_overlay.cpp @@ -0,0 +1,175 @@ +#include +#include +#include + +#include "fmt/format.h" +#include "imgui.h" + +#include "imgui.hpp" + +static bool m_frameRate = true; +static bool m_pipelineInfo = true; +static bool m_graphicsBackend = true; +static int m_debugOverlayCorner = 0; // top-left + +namespace aurora::gfx +{ + extern std::atomic_uint32_t queuedPipelines; + extern std::atomic_uint32_t createdPipelines; + + extern size_t g_drawCallCount; + extern size_t g_mergedDrawCallCount; + extern size_t g_lastVertSize; + extern size_t g_lastUniformSize; + extern size_t g_lastIndexSize; + extern size_t g_lastStorageSize; +} // namespace aurora::gfx + +using namespace std::string_literals; +using namespace std::string_view_literals; + +static void SetOverlayWindowLocation(int corner) +{ + const ImGuiViewport *viewport = ImGui::GetMainViewport(); + ImVec2 workPos = viewport->WorkPos; // Use work area to avoid menu-bar/task-bar, if any! + ImVec2 workSize = viewport->WorkSize; + ImVec2 windowPos; + ImVec2 windowPosPivot; + constexpr float padding = 10.0f; + windowPos.x = (corner & 1) != 0 ? (workPos.x + workSize.x - padding) : (workPos.x + padding); + windowPos.y = (corner & 2) != 0 ? (workPos.y + workSize.y - padding) : (workPos.y + padding); + windowPosPivot.x = (corner & 1) != 0 ? 1.0f : 0.0f; + windowPosPivot.y = (corner & 2) != 0 ? 1.0f : 0.0f; + ImGui::SetNextWindowPos(windowPos, ImGuiCond_Always, windowPosPivot); +} + +static void ImGuiStringViewText(std::string_view text) +{ + // begin()/end() do not work on MSVC + ImGui::TextUnformatted(text.data(), text.data() + text.size()); +} + +std::string BytesToString(size_t bytes) +{ + constexpr std::array suffixes{"B"sv, "KB"sv, "MB"sv, "GB"sv, "TB"sv, "PB"sv, "EB"sv}; + uint32_t s = 0; + auto count = static_cast(bytes); + while (count >= 1024.0 && s < 7) + { + s++; + count /= 1024.0; + } + if (count - floor(count) == 0.0) + { + return fmt::format(FMT_STRING("{}{}"), static_cast(count), suffixes[s]); + } + return fmt::format(FMT_STRING("{:.1f}{}"), count, suffixes[s]); +} + +static bool Active = false; + +void DuskImguiDebugOverlay(const AuroraInfo *info) { + if (ImGui::BeginMenu(MenuView)) { + ImGui::MenuItem("Debug overlay", "F3", &Active); + + ImGui::EndMenu(); + } + + if (ImGui::IsKeyPressed(ImGuiKey_F3)) { + Active = !Active; + } + + if (!Active) { + return; + } + + ImGuiIO &io = ImGui::GetIO(); + ImGuiWindowFlags windowFlags = ImGuiWindowFlags_NoDecoration | + ImGuiWindowFlags_AlwaysAutoResize | + ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav; + if (m_debugOverlayCorner != -1) + { + SetOverlayWindowLocation(m_debugOverlayCorner); + windowFlags |= ImGuiWindowFlags_NoMove; + } + ImGui::SetNextWindowBgAlpha(0.65f); + if (ImGui::Begin("Debug Overlay", nullptr, windowFlags)) + { + bool hasPrevious = false; + if (m_frameRate) + { + if (hasPrevious) + { + ImGui::Separator(); + } + hasPrevious = true; + + ImGuiStringViewText(fmt::format(FMT_STRING("FPS: {:.1f}\n"), io.Framerate)); + } + if (m_graphicsBackend) + { + if (hasPrevious) + { + ImGui::Separator(); + } + hasPrevious = true; + + std::string_view backendString = "Unknown"sv; + switch (info->backend) + { + case BACKEND_D3D12: + backendString = "D3D12"sv; + break; + case BACKEND_METAL: + backendString = "Metal"sv; + break; + case BACKEND_VULKAN: + backendString = "Vulkan"sv; + break; + case BACKEND_OPENGL: + backendString = "OpenGL"sv; + break; + case BACKEND_OPENGLES: + backendString = "OpenGL ES"sv; + break; + case BACKEND_WEBGPU: + backendString = "WebGPU"sv; + break; + case BACKEND_NULL: + backendString = "Null"sv; + break; + } + ImGuiStringViewText(fmt::format(FMT_STRING("Backend: {}\n"), backendString)); + } + if (m_pipelineInfo) + { + if (hasPrevious) + { + ImGui::Separator(); + } + hasPrevious = true; + + ImGuiStringViewText( + fmt::format(FMT_STRING("Queued pipelines: {}\n"), aurora::gfx::queuedPipelines.load())); + ImGuiStringViewText( + fmt::format(FMT_STRING("Done pipelines: {}\n"), aurora::gfx::createdPipelines.load())); + ImGuiStringViewText( + fmt::format(FMT_STRING("Draw call count: {}\n"), aurora::gfx::g_drawCallCount)); + ImGuiStringViewText(fmt::format(FMT_STRING("Merged draw calls: {}\n"), + aurora::gfx::g_mergedDrawCallCount)); + ImGuiStringViewText(fmt::format(FMT_STRING("Vertex size: {}\n"), + BytesToString(aurora::gfx::g_lastVertSize))); + ImGuiStringViewText(fmt::format(FMT_STRING("Uniform size: {}\n"), + BytesToString(aurora::gfx::g_lastUniformSize))); + ImGuiStringViewText(fmt::format(FMT_STRING("Index size: {}\n"), + BytesToString(aurora::gfx::g_lastIndexSize))); + ImGuiStringViewText(fmt::format(FMT_STRING("Storage size: {}\n"), + BytesToString(aurora::gfx::g_lastStorageSize))); + ImGuiStringViewText(fmt::format( + FMT_STRING("Total: {}\n"), + BytesToString(aurora::gfx::g_lastVertSize + aurora::gfx::g_lastUniformSize + + aurora::gfx::g_lastIndexSize + aurora::gfx::g_lastStorageSize))); + } + } + ImGui::End(); +} diff --git a/src/dusk/imgui/heaps.cpp b/src/dusk/imgui/heaps.cpp new file mode 100644 index 0000000000..aa4de04ba3 --- /dev/null +++ b/src/dusk/imgui/heaps.cpp @@ -0,0 +1,112 @@ +#include + +#include "JSystem/JFramework/JFWSystem.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "imgui.h" +#include "imgui.hpp" + +static bool Active = false; + +static void DrawTableCore(); + +void DuskImguiHeaps() { + if (ImGui::BeginMenu(MenuView)) { + ImGui::MenuItem("Heaps", "F4", &Active); + + ImGui::EndMenu(); + } + + if (ImGui::IsKeyPressed(ImGuiKey_F4)) { + Active = !Active; + } + + if (!Active) { + return; + } + + if (ImGui::Begin("Heaps", &Active)) { + if (ImGui::BeginTable( + "heaps", + 5, + ImGuiTableFlags_RowBg | ImGuiTableFlags_Resizable)) { + + DrawTableCore(); + + ImGui::EndTable(); + } + } + + ImGui::End(); +} + +static void DrawHeap(JKRHeap* heap, int depth = 0); + +static void DrawTableCore() { + ImGui::TableNextRow(ImGuiTableRowFlags_Headers); + ImGui::TableNextColumn(); + ImGui::TextUnformatted("Heap name"); + ImGui::TableNextColumn(); + ImGui::TextUnformatted("Use%"); + ImGui::TableNextColumn(); + ImGui::TextUnformatted("Available"); + ImGui::TableNextColumn(); + ImGui::TextUnformatted("Total"); + ImGui::TableNextColumn(); + ImGui::TextUnformatted("Type"); + + DrawHeap(reinterpret_cast(JFWSystem::rootHeap)); +} + +static std::array GetHeapType(JKRHeap* heap) { + auto type = heap->getHeapType(); + + return { + (char)(type >> 24 & 0xFF), + (char)(type >> 16 & 0xFF), + (char)(type >> 8 & 0xFF), + (char)(type >> 0 & 0xFF), + }; +} + +static const char* GetHeapName(const JKRHeap* heap) { + const auto name = heap->getName(); + if (strlen(name) == 0) { + return "Unknown"; + } + + return name; +} + +static void DrawHeap(JKRHeap* heap, const int depth) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + + auto indentSize = depth * 16; + if (indentSize != 0) + ImGui::Indent(indentSize); + ImGui::TextUnformatted(GetHeapName(heap)); + if (indentSize != 0) + ImGui::Unindent(indentSize); + + ImGui::TableNextColumn(); + ImGui::ProgressBar( + 1 - (f32)heap->getFreeSize() / (f32)heap->getSize(), + ImVec2(ImGui::GetContentRegionAvail().x, 0)); + + ImGui::TableNextColumn(); + auto freeSizeString = BytesToString(heap->getFreeSize()); + ImGui::TextUnformatted(freeSizeString.c_str()); + + ImGui::TableNextColumn(); + auto totalSizeString = BytesToString(heap->getSize()); + ImGui::TextUnformatted(totalSizeString.c_str()); + + ImGui::TableNextColumn(); + auto typeString = GetHeapType(heap); + ImGui::TextUnformatted(typeString.data(), typeString.data() + 4); + + const JSUTree& tree = heap->getHeapTree(); + for (JSUTreeIterator iter(tree.getFirstChild()); iter != tree.getEndChild(); ++iter) { + DrawHeap(*iter, depth + 1); + } +} \ No newline at end of file diff --git a/src/dusk/imgui/imgui.hpp b/src/dusk/imgui/imgui.hpp new file mode 100644 index 0000000000..d6006f8353 --- /dev/null +++ b/src/dusk/imgui/imgui.hpp @@ -0,0 +1,15 @@ +#ifndef DUSK_IMGUI_HPP +#define DUSK_IMGUI_HPP + +#include +#include + +inline const char* MenuView = "View"; + +void DuskImguiDebugOverlay(const AuroraInfo *info); +void DuskImguiProcesses(); +void DuskImguiHeaps(); + +std::string BytesToString(size_t bytes); + +#endif // DUSK_IMGUI_HPP diff --git a/src/dusk/imgui/processes.cpp b/src/dusk/imgui/processes.cpp new file mode 100644 index 0000000000..7bbaeaf26e --- /dev/null +++ b/src/dusk/imgui/processes.cpp @@ -0,0 +1,110 @@ +#define PROCS_DUMP_NAMES 1 + +#include + +#include "d/d_procname.h" +#include "f_pc/f_pc_create_iter.h" +#include "f_pc/f_pc_create_req.h" +#include "f_pc/f_pc_layer.h" +#include "f_pc/f_pc_layer_iter.h" +#include "f_pc/f_pc_leaf.h" +#include "f_pc/f_pc_node.h" +#include "imgui.h" +#include "imgui.hpp" +#include "imgui_internal.h" + +bool showTreeRecursive; + +static int ShowProcess(void* p, void*) { + auto proc = static_cast(p); + + char buf[64]; + snprintf(buf, sizeof(buf), "%d", proc->id); + + ImVec2 avail = ImGui::GetContentRegionAvail(); + + ImVec2 vec = {avail.x, 0}; + if (ImGui::BeginChild(buf, vec, ImGuiChildFlags_Border | ImGuiChildFlags_AutoResizeY)) { + ImGui::Text("[%d] %s", proc->id, GetProcName(proc->profname)); + ImGui::Text("init_state: %d, create_phase: %d", proc->state.init_state, proc->state.create_phase); + + const char* ofTypeName = "unknown"; + if (proc->subtype == g_fpcNd_type) { + ofTypeName = "Node"; + } else if (proc->subtype == g_fpcLf_type) { + ofTypeName = "Leaf"; + } + + ImGui::Text("OfType: %d (%s), layer: %d", proc->subtype, ofTypeName, proc->layer_tag.layer->layer_id); + + if (proc->create_req != nullptr) { + ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "Pending create request"); + } + + if (showTreeRecursive) { + if (fpcBs_Is_JustOfType(g_fpcNd_type, proc->subtype)) { + auto procNode = static_cast(p); + + ImGui::Text("Owns layer %d", procNode->layer.layer_id); + + fpcLyIt_OnlyHere(&procNode->layer, ShowProcess, nullptr); + } + } + } + + ImGui::EndChild(); + return 1; +} + +static int ShowCreateRequest(void* p, void*) { + create_request* req = (create_request*)p; + + if (req->process != nullptr) { + ShowProcess(req->process, nullptr); + } + + return 1; +} + +static bool Visible = false; + +void DuskImguiProcesses() { + if (ImGui::BeginMenu(MenuView)) { + ImGui::MenuItem("Process management", "F2", &Visible); + ImGui::EndMenu(); + } + + if (ImGui::IsKeyPressed(ImGuiKey_F2)) { + Visible = !Visible; + } + + if (!Visible) { + return; + } + + if (ImGui::Begin("Processes")) { + if (ImGui::BeginTabBar("Tabs")) { + showTreeRecursive = true; + if (ImGui::BeginTabItem("Tree")) { + fpcLyIt_OnlyHere(fpcLy_RootLayer(), ShowProcess, nullptr); + ImGui::EndTabItem(); + } + + showTreeRecursive = false; + if (ImGui::BeginTabItem("All layers")) { + fpcLyIt_All(ShowProcess, nullptr); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("Creation queue")) { + fpcCtIt_Method(ShowCreateRequest, nullptr); + + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + } + } + + ImGui::End(); +} diff --git a/src/dusk/offset_ptr.cpp b/src/dusk/offset_ptr.cpp new file mode 100644 index 0000000000..f26fae3db5 --- /dev/null +++ b/src/dusk/offset_ptr.cpp @@ -0,0 +1,28 @@ +#include "dusk/offset_ptr.h" + +#include "JSystem/JUtility/JUTAssert.h" + +#if TARGET_PC +bool OffsetPtr::isRelocated() { + return value & 0x8000'0000; +} + +bool OffsetPtr::setBase(void* base) { + JUT_ASSERT(__LINE__, value != 0); + + if (isRelocated()) { + // Already relocated, don't touch it again! + return false; + } + + ptrdiff_t diff = (u8*)this - (u8*)base; + ptrdiff_t newDiff = value - diff; + // Check that it's in range given that we use the 31st bit as a flag. + if (newDiff < -0x4000'0000 || newDiff > 0x7FFF'FFFF) { + OSPanic(__FILE__, __LINE__, "Not enough space in StageOffsetPtr!"); + } + + value = newDiff | 0x8000'0000; + return true; +} +#endif diff --git a/src/dusk/stubs.cpp b/src/dusk/stubs.cpp index bf5026b6e0..867a1e1a7d 100644 --- a/src/dusk/stubs.cpp +++ b/src/dusk/stubs.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include @@ -39,39 +39,13 @@ static bool PerfInitialized = false; #endif +#define STUB_LOG(v) // puts(v); + // ========================================================================== // General OS // ========================================================================== - -// Credits: Super Monkey Ball - -static u64 GetGCTicks() { -#if __APPLE__ - return mach_absolute_time() * MachToDolphinNum / MachToDolphinDenom; -#elif __linux__ || __FreeBSD__ - struct timespec tp; - clock_gettime(CLOCK_MONOTONIC, &tp); - - return ((tp.tv_sec * 1000000000ull) + tp.tv_nsec) * OS_CORE_CLOCK / 1000000000ull; -#elif _WIN32 - if (!PerfInitialized) { - QueryPerformanceFrequency(&PerfFrequency); - PerfInitialized = true; - } - LARGE_INTEGER perf; - QueryPerformanceCounter(&perf); - - perf.QuadPart *= OS_CORE_CLOCK; - perf.QuadPart /= PerfFrequency.QuadPart; - - return perf.QuadPart; -#else - return 0; -#endif -} - u32 OSGetConsoleType() { return OS_CONSOLE_RETAIL1; } @@ -80,10 +54,6 @@ u32 OSGetSoundMode() { return 2; } -void OSInit() { - // Thread system is lazy-initialized via OSGetCurrentThread() -} - // ========================================================================== // Message Queue (thread-safe implementation) // ========================================================================== @@ -230,45 +200,6 @@ int OSJamMessage(OSMessageQueue* mq, void* msg, s32 flags) { // Arena Functions // ========================================================================== -static void* sArenaLo = nullptr; -static void* sArenaHi = nullptr; - -void* OSGetArenaHi(void) { - return sArenaHi; -} - -void* OSGetArenaLo(void) { - return sArenaLo; -} - -void OSSetArenaHi(void* newHi) { - sArenaHi = newHi; -} - -void OSSetArenaLo(void* newLo) { - sArenaLo = newLo; -} - -void* OSAllocFromArenaLo(u32 size, u32 align) { - if (!sArenaLo || !sArenaHi) return nullptr; - - uintptr_t lo = (uintptr_t)sArenaLo; - if (align > 0) { - lo = (lo + align - 1) & ~((uintptr_t)align - 1); - } - - uintptr_t hi = (uintptr_t)sArenaHi; - if (lo + size > hi) { - OSReport("[PC-Arena] OSAllocFromArenaLo: out of arena space (need %u, have %u)\n", - size, (u32)(hi - lo)); - return nullptr; - } - - void* result = (void*)lo; - sArenaLo = (void*)(lo + size); - return result; -} - void* OSInitAlloc(void* arenaStart, void* arenaEnd, int maxHeaps) { return arenaStart; } @@ -287,14 +218,6 @@ void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* td) { if (td) memset(td, 0, sizeof(OSCalendarTime)); } -OSTime OSGetTime(void) { - return (OSTime)GetGCTicks(); -} - -OSTick OSGetTick(void) { - return (OSTick)GetGCTicks(); -} - u16 OSGetFontEncode() { return 0; } char* OSGetFontTexture(char* string, void** image, s32* x, s32* y, s32* width) { return 0; } @@ -334,16 +257,16 @@ void OSSetAlarm(OSAlarm* alarm, OSTime tick, OSAlarmHandler handler) {} #pragma mark SOUND void SoundChoID(int a, int b) { - puts("SoundChoID is a stub"); + STUB_LOG("SoundChoID is a stub"); } void SoundPan(int a, int b, int c) { - puts("SoundPan is a stub"); + STUB_LOG("SoundPan is a stub"); } void SoundPitch(u16 a, int b) { - puts("SoundPitch is a stub"); + STUB_LOG("SoundPitch is a stub"); } void SoundRevID(int a, int b) { - puts("SoundRevID is a stub"); + STUB_LOG("SoundRevID is a stub"); } #pragma mark CARD @@ -351,150 +274,150 @@ void SoundRevID(int a, int b) { #include extern "C" int CARDProbe(s32 chan) { - puts("CARDProbe is a stub"); + STUB_LOG("CARDProbe is a stub"); return 0; } s32 CARDCancel(CARDFileInfo* fileInfo) { - puts("CARDCancel is a stub"); + STUB_LOG("CARDCancel is a stub"); return 0; } s32 CARDCheck(s32 chan) { - puts("CARDCheck is a stub"); + STUB_LOG("CARDCheck is a stub"); return 0; } s32 CARDCheckAsync(s32 chan, CARDCallback callback) { - puts("CARDCheckAsync is a stub"); + STUB_LOG("CARDCheckAsync is a stub"); return 0; } s32 CARDClose(CARDFileInfo* fileInfo) { - puts("CARDClose is a stub"); + STUB_LOG("CARDClose is a stub"); return 0; } s32 CARDCreate(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo) { - puts("CARDCreate is a stub"); + STUB_LOG("CARDCreate is a stub"); return 0; } s32 CARDCreateAsync(s32 chan, const char* fileName, u32 size, CARDFileInfo* fileInfo, CARDCallback callback) { - puts("CARDCreateAsync is a stub"); + STUB_LOG("CARDCreateAsync is a stub"); return 0; } s32 CARDDelete(s32 chan, const char* fileName) { - puts("CARDDelete is a stub"); + STUB_LOG("CARDDelete is a stub"); return 0; } s32 CARDDeleteAsync(s32 chan, const char* fileName, CARDCallback callback) { - puts("CARDDeleteAsync is a stub"); + STUB_LOG("CARDDeleteAsync is a stub"); return 0; } s32 CARDFastDeleteAsync(s32 chan, s32 fileNo, CARDCallback callback) { - puts("CARDFastDeleteAsync is a stub"); + STUB_LOG("CARDFastDeleteAsync is a stub"); return 0; } s32 CARDFastOpen(s32 chan, s32 fileNo, CARDFileInfo* fileInfo) { - puts("CARDFastOpen is a stub"); + STUB_LOG("CARDFastOpen is a stub"); return 0; } s32 CARDFormat(s32 chan) { - puts("CARDFormat is a stub"); + STUB_LOG("CARDFormat is a stub"); return 0; } s32 CARDFreeBlocks(s32 chan, s32* byteNotUsed, s32* filesNotUsed) { - puts("CARDFreeBlocks is a stub"); + STUB_LOG("CARDFreeBlocks is a stub"); return 0; } s32 CARDGetResultCode(s32 chan) { - puts("CARDGetResultCode is a stub"); + STUB_LOG("CARDGetResultCode is a stub"); return 0; } s32 CARDGetStatus(s32 chan, s32 fileNo, CARDStat* stat) { - puts("CARDGetStatus is a stub"); + STUB_LOG("CARDGetStatus is a stub"); return 0; } s32 CARDGetSectorSize(s32 chan, u32* size) { - puts("CARDGetSectorSize is a stub"); + STUB_LOG("CARDGetSectorSize is a stub"); return 0; } void CARDInit() { - puts("CARDInit is a stub"); + STUB_LOG("CARDInit is a stub"); } s32 CARDMount(s32 chan, void* workArea, CARDCallback detachCallback) { - puts("CARDMount is a stub"); + STUB_LOG("CARDMount is a stub"); return 0; } s32 CARDMountAsync(s32 chan, void* workArea, CARDCallback detachCallback, CARDCallback attachCallback) { - puts("CARDMountAsync is a stub"); + STUB_LOG("CARDMountAsync is a stub"); return 0; } s32 CARDOpen(s32 chan, const char* fileName, CARDFileInfo* fileInfo) { - puts("CARDOpen is a stub"); + STUB_LOG("CARDOpen is a stub"); return 0; } s32 CARDProbeEx(s32 chan, s32* memSize, s32* sectorSize) { - puts("CARDProbeEx is a stub"); + STUB_LOG("CARDProbeEx is a stub"); return 0; } s32 CARDRead(CARDFileInfo* fileInfo, void* addr, s32 length, s32 offset) { - puts("CARDRead is a stub"); + STUB_LOG("CARDRead is a stub"); return 0; } s32 CARDReadAsync(CARDFileInfo* fileInfo, void* addr, s32 length, s32 offset, CARDCallback callback) { - puts("CARDReadAsync is a stub"); + STUB_LOG("CARDReadAsync is a stub"); return 0; } s32 CARDRename(s32 chan, const char* oldName, const char* newName) { - puts("CARDRename is a stub"); + STUB_LOG("CARDRename is a stub"); return 0; } s32 CARDRenameAsync(s32 chan, const char* oldName, const char* newName, CARDCallback callback) { - puts("CARDRenameAsync is a stub"); + STUB_LOG("CARDRenameAsync is a stub"); return 0; } s32 CARDSetStatusAsync(s32 chan, s32 fileNo, CARDStat* stat, CARDCallback callback) { - puts("CARDSetStatusAsync is a stub"); + STUB_LOG("CARDSetStatusAsync is a stub"); return 0; } s32 CARDUnmount(s32 chan) { - puts("CARDUnmount is a stub"); + STUB_LOG("CARDUnmount is a stub"); return 0; } extern "C" s32 CARDWrite(CARDFileInfo* fileInfo, void* addr, s32 length, s32 offset) { - puts("CARDWrite is a stub"); + STUB_LOG("CARDWrite is a stub"); return 0; } s32 CARDWriteAsync(CARDFileInfo* fileInfo, const void* addr, s32 length, s32 offset, CARDCallback callback) { - puts("CARDWriteAsync is a stub"); + STUB_LOG("CARDWriteAsync is a stub"); return 0; } @@ -507,73 +430,73 @@ s32 CARDSetStatus(s32 chan, s32 fileNo, CARDStat* stat) { } s32 __CARDFormatRegionAsync(int a, int b) { - puts("__CARDFormatRegionAsync is a stub"); + STUB_LOG("__CARDFormatRegionAsync is a stub"); return 0; } #pragma mark DC void DCFlushRange(void* addr, u32 nBytes) { - // puts("DCFlushRange is a stub"); + // STUB_LOG("DCFlushRange is a stub"); } void DCFlushRangeNoSync(void* addr, u32 nBytes) { - // puts("DCFlushRangeNoSync is a stub"); + // STUB_LOG("DCFlushRangeNoSync is a stub"); } void DCInvalidateRange(void* addr, u32 nBytes) { - // puts("DCInvalidateRange is a stub"); + // STUB_LOG("DCInvalidateRange is a stub"); } void DCStoreRange(void* addr, u32 nBytes) { - // puts("DCStoreRange is a stub"); + // STUB_LOG("DCStoreRange is a stub"); } void DCStoreRangeNoSync(void* addr, u32 nBytes) { - // puts("DCStoreRangeNoSync is a stub"); + // STUB_LOG("DCStoreRangeNoSync is a stub"); } #pragma mark EXI BOOL EXIDeselect(int chan) { - puts("EXIDeselect is a stub"); + STUB_LOG("EXIDeselect is a stub"); return FALSE; } BOOL EXIDma(int chan, void* buffer, s32 size, int d, int e) { - puts("EXIDma is a stub"); + STUB_LOG("EXIDma is a stub"); return FALSE; } BOOL EXIImm(int chan, u32* b, int c, int d, int e) { - puts("EXIImm is a stub"); + STUB_LOG("EXIImm is a stub"); return FALSE; } BOOL EXILock(int chan, int b, int c) { - puts("EXILock is a stub"); + STUB_LOG("EXILock is a stub"); return FALSE; } BOOL EXISelect(int chan, int b, int c) { - puts("EXISelect is a stub"); + STUB_LOG("EXISelect is a stub"); return FALSE; } BOOL EXISync(int chan) { - puts("EXISync is a stub"); + STUB_LOG("EXISync is a stub"); return FALSE; } BOOL EXIUnlock(int chan) { - puts("EXIUnlock is a stub"); + STUB_LOG("EXIUnlock is a stub"); return FALSE; } #pragma mark LC void LCEnable() { - puts("LCEnable is a stub"); + STUB_LOG("LCEnable is a stub"); } // OS-related functions consolidated under "# pragma mark OS" further up @@ -592,11 +515,11 @@ static VIRetraceCallback sVIPostRetraceCallback = NULL; extern "C" { void VIConfigure(const GXRenderModeObj* rm) { - // puts("VIConfigure is a stub"); + // STUB_LOG("VIConfigure is a stub"); } void VIConfigurePan(u16 xOrg, u16 yOrg, u16 width, u16 height) { - // puts("VIConfigurePan is a stub"); + // STUB_LOG("VIConfigurePan is a stub"); } u32 VIGetRetraceCount() { @@ -608,11 +531,11 @@ u32 VIGetNextField() { } void VISetBlack(BOOL black) { - // puts("VISetBlack is a stub"); + // STUB_LOG("VISetBlack is a stub"); } void VISetNextFrameBuffer(void* fb) { - // puts("VISetNextFrameBuffer is a stub"); + // STUB_LOG("VISetNextFrameBuffer is a stub"); } void VIWaitForRetrace() { @@ -654,41 +577,41 @@ VIRetraceCallback VISetPreRetraceCallback(VIRetraceCallback cb) { #pragma mark DSP #include extern "C" void __DSP_insert_task(DSPTaskInfo* task) { - puts("__DSP_insert_task is a stub"); + STUB_LOG("__DSP_insert_task is a stub"); } extern "C" void __DSP_boot_task(DSPTaskInfo*) { - puts("__DSP_boot_task is a stub"); + STUB_LOG("__DSP_boot_task is a stub"); } extern "C" void __DSP_exec_task(DSPTaskInfo*, DSPTaskInfo*) { - puts("__DSP_exec_task is a stub"); + STUB_LOG("__DSP_exec_task is a stub"); } extern "C" void __DSP_remove_task(DSPTaskInfo* task) { - puts("__DSP_remove_task is a stub"); + STUB_LOG("__DSP_remove_task is a stub"); } void DSPAssertInt(void) { - puts("DSPAssertInt is a stub"); + STUB_LOG("DSPAssertInt is a stub"); } u32 DSPCheckMailFromDSP(void) { - puts("DSPCheckMailFromDSP is a stub"); + STUB_LOG("DSPCheckMailFromDSP is a stub"); return 0; } u32 DSPCheckMailToDSP(void) { - puts("DSPCheckMailToDSP is a stub"); + STUB_LOG("DSPCheckMailToDSP is a stub"); return 0; } void DSPInit(void) { - puts("DSPInit is a stub"); + STUB_LOG("DSPInit is a stub"); } u32 DSPReadMailFromDSP(void) { - puts("DSPReadMailFromDSP is a stub"); + STUB_LOG("DSPReadMailFromDSP is a stub"); return 0; } void DSPSendMailToDSP(u32 mail) { - puts("DSPSendMailToDSP is a stub"); + STUB_LOG("DSPSendMailToDSP is a stub"); } #pragma mark Z2Audio @@ -697,7 +620,7 @@ public: void extensionProcess(s32, s32); }; void Z2AudioCS::extensionProcess(s32, s32) { - puts("Z2AudioMgr::play is a stub"); + STUB_LOG("Z2AudioMgr::play is a stub"); } #pragma mark JORServer @@ -732,21 +655,21 @@ JKRHeap* JKRHeap::sRootHeap2; // XXX this is defined for WII/SHIELD, should we #pragma mark mDoExt_onCupOnAupPacket #include mDoExt_offCupOnAupPacket::~mDoExt_offCupOnAupPacket() { - puts("mDoExt_onCupOffAupPacket_c destructor is a stub"); + STUB_LOG("mDoExt_onCupOffAupPacket_c destructor is a stub"); } #pragma mark mDoExt_onCupOffAupPacket mDoExt_onCupOffAupPacket::~mDoExt_onCupOffAupPacket() { - puts("mDoExt_onCupOffAupPacket_c destructor is a stub"); + STUB_LOG("mDoExt_onCupOffAupPacket_c destructor is a stub"); } #pragma mark dKankyo_vrboxHIO_c #include void dKankyo_vrboxHIO_c::dKankyo_vrboxHIOInfoUpDateF() { - puts("dKankyo_vrboxHIO_c::dKankyo_vrboxHIOInfoUpDateF is a stub"); + STUB_LOG("dKankyo_vrboxHIO_c::dKankyo_vrboxHIOInfoUpDateF is a stub"); } void dKankyo_lightHIO_c::dKankyo_lightHIOInfoUpDateF() { - puts("dKankyo_lightHIO_c::dKankyo_lightHIOInfoUpDateF is a stub"); + STUB_LOG("dKankyo_lightHIO_c::dKankyo_lightHIOInfoUpDateF is a stub"); } #pragma mark dKankyo_HIO_c @@ -1216,144 +1139,62 @@ dKankyo_navyHIO_c::dKankyo_navyHIO_c() { #pragma mark AI #include u32 AIGetDSPSampleRate(void) { - puts("AIGetDSPSampleRate is a stub"); + STUB_LOG("AIGetDSPSampleRate is a stub"); return 48000; // Default sample rate? } void AIInit(u8* stack) { - puts("AIInit is a stub"); + STUB_LOG("AIInit is a stub"); // This function initializes the AI system, but we don't have any specific implementation here. // In a real scenario, it would set up the audio interface and prepare it for use. } void AIInitDMA(u32 start_addr, u32 length) { - puts("AIInitDMA is a stub"); + STUB_LOG("AIInitDMA is a stub"); } AIDCallback AIRegisterDMACallback(AIDCallback callback) { - puts("AIRegisterDMACallback is a stub"); + STUB_LOG("AIRegisterDMACallback is a stub"); return callback; } void AISetDSPSampleRate(u32 rate) { // Should this link with the getsamplerate? this is very TODO - puts("AISetDSPSampleRate is a stub"); + STUB_LOG("AISetDSPSampleRate is a stub"); } void AIStartDMA(void) { - puts("AIStartDMA is a stub"); + STUB_LOG("AIStartDMA is a stub"); } void AIStopDMA(void) { - puts("AIStopDMA is a stub"); -} - -#pragma mark AR -#include - -// ARAM emulation: allocate a large buffer to simulate the GameCube's Auxiliary RAM. -// ARAM "addresses" are offsets into this buffer. On GameCube, ARAM is 16 MB starting -// at a base address returned by ARInit. We emulate this by malloc'ing a 16 MB buffer -// and using a simple bump allocator (matching ARAlloc behavior on real hardware). -static const u32 ARAM_EMU_SIZE = 16 * 1024 * 1024; // 16 MB (GameCube ARAM size) -static u8* sAramBuffer = nullptr; -static u32 sAramAllocPtr = 0; // bump allocator offset into sAramBuffer - -// Convert an ARAM "address" (offset) to a real host pointer -static u8* aramToHost(u32 aramAddr) { - if (!sAramBuffer || aramAddr >= ARAM_EMU_SIZE) { - return nullptr; - } - return sAramBuffer + aramAddr; -} - -u32 ARAlloc(u32 length) { - // Simple bump allocator (matching GameCube behavior - ARAlloc never frees) - u32 addr = sAramAllocPtr; - sAramAllocPtr += (length + 31) & ~31; // 32-byte align - if (sAramAllocPtr > ARAM_EMU_SIZE) { - OSReport("[ARAM] ERROR: ARAlloc overflow! Requested %u, used %u/%u\n", - length, sAramAllocPtr, ARAM_EMU_SIZE); - return 0; - } - OSReport("[ARAM] ARAlloc(%u) -> 0x%08X\n", length, addr); - return addr; -} - -u32 ARGetSize(void) { - return ARAM_EMU_SIZE; -} - -u32 ARInit(u32* stack_index_addr, u32 num_entries) { - if (!sAramBuffer) { - sAramBuffer = (u8*)malloc(ARAM_EMU_SIZE); - if (sAramBuffer) { - memset(sAramBuffer, 0, ARAM_EMU_SIZE); - OSReport("[ARAM] Initialized %u bytes of emulated ARAM\n", ARAM_EMU_SIZE); - } else { - OSReport("[ARAM] FATAL: Failed to allocate ARAM emulation buffer!\n"); - } - } - // Return base address (start of usable ARAM, after stack entries) - sAramAllocPtr = 0; - return 0; -} - -#pragma mark ARQ -void ARQPostRequest(ARQRequest* request, u32 owner, u32 type, u32 priority, uintptr_t source, uintptr_t dest, - u32 length, ARQCallback callback) { - // Emulate ARAM DMA transfers using memcpy. - // type 0 = MRAM -> ARAM, type 1 = ARAM -> MRAM - if (type == ARAM_DIR_MRAM_TO_ARAM) { - // Main RAM -> ARAM: source is a host pointer (cast to u32), dest is an ARAM offset - u8* hostSrc = (u8*)(uintptr_t)source; - u8* aramDst = aramToHost(dest); - if (aramDst && hostSrc) { - memcpy(aramDst, hostSrc, length); - } - } else { - // ARAM -> Main RAM: source is an ARAM offset, dest is a host pointer (cast to u32) - u8* aramSrc = aramToHost(source); - u8* hostDst = (u8*)(uintptr_t)dest; - if (aramSrc && hostDst) { - memcpy(hostDst, aramSrc, length); - } - } - - // Immediately invoke the callback (synchronous on PC, no DMA latency) - if (callback) { - callback((uintptr_t)request); - } -} - -void ARQInit() { - // Nothing to do on PC - ARAM is initialized in ARInit + STUB_LOG("AIStopDMA is a stub"); } #pragma mark DVD #include s32 DVDCancel(volatile DVDCommandBlock* block) { - puts("DVDCancel is a stub"); + STUB_LOG("DVDCancel is a stub"); return 0; } s32 DVDCancel(DVDCommandBlock* block) { - puts("DVDCancel is a stub"); + STUB_LOG("DVDCancel is a stub"); return 0; } BOOL DVDChangeDir(const char* dirName) { - puts("DVDChangeDir is a stub"); + STUB_LOG("DVDChangeDir is a stub"); return TRUE; } BOOL DVDCheckDisk(void) { - puts("DVDCheckDisk is a stub"); + STUB_LOG("DVDCheckDisk is a stub"); return TRUE; } BOOL DVDClose(DVDFileInfo* fileInfo) { - puts("DVDClose is a stub"); + STUB_LOG("DVDClose is a stub"); return TRUE; } int DVDCloseDir(DVDDir* dir) { - puts("DVDCloseDir is a stub"); + STUB_LOG("DVDCloseDir is a stub"); return 0; } s32 DVDConvertPathToEntrynum(const char* pathPtr) { @@ -1378,19 +1219,19 @@ BOOL DVDFastOpen(s32 entrynum, DVDFileInfo* fileInfo) { return TRUE; } s32 DVDGetCommandBlockStatus(const DVDCommandBlock* block) { - puts("DVDGetCommandBlockStatus is a stub"); + STUB_LOG("DVDGetCommandBlockStatus is a stub"); return 0; } DVDDiskID* DVDGetCurrentDiskID(void) { - puts("DVDGetCurrentDiskID is a stub"); + STUB_LOG("DVDGetCurrentDiskID is a stub"); return NULL; } s32 DVDGetDriveStatus(void) { - //puts("DVDGetDriveStatus is a stub"); + //STUB_LOG("DVDGetDriveStatus is a stub"); return 0; } void DVDInit(void) { - puts("DVDInit is a stub"); + STUB_LOG("DVDInit is a stub"); } BOOL DVDOpen(const char* fileName, DVDFileInfo* fileInfo) { s32 entryNum = DVDConvertPathToEntrynum(fileName); @@ -1401,7 +1242,7 @@ BOOL DVDOpen(const char* fileName, DVDFileInfo* fileInfo) { return DVDFastOpen(entryNum, fileInfo); } int DVDOpenDir(const char* dirName, DVDDir* dir) { - puts("DVDOpenDir is a stub"); + STUB_LOG("DVDOpenDir is a stub"); return 0; } BOOL DVDReadAsyncPrio(DVDFileInfo* fileInfo, void* addr, s32 length, s32 offset, @@ -1421,7 +1262,7 @@ BOOL DVDReadAsyncPrio(DVDFileInfo* fileInfo, void* addr, s32 length, s32 offset, return TRUE; } int DVDReadDir(DVDDir* dir, DVDDirEntry* dirent) { - puts("DVDReadDir is a stub"); + STUB_LOG("DVDReadDir is a stub"); return 0; } s32 DVDReadPrio(DVDFileInfo* fileInfo, void* addr, s32 length, s32 offset, s32 prio) { @@ -1436,22 +1277,22 @@ s32 DVDReadPrio(DVDFileInfo* fileInfo, void* addr, s32 length, s32 offset, s32 p } void DVDReadAbsAsyncForBS(void* a, struct bb2struct* b, int c, int d, void (*e)()) { - puts("DVDReadAbsAsyncForBS is a stub"); + STUB_LOG("DVDReadAbsAsyncForBS is a stub"); } void DVDReadDiskID(void* a, DVDDiskID* b, void (*c)()) { - puts("DVDReadDiskID is a stub"); + STUB_LOG("DVDReadDiskID is a stub"); } void DVDReset() { - puts("DVDReset is a stub"); + STUB_LOG("DVDReset is a stub"); } #pragma mark GD #include #include void GDFlushCurrToMem(void) { - puts("GDFlushCurrToMem is a stub"); + STUB_LOG("GDFlushCurrToMem is a stub"); } void GDInitGDLObj(GDLObj* dl, void* start, u32 length) { ASSERTMSGLINE(40, !((u32)start & 0x1F), "start must be aligned to 32 bytes"); @@ -1462,121 +1303,74 @@ void GDInitGDLObj(GDLObj* dl, void* start, u32 length) { dl->length = length; } void GDOverflowed(void) { - puts("GDOverflowed is a stub"); + STUB_LOG("GDOverflowed is a stub"); } void GDPadCurr32(void) { - puts("GDPadCurr32 is a stub"); + STUB_LOG("GDPadCurr32 is a stub"); } void GDSetArray(GXAttr attr, void* base_ptr, u8 stride) { - puts("GDSetArray is a stub"); + STUB_LOG("GDSetArray is a stub"); } void GDSetArrayRaw(GXAttr attr, u32 base_ptr_raw, u8 stride) { - puts("GDSetArrayRaw is a stub"); + STUB_LOG("GDSetArrayRaw is a stub"); } void GDSetVtxDescv(const GXVtxDescList* attrPtr) { - puts("GDSetVtxDescv is a stub"); + STUB_LOG("GDSetVtxDescv is a stub"); } #pragma mark GX #include -// Dummy FIFO sink for direct GXWGFifo writes in J3D code (e.g. J3DFifo.h). -// On GameCube these write to the GX command processor at 0xCC008000. -// On PC, writes land here harmlessly and are discarded. -volatile PPCWGPipe GXWGFifo; - -// GXCmd/GXParam/GXMatrixIndex: low-level command FIFO functions used by J3D. -// Route through Aurora's software FIFO so display list data is actually recorded. -// -// We forward-declare Aurora's FIFO functions with explicit stdint types instead of -// including fifo.hpp, because the game's u32 (unsigned long) differs from Aurora's -// u32 (uint32_t = unsigned int on MSVC). Including fifo.hpp would resolve its u32 -// parameter types to the game's unsigned long (since game headers are included first -// and set the include guards), causing MSVC name mangling mismatches at link time. -namespace aurora::gfx::fifo { - void write_u8(uint8_t val); - void write_u16(uint16_t val); - void write_u32(uint32_t val); - void write_f32(float val); -} - -// Cast to stdint types: game headers define u32=unsigned long, but Aurora uses -// uint32_t=unsigned int. Both are 32-bit on Win32 but have different MSVC name mangling. -void GXCmd1u8(const u8 x) { aurora::gfx::fifo::write_u8(static_cast(x)); } -void GXCmd1u16(const u16 x) { aurora::gfx::fifo::write_u16(static_cast(x)); } -void GXCmd1u32(const u32 x) { aurora::gfx::fifo::write_u32(static_cast(x)); } - -void GXParam1u8(const u8 x) { aurora::gfx::fifo::write_u8(static_cast(x)); } -void GXParam1u16(const u16 x) { aurora::gfx::fifo::write_u16(static_cast(x)); } -void GXParam1u32(const u32 x) { aurora::gfx::fifo::write_u32(static_cast(x)); } -void GXParam1s8(const s8 x) { aurora::gfx::fifo::write_u8(static_cast(x)); } -void GXParam1s16(const s16 x) { aurora::gfx::fifo::write_u16(static_cast(x)); } -void GXParam1s32(const s32 x) { aurora::gfx::fifo::write_u32(static_cast(x)); } -void GXParam1f32(const f32 x) { aurora::gfx::fifo::write_f32(x); } -void GXParam3f32(const f32 x, const f32 y, const f32 z) { - aurora::gfx::fifo::write_f32(x); - aurora::gfx::fifo::write_f32(y); - aurora::gfx::fifo::write_f32(z); -} -void GXParam4f32(const f32 x, const f32 y, const f32 z, const f32 w) { - aurora::gfx::fifo::write_f32(x); - aurora::gfx::fifo::write_f32(y); - aurora::gfx::fifo::write_f32(z); - aurora::gfx::fifo::write_f32(w); -} - -void GXMatrixIndex1u8(const u8 x) { aurora::gfx::fifo::write_u8(static_cast(x)); } - // Moved-in GX helpers and helpers for metrics/project void __GXSetSUTexSize() { - puts("__GXSetSUTexSize is a stub"); + STUB_LOG("__GXSetSUTexSize is a stub"); } // __GXSetVAT, __GXSetVCD, __GXUpdateBPMask: now provided by Aurora's GXManage.cpp (fifo branch) void GXSetGPMetric(GXPerf0 perf0, GXPerf1 perf1) { - // puts("GXSetGPMetric is a stub"); + // STUB_LOG("GXSetGPMetric is a stub"); } void GXReadGPMetric(u32* cnt0, u32* cnt1) { - // puts("GXReadGPMetric is a stub"); + // STUB_LOG("GXReadGPMetric is a stub"); } void GXClearGPMetric(void) { - // puts("GXClearGPMetric is a stub"); + // STUB_LOG("GXClearGPMetric is a stub"); } void GXReadMemMetric(u32* cp_req, u32* tc_req, u32* cpu_rd_req, u32* cpu_wr_req, u32* dsp_req, u32* io_req, u32* vi_req, u32* pe_req, u32* rf_req, u32* fi_req) { - // puts("GXReadMemMetric is a stub"); + // STUB_LOG("GXReadMemMetric is a stub"); } void GXClearMemMetric(void) { - // puts("GXClearMemMetric is a stub"); + // STUB_LOG("GXClearMemMetric is a stub"); } void GXClearVCacheMetric(void) { - // puts("GXClearVCacheMetric is a stub"); + // STUB_LOG("GXClearVCacheMetric is a stub"); } void GXReadPixMetric(u32* top_pixels_in, u32* top_pixels_out, u32* bot_pixels_in, u32* bot_pixels_out, u32* clr_pixels_in, u32* copy_clks) { - // puts("GXReadPixMetric is a stub"); + // STUB_LOG("GXReadPixMetric is a stub"); } void GXClearPixMetric(void) { - // puts("GXClearPixMetric is a stub"); + // STUB_LOG("GXClearPixMetric is a stub"); } void GXSetVCacheMetric(GXVCachePerf attr) { - // puts("GXSetVCacheMetric is a stub"); + // STUB_LOG("GXSetVCacheMetric is a stub"); } void GXReadVCacheMetric(u32* check, u32* miss, u32* stall) { - // puts("GXReadVCacheMetric is a stub"); + // STUB_LOG("GXReadVCacheMetric is a stub"); } void GXSetDrawSync(u16 token) { - // puts("GXSetDrawSync is a stub"); + // STUB_LOG("GXSetDrawSync is a stub"); } GXDrawSyncCallback GXSetDrawSyncCallback(GXDrawSyncCallback cb) { - puts("GXSetDrawSyncCallback is a stub"); + STUB_LOG("GXSetDrawSyncCallback is a stub"); return cb; } void GXDrawCylinder(u8 numEdges) { - puts("GXDrawCylinder is a stub"); + STUB_LOG("GXDrawCylinder is a stub"); } void GXWaitDrawDone(void) { - // puts("GXWaitDrawDone is a stub"); + // STUB_LOG("GXWaitDrawDone is a stub"); } void GXSetTevIndTile(GXTevStageID tev_stage, GXIndTexStageID ind_stage, u16 tilesize_s, u16 tilesize_t, u16 tilespacing_s, u16 tilespacing_t, GXIndTexFormat format, @@ -1585,83 +1379,57 @@ void GXSetTevIndTile(GXTevStageID tev_stage, GXIndTexStageID ind_stage, u16 tile // TODO } void GXResetWriteGatherPipe(void) { - // puts("GXResetWriteGatherPipe is a stub"); + // STUB_LOG("GXResetWriteGatherPipe is a stub"); } -void GXProject(f32 x, f32 y, f32 z, const f32 mtx[3][4], const f32* pm, const f32* vp, f32* sx, - f32* sy, f32* sz) { - Vec peye; - f32 xc; - f32 yc; - f32 zc; - f32 wc; - - peye.x = mtx[0][3] + ((mtx[0][2] * z) + ((mtx[0][0] * x) + (mtx[0][1] * y))); - peye.y = mtx[1][3] + ((mtx[1][2] * z) + ((mtx[1][0] * x) + (mtx[1][1] * y))); - peye.z = mtx[2][3] + ((mtx[2][2] * z) + ((mtx[2][0] * x) + (mtx[2][1] * y))); - if (pm[0] == 0.0f) { - xc = (peye.x * pm[1]) + (peye.z * pm[2]); - yc = (peye.y * pm[3]) + (peye.z * pm[4]); - zc = pm[6] + (peye.z * pm[5]); - wc = 1.0f / -peye.z; - } else { - xc = pm[2] + (peye.x * pm[1]); - yc = pm[4] + (peye.y * pm[3]); - zc = pm[6] + (peye.z * pm[5]); - wc = 1.0f; - } - *sx = (vp[2] / 2.0f) + (vp[0] + (wc * (xc * vp[2] / 2.0f))); - *sy = (vp[3] / 2.0f) + (vp[1] + (wc * (-yc * vp[3] / 2.0f))); - *sz = vp[5] + (wc * (zc * (vp[5] - vp[4]))); -} void GXAbortFrame(void) { - puts("GXAbortFrame is a stub"); + STUB_LOG("GXAbortFrame is a stub"); } // GXEnableTexOffsets: now provided by Aurora's GXGeometry.cpp (fifo branch) OSThread* GXGetCurrentGXThread(void) { - puts("GXGetCurrentGXThread is a stub"); + STUB_LOG("GXGetCurrentGXThread is a stub"); return NULL; } void* GXGetFifoBase(const GXFifoObj* fifo) { - puts("GXGetFifoBase is a stub"); + STUB_LOG("GXGetFifoBase is a stub"); return NULL; } u32 GXGetFifoSize(const GXFifoObj* fifo) { - puts("GXGetFifoSize is a stub"); + STUB_LOG("GXGetFifoSize is a stub"); return 0; } u16 GXGetNumXfbLines(u16 efbHeight, f32 yScale) { - puts("GXGetNumXfbLines is a stub"); + STUB_LOG("GXGetNumXfbLines is a stub"); return 0; } void GXGetViewportv(f32* vp) { - puts("GXGetViewportv is a stub"); + STUB_LOG("GXGetViewportv is a stub"); } void GXGetScissor(u32* left, u32* top, u32* wd, u32* ht) { - puts("GXGetScissor is a stub"); + STUB_LOG("GXGetScissor is a stub"); } u32 GXGetTexObjTlut(const GXTexObj* tex_obj) { - puts("GXGetTexObjTlut is a stub"); + STUB_LOG("GXGetTexObjTlut is a stub"); return 0; } f32 GXGetYScaleFactor(u16 efbHeight, u16 xfbHeight) { - puts("GXGetYScaleFactor is a stub"); + STUB_LOG("GXGetYScaleFactor is a stub"); return 0.0f; } -void GXInitTexCacheRegion(GXTexRegion* region, u8 is_32b_mipmap, u32 tmem_even, +void GXInitTexCacheRegion(GXTexRegion* region, GXBool is_32b_mipmap, u32 tmem_even, GXTexCacheSize size_even, u32 tmem_odd, GXTexCacheSize size_odd) { - puts("GXInitTexCacheRegion is a stub"); + STUB_LOG("GXInitTexCacheRegion is a stub"); } // XXX, this should be some struct? // GXRenderModeObj GXNtsc480IntDf; //GXRenderModeObj GXNtsc480Int; void GXPeekZ(u16 x, u16 y, u32* z) { - puts("GXPeekZ is a stub"); + STUB_LOG("GXPeekZ is a stub"); *z = 0; } void GXReadXfRasMetric(u32* xf_wait_in, u32* xf_wait_out, u32* ras_busy, u32* clocks) { - puts("GXReadXfRasMetric is a stub"); + STUB_LOG("GXReadXfRasMetric is a stub"); *xf_wait_in = 0; *xf_wait_out = 0; *ras_busy = 0; @@ -1669,104 +1437,104 @@ void GXReadXfRasMetric(u32* xf_wait_in, u32* xf_wait_out, u32* ras_busy, u32* cl } void GXSetCopyClamp(GXFBClamp clamp) { - puts("GXSetCopyClamp is a stub"); + STUB_LOG("GXSetCopyClamp is a stub"); } OSThread* GXSetCurrentGXThread(void) { - puts("GXSetCurrentGXThread is a stub"); + STUB_LOG("GXSetCurrentGXThread is a stub"); return NULL; } void GXSetMisc(GXMiscToken token, u32 val) { - puts("GXSetMisc is a stub"); + STUB_LOG("GXSetMisc is a stub"); } void GXSetProjectionv(const f32* ptr) { - puts("GXSetProjectionv is a stub"); + STUB_LOG("GXSetProjectionv is a stub"); } void GXSetVtxAttrFmtv(GXVtxFmt vtxfmt, const GXVtxAttrFmtList* list) { - puts("GXSetVtxAttrFmtv is a stub"); + STUB_LOG("GXSetVtxAttrFmtv is a stub"); } #pragma mark KPAD // is this actually used? extern "C" void KPADDisableDPD(s32) { - puts("KPADDisableDPD is a stub"); + STUB_LOG("KPADDisableDPD is a stub"); } extern "C" void KPADEnableDPD(s32) { - puts("KPADEnableDPD is a stub"); + STUB_LOG("KPADEnableDPD is a stub"); } // LC (consolidated above) void LCDisable(void) { - puts("LCDisable is a stub"); + STUB_LOG("LCDisable is a stub"); } void LCQueueWait(__REGISTER u32 len) { - puts("LCQueueWait is a stub"); + STUB_LOG("LCQueueWait is a stub"); } u32 LCStoreData(void* destAddr, void* srcAddr, u32 nBytes) { - puts("LCStoreData is a stub"); + STUB_LOG("LCStoreData is a stub"); return 0; } #pragma mark PPC Arch // MSR stuff? void PPCHalt() { - puts("PPCHalt is a stub"); + STUB_LOG("PPCHalt is a stub"); } extern "C" void PPCSync(void) { - // puts("PPCSync is a stub"); + // STUB_LOG("PPCSync is a stub"); } u32 PPCMfhid2() { - puts("PPCMfhid2 is a stub"); + STUB_LOG("PPCMfhid2 is a stub"); return 0; } u32 PPCMfmsr() { - puts("PPCMfmsr is a stub"); + STUB_LOG("PPCMfmsr is a stub"); return 0; } void PPCMtmsr(u32 newMSR) { - puts("PPCMtmsr is a stub"); + STUB_LOG("PPCMtmsr is a stub"); } #pragma mark WPAD // uh.. this is revolution include not dolphin? typedef void (*WPADExtensionCallback)(s32 chan, s32 devType); extern "C" WPADExtensionCallback WPADSetExtensionCallback(s32 chan, WPADExtensionCallback cb) { - puts("WPADSetExtensionCallback is a stub"); + STUB_LOG("WPADSetExtensionCallback is a stub"); return cb; } #pragma mark GF #include void GFSetZMode(u8 compare_enable, GXCompare func, u8 update_enable) { - puts("GFSetZMode is a stub"); + STUB_LOG("GFSetZMode is a stub"); } void GFSetGenMode2(u8 nTexGens, u8 nChans, u8 nTevs, u8 nInds, GXCullMode cm) { - puts("GFSetGenMode2 is a stub"); + STUB_LOG("GFSetGenMode2 is a stub"); } void GFSetTevColorS10(GXTevRegID reg, GXColorS10 color) { - puts("GFSetTevColorS10 is a stub"); + STUB_LOG("GFSetTevColorS10 is a stub"); } void GFSetBlendModeEtc(GXBlendMode type, GXBlendFactor src_factor, GXBlendFactor dst_factor, GXLogicOp logic_op, u8 color_update_enable, u8 alpha_update_enable, u8 dither_enable) { - puts("GFSetBlendModeEtc is a stub"); + STUB_LOG("GFSetBlendModeEtc is a stub"); } void GFSetChanAmbColor(GXChannelID chan, GXColor color) { - puts("GFSetChanAmbColor is a stub"); + STUB_LOG("GFSetChanAmbColor is a stub"); } void GFSetFog(GXFogType type, f32 startz, f32 endz, f32 nearz, f32 farz, GXColor color) { - puts("GFSetFog is a stub"); + STUB_LOG("GFSetFog is a stub"); } #pragma mark DEBUGPAD #include dDebugPad_c::dDebugPad_c() { - puts("constructing debug pad, stubbed?"); + STUB_LOG("constructing debug pad, stubbed?"); } #pragma mark f_ap @@ -1776,95 +1544,95 @@ u8 fapGm_HIO_c::mCaptureScreenDivH = 1; #pragma mark dMsgObject #include void dMsgObject_c::setWord(const char* i_word) { - puts("dMsgObject_c::setWord is a stub"); + STUB_LOG("dMsgObject_c::setWord is a stub"); } void dMsgObject_c::setSelectWord(int i_no, const char* i_word) { - puts("dMsgObject_c::setSelectWord is a stub"); + STUB_LOG("dMsgObject_c::setSelectWord is a stub"); } #pragma mark HIO #include -#include +#include BOOL HIO2Close(s32 handle) { - puts("HIO2Close is a stub"); + STUB_LOG("HIO2Close is a stub"); return FALSE; } BOOL HIO2EnumDevices(HIO2EnumCallback callback) { - puts("HIO2EnumDevices is a stub"); + STUB_LOG("HIO2EnumDevices is a stub"); return FALSE; } BOOL HIO2Init(void) { - puts("HIO2Init is a stub"); + STUB_LOG("HIO2Init is a stub"); return FALSE; } s32 HIO2Open(HIO2DeviceType type, HIO2UnkCallback exiCb, HIO2DisconnectCallback disconnectCb) { - puts("HIO2Open is a stub"); + STUB_LOG("HIO2Open is a stub"); return 0; } BOOL HIO2Read(s32 handle, u32 addr, void* buffer, s32 size) { - puts("HIO2Read is a stub"); + STUB_LOG("HIO2Read is a stub"); return FALSE; } BOOL HIO2Write(s32 handle, u32 addr, void* buffer, s32 size) { - puts("HIO2Write is a stub"); + STUB_LOG("HIO2Write is a stub"); return FALSE; } BOOL HIORead(u32 addr, void* buffer, s32 size) { - puts("HIORead is a stub"); + STUB_LOG("HIORead is a stub"); return FALSE; } BOOL HIOWrite(u32 addr, void* buffer, s32 size) { - puts("HIOWrite is a stub"); + STUB_LOG("HIOWrite is a stub"); return FALSE; } #pragma mark JHICommBuf #include void JHICommBufHeader::init() { - puts("JHICommBufHeader::init is a stub"); + STUB_LOG("JHICommBufHeader::init is a stub"); } int JHICommBufHeader::load() { - puts("JHICommBufHeader::load is a stub"); + STUB_LOG("JHICommBufHeader::load is a stub"); return 0; } int JHICommBufReader::read(void*, int) { - puts("JHICommBufReader::read is a stub"); + STUB_LOG("JHICommBufReader::read is a stub"); return 0; } void JHICommBufReader::readEnd() { - puts("JHICommBufReader::readEnd is a stub"); + STUB_LOG("JHICommBufReader::readEnd is a stub"); } int JHICommBufReader::readBegin() { - puts("JHICommBufReader::readBegin is a stub"); + STUB_LOG("JHICommBufReader::readBegin is a stub"); return 0; } int JHICommBufWriter::writeBegin() { - puts("JHICommBufWriter::writeBegin is a stub"); + STUB_LOG("JHICommBufWriter::writeBegin is a stub"); return 0; } int JHICommBufWriter::write(void*, int) { - puts("JHICommBufWriter::write is a stub"); + STUB_LOG("JHICommBufWriter::write is a stub"); return 0; } void JHICommBufWriter::writeEnd() { - puts("JHICommBufWriter::writeEnd is a stub"); + STUB_LOG("JHICommBufWriter::writeEnd is a stub"); } u32 JHICommBufReader::Header::getReadableSize() const { - puts("JHICommBufReader::Header::getReadableSize is a stub"); + STUB_LOG("JHICommBufReader::Header::getReadableSize is a stub"); return 0; } diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 2bc28c2014..f2e2d839c2 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -3,6 +3,11 @@ * Actor Manager */ +#if TARGET_PC +#define PROCS_DUMP_NAMES 1 +#include "d/d_procname.h" +#endif + #include "d/dolzel.h" // IWYU pragma: keep #include "JSystem/J3DGraphBase/J3DMaterial.h" @@ -727,6 +732,18 @@ u8 var_r30 = fopAcM::HeapAdjustEntry; #endif fopAcM::HeapAdjustUnk = var_r31; fopAcM::HeapAdjustEntry = var_r30; + +#if TARGET_PC + char buf[32]; + snprintf( + buf, + sizeof(buf), + "Actor %d (%s)", + i_actor->id, + GetProcName(i_actor->profname)); + JKRHEAP_NAME(i_actor->heap, buf); +#endif + return result; } @@ -895,7 +912,7 @@ bool fopAcM_checkCullingBox(Mtx m, f32 x1, f32 y1, f32 z1, f32 x2, f32 y2, f32 z return false; } -static cull_box l_cullSizeBox[] = { +cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e] = { { {-40.0f, 0.0f, -40.0f}, {40.0f, 125.0f, 40.0f}, @@ -960,7 +977,7 @@ static cull_box l_cullSizeBox[] = { #endif }; -static cull_sphere l_cullSizeSphere[] = { +cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e] = { { {0.0f, 0.0f, 0.0f}, 80.0f, diff --git a/src/f_op/f_op_kankyo.cpp b/src/f_op/f_op_kankyo.cpp index c65007622a..2e0563f2c9 100644 --- a/src/f_op/f_op_kankyo.cpp +++ b/src/f_op/f_op_kankyo.cpp @@ -12,8 +12,8 @@ static int fopKy_KANKYO_TYPE; -void fopKy_IsKankyo(void* i_this) { - fpcM_IsJustType(fopKy_KANKYO_TYPE, ((kankyo_class*)i_this)->type); +BOOL fopKy_IsKankyo(void* i_this) { + return fpcM_IsJustType(fopKy_KANKYO_TYPE, ((kankyo_class*)i_this)->type); } static int fopKy_Draw(void* i_this) { diff --git a/src/f_op/f_op_kankyo_mng.cpp b/src/f_op/f_op_kankyo_mng.cpp index 0093173817..fe71a828c2 100644 --- a/src/f_op/f_op_kankyo_mng.cpp +++ b/src/f_op/f_op_kankyo_mng.cpp @@ -11,8 +11,8 @@ void dummy(fpcLyIt_JudgeFunc i_createFunc, void* i_this) { fpcM_Search(i_createFunc, i_this); } -void fopKyM_IsKy(void* i_this) { - fopKy_IsKankyo((fopKyM_prm_class*)i_this); +BOOL fopKyM_IsKy(void* i_this) { + return fopKy_IsKankyo((fopKyM_prm_class*)i_this); } fopKyM_prm_class* fopKyM_CreateAppend() { diff --git a/src/f_pc/f_pc_base.cpp b/src/f_pc/f_pc_base.cpp index 8e2e3f6a5e..edd8a842f4 100644 --- a/src/f_pc/f_pc_base.cpp +++ b/src/f_pc/f_pc_base.cpp @@ -2,6 +2,7 @@ * f_pc_base.cpp * Framework - Process Base */ +#define PROCS_DUMP_NAMES 1 #include "f_pc/f_pc_base.h" #include "SSystem/SComponent/c_malloc.h" @@ -16,6 +17,21 @@ #include "Z2AudioLib/Z2AudioMgr.h" #include +#if TARGET_PC +#include "d/d_procname.h" + +static const char* getProcName(s16 id) { + for (auto procName : procNames) { + if (procName.id == id) { + return procName.name; + } + } + + return nullptr; +} + +#endif + BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB) { if (i_typeB == i_typeA) { return TRUE; @@ -119,8 +135,8 @@ base_process_class* fpcBs_Create(s16 i_profname, fpc_ProcID i_procID, void* i_ap u32 size; pprofile = (process_profile_definition*)fpcPf_Get(i_profname); - printf("[DIAG] fpcBs_Create: profname=%d profile=%p procSize=%d unkSize=%d\n", - i_profname, pprofile, pprofile->process_size, pprofile->unk_size); fflush(stdout); + printf("[DIAG] fpcBs_Create: pid=%d profname=%s (%d) profile=%p procSize=%d unkSize=%d\n", + i_procID, getProcName(i_profname), i_profname, pprofile, pprofile->process_size, pprofile->unk_size); fflush(stdout); size = pprofile->process_size + pprofile->unk_size; pprocess = (base_process_class*)cMl::memalignB(-4, size); @@ -171,3 +187,9 @@ int fpcBs_SubCreate(base_process_class* i_proc) { return cPhs_ERROR_e; } } + +#if !__MWERKS__ +base_process_class::~base_process_class() { + // Nada. Only exists to ensure the base class has a vtable. +} +#endif diff --git a/src/f_pc/f_pc_leaf.cpp b/src/f_pc/f_pc_leaf.cpp index c3ab1e6c73..eab6532a92 100644 --- a/src/f_pc/f_pc_leaf.cpp +++ b/src/f_pc/f_pc_leaf.cpp @@ -42,7 +42,7 @@ int fpcLf_Delete(leafdraw_class* i_leaf) { int ret = fpcMtd_Delete(&i_leaf->leaf_methods->base, i_leaf); UNUSED(ret); // possible fakematch? this line fixes debug regalloc if (ret == 1) { - i_leaf->base.subtype = 0; + LEAFDRAW_BASE(i_leaf).subtype = 0; } return ret; } @@ -50,10 +50,10 @@ int fpcLf_Delete(leafdraw_class* i_leaf) { int g_fpcLf_type; int fpcLf_Create(leafdraw_class* i_leaf) { - if (i_leaf->base.state.init_state == 0) { - leaf_process_profile_definition* pprofile = (leaf_process_profile_definition*)i_leaf->base.profile; + if (LEAFDRAW_BASE(i_leaf).state.init_state == 0) { + leaf_process_profile_definition* pprofile = (leaf_process_profile_definition*)LEAFDRAW_BASE(i_leaf).profile; i_leaf->leaf_methods = pprofile->sub_method; - i_leaf->base.subtype = fpcBs_MakeOfType(&g_fpcLf_type); + LEAFDRAW_BASE(i_leaf).subtype = fpcBs_MakeOfType(&g_fpcLf_type); fpcDwPi_Init(&i_leaf->draw_priority, pprofile->priority); i_leaf->unk_0xBC = 0; } diff --git a/src/f_pc/f_pc_stdcreate_req.cpp b/src/f_pc/f_pc_stdcreate_req.cpp index 4ea132ed73..fa8ac20ae6 100644 --- a/src/f_pc/f_pc_stdcreate_req.cpp +++ b/src/f_pc/f_pc_stdcreate_req.cpp @@ -9,8 +9,13 @@ #include "f_pc/f_pc_manager.h" #include "f_pc/f_pc_debug_sv.h" #include "SSystem/SComponent/c_phase.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #include +#include "os_report.h" typedef struct standard_create_request_class { /* 0x00 */ create_request base; @@ -63,7 +68,7 @@ int fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_request) { int ret = fpcBs_SubCreate(i_request->base.process); static int sSubCreateLogCount = 0; if (sSubCreateLogCount < 20) { - printf("[DIAG] fpcSCtRq_phase_SubCreateProcess: procName=%d ret=%d\n", i_request->process_name, ret); fflush(stdout); + printf("[DIAG] fpcSCtRq_phase_SubCreateProcess: pid=%d procName=%04x ret=%d\n", i_request->base.id, i_request->process_name, ret); fflush(stdout); sSubCreateLogCount++; } diff --git a/src/m_Do/m_Do_DVDError.cpp b/src/m_Do/m_Do_DVDError.cpp index 0706d0a851..4984ea22c7 100644 --- a/src/m_Do/m_Do_DVDError.cpp +++ b/src/m_Do/m_Do_DVDError.cpp @@ -4,11 +4,11 @@ */ #include "m_Do/m_Do_DVDError.h" -#include #include "JSystem/JKernel/JKRAssertHeap.h" -#include "m_Do/m_Do_Reset.h" +#include #include "m_Do/m_Do_dvd_thread.h" #include "m_Do/m_Do_ext.h" +#include "m_Do/m_Do_Reset.h" // Added for the sleep workaround #include diff --git a/src/m_Do/m_Do_MemCard.cpp b/src/m_Do/m_Do_MemCard.cpp index 29c72ac187..0241677e6e 100644 --- a/src/m_Do/m_Do_MemCard.cpp +++ b/src/m_Do/m_Do_MemCard.cpp @@ -3,12 +3,13 @@ * Memory Card Control */ -#include +#include #include "m_Do/m_Do_MemCard.h" #include "JSystem/JKernel/JKRAssertHeap.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_MemCardRWmng.h" #include "m_Do/m_Do_Reset.h" +#include "os_report.h" #if PLATFORM_WII || PLATFORM_SHIELD #include diff --git a/src/m_Do/m_Do_Reset.cpp b/src/m_Do/m_Do_Reset.cpp index e2a062d204..c3a5fea739 100644 --- a/src/m_Do/m_Do_Reset.cpp +++ b/src/m_Do/m_Do_Reset.cpp @@ -8,7 +8,7 @@ #include "JSystem/JUtility/JUTGamePad.h" #include "JSystem/JUtility/JUTXfb.h" #include "SSystem/SComponent/c_API_controller_pad.h" -#include +#include #include "m_Do/m_Do_audio.h" #include "m_Do/m_Do_DVDError.h" #include "m_Do/m_Do_ext.h" @@ -17,6 +17,7 @@ #if !PLATFORM_GCN #include #endif +#include "os_report.h" static void my_OSCancelAlarmAll() {} diff --git a/src/m_Do/m_Do_audio.cpp b/src/m_Do/m_Do_audio.cpp index 231c818438..fc386bda88 100644 --- a/src/m_Do/m_Do_audio.cpp +++ b/src/m_Do/m_Do_audio.cpp @@ -22,7 +22,7 @@ u8 mDoAud_zelAudio_c::mInitFlag; u8 mDoAud_zelAudio_c::mResetFlag; -bool mDoAud_zelAudio_c::mBgmSet; +u8 mDoAud_zelAudio_c::mBgmSet; void mDoAud_zelAudio_c::reset() { mBgmSet = false; @@ -45,6 +45,8 @@ static void dummy() { #endif static void mDoAud_Create() { + DUSK_AUDIO_SKIP() + if (l_affCommand == NULL) { #if DEBUG if (!mDoRst::getLogoScnFlag()) { @@ -154,6 +156,8 @@ static void mDoAud_Create() { } void mDoAud_Execute() { + DUSK_AUDIO_SKIP() + if (!mDoAud_zelAudio_c::isInitFlag()) { if (!mDoRst::isShutdown() && !mDoRst::isReturnToMenu()) { mDoAud_Create(); @@ -188,23 +192,28 @@ void mDoAud_Execute() { } void mDoAud_setSceneName(char const* spot, s32 room, s32 layer) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setSceneName((char*)spot, room, layer); } s32 mDoAud_load1stDynamicWave() { + DUSK_AUDIO_SKIP(1) Z2AudioMgr::getInterface()->load1stDynamicWave(); return 1; } void mDoAud_setFadeOutStart(u8 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setFadeOutStart((u8)param_0); } void mDoAud_setFadeInStart(u8 param_0) { + DUSK_AUDIO_SKIP() Z2AudioMgr::getInterface()->setFadeInStart((u8)param_0); } void mDoAud_resetProcess() { + DUSK_AUDIO_SKIP() if (!mDoAud_zelAudio_c::isResetFlag()) { Z2AudioMgr::getInterface()->resetProcess(0x1E, false); mDoAud_zelAudio_c::onResetFlag(); diff --git a/src/m_Do/m_Do_dvd_thread.cpp b/src/m_Do/m_Do_dvd_thread.cpp index 999e01bb38..6a7e4a8bcf 100644 --- a/src/m_Do/m_Do_dvd_thread.cpp +++ b/src/m_Do/m_Do_dvd_thread.cpp @@ -13,6 +13,7 @@ #include "m_Do/m_Do_Reset.h" #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_ext.h" +#include "os_report.h" s32 mDoDvdThd::main(void* param_0) { JKRThread(OSGetCurrentThread(), 0); diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index cb9dc7fb80..6b438fa5c0 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -5,8 +5,8 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include -#include +#include +#include #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" #include "JSystem/J3DGraphBase/J3DDrawBuffer.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" @@ -670,6 +670,7 @@ static JKRExpHeap* DbPrintHeap; JKRExpHeap* mDoExt_createDbPrintHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1693, DbPrintHeap == NULL || heapSize == 0); DbPrintHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(DbPrintHeap, "DbPrintHeap"); return DbPrintHeap; } @@ -683,6 +684,7 @@ static intptr_t safeGameHeapSize = -1; JKRExpHeap* mDoExt_createGameHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1739, gameHeap == NULL || heapSize == 0); gameHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(gameHeap, "gameHeap"); gameHeap->setAllocationMode(JKRExpHeap::ALLOC_MODE_1); return gameHeap; } @@ -715,6 +717,7 @@ intptr_t safeZeldaHeapSize = -1; JKRExpHeap* mDoExt_createZeldaHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1815, zeldaHeap == NULL || heapSize == 0); zeldaHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(zeldaHeap, "zeldaHeap"); return zeldaHeap; } @@ -748,6 +751,7 @@ intptr_t safeCommandHeapSize = -1; JKRExpHeap* mDoExt_createCommandHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1894, commandHeap == 0 || heapSize == 0); commandHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(commandHeap, "commandHeap"); return commandHeap; } @@ -774,6 +778,7 @@ intptr_t safeArchiveHeapSize = -1; JKRExpHeap* mDoExt_createArchiveHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1966, archiveHeap == 0 || heapSize == 0); archiveHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(archiveHeap, "archiveHeap"); archiveHeap->setAllocationMode(JKRExpHeap::ALLOC_MODE_1); return archiveHeap; } @@ -811,6 +816,7 @@ intptr_t safeJ2dHeapSize = -1; JKRExpHeap* mDoExt_createJ2dHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(2059, j2dHeap == 0 || heapSize == 0); j2dHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(j2dHeap, "j2dHeap"); j2dHeap->setAllocationMode(JKRExpHeap::ALLOC_MODE_1); return j2dHeap; } @@ -843,6 +849,7 @@ static JKRExpHeap* HostIOHeap; JKRHeap* mDoExt_createHostIOHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(2142, HostIOHeap == 0 || heapSize == 0); HostIOHeap = JKRExpHeap::create(heapSize, parentHeap, true); + JKRHEAP_NAME(HostIOHeap, "HostIOHeap"); return HostIOHeap; } @@ -1729,6 +1736,10 @@ void mDoExt_McaMorfSO::setAnm(J3DAnmTransform* i_anm, int i_attr, f32 i_morf, f3 setLoopFrame(getFrame()); setMorf(i_morf); +#if TARGET_PC + puts("We don't know why, but initAnime doesn't work"); + return; +#endif if (mpSound != NULL) { if (i_anm != NULL) { mpBas = static_cast(i_anm)->getBas(); @@ -2265,45 +2276,48 @@ int mDoExt_3Dline_c::init(u16 param_0, int param_1, BOOL param_2) { int sp20 = param_0 * 2; - field_0x8 = new cXyz[sp20]; + field_0x8[0] = new cXyz[sp20]; if (field_0x8 == NULL) { return 0; } - field_0xc = new cXyz[sp20]; - if (field_0xc == NULL) { + field_0x8[1] = new cXyz[sp20]; + if (field_0x8[1] == NULL) { return 0; } - field_0x10 = new mDoExt_3Dline_field_0x10_c[sp20]; + field_0x10[0] = new mDoExt_3Dline_field_0x10_c[sp20]; if (field_0x10 == NULL) { return 0; } - field_0x14 = new mDoExt_3Dline_field_0x10_c[sp20]; - if (field_0x14 == NULL) { + field_0x10[1] = new mDoExt_3Dline_field_0x10_c[sp20]; + if (field_0x10[1] == NULL) { return 0; } if (param_2) { - field_0x18 = new mDoExt_3Dline_field_0x18_c[sp20]; - if (field_0x18 == NULL) { + field_0x18[0] = new cXy[sp20]; + if (field_0x18[0] == NULL) { return 0; } - field_0x1c = new mDoExt_3Dline_field_0x18_c[sp20]; - if (field_0x1c == NULL) { + field_0x18[1] = new cXy[sp20]; + if (field_0x18[1] == NULL) { return 0; } - mDoExt_3Dline_field_0x18_c* var_r28 = field_0x18; - mDoExt_3Dline_field_0x18_c* var_r27 = field_0x1c; + cXy* tex0 = field_0x18[0]; + cXy* tex1 = field_0x18[1]; for (s32 i = 0; i < param_0; i++) { - var_r28++->field_0x0 = 0.0f; - var_r27++->field_0x0 = 0.0f; + tex0[0].x = 0.0f; + tex1[0].x = 0.0f; - var_r28++->field_0x0 = 1.0f; - var_r27++->field_0x0 = 1.0f; + tex0[1].x = 1.0f; + tex1[1].x = 1.0f; + + tex0 += 2; + tex1 += 2; } } @@ -2368,8 +2382,8 @@ void mDoExt_3DlineMat0_c::draw() { int var_r26 = (field_0x14 << 1) & 0xFFFF; for (int i = 0; i < field_0x10; i++) { - GXSetArray(GX_VA_POS, ((mDoExt_3Dline_c*)((intptr_t)var_r28 + field_0x16 * 4))->field_0x8, sizeof(cXyz)); - GXSetArray(GX_VA_NRM, ((mDoExt_3Dline_c*)((intptr_t)var_r28 + field_0x16 * 4))->field_0x10, 3); + GXSETARRAY(GX_VA_POS, field_0x18->field_0x8[field_0x16], sizeof(cXyz) * var_r26, sizeof(cXyz)); + GXSETARRAY(GX_VA_NRM, field_0x18->field_0x10[field_0x16], 3 * var_r26, 3); GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, var_r26); for (u16 j = 0; j < (u16)var_r26; j++) { @@ -2424,9 +2438,9 @@ void mDoExt_3DlineMat0_c::update(int param_0, f32 param_1, GXColor& param_2, u16 for (s32 sp_14 = 0; sp_14 < field_0x10; sp_14++) { local_r27 = sp_28->field_0x0; - sp_1c = ((mDoExt_3Dline_c*)((intptr_t)sp_28 + (field_0x16 << 2)))->field_0x8; + sp_1c = sp_28->field_0x8[field_0x16]; local_r26 = sp_1c; - sp_18 = ((mDoExt_3Dline_c*)((intptr_t)sp_28 + (field_0x16 << 2)))->field_0x10; + sp_18 = sp_28->field_0x10[field_0x16]; local_r30 = sp_18; local_r29 = local_r30 + 1; @@ -2545,9 +2559,9 @@ void mDoExt_3DlineMat0_c::update(int param_0, GXColor& param_2, dKy_tevstr_c* pa JUT_ASSERT(5445, size_p != NULL); - sp_20 = ((mDoExt_3Dline_c*)((intptr_t)sp_30 + (field_0x16 << 2)))->field_0x8; + sp_20 = sp_30->field_0x8[field_0x16]; sp_24 = sp_20; - sp_1c = ((mDoExt_3Dline_c*)((intptr_t)sp_30 + (field_0x16 << 2)))->field_0x10; + sp_1c = sp_30->field_0x10[field_0x16]; local_r30 = sp_1c; local_r29 = local_r30 + 1; @@ -2684,9 +2698,9 @@ void mDoExt_3DlineMat1_c::draw() { mDoExt_3Dline_c* lines = mpLines; u16 vert_num = field_0x34 << 1; for (s32 i = 0; i < mNumLines; i++) { - GXSetArray(GX_VA_POS, ((mDoExt_3Dline_c*)((intptr_t)lines + (mIsDrawn << 2)))->field_0x8, 0xC); - GXSetArray(GX_VA_NRM, ((mDoExt_3Dline_c*)((intptr_t) lines + (mIsDrawn << 2)))->field_0x10, 0x3); - GXSetArray(GX_VA_TEX0, ((mDoExt_3Dline_c*)((intptr_t)lines + (mIsDrawn << 2)))->field_0x18, 0x8); + GXSETARRAY(GX_VA_POS, ((mDoExt_3Dline_c*)((intptr_t)lines + (mIsDrawn << 2)))->field_0x8, vert_num * sizeof(cXyz), sizeof(cXyz)); + GXSETARRAY(GX_VA_NRM, ((mDoExt_3Dline_c*)((intptr_t) lines + (mIsDrawn << 2)))->field_0x10, vert_num * sizeof(mDoExt_3Dline_field_0x10_c), sizeof(mDoExt_3Dline_field_0x10_c)); + GXSETARRAY(GX_VA_TEX0, ((mDoExt_3Dline_c*)((intptr_t)lines + (mIsDrawn << 2)))->field_0x18, vert_num * sizeof(cXy), sizeof(cXy)); GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, vert_num); u16 j = 0; @@ -2706,7 +2720,7 @@ void mDoExt_3DlineMat1_c::draw() { mIsDrawn ^= (u8)1; } -void mDoExt_3DlineMat1_c::update(int param_0, f32 param_1, _GXColor& param_2, u16 param_3, +void mDoExt_3DlineMat1_c::update(int param_0, f32 param_1, GXColor& param_2, u16 param_3, dKy_tevstr_c* param_4) { mColor = param_2; this->mpTevStr = param_4; @@ -2738,29 +2752,28 @@ void mDoExt_3DlineMat1_c::update(int param_0, f32 param_1, _GXColor& param_2, u1 mDoExt_3Dline_field_0x10_c* local_r28; mDoExt_3Dline_field_0x10_c* sp_20; - mDoExt_3Dline_field_0x18_c* sp_1c; - - mDoExt_3Dline_field_0x18_c* sp_18; + cXy* sp_1c; + cXy* sp_18; f32 local_f29; f32 local_f31 = 0.0f; for (s32 sp_14 = 0; sp_14 < mNumLines; sp_14++) { local_r27 = sp_38[0].field_0x0; - sp_24 = ((mDoExt_3Dline_c*)((intptr_t)sp_38 + (mIsDrawn << 2)))->field_0x8; + sp_24 = sp_38->field_0x8[mIsDrawn]; sp_28 = sp_24; - sp_20 = ((mDoExt_3Dline_c*)((intptr_t)sp_38 + (mIsDrawn << 2)))->field_0x10; + sp_20 = sp_38->field_0x10[mIsDrawn]; local_r30 = sp_20; local_r28 = local_r30 + 1; - sp_18 = ((mDoExt_3Dline_c*)((intptr_t)sp_38 + (mIsDrawn << 2)))->field_0x18; + sp_18 = sp_38->field_0x18[mIsDrawn]; sp_1c = sp_18; local_f29 = param_1; - sp_1c++->field_0x4 = local_f31; - sp_1c++->field_0x4 = local_f31; + sp_1c++->y = local_f31; + sp_1c++->y = local_f31; sp_130 = local_r27[1] - local_r27[0]; f32 local_f30 = sp_130.abs(); @@ -2794,8 +2807,8 @@ void mDoExt_3DlineMat1_c::update(int param_0, f32 param_1, _GXColor& param_2, u1 local_f29 -= local_f27; } - sp_1c++->field_0x4 = local_f31; - sp_1c++->field_0x4 = local_f31; + sp_1c++->y = local_f31; + sp_1c++->y = local_f31; sp_130 = local_r27[1] - local_r27[0]; local_f30 = sp_130.abs(); @@ -2831,8 +2844,8 @@ void mDoExt_3DlineMat1_c::update(int param_0, f32 param_1, _GXColor& param_2, u1 sp_118 = local_r27[0] - sp_130; } - sp_1c++->field_0x4 = local_f31; - sp_1c->field_0x4 = local_f31; + sp_1c++->y = local_f31; + sp_1c->y = local_f31; local_r28 += 1; local_r28->x = local_r30->x; @@ -2875,7 +2888,7 @@ void mDoExt_3DlineMat2_c::setMaterial() { GXLoadNrmMtxImm(cMtx_getIdentity(), 0); } -void mDoExt_3DlineMat1_c::update(int param_0, _GXColor& param_2, dKy_tevstr_c* param_4) { +void mDoExt_3DlineMat1_c::update(int param_0, GXColor& param_2, dKy_tevstr_c* param_4) { mColor = param_2; this->mpTevStr = param_4; if (param_0 < 0) { @@ -2903,23 +2916,23 @@ void mDoExt_3DlineMat1_c::update(int param_0, _GXColor& param_2, dKy_tevstr_c* p mDoExt_3Dline_field_0x10_c* local_r30; mDoExt_3Dline_field_0x10_c* local_r28; mDoExt_3Dline_field_0x10_c* sp_20; - mDoExt_3Dline_field_0x18_c* sp_1c; - mDoExt_3Dline_field_0x18_c* sp_18; + cXy* sp_1c; + cXy* sp_18; f32 local_f31 = 0.0f; f32* size_p; for (s32 sp_14 = 0; sp_14 < mNumLines; sp_14++) { local_r27 = sp_38[0].field_0x0; size_p = sp_38->field_0x4; JUT_ASSERT(5875, size_p != NULL); - sp_24 = ((mDoExt_3Dline_c*)((intptr_t)sp_38 + (mIsDrawn << 2)))->field_0x8; + sp_24 = sp_38->field_0x8[mIsDrawn]; sp_28 = sp_24; - sp_20 = ((mDoExt_3Dline_c*)((intptr_t)sp_38 + (mIsDrawn << 2)))->field_0x10; + sp_20 = sp_38->field_0x10[mIsDrawn]; local_r30 = sp_20; local_r28 = local_r30 + 1; - sp_18 = ((mDoExt_3Dline_c*)((intptr_t)sp_38 + (mIsDrawn << 2)))->field_0x18; + sp_18 = sp_38->field_0x18[mIsDrawn]; sp_1c = sp_18; - sp_1c++->field_0x4 = local_f31; - sp_1c++->field_0x4 = local_f31; + sp_1c++->y = local_f31; + sp_1c++->y = local_f31; sp_130 = local_r27[1] - local_r27[0]; local_f30 = sp_130.abs(); local_f31 += local_f30 * 0.1f; @@ -2940,8 +2953,8 @@ void mDoExt_3DlineMat1_c::update(int param_0, _GXColor& param_2, dKy_tevstr_c* p sp_124 = local_r27[0] + sp_130; sp_118 = local_r27[0] - sp_130; for (s32 sp_10 = field_0x34 - 2; sp_10 > 0; sp_10--) { - sp_1c++->field_0x4 = local_f31; - sp_1c++->field_0x4 = local_f31; + sp_1c++->y = local_f31; + sp_1c++->y = local_f31; sp_130 = local_r27[1] - local_r27[0]; local_f30 = sp_130.abs(); local_f31 += local_f30 * 0.1f; @@ -2967,8 +2980,8 @@ void mDoExt_3DlineMat1_c::update(int param_0, _GXColor& param_2, dKy_tevstr_c* p sp_118 = local_r27[0] - sp_130; } - sp_1c++->field_0x4 = local_f31; - sp_1c->field_0x4 = local_f31; + sp_1c++->y = local_f31; + sp_1c->y = local_f31; local_r28 += 1; local_r28->x = local_r30->x; @@ -3020,7 +3033,7 @@ mDoExt_cube8pPacket::mDoExt_cube8pPacket(cXyz* i_points, const GXColor& i_color) } void drawCube(MtxP mtx, cXyz* pos, const GXColor& color) { - GXSetArray(GX_VA_POS, pos, sizeof(cXyz)); + GXSETARRAY(GX_VA_POS, pos, sizeof(*pos), sizeof(*pos)); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); GXClearVtxDesc(); GXSetVtxDesc(GX_VA_POS, GX_INDEX8); @@ -3099,7 +3112,7 @@ mDoExt_quadPacket::mDoExt_quadPacket(cXyz* i_points, const GXColor& i_color, u8 } void mDoExt_quadPacket::draw() { - GXSetArray(GX_VA_POS, mPoints, sizeof(cXyz)); + GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz)); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); GXClearVtxDesc(); GXSetVtxDesc(GX_VA_POS, GX_INDEX8); @@ -3151,7 +3164,7 @@ mDoExt_trianglePacket::mDoExt_trianglePacket(cXyz* i_points, const GXColor& i_co void mDoExt_trianglePacket::draw() { j3dSys.reinitGX(); - GXSetArray(GX_VA_POS, mPoints, sizeof(cXyz)); + GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz)); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); GXClearVtxDesc(); GXSetVtxDesc(GX_VA_POS, GX_INDEX8); diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index 54a89adbdb..eb41c7dfd5 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -22,7 +22,7 @@ #include "d/d_menu_collect.h" #include "d/d_jcam_editor.h" #include "d/d_jpreviewer.h" -#include +#include #include "f_ap/f_ap_game.h" #include "f_op/f_op_camera_mng.h" #include "m_Do/m_Do_controller_pad.h" @@ -44,6 +44,11 @@ #include "d/d_cursor_mng.h" #endif +#if TARGET_PC +#include "dusk/imgui.h" +#include "dusk/dusk.h" +#endif + class mDoGph_HIO_c : public JORReflexible { public: mDoGph_HIO_c() { @@ -241,12 +246,12 @@ static ResTIMG* createTimg(u16 width, u16 height, u32 format) { cLib_memSet(timg, 0, bufferSize); timg->format = format; timg->alphaEnabled = false; - timg->width = RES_U16(width); - timg->height = RES_U16(height); + timg->width = width; + timg->height = height; timg->minFilter = GX_LINEAR; timg->magFilter = GX_LINEAR; timg->mipmapCount = 1; - timg->imageOffset = RES_U32(0x20); + timg->imageOffset = 0x20; return timg; } @@ -2128,6 +2133,10 @@ int mDoGph_Painter() { JAWExtSystem::draw(); #endif +#if TARGET_PC + imgui_main(&auroraInfo); +#endif + mDoGph_gInf_c::endRender(); #if WIDESCREEN_SUPPORT diff --git a/src/m_Do/m_Do_hostIO.cpp b/src/m_Do/m_Do_hostIO.cpp index 286a942110..6a3347efb5 100644 --- a/src/m_Do/m_Do_hostIO.cpp +++ b/src/m_Do/m_Do_hostIO.cpp @@ -1,6 +1,10 @@ #include "m_Do/m_Do_hostIO.h" #include "JSystem/JHostIO/JORServer.h" -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif #if DEBUG diff --git a/src/m_Do/m_Do_lib.cpp b/src/m_Do/m_Do_lib.cpp index 3b8e5accdd..261a7db1f5 100644 --- a/src/m_Do/m_Do_lib.cpp +++ b/src/m_Do/m_Do_lib.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphBase/J3DMatBlock.h" #include "SSystem/SComponent/c_math.h" #include "d/d_com_inf_game.h" -#include +#include u32 mDoLib_setResTimgObj(ResTIMG const* i_img, GXTexObj* o_texObj, u32 tlut_name, GXTlutObj* o_tlutObj) { diff --git a/src/m_Do/m_Do_machine.cpp b/src/m_Do/m_Do_machine.cpp index 9fbf2ae305..13c55de871 100644 --- a/src/m_Do/m_Do_machine.cpp +++ b/src/m_Do/m_Do_machine.cpp @@ -27,6 +27,7 @@ #include "m_Do/m_Do_machine_exception.h" #include "m_Do/m_Do_main.h" #include "DynamicLink.h" +#include "os_report.h" #if !PLATFORM_GCN #include diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 66727e5c32..b4d440b6bf 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -45,6 +45,7 @@ #include #include "SSystem/SComponent/c_API.h" #include "dusk/dvd_emu.h" +#include "dusk/dusk.h" #include #include @@ -56,7 +57,11 @@ OSTime mDoMain::sPowerOnTime; OSTime mDoMain::sHungUpTime; u32 mDoMain::memMargin = 0xFFFFFFFF; char mDoMain::COPYDATE_STRING[18] = "??/??/?? ??:??:??"; +#if TARGET_PC +const int audioHeapSize = 0x14D800 * 2; +#else const int audioHeapSize = 0x14D800; +#endif // --- PC LOGGING CALLBACK --- void aurora_log_callback(AuroraLogLevel level, const char* module, const char* message, @@ -128,6 +133,8 @@ s32 LOAD_COPYDATE(void*) { return 1; } +AuroraInfo auroraInfo; + void main01(void) { OS_REPORT("\x1b[m"); GXSetColorUpdate(GX_ENABLE); @@ -156,7 +163,13 @@ void main01(void) { OSReport("Calling cDyl_InitAsync()...\n"); cDyl_InitAsync(); - mDoAud_zelAudio_c::onInitFlag(); + g_mDoAud_audioHeap = JKRCreateSolidHeap(audioHeapSize, JKRGetCurrentHeap(), false); + JKRHEAP_NAME(g_mDoAud_audioHeap, "g_mDoAud_audioHeap"); + + if (DUSK_AUDIO_DISABLED) { + // Pretend the audio engine initialized already. This is a lie, but needed to boot. + mDoAud_zelAudio_c::onInitFlag(); + } OSReport("Entering Main Loop (main01)...\n"); @@ -164,8 +177,18 @@ void main01(void) { do { // 1. Update Window Events const AuroraEvent* event = aurora_update(); - if (event && event->type == AURORA_EXIT) - break; + while (true) { + switch (event->type) { + case AURORA_NONE: + goto eventsDone; + case AURORA_EXIT: + goto exit; + } + + event++; + } + + eventsDone:; static u32 frame = 0; frame++; @@ -190,6 +213,8 @@ void main01(void) { std::this_thread::sleep_for(std::chrono::milliseconds(16)); } while (true); + + exit:; } // ========================================================================= @@ -206,19 +231,12 @@ int game_main(int argc, char* argv[]) { config.windowHeight = 480; config.configPath = "."; config.logCallback = &aurora_log_callback; + config.mem1Size = 256 * 1024 * 1024; + config.mem2Size = 24 * 1024 * 1024; - aurora_initialize(argc, argv, &config); + auroraInfo = aurora_initialize(argc, argv, &config); - // 2. Setup Virtual Game RAM - // Simulates Gamecube RAM (24MB + Audio etc, we take 256MB) -#define GAME_RAM_SIZE (256 * 1024 * 1024) - void* virtualGameRam = calloc(1, GAME_RAM_SIZE); - if (!virtualGameRam) { - printf("Fatal: Failed to allocate game RAM\n"); - return -1; - } - OSSetArenaLo(virtualGameRam); - OSSetArenaHi((char*)virtualGameRam + GAME_RAM_SIZE); + OSInit(); // 3. Init DVD Emulation DvdEmu::setBasePath("data"); @@ -244,7 +262,6 @@ int game_main(int argc, char* argv[]) { main01(); aurora_shutdown(); - free(virtualGameRam); return 0; } diff --git a/src/m_Do/m_Do_mtx.cpp b/src/m_Do/m_Do_mtx.cpp index 3b8bcd137e..e0df166e8e 100644 --- a/src/m_Do/m_Do_mtx.cpp +++ b/src/m_Do/m_Do_mtx.cpp @@ -10,6 +10,7 @@ #include "SSystem/SComponent/c_m3d.h" #include "SSystem/SComponent/c_math.h" #include "global.h" +#include "os_report.h" Mtx mDoMtx_stack_c::now; diff --git a/src/m_Do/m_Do_printf.cpp b/src/m_Do/m_Do_printf.cpp index 05f9afcc0b..f4ef1fad00 100644 --- a/src/m_Do/m_Do_printf.cpp +++ b/src/m_Do/m_Do_printf.cpp @@ -5,8 +5,11 @@ #include "m_Do/m_Do_printf.h" #include -#include +#include #include "m_Do/m_Do_ext.h" +#if TARGET_PC +#include +#endif u8 __OSReport_disable; diff --git a/src/odemuexi2/DebuggerDriver.c b/src/odemuexi2/DebuggerDriver.c index 2102bb8e16..d8821f5ce3 100644 --- a/src/odemuexi2/DebuggerDriver.c +++ b/src/odemuexi2/DebuggerDriver.c @@ -1,7 +1,7 @@ #include "odemuexi2/DebuggerDriver.h" -#include -#include +#include +#include static MTRCallbackType MTRCallback; diff --git a/src/odenotstub/odenotstub.c b/src/odenotstub/odenotstub.c index 48e09dbd05..282962e911 100644 --- a/src/odenotstub/odenotstub.c +++ b/src/odenotstub/odenotstub.c @@ -1,4 +1,8 @@ -#include +#ifdef __REVOLUTION_SDK__ +#include +#else +#include +#endif u8 Hu_IsStub() { return 0; diff --git a/tools/project.py b/tools/project.py index b1417ae69a..f51482d98e 100644 --- a/tools/project.py +++ b/tools/project.py @@ -68,6 +68,7 @@ class Object: "shift_jis": None, "source": name, "src_dir": None, + "strip_prefix": None, } self.options.update(options) @@ -115,10 +116,13 @@ class Object: # Resolve paths build_dir = config.out_path() - obj.src_path = Path(obj.options["src_dir"]) / obj.options["source"] + source = obj.options["source"] + if obj.options["strip_prefix"]: + source = source.removeprefix(obj.options["strip_prefix"]) + obj.src_path = Path(obj.options["src_dir"]) / source if obj.options["asm_dir"] is not None: obj.asm_path = ( - Path(obj.options["asm_dir"]) / obj.options["source"] + Path(obj.options["asm_dir"]) / source ).with_suffix(".s") base_name = Path(self.name).with_suffix("") obj.src_obj_path = build_dir / "src" / f"{base_name}.o" @@ -356,14 +360,13 @@ def make_flags_str(flags: Optional[List[str]]) -> str: return " ".join(flags) -def get_pch_out_name(config: ProjectConfig, pch: PrecompiledHeader) -> str: - pch_rel_path = Path(pch["source"]) - pch_out_name = pch_rel_path.with_suffix(".mch") +def get_pch_out_path(config: ProjectConfig, pch: PrecompiledHeader) -> str: + pch_rel_path = Path(pch["output"]) # Use absolute path as a workaround to allow this target to be matched with absolute paths in depfiles. # # Without this any object which includes the PCH would depend on the .mch filesystem entry but not the # corresponding Ninja task, so the MCH would not be implicitly rebuilt when the PCH is modified. - return os.path.abspath(config.out_path() / "include" / pch_out_name) + return os.path.abspath(config.out_path() / "include" / pch_rel_path) # Unit configuration @@ -863,7 +866,7 @@ def generate_build_ninja( # Add all build steps needed before we compile (e.g. processing assets) pch_out_names = [ - get_pch_out_name(config, pch) for pch in config.precompiled_headers or [] + get_pch_out_path(config, pch) for pch in config.precompiled_headers or [] ] write_custom_step("pre-compile", extra_inputs=pch_out_names) @@ -967,14 +970,12 @@ def generate_build_ninja( if config.precompiled_headers: for pch in config.precompiled_headers: - src_path_rel_str = Path(pch["source"]) - src_path_rel = Path(src_path_rel_str) - pch_out_name = src_path_rel.with_suffix(".mch") - pch_out_abs_path = Path(get_pch_out_name(config, pch)) + src_path = Path(pch["source"]) + pch_out_abs_path = Path(get_pch_out_path(config, pch)) # Add appropriate language flag if it doesn't exist already cflags = pch["cflags"] if not any(flag.startswith("-lang") for flag in cflags): - if file_is_cpp(src_path_rel): + if file_is_cpp(src_path): cflags.insert(0, "-lang=c++") else: cflags.insert(0, "-lang=c") @@ -982,11 +983,11 @@ def generate_build_ninja( cflags_str = make_flags_str(cflags) shift_jis = pch.get("shift_jis", config.shift_jis) - n.comment(f"Precompiled header {pch_out_name}") + n.comment(f"Precompiled header {pch['output']}") n.build( outputs=pch_out_abs_path, rule="mwcc_pch_sjis" if shift_jis else "mwcc_pch", - inputs=f"include/{src_path_rel_str}", + inputs=src_path, variables={ "mw_version": Path(pch["mw_version"]), "cflags": cflags_str,