MSL_C header cleanup (#2988)

* msl_c header cleanup

* math header cleanup

* fix rest of shieldD configs

* cleanup cflag configs a bit

* fix shield build
This commit is contained in:
TakaRikka
2025-12-23 10:20:32 -08:00
committed by GitHub
parent ce895330ed
commit c9d0c58ffe
281 changed files with 987 additions and 792 deletions
+25 -25
View File
@@ -4787,105 +4787,105 @@ PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.
PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c:
.text start:0x80629B50 end:0x80629BF4
TRK_Hollywood_Revolution/metrotrk/targsupp.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Export/targsupp.s:
.text start:0x80629BF4 end:0x80629C14
TRK_Hollywood_Revolution/metrotrk/custconn/cc_gdev.c:
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/cc_gdev.c:
.text start:0x80629C14 end:0x80629E8C
.sbss start:0x8074D6D8 end:0x8074D6E0
.bss start:0x8080E8A8 end:0x8080EDC8
TRK_Hollywood_Revolution/metrotrk/custconn/MWCriticalSection_gc.c:
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/MWCriticalSection_gc.c:
.text start:0x80629E8C end:0x80629EC8
TRK_Hollywood_Revolution/metrotrk/custconn/CircleBuffer.c:
TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/CircleBuffer.c:
.text start:0x80629EC8 end:0x8062A104
TRK_Hollywood_Revolution/metrotrk/flush_cache.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c:
.text start:0x8062A104 end:0x8062A13C
TRK_Hollywood_Revolution/metrotrk/main_TRK.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/main_TRK.c:
.text start:0x8062A13C end:0x8062A178
.sbss start:0x8074D6E0 end:0x8074D6E8
TRK_Hollywood_Revolution/metrotrk/mainloop.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mainloop.c:
.text start:0x8062A178 end:0x8062A264
TRK_Hollywood_Revolution/metrotrk/mem_TRK.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/mem_TRK.c:
.text start:0x8062A264 end:0x8062A4C8
TRK_Hollywood_Revolution/metrotrk/dispatch.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/dispatch.c:
.text start:0x8062A4C8 end:0x8062A5E8
.data start:0x8073EE40 end:0x8073EEB0
TRK_Hollywood_Revolution/metrotrk/dolphin_trk.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk.c:
.text start:0x8062A5E8 end:0x8062A90C
.data start:0x8073EEB0 end:0x8073EEF0
.sbss start:0x8074D6E8 end:0x8074D6F4
TRK_Hollywood_Revolution/metrotrk/dolphin_trk_glue.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c:
.text start:0x8062A90C end:0x8062ACA8
.data start:0x8073EEF0 end:0x8073EFD8
.sbss start:0x8074D6F4 end:0x8074D6F8
.sdata2 start:0x80753480 end:0x80753484
.bss start:0x8080EDC8 end:0x8080EDF0
TRK_Hollywood_Revolution/metrotrk/notify.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/notify.c:
.text start:0x8062ACA8 end:0x8062AD38
TRK_Hollywood_Revolution/metrotrk/nubevent.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubevent.c:
.text start:0x8062AD38 end:0x8062AED4
.data start:0x8073EFD8 end:0x8073EFF8
.bss start:0x8080EDF0 end:0x8080EE18
TRK_Hollywood_Revolution/metrotrk/nubinit.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/nubinit.c:
.text start:0x8062AED4 end:0x8062B024
.data start:0x8073EFF8 end:0x8073F018
.sbss start:0x8074D6F8 end:0x8074D700
TRK_Hollywood_Revolution/metrotrk/serpoll.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/serpoll.c:
.text start:0x8062B024 end:0x8062B16C
.sbss start:0x8074D700 end:0x8074D708
TRK_Hollywood_Revolution/metrotrk/string_TRK.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/string_TRK.c:
.text start:0x8062B16C end:0x8062B188
TRK_Hollywood_Revolution/metrotrk/support.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/support.c:
.text start:0x8062B188 end:0x8062B7AC
.data start:0x8073F018 end:0x8073F060
TRK_Hollywood_Revolution/metrotrk/targcont.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/targcont.c:
.text start:0x8062B7AC end:0x8062B7E0
TRK_Hollywood_Revolution/metrotrk/mpc_7xx_603e.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/mpc_7xx_603e.c:
.text start:0x8062B7E0 end:0x8062BB08
TRK_Hollywood_Revolution/metrotrk/msg.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msg.c:
.text start:0x8062BB08 end:0x8062BB6C
.data start:0x8073F060 end:0x8073F088
.sbss start:0x8074D708 end:0x8074D710
TRK_Hollywood_Revolution/metrotrk/msgbuf.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msgbuf.c:
.text start:0x8062BB6C end:0x8062C378
.data start:0x8073F088 end:0x8073F0B0
.bss start:0x8080EE18 end:0x808107C0
TRK_Hollywood_Revolution/metrotrk/msghndlr.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c:
.text start:0x8062C378 end:0x8062D2FC
.data start:0x8073F0B0 end:0x8073F118
.sbss start:0x8074D710 end:0x8074D718
TRK_Hollywood_Revolution/metrotrk/mslsupp.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Export/mslsupp.c:
.text start:0x8062D2FC end:0x8062D488
TRK_Hollywood_Revolution/metrotrk/targimpl.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl.c:
.text start:0x8062D488 end:0x8062ECAC
.rodata start:0x8065FF00 end:0x8065FF88
.data start:0x8073F118 end:0x8073F128
.sbss start:0x8074D718 end:0x8074D728
.bss start:0x808107C0 end:0x80810D68
TRK_Hollywood_Revolution/metrotrk/target_options.c:
TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/target_options.c:
.text start:0x8062ECAC end:0x8062ECBC
NdevExi2AD/DebuggerDriver.c:
+203 -80
View File
@@ -239,16 +239,19 @@ cflags_base = [
"-fp hardware",
"-Cpp_exceptions off",
# "-W all",
"-O4,p",
"-inline auto",
'-pragma "cats off"',
'-pragma "warn_notinlined off"',
"-maxerrors 1",
"-nosyspath",
"-RTTI off",
"-fp_contract on",
"-str reuse",
"-i include",
f"-i build/{config.version}/include",
f"-i assets/{config.version}",
"-i src",
"-ir src/dolphin",
"-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",
@@ -260,15 +263,10 @@ cflags_base = [
"-D__GEKKO__",
]
if config.version == "ShieldD":
cflags_base.extend(["-O0", "-inline off", "-RTTI on", "-str reuse", "-enc SJIS", "-DDEBUG=1", "-DWIDESCREEN_SUPPORT=1"])
elif config.version in ["RZDE01_00", "RZDE01_02", "RZDP01", "RZDJ01", "Shield"]:
cflags_base.extend(["-O4,p", "-inline auto", "-ipa file", "-RTTI on", "-str reuse", "-enc SJIS", "-DWIDESCREEN_SUPPORT=1"])
if config.version in ["RZDE01_00", "RZDE01_02", "RZDP01", "RZDJ01", "Shield", "ShieldD"]:
cflags_base.extend(["-enc SJIS"])
else:
cflags_base.extend(["-O4,p", "-inline auto", "-RTTI off", "-str reuse", "-multibyte"])
if config.version in ["RZDE01_00", "ShieldD"] or args.debug or args.reghio:
cflags_base.extend(["-DENABLE_REGHIO=1"])
cflags_base.extend(["-multibyte"])
USE_REVOLUTION_SDK_VERSIONS = [
"RZDE01_00", # Wii USA Rev 0
@@ -290,6 +288,8 @@ if config.version in USE_REVOLUTION_SDK_VERSIONS:
if args.debug:
# Or -sym dwarf-2 for Wii compilers
cflags_base.extend(["-sym on", "-DDEBUG=1", "-DDEBUG_DEFINED=1", "-DNDEBUG_DEFINED=0"])
elif config.version == "ShieldD":
cflags_base.extend(["-DDEBUG=1", "-DDEBUG_DEFINED=1", "-DNDEBUG_DEFINED=0"])
else:
cflags_base.extend(["-DNDEBUG=1", "-DNDEBUG_DEFINED=1", "-DDEBUG_DEFINED=0"])
@@ -301,11 +301,6 @@ elif args.warn == "off":
elif args.warn == "error":
cflags_base.append("-W error")
cflags_noopt = cflags_base[:]
if config.version != "ShieldD":
cflags_noopt.remove("-O4,p")
# Metrowerks library flags
cflags_runtime = [
*cflags_base,
@@ -313,9 +308,10 @@ cflags_runtime = [
"-str reuse,pool,readonly",
"-common off",
"-char signed",
# "-inline deferred,auto"
]
if config.version != "ShieldD":
if config.version not in ["ShieldD", "Shield"]:
cflags_runtime.extend(["-inline deferred,auto"])
cflags_trk = [
@@ -333,81 +329,35 @@ cflags_trk = [
# Dolphin library flags
cflags_dolphin = [
"-nodefaults",
"-proc gekko",
"-align powerpc",
"-enum int",
"-fp hardware",
"-Cpp_exceptions off",
'-pragma "cats off"',
'-pragma "warn_notinlined off"',
"-maxerrors 1",
"-nosyspath",
"-char unsigned",
"-O4,p",
"-sym on",
"-inline auto",
"-i include",
f"-i build/{config.version}/include",
*cflags_base,
"-ir src/dolphin",
"-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",
f"-DVERSION={version_num}",
"-D__GEKKO__",
"-fp_contract off",
"-char unsigned",
"-sym on",
"-DSDK_REVISION=2",
]
# Revolution library flags
cflags_revolution_base = [
"-nodefaults",
"-proc gekko",
"-align powerpc",
"-enum int",
"-fp hardware",
"-Cpp_exceptions off",
'-pragma "cats off"',
'-pragma "warn_notinlined off"',
"-maxerrors 1",
"-nosyspath",
#"-char unsigned",
*cflags_base,
"-ir src/revolution",
"-fp_contract off",
"-sym on",
"-inline auto",
"-ipa file",
"-i include",
f"-i build/{config.version}/include",
"-ir src/revolution",
"-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/revolution",
f"-DVERSION={version_num}",
"-D__GEKKO__",
"-D__REVOLUTION_SDK__",
]
cflags_revolution_retail = [
*cflags_revolution_base,
"-O4,p",
"-DNDEBUG=1",
"-DNDEBUG_DEFINED=1",
"-DDEBUG_DEFINED=0",
]
cflags_revolution_debug = [
*cflags_revolution_base,
"-opt off",
"-inline off",
"-DDEBUG=1",
"-DDEBUG_DEFINED=1",
"-DNDEBUG_DEFINED=0",
]
# Framework flags
@@ -419,6 +369,20 @@ cflags_framework = [
"-fp_contract off",
]
# for specific sdk libs
cflags_noopt = cflags_base[:]
if config.version != "ShieldD":
cflags_noopt.remove("-O4,p")
if config.version == "ShieldD":
cflags_framework.extend(["-O0", "-inline off", "-RTTI on", "-DDEBUG=1", "-DWIDESCREEN_SUPPORT=1"])
elif config.version in ["RZDE01_00", "RZDE01_02", "RZDP01", "RZDJ01", "Shield"]:
cflags_framework.extend(["-ipa file", "-RTTI on", "-DWIDESCREEN_SUPPORT=1"])
if config.version in ["RZDE01_00", "ShieldD"] or args.debug or args.reghio:
cflags_framework.extend(["-DENABLE_REGHIO=1"])
if config.version != "ShieldD":
if config.version in ["RZDE01_00", "RZDE01_02", "RZDP01", "RZDJ01", "Shield"]:
# TODO: whats the correct inlining flag? deferred looks better in some places, others not. something else wrong?
@@ -429,6 +393,7 @@ if config.version != "ShieldD":
if config.version in ["RZDE01_00", "RZDE01_02", "RZDP01", "RZDJ01"]:
cflags_framework.extend(["-DSDK_SEP2006"])
# REL flags
cflags_rel = [
*cflags_framework,
@@ -465,6 +430,7 @@ def MWVersion(cfg_version: str | None) -> str:
case _:
return "GC/2.7"
# Wii versions specifically need linker GC/3.0a5
if config.version in ["RZDE01_00", "RZDE01_02", "RZDP01", "RZDJ01"]:
config.linker_version = "GC/3.0a5"
else:
@@ -597,6 +563,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_machine.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_mtx.cpp"),
Object(Equivalent, "m_Do/m_Do_ext.cpp"), # weak func order
Object(NonMatching, "m_Do/m_Do_ext2.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_lib.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_Reset.cpp"),
Object(MatchingFor(ALL_GCN), "m_Do/m_Do_dvd_thread.cpp"),
@@ -633,6 +600,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN, "Shield", "ShieldD"), "f_op/f_op_actor_iter.cpp"),
Object(MatchingFor(ALL_GCN), "f_op/f_op_actor_tag.cpp"),
Object(MatchingFor(ALL_GCN), "f_op/f_op_camera.cpp"),
Object(NonMatching, "f_op/f_op_actor_map.cpp"),
Object(MatchingFor(ALL_GCN), "f_op/f_op_actor_mng.cpp"),
Object(MatchingFor(ALL_GCN), "f_op/f_op_camera_mng.cpp"),
Object(MatchingFor(ALL_GCN), "f_op/f_op_overlap.cpp"),
@@ -740,7 +708,9 @@ config.libs = [
Object(MatchingFor(ALL_GCN, "Shield"), "d/d_bg_plc.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_s.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_s_acch.cpp"),
Object(NonMatching, "d/d_bg_s_capt_poly.cpp"),
Object(MatchingFor(ALL_GCN, "Shield"), "d/d_bg_s_chk.cpp"),
Object(NonMatching, "d/d_bg_s_func.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_s_gnd_chk.cpp"), # debug weak func order
Object(MatchingFor(ALL_GCN), "d/d_bg_s_grp_pass_chk.cpp"), # debug weak func order
Object(MatchingFor(ALL_GCN), "d/d_bg_s_lin_chk.cpp"),
@@ -752,6 +722,8 @@ config.libs = [
Object(MatchingFor(ALL_GCN, "Shield", "ShieldD"), "d/d_bg_s_wtr_chk.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_w.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_w_base.cpp"),
Object(NonMatching, "d/d_bg_w_deform.cpp"),
Object(NonMatching, "d/d_bg_w_hf.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_w_kcol.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_bg_w_sv.cpp"),
Object(Equivalent, "d/d_cc_d.cpp"), # weak func order (cCcD_ShapeAttr::GetCoCP)
@@ -760,6 +732,8 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "d/d_cc_uty.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_cam_param.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_ev_camera.cpp"),
Object(NonMatching, "d/d_jcam_editor.cpp"),
Object(NonMatching, "d/d_jpreviewer.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_spline_path.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_item_data.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_item.cpp"),
@@ -768,6 +742,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "d/d_eye_hl.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_error_msg.cpp"),
Object(Equivalent, "d/d_debug_viewer.cpp"), # debug weak func order
Object(NonMatching, "d/d_debug_pad.cpp"),
Object(NonMatching, "d/d_debug_camera.cpp"),
Object(Equivalent, "d/actor/d_a_alink.cpp"), # weak func order, vtable order
Object(MatchingFor(ALL_GCN), "d/actor/d_a_itembase.cpp"),
@@ -810,6 +785,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "d/d_menu_item_explain.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_menu_letter.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_menu_option.cpp"),
Object(NonMatching, "d/d_menu_quit.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_menu_ring.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_menu_save.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_menu_skill.cpp"),
@@ -846,6 +822,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "d/d_msg_string.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_msg_flow.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_name.cpp"),
Object(NonMatching, "d/d_npc.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_npc_lib.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_ovlp_fade.cpp"),
Object(MatchingFor(ALL_GCN), "d/d_ovlp_fade2.cpp"),
@@ -944,8 +921,13 @@ config.libs = [
JSystemLib(
"J3DU",
[
Object(NonMatching, "JSystem/J3DU/J3DUPerf.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DU/J3DUClipper.cpp"),
Object(NonMatching, "JSystem/J3DU/J3DUMotion.cpp"),
Object(MatchingFor(ALL_GCN, "Shield"), "JSystem/J3DU/J3DUDL.cpp"),
Object(NonMatching, "JSystem/J3DU/J3DUFur.cpp"),
Object(NonMatching, "JSystem/J3DU/J3DUShadow.cpp"),
Object(NonMatching, "JSystem/J3DU/J3DUMtxCache.cpp"),
],
),
JSystemLib(
@@ -1025,6 +1007,37 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JStudio/JStudio_JParticle/object-particle.cpp"),
],
),
JSystemLib(
"JStudioCameraEditor",
[
Object(NonMatching, "JSystem/JStudio/JStudioCameraEditor/control.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioCameraEditor/csb.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioCameraEditor/csb-data.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioCameraEditor/sequence.cpp"),
],
),
JSystemLib(
"JStudioPreviewer",
[
Object(NonMatching, "JSystem/JStudio/JStudioPreviewer/control.cpp"),
],
),
JSystemLib(
"JStudioToolLibrary",
[
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/anchor.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/console.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/controlset.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/controlset-anchor.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/controlset-preview.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/interface.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/scroll.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/visual.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/xml.cpp"),
Object(NonMatching, "JSystem/JStudio/JStudioToolLibrary/jstudio-controlset-transform.cpp"),
],
),
JSystemLib(
"JAudio2",
[
@@ -1036,6 +1049,8 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASResArcLoader.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASProbe.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASReport.cpp"),
Object(NonMatching, "JSystem/JAudio2/JASWaveFile.cpp"),
Object(NonMatching, "JSystem/JAudio2/JASWaveFileWav.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASCmdStack.cpp"),
Object(Equivalent, "JSystem/JAudio2/JASTrack.cpp"), # weak func order
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASTrackPort.cpp"),
@@ -1044,6 +1059,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASSeqParser.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASSeqReader.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASAramStream.cpp"),
Object(NonMatching, "JSystem/JAudio2/JASMidi.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASBank.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASBasicBank.cpp"),
Object(MatchingFor(ALL_GCN, "ShieldD"), "JSystem/JAudio2/JASVoiceBank.cpp"),
@@ -1051,6 +1067,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASDrumSet.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASBasicWaveBank.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASSimpleWaveBank.cpp"),
Object(NonMatching, "JSystem/JAudio2/JASInstRand.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASWSParser.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASBNKParser.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JASWaveArcLoader.cpp"),
@@ -1084,6 +1101,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAIStream.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAIStreamDataMgr.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAIStreamMgr.cpp"),
Object(NonMatching, "JSystem/JAudio2/JAUAudience.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUAudioArcInterpreter.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUAudioArcLoader.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUAudioMgr.cpp"),
@@ -1094,8 +1112,12 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSeqCollection.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSeqDataBlockMgr.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSoundAnimator.cpp"),
Object(NonMatching, "JSystem/JAudio2/JAUSoundMgr.cpp"),
Object(NonMatching, "JSystem/JAudio2/JAUSoundObject.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUSoundTable.cpp"),
Object(NonMatching, "JSystem/JAudio2/JAUStdSoundInfo.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JAudio2/JAUStreamFileTable.cpp"),
Object(NonMatching, "JSystem/JAudio2/JAUWaveFilePlayer.cpp"),
],
),
JSystemLib(
@@ -1109,24 +1131,62 @@ config.libs = [
],
),
JSystemLib(
"JAHostIO",
"JAWWinLib",
[
Object(Matching, "JSystem/JAHostIO/JAHioMessage.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHioMgr.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHioNode.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHioUtil.cpp"),
]
Object(NonMatching, "JSystem/JAWWinLib/JAWSeqEdit.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWSoundTable.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWBankView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWHioBankEdit.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWHioReceiver.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWMidiTerm.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWSysMemView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWChView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWVolume.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWReportView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWPlayerChView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWPlaySeView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWEntrySeView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWTrackView.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWSpeAna.cpp"),
Object(NonMatching, "JSystem/JAWWinLib/JAWSectionHeapView.cpp"),
],
),
JSystemLib(
"JMessage",
[
Object(MatchingFor(ALL_GCN), "JSystem/JMessage/control.cpp"),
Object(MatchingFor(ALL_GCN, "ShieldD"), "JSystem/JMessage/data.cpp"),
Object(NonMatching, "JSystem/JMessage/data-parse.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JMessage/processor.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JMessage/resource.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JMessage/locale.cpp"),
],
),
JSystemLib(
"JAHostIO",
[
Object(Matching, "JSystem/JAHostIO/JAHioMessage.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHioMgr.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHioNode.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHioUtil.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHFrameNode.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHVirtualNode.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHUAsnData.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHUTableEdit.cpp"),
Object(NonMatching, "JSystem/JAHostIO/JAHUFx.cpp"),
],
),
JSystemLib(
"JAHNodeLib",
[
Object(NonMatching, "JSystem/JAHNodeLib/JAHAudienceSettingNode.cpp"),
Object(NonMatching, "JSystem/JAHNodeLib/JAHConductNode.cpp"),
Object(NonMatching, "JSystem/JAHNodeLib/JAHIDSwapNode.cpp"),
Object(NonMatching, "JSystem/JAHNodeLib/JAHSoundPlayerNode.cpp"),
Object(NonMatching, "JSystem/JAHNodeLib/JAHViewerSys.cpp"),
Object(NonMatching, "JSystem/JAHNodeLib/JAHViewerApp.cpp"),
],
),
{
"lib": "Z2AudioLib",
"mw_version": MWVersion(config.version),
@@ -1156,25 +1216,47 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "Z2AudioLib/Z2SpeechMgr2.cpp"),
Object(Equivalent, "Z2AudioLib/Z2AudioMgr.cpp"), # weak func order
Object(NonMatching, "Z2AudioLib/Z2DebugSys.cpp"),
Object(NonMatching, "Z2AudioLib/Z2F1TestWindow.cpp"),
Object(NonMatching, "Z2AudioLib/Z2SoundPlayer.cpp"),
Object(NonMatching, "Z2AudioLib/Z2WaveArcLoader.cpp"),
Object(NonMatching, "Z2AudioLib/Z2SeView.cpp"),
Object(NonMatching, "Z2AudioLib/Z2TrackView.cpp"),
],
},
{
"lib": "Z2AudioCSD",
"mw_version": MWVersion(config.version),
"cflags": cflags_framework,
"progress_category": "core",
"host": True,
"objects": [
Object(NonMatching, "Z2AudioCSD/SpkSpeakerCtrl.cpp"),
Object(NonMatching, "Z2AudioCSD/SpkSystem.cpp"),
Object(NonMatching, "Z2AudioCSD/SpkMixingBuffer.cpp"),
Object(NonMatching, "Z2AudioCSD/SpkWave.cpp"),
Object(NonMatching, "Z2AudioCSD/SpkTable.cpp"),
Object(NonMatching, "Z2AudioCSD/SpkData.cpp"),
Object(NonMatching, "Z2AudioCSD/SpkSound.cpp"),
Object(NonMatching, "Z2AudioCSD/Z2AudioCS.cpp"),
],
},
{
"lib": "gf",
"mw_version": MWVersion(config.version),
"cflags": cflags_noopt,
"cflags": [*cflags_noopt, "-O3"],
"progress_category": "sdk",
"objects": [
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFGeometry.cpp", extra_cflags=["-O3"]),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFLight.cpp", extra_cflags=["-O3"]),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFPixel.cpp", extra_cflags=["-O3"]),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFTev.cpp", extra_cflags=["-O3"]),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFGeometry.cpp"),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFLight.cpp"),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFPixel.cpp"),
Object(MatchingFor(ALL_GCN), "dolphin/gf/GFTev.cpp"),
],
},
JSystemLib(
"JKernel",
[
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRHeap.cpp"),
Object(NonMatching, "JSystem/JKernel/JKRStdHeap.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRExpHeap.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRSolidHeap.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRAssertHeap.cpp"),
@@ -1196,6 +1278,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRCompArchive.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRFile.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRDvdFile.cpp"),
Object(NonMatching, "JSystem/JKernel/JKRRelocation.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRDvdRipper.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRDvdAramRipper.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JKernel/JKRDecomp.cpp"),
@@ -1214,9 +1297,18 @@ config.libs = [
JSystemLib(
"JGadget",
[
Object(NonMatching, "JSystem/JGadget/define.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JGadget/binary.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JGadget/linklist.cpp"),
Object(NonMatching, "JSystem/JGadget/search.cpp"),
Object(NonMatching, "JSystem/JGadget/textreader.cpp"),
Object(NonMatching, "JSystem/JGadget/xml-scanner.cpp"),
Object(NonMatching, "JSystem/JGadget/std-list.cpp"),
Object(NonMatching, "JSystem/JGadget/std-stream.cpp"),
Object(NonMatching, "JSystem/JGadget/std-streambuf.cpp"),
Object(NonMatching, "JSystem/JGadget/std-string.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JGadget/std-vector.cpp"),
Object(NonMatching, "JSystem/JGadget/dolphin-stream-JORFile.cpp"),
],
),
JSystemLib(
@@ -1242,6 +1334,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/JUtility/JUTConsole.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/JUtility/JUTDirectFile.cpp"),
Object(MatchingFor(ALL_GCN, "Shield", "ShieldD"), "JSystem/JUtility/JUTFontData_Ascfont_fix12.cpp"),
Object(NonMatching, "JSystem/JUtility/JUTFontData_Ascfont_fix16.cpp"),
],
),
JSystemLib(
@@ -1263,6 +1356,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/J2DGraph/J2DPictureEx.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J2DGraph/J2DTextBoxEx.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J2DGraph/J2DAnmLoader.cpp"),
Object(NonMatching, "JSystem/J2DGraph/J2DAnmSaver.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J2DGraph/J2DAnimation.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J2DGraph/J2DManage.cpp"),
],
@@ -1308,11 +1402,14 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DMaterialFactory.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DMaterialFactory_v21.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DClusterLoader.cpp"),
Object(NonMatching, "JSystem/J3DGraphLoader/J3DBinaryFormat.cpp"),
Object(NonMatching, "JSystem/J3DGraphLoader/J3DSaverUtility.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DModelLoader.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DJointFactory.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DShapeFactory.cpp"),
Object(MatchingFor(ALL_GCN), "JSystem/J3DGraphLoader/J3DAnmLoader.cpp"),
Object(NonMatching, "JSystem/J3DGraphLoader/J3DModelSaver.cpp"),
],
),
JSystemLib(
@@ -1378,7 +1475,7 @@ config.libs = [
{
"lib": "exi",
"mw_version": "GC/1.2.5n",
"cflags": cflags_noopt,
"cflags": [*cflags_noopt, "-ir src/dolphin"],
"progress_category": "sdk",
"objects": [
Object(MatchingFor(ALL_GCN), "dolphin/exi/EXIBios.c", extra_cflags=["-O3,p"]),
@@ -1796,6 +1893,7 @@ config.libs = [
"progress_category": "sdk",
"host": False,
"objects": [
Object(NonMatching, "PowerPC_EABI_Support/Runtime/Src/GCN_mem_alloc.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/Runtime/Src/__mem.c"),
Object(MatchingFor(ALL_GCN, "Shield"), "PowerPC_EABI_Support/Runtime/Src/__va_arg.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c"),
@@ -1820,31 +1918,41 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/ansi_fp.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Src/math_sun.c"),
Object(MatchingFor(ALL_GCN, "Shield"), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/locale.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_api.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtold.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wctype.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wstring.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/secure_error.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/math_double.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_log10.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c"),
@@ -1866,8 +1974,10 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_log10.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c"),
Object(NonMatching, "PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/abort_exit_ppc_eabi.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c"),
Object(MatchingFor(ALL_GCN), "PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c"),
@@ -1887,6 +1997,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msg.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msgbuf.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/serpoll.c", extra_cflags=["-sdata 8"]),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/string_TRK.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/dispatch.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Portable/msghndlr.c"),
@@ -1912,6 +2023,7 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/CircleBuffer.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/gamedev/cust_connection/cc/exi2/GCN/EXI2_GDEV_GCN/main.c", extra_cflags=["-sdata 8"]),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/common/MWTrace.c"),
Object(NonMatching, "TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/cc_gdev.c"),
Object(MatchingFor(ALL_GCN), "TRK_MINNOW_DOLPHIN/gamedev/cust_connection/utils/gc/MWCriticalSection_gc.c"),
],
},
@@ -1945,6 +2057,17 @@ config.libs = [
Object(MatchingFor(ALL_GCN), "odenotstub/odenotstub.c"),
],
},
{
"lib": "NdevExi2AD",
"mw_version": MWVersion(config.version),
"cflags": cflags_dolphin,
"progress_category": "sdk",
"host": False,
"objects": [
Object(NonMatching, "NdevExi2AD/DebuggerDriver.c"),
Object(NonMatching, "NdevExi2AD/exi2.c"),
],
},
{
"lib": "lingcod",
"mw_version": MWVersion(config.version),
+1 -1
View File
@@ -2,7 +2,7 @@
#define J2DPRINT_H
#include "JSystem/J2DGraph/J2DTextBox.h"
#include "__va_arg.h"
#include <stdarg.h>
class JUTFont;
class J2DPrint;
+1 -1
View File
@@ -2,7 +2,7 @@
#define JGEOMETRY_H
#include "dolphin/mtx.h"
#include "math.h"
#include <math.h>
#include "JSystem/JMath/JMath.h"
namespace JGeometry {
+1 -1
View File
@@ -2,7 +2,7 @@
#define JMATH_H
#include "dolphin/mtx.h"
#include "math.h"
#include <math.h>
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
@@ -2,7 +2,7 @@
#define JSTUDIO_MATH_H
#include "dolphin/mtx.h"
#include "math.h"
#include <math.h>
namespace JStudio {
namespace math {
@@ -3,8 +3,8 @@
#include "JSystem/JStudio/JStudio/jstudio-control.h"
#include "global.h"
#include "limits.h"
#include "math.h"
#include <limits.h>
#include <math.h>
typedef struct _GXColor GXColor;
+1 -1
View File
@@ -163,7 +163,7 @@ private:
/* 0x04 */ u32 _4;
/* 0x08 */ u32 _8;
/* 0x0C */ TFactory* pFactory;
/* 0x10 */ JGadget::TLinkList<TObject, -12> mObjectContainer;
/* 0x10 */ JGadget::TLinkList<TObject, -12> ocObject_;
/* 0x1C */ u32 mStatus;
/* 0x20 */ TObject_control mObject_control;
/* 0x54 */ s32 _54;
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/JGadget/linklist.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JUtility/JUTFont.h"
#include "__va_arg.h"
#include <stdarg.h>
/**
* @ingroup jsystem-jutility
+1 -1
View File
@@ -2,7 +2,7 @@
#define JUTDIRECTPRINT_H
#include "JSystem/JUtility/TColor.h"
#include "__va_arg.h"
#include <stdarg.h>
/**
* @ingroup jsystem-jutility
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRThread.h"
#include "JSystem/JUtility/JUTGamePad.h"
#include "__va_arg.h"
#include <stdarg.h>
#include <dolphin/gx.h>
#include <dolphin/os.h>
#include "global.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef C_M3D_H_
#define C_M3D_H_
#include "math.h"
#include <math.h>
#include "dolphin/mtx.h"
class cM3dGAab;
+1 -1
View File
@@ -2,7 +2,7 @@
#define C_XYZ_H
#include "dolphin/mtx.h"
#include "math.h"
#include <math.h>
struct cXyz : Vec {
static const cXyz Zero;
+1 -1
View File
@@ -11,7 +11,7 @@
#include "d/d_resorce.h"
#include "d/d_s_play.h"
#include <cmath.h>
#include <math.h>
/**
* @ingroup actors-objects
+1 -1
View File
@@ -2,7 +2,7 @@
#define D_MENU_D_MENU_DMAP_MAP_H
#include "d/d_menu_dmap.h"
#include <cmath.h>
#include <math.h>
class dMenu_DmapMap_c {
public:
+3 -3
View File
@@ -5,13 +5,13 @@
#include "weak_bss_1109_to_1009.h" // IWYU pragma: export
// Fixes weak .data
#include "math.h" // IWYU pragma: export
#include "cmath.h" // IWYU pragma: export
#include "JSystem/J3DGraphBase/J3DMatBlock.h" // IWYU pragma: export
#include "Z2AudioLib/Z2Calc.h" // IWYU pragma: export
// Fixes weak function ordering
#include "cmath.h" // IWYU pragma: export
#include "string.h" // IWYU pragma: export
#include "math.h" // IWYU pragma: export
#include "cstring.h" // IWYU pragma: export
#include "JSystem/JUtility/JUTGamePad.h" // IWYU pragma: export
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" // IWYU pragma: export
#include "JSystem/JHostIO/JORReflexible.h" // IWYU pragma: export
+7
View File
@@ -1,6 +1,9 @@
#ifndef _DOLPHIN_AR_H_
#define _DOLPHIN_AR_H_
#ifdef __REVOLUTION_SDK__
#include <revolution/aralt.h>
#else
#include <dolphin/types.h>
#ifdef __cplusplus
@@ -64,8 +67,12 @@ void ARQSetChunkSize(u32 size);
u32 ARQGetChunkSize(void);
BOOL ARQCheckInit(void);
u16 __ARGetInterruptStatus(void);
void __ARClearInterrupt(void);
#ifdef __cplusplus
}
#endif
#endif
#endif
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef _DOLPHIN_OS_H_
#define _DOLPHIN_OS_H_
#include <stdio.h>
#include <cstdio.h>
#ifdef __REVOLUTION_SDK__
#include <revolution/os.h>
@@ -1,4 +1,4 @@
#pragma cplusplus on
// fake MSL_C math for sdk specifically since it differs from game MSL_C math
extern inline float sqrtf(float x) {
static const double _half=.5;
@@ -46,6 +46,10 @@ extern inline float fabsf(float x) {
}
extern float cosf(float);
extern float sinf(float);
extern float tanf(float);
extern float acosf(float);
extern inline float cos(float x) {
return cosf(x);
}
@@ -62,5 +66,3 @@ inline float floor(float x) {
// x < 0 -> int conversion of x above rounded toward zero(so decrement)
return (float)i;
}
#pragma cplusplus reset
+1 -1
View File
@@ -82,7 +82,7 @@ typedef unsigned int uint;
#define __REGISTER
#endif
#include <stddef.h>
#include <cstddef.h>
#endif
#endif
+1 -4
View File
@@ -1,8 +1,7 @@
#ifndef _global_h_
#define _global_h_
#include "dolphin/types.h"
// Version ordering defined in configure.py
#define VERSION_GCN_USA 0
#define VERSION_GCN_PAL 1
#define VERSION_GCN_JPN 2
@@ -49,8 +48,6 @@
#define decltype __decltype__
#endif
#define JUT_EXPECT(...)
#define _SDA_BASE_(dummy) 0
#define _SDA2_BASE_(dummy) 0
+15
View File
@@ -40,14 +40,29 @@ typedef struct ARQRequest ARQRequest;
// AR
ARQCallback ARRegisterDMACallback(ARQCallback callback);
u32 ARGetDMAStatus(void);
void ARStartDMA(u32 type, u32 mainmem_addr, u32 aram_addr, u32 length);
u32 ARAlloc(u32 length);
u32 ARFree(u32* length);
BOOL ARCheckInit(void);
u32 ARInit(u32* stack_index_addr, u32 num_entries);
void ARReset(void);
void ARSetSize(void);
u32 ARGetBaseAddress(void);
u32 ARGetSize(void);
u32 ARGetInternalSize(void);
void ARClear(u32 flag);
// ARQ
void ARQInit(void);
void ARQReset(void);
void ARQPostRequest(ARQRequest* request, u32 owner, u32 type, u32 priority, u32 source, u32 dest, u32 length, ARQCallback callback);
void ARQRemoveRequest(ARQRequest* request);
void ARQRemoveOwnerRequest(u32 owner);
void ARQFlushQueue(void);
void ARQSetChunkSize(u32 size);
u32 ARQGetChunkSize(void);
BOOL ARQCheckInit(void);
#ifdef __cplusplus
}
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef _REVOLUTION_OS_H_
#define _REVOLUTION_OS_H_
#include <stdio.h>
#include <cstdio.h>
#include <revolution/types.h>
#include <revolution/gx/GXStruct.h>
+4 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#ifndef _REVOLUTION_IOSRESTYPES_H_
#define _REVOLUTION_IOSRESTYPES_H_
#include <revolution/types.h>
@@ -87,3 +88,5 @@ typedef struct {
IOSResourceIoctlv ioctlv;
} args;
} IOSResourceRequest;
#endif
+4 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#ifndef _REVOLUTION_IOSTYPES_H_
#define _REVOLUTION_IOSTYPES_H_
#include <revolution/types.h>
@@ -41,3 +42,5 @@ typedef struct {
IOSCSigDummy dummy;
IOSCName issuer;
} IOSCSigRsa2048;
#endif
@@ -1,4 +1,4 @@
#pragma cplusplus on
// fake MSL_C math for sdk specifically since it differs from game MSL_C math
extern inline float sqrtf(float x) {
static const double _half=.5;
@@ -46,6 +46,10 @@ extern inline float fabsf(float x) {
}
extern float cosf(float);
extern float sinf(float);
extern float tanf(float);
extern float acosf(float);
extern inline float cos(float x) {
return cosf(x);
}
@@ -62,5 +66,3 @@ inline float floor(float x) {
// x < 0 -> int conversion of x above rounded toward zero(so decrement)
return (float)i;
}
#pragma cplusplus reset
+1 -1
View File
@@ -79,6 +79,6 @@ typedef unsigned int uint;
#define __REGISTER
#endif
#include <stddef.h>
#include <cstddef.h>
#endif
+1 -1
View File
@@ -8,7 +8,7 @@
#include "JSystem/JKernel/JKRExpHeap.h"
#include "JSystem/JKernel/JKRFileCache.h"
#include "JSystem/JUtility/JUTConsole.h"
#include "stdio.h"
#include <stdio.h>
#include "m_Do/m_Do_dvd_thread.h"
#include "m_Do/m_Do_ext.h"
+15 -15
View File
@@ -6,7 +6,7 @@
#include "JSystem/J2DGraph/J2DTevs.h"
#include "JSystem/J2DGraph/J2DMatBlock.h"
#include "math.h"
#include <math.h>
#include "dolphin/gx.h"
void J2DTexMtx::load(u32 mtxIdx) {
@@ -24,15 +24,15 @@ void J2DTexMtx::calc() {
void J2DTexMtx::getTextureMtx(J2DTextureSRTInfo const& param_0, Vec param_1, Mtx param_2) {
float f31 = (param_0.mRotationDeg * M_PI) / 180.0f;
param_2[0][0] = param_0.mScaleX * i_cosf(f31);
param_2[0][1] = -param_0.mScaleX * i_sinf(f31);
param_2[0][0] = param_0.mScaleX * cosf(f31);
param_2[0][1] = -param_0.mScaleX * sinf(f31);
param_2[0][2] = 0.0f;
param_2[0][3] = -param_0.mScaleX * i_cosf(f31) * param_1.x + param_1.y * (param_0.mScaleX * i_sinf(f31)) +
param_2[0][3] = -param_0.mScaleX * cosf(f31) * param_1.x + param_1.y * (param_0.mScaleX * sinf(f31)) +
param_1.x + param_0.mTranslationX;
param_2[1][0] = param_0.mScaleY * i_sinf(f31);
param_2[1][1] = param_0.mScaleY * i_cosf(f31);
param_2[1][0] = param_0.mScaleY * sinf(f31);
param_2[1][1] = param_0.mScaleY * cosf(f31);
param_2[1][2] = 0.0f;
param_2[1][3] = -param_0.mScaleY * i_sinf(f31) * param_1.x - param_1.y * (param_0.mScaleY * i_cosf(f31)) +
param_2[1][3] = -param_0.mScaleY * sinf(f31) * param_1.x - param_1.y * (param_0.mScaleY * cosf(f31)) +
param_1.y + param_0.mTranslationY;
param_2[2][0] = 0.0f;
param_2[2][1] = 0.0f;
@@ -42,16 +42,16 @@ void J2DTexMtx::getTextureMtx(J2DTextureSRTInfo const& param_0, Vec param_1, Mtx
void J2DTexMtx::getTextureMtxMaya(J2DTextureSRTInfo const& param_0, Mtx param_1) {
float f31 = (param_0.mRotationDeg * M_PI) / 180.0f;
param_1[0][0] = param_0.mScaleX * i_cosf(f31);
param_1[0][1] = param_0.mScaleY * i_sinf(f31);
param_1[0][0] = param_0.mScaleX * cosf(f31);
param_1[0][1] = param_0.mScaleY * sinf(f31);
param_1[0][2] = 0.0f;
param_1[0][3] = (param_0.mTranslationX - 0.5f) * i_cosf(f31) -
(param_0.mTranslationY - 0.5f + param_0.mScaleY) * i_sinf(f31) + 0.5f;
param_1[1][0] = -param_0.mScaleX * i_sinf(f31);
param_1[1][1] = param_0.mScaleY * i_cosf(f31);
param_1[0][3] = (param_0.mTranslationX - 0.5f) * cosf(f31) -
(param_0.mTranslationY - 0.5f + param_0.mScaleY) * sinf(f31) + 0.5f;
param_1[1][0] = -param_0.mScaleX * sinf(f31);
param_1[1][1] = param_0.mScaleY * cosf(f31);
param_1[1][2] = 0.0f;
param_1[1][3] = -(param_0.mTranslationX - 0.5f) * i_sinf(f31) -
(param_0.mTranslationY - 0.5f + param_0.mScaleY) * i_cosf(f31) + 0.5f;
param_1[1][3] = -(param_0.mTranslationX - 0.5f) * sinf(f31) -
(param_0.mTranslationY - 0.5f + param_0.mScaleY) * cosf(f31) + 0.5f;
param_1[2][0] = 0.0f;
param_1[2][1] = 0.0f;
param_1[2][2] = 1.0f;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/J3DU/J3DUClipper.h"
#include "math.h"
#include <math.h>
void J3DUClipper::init() {
mNear = 1.0f;
+1 -1
View File
@@ -8,7 +8,7 @@
#include "JSystem/JAudio2/JASCalc.h"
#include "JSystem/JAudio2/JASMutex.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "stdio.h"
#include <stdio.h>
static OSMutex sMutex;
+1 -1
View File
@@ -5,7 +5,7 @@
#include "JSystem/JAudio2/JASTaskThread.h"
#include "JSystem/JAudio2/JASMutex.h"
#include "JSystem/JKernel/JKRDvdAramRipper.h"
#include "cstring.h"
#include "string.h"
#include "dolphin/os.h"
#include <stdint.h>
+2 -5
View File
@@ -3,11 +3,8 @@
#include "JSystem/JHostIO/JHIMccBuf.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JHostIO/JHIRMcc.h"
#include <dolphin/dolphin.h>
#include <cstring.h>
extern "C" int HIO2Read(u32, u32, void*, u32);
extern "C" int HIO2Write(u32, u32, void*, u32);
#include <revolution/hio2.h>
#include <string.h>
void JHIReport(const char* fmt, ...) {}
+4 -15
View File
@@ -1,20 +1,9 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JHostIO/JHIMccBuf.h"
#include <revolution/hio2.h>
enum HIO2DeviceType {
DEVICE_INVALID = -1,
};
typedef BOOL (*HIO2EnumCallback)(HIO2DeviceType);
typedef void (*HIO2DisconnectCallback)(s32);
extern "C" BOOL HIO2Init();
extern "C" BOOL HIO2EnumDevices(HIO2EnumCallback);
extern "C" BOOL HIO2Close(s32);
extern "C" s32 HIO2Open(HIO2DeviceType, int, HIO2DisconnectCallback);
HIO2DeviceType gExiDevice = DEVICE_INVALID;
HIO2DeviceType gExiDevice = HIO2_DEVICE_INVALID;
u8 data_8074bd04 = 1;
s32 ghHIO2;
@@ -29,7 +18,7 @@ BOOL JHIhio2CallbackEnum(HIO2DeviceType type) {
}
void JHIhio2DisconnectCallback(s32) {
gExiDevice = DEVICE_INVALID;
gExiDevice = HIO2_DEVICE_INVALID;
}
u32 JHIInitInterface() {
@@ -45,7 +34,7 @@ u32 JHIInitInterface() {
data_8074bd04 = 0;
}
if (gExiDevice == DEVICE_INVALID) {
if (gExiDevice == HIO2_DEVICE_INVALID) {
return 0;
}
+1 -1
View File
@@ -7,7 +7,7 @@
#include "JSystem/JKernel/JKRDvdFile.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include "math.h"
#include <math.h>
#include "string.h"
JKRAramArchive::JKRAramArchive(s32 entryNumber, JKRArchive::EMountDirection mountDirection)
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRAramHeap.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "global.h"
#include <limits.h>
#include <climits.h>
JSUList<JKRAramBlock> JKRAramHeap::sAramList;
+1 -1
View File
@@ -10,7 +10,7 @@
#include "JSystem/JKernel/JKRMemArchive.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include "math.h"
#include <math.h>
#include "string.h"
#include <stdint.h>
+1 -1
View File
@@ -6,7 +6,7 @@
#include "JSystem/JKernel/JKRDvdRipper.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include "math.h"
#include <math.h>
#include "string.h"
#include "global.h"
#include <stdint.h>
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRThread.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTConsole.h"
#include "stdio.h"
#include <stdio.h>
#include "global.h"
#include <stdint.h>
+1 -1
View File
@@ -2,7 +2,7 @@
// don't include header until this "zero" mess is figured out
// #include "JSystem/JMath/JMATrigonometric.h"
#include "math.h"
#include <math.h>
#include "global.h"
static f32 dummy() {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JStage/JSGCamera.h"
#include "limits.h"
#include <limits.h>
JStage::TCamera::~TCamera() {}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JStage/JSGFog.h"
#include "limits.h"
#include <limits.h>
JStage::TFog::~TFog() {}
@@ -5,9 +5,9 @@
#include "JSystem/JUtility/JUTException.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JGadget/linklist.h"
#include "math.h"
#include "stdlib.h"
#include "limits.h"
#include <math.h>
#include <stdlib.h>
#include <limits.h>
namespace JStudio {
+5 -5
View File
@@ -249,7 +249,7 @@ void TObject_transition::prepare_data_(const data::TParse_TParagraph::TData& rDa
ASSERT(rData.u32Type == data::PARAGRAPH_DATA);
u32 u32Size = rData.u32Size;
JUT_EXPECT(u32size == 8);
JGADGET_ASSERTWARN(0, u32Size == 8);
const f32* pContent = static_cast<const f32*>(rData.pContent);
ASSERT(pContent != NULL);
@@ -263,7 +263,7 @@ void TObject_list::prepare_data_(const data::TParse_TParagraph::TData& rData, TC
ASSERT(rData.u32Type == data::PARAGRAPH_DATA);
u32 u32Size = rData.u32Size;
JUT_EXPECT(u32size >= 8);
JGADGET_ASSERTWARN(0, u32Size >= 8);
const ListData* pContent = static_cast<const ListData*>(rData.pContent);
ASSERT(pContent != NULL);
@@ -280,7 +280,7 @@ void TObject_list_parameter::prepare_data_(const data::TParse_TParagraph::TData&
ASSERT(rData.u32Type == data::PARAGRAPH_DATA);
u32 u32Size = rData.u32Size;
JUT_EXPECT(u32size >= 8);
JGADGET_ASSERTWARN(0, u32Size >= 8);
const ListData* pContent = static_cast<const ListData*>(rData.pContent);
ASSERT(pContent != NULL);
@@ -295,7 +295,7 @@ void TObject_hermite::prepare_data_(const data::TParse_TParagraph::TData& rData,
ASSERT(rData.u32Type == data::PARAGRAPH_DATA);
u32 u32Size = rData.u32Size;
JUT_EXPECT(u32size >= 8);
JGADGET_ASSERTWARN(0, u32Size >= 8);
const ListData* pContent = static_cast<const ListData*>(rData.pContent);
ASSERT(pContent != NULL);
@@ -306,7 +306,7 @@ void TObject_hermite::prepare_data_(const data::TParse_TParagraph::TData& rData,
TControl::TControl() : pFactory(NULL) {}
TControl::~TControl() {
JUT_EXPECT(ocObject_.empty());
JGADGET_ASSERTWARN(0, ocObject_.empty());
}
void TControl::appendObject(TObject* object) {
+7 -7
View File
@@ -3,15 +3,15 @@
#include "JSystem/JStudio/JStudio/jstudio-math.h"
#include "JSystem/JGeometry.h"
#include "JSystem/TPosition3.h"
#include "math.h"
#include <math.h>
void JStudio::math::getRotation_xyz(MtxP param_1, f32 x, f32 y, f32 z) {
f32 cosx = i_cosf(DEG_TO_RAD(x));
f32 sinx = i_sinf(DEG_TO_RAD(x));
f32 cosy = i_cosf(DEG_TO_RAD(y));
f32 siny = i_sinf(DEG_TO_RAD(y));
f32 cosz = i_cosf(DEG_TO_RAD(z));
f32 sinz = i_sinf(DEG_TO_RAD(z));
f32 cosx = cosf(DEG_TO_RAD(x));
f32 sinx = sinf(DEG_TO_RAD(x));
f32 cosy = cosf(DEG_TO_RAD(y));
f32 siny = sinf(DEG_TO_RAD(y));
f32 cosz = cosf(DEG_TO_RAD(z));
f32 sinz = sinf(DEG_TO_RAD(z));
f32 cosxcosz = cosx * cosz;
f32 cosxsinz = cosx * sinz;
f32 sinxcosz = sinx * cosz;
+17 -17
View File
@@ -46,7 +46,7 @@ TObject::TObject(const data::TParse_TBlock_object& object)
pSequence_next(object.getContent()), u32Wait_(0), mStatus(STATUS_STILL) {}
TObject::~TObject() {
JUT_EXPECT(getControl() == NULL);
JGADGET_ASSERTWARN(0, getControl() == NULL);
}
void TObject::setFlag_operation(u8 op, int val) {
@@ -205,26 +205,26 @@ void TObject::process_sequence_() {
switch (type) {
case 0:
JUT_EXPECT(u32Value == 0);
JUT_EXPECT(pContent == NULL);
JGADGET_ASSERTWARN(0, u32Value == 0);
JGADGET_ASSERTWARN(0, pContent == NULL);
break;
case 1:
JUT_EXPECT(pContent == NULL);
JGADGET_ASSERTWARN(0, pContent == NULL);
setFlag_operation_(u32Value);
break;
case 2:
JUT_EXPECT(pContent == NULL);
JGADGET_ASSERTWARN(0, pContent == NULL);
setWait(u32Value);
break;
case 3: {
JUT_EXPECT(pContent == NULL);
JGADGET_ASSERTWARN(0, pContent == NULL);
s32 off = toInt32FromUInt24_(u32Value);
void* nextseq = (void*)getSequence_offset(off);
setSequence_next(nextseq);
break;
}
case 4: {
JUT_EXPECT(pContent == NULL);
JGADGET_ASSERTWARN(0, pContent == NULL);
u32 val = toInt32FromUInt24_(u32Value);
suspend(val);
break;
@@ -246,7 +246,7 @@ void TObject::process_sequence_() {
p = (void*)para_dat.next;
ASSERT(p != NULL);
}
JUT_EXPECT(p == pNext);
JGADGET_ASSERTWARN(0, p == pNext);
break;
}
default:
@@ -302,19 +302,19 @@ TControl::TControl() : _4(0), _8(0), pFactory(NULL), mObject_control(NULL, 0), _
TControl::~TControl() {
mObject_control.setControl_(NULL);
JUT_EXPECT(ocObject_.empty());
JGADGET_ASSERTWARN(0, ocObject_.empty());
}
void TControl::appendObject(TObject* p) {
p->setControl_(this);
mObjectContainer.Push_back(p);
ocObject_.Push_back(p);
}
void TControl::removeObject(TObject* p) {
ASSERT(p != NULL);
ASSERT(p->getControl() == this);
p->setControl_(NULL);
mObjectContainer.Erase(p);
ocObject_.Erase(p);
}
void TControl::destroyObject(TObject* p) {
@@ -324,15 +324,15 @@ void TControl::destroyObject(TObject* p) {
}
void TControl::destroyObject_all() {
while (!mObjectContainer.empty()) {
destroyObject(&mObjectContainer.back());
while (!ocObject_.empty()) {
destroyObject(&ocObject_.back());
}
}
// NONMATCHING - TPRObject_ID_equal copy issue
TObject* TControl::getObject(void const* param_0, u32 param_1) {
JGadget::TLinkList<TObject, -12>::iterator begin = mObjectContainer.begin();
JGadget::TLinkList<TObject, -12>::iterator end = mObjectContainer.end();
JGadget::TLinkList<TObject, -12>::iterator begin = ocObject_.begin();
JGadget::TLinkList<TObject, -12>::iterator end = ocObject_.end();
JGadget::TLinkList<TObject, -12>::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<JGadget::TLinkList<JStudio::stb::TObject, -12> > aTStack_18(mObjectContainer);
JGadget::TContainerEnumerator<JGadget::TLinkList<JStudio::stb::TObject, -12> > 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<JGadget::TLinkList<JStudio::stb::TObject, -12> > aTStack_38(mObjectContainer);
JGadget::TContainerEnumerator<JGadget::TLinkList<JStudio::stb::TObject, -12> > aTStack_38(ocObject_);
while (aTStack_38) {
JStudio::stb::TObject& this_00 = *aTStack_38;
rv = this_00.forward(param_0) || rv;
@@ -93,12 +93,12 @@ void JStudio_JStage::TAdaptor_light::adaptor_do_update(u32 param_1) {
f32 dVar10 = adaptor_getVariableValue(10)->getValue();
f32 dVar11 = adaptor_getVariableValue(11)->getValue();
f32 temp = MTXDegToRad(dVar11);
f32 dVar12 = i_cosf(temp);
f32 sinVal = i_sinf(temp);
f32 dVar12 = cosf(temp);
f32 sinVal = sinf(temp);
f32 temp2 = MTXDegToRad(dVar10);
VStack_198.direction.x = dVar12 * i_sinf(temp2);
VStack_198.direction.x = dVar12 * sinf(temp2);
VStack_198.direction.y = sinVal;
VStack_198.direction.z = dVar12 * i_cosf(temp2);
VStack_198.direction.z = dVar12 * cosf(temp2);
break;
}
case 2:
+1 -1
View File
@@ -3,7 +3,7 @@
#include "JSystem/JSupport/JSUOutputStream.h"
#include "JSystem/JSupport/JSURandomOutputStream.h"
#include <dolphin/dolphin.h>
#include <cstring.h>
#include <string.h>
JSUOutputStream::~JSUOutputStream() {
if (!isGood()) {
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/JUtility/JUTConsole.h"
#include "JSystem/JUtility/JUTDbPrint.h"
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "stdio.h"
#include <stdio.h>
#include <dolphin/vi.h>
bool sAssertVisible = true;
+1 -1
View File
@@ -4,7 +4,7 @@
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JUtility/JUTVideo.h"
#include "stdio.h"
#include <stdio.h>
JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) {
mFont = pFont;
+1 -1
View File
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JUtility/JUTDirectPrint.h"
#include "stdio.h"
#include <stdio.h>
#include <dolphin/os.h>
#include "global.h"
@@ -1,39 +1,8 @@
#ifndef _STD_LIMITS_H
#define _STD_LIMITS_H
#ifndef _MSL_LIMITS_H
#define _MSL_LIMITS_H
#include "float.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CHAR_BIT 8
#define SCHAR_MIN (-0x7F - 1)
#define SCHAR_MAX 0x7F
#define UCHAR_MAX 0xFF
#define CHAR_MIN 0
#define CHAR_MAX SCHAR_MAX
#define SHRT_MIN (-0x7FFF - 1)
#define SHRT_MAX 0x7FFF
#define USHRT_MAX 0xFFFF
#define INT_MIN (-0x7FFFFFFF - 1)
#define INT_MAX 0x7FFFFFFF
#define UINT_MAX 0xFFFFFFFF
#define LONG_MIN (-0x7FFFFFFFL - 1)
#define LONG_MAX 0x7FFFFFFFL
#define ULONG_MAX 0xFFFFFFFFUL
#define LLONG_MIN (-0x7FFFFFFFFFFFFFFFLL - 1)
#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
#ifdef __cplusplus
}
#include <climits.h>
#include <float.h>
namespace std {
template <typename T>
@@ -119,5 +88,5 @@ public:
#endif
} // namespace std
#endif
#endif
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_FILE_POS_H
#define _MSL_COMMON_FILE_POS_H
#include "ansi_files.h"
#include <ansi_files.h>
#ifdef __cplusplus
extern "C" {
@@ -15,4 +15,4 @@ long ftell(FILE* file);
}
#endif
#endif /* _MSL_COMMON_FILE_POS_H */
#endif /* _MSL_COMMON_FILE_POS_H */
@@ -1,7 +1,6 @@
#ifndef _MSL_COMMON_ALLOC_H
#define _MSL_COMMON_ALLOC_H
#ifdef __cplusplus
extern "C" {
#endif
@@ -12,4 +11,4 @@ void free(void* ptr);
}
#endif
#endif /* _MSL_COMMON_ALLOC_H */
#endif /* _MSL_COMMON_ALLOC_H */
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_ANSI_FILES_H
#define _MSL_COMMON_ANSI_FILES_H
#include "stddef.h"
#include <cstddef.h>
#ifdef __cplusplus
extern "C" {
@@ -13,9 +13,6 @@ extern "C" {
typedef unsigned long __file_handle;
typedef unsigned long fpos_t;
#ifndef __cplusplus
typedef unsigned short wchar_t;
#endif
#define set_error(file) \
do { \
@@ -126,4 +123,4 @@ void __close_all(void);
};
#endif
#endif /* _MSL_COMMON_ANSI_FILES_H */
#endif /* _MSL_COMMON_ANSI_FILES_H */
@@ -1,7 +1,6 @@
#ifndef _MSL_COMMON_ANSI_FP_H
#define _MSL_COMMON_ANSI_FP_H
#define SIGDIGLEN 36
typedef struct decimal {
@@ -21,15 +20,4 @@ typedef struct decform {
short digits;
} decform;
/* void __ull2dec(decimal*, u64);
void __timesdec(decimal*, const decimal*, const decimal*);
void __str2dec(decimal*, const char*, short);
void __two_exp(decimal*, s32);
BOOL __equals_dec(const decimal*, const decimal*);
BOOL __less_dec(const decimal*, const decimal*);
void __minus_dec(decimal*, const decimal*, const decimal*);
void __num2dec_internal(decimal*, f64);
void __num2dec(const decform*, f64, decimal*);
f64 __dec2num(const decimal*); */
#endif
#endif
@@ -1,11 +1,11 @@
#ifndef _MSL_COMMON_BUFFER_IO_H
#define _MSL_COMMON_BUFFER_IO_H
#include "ansi_files.h"
#include <cstdio.h>
enum { __align_buffer, __dont_align_buffer };
void __prep_buffer(FILE* file);
int __flush_buffer(FILE* file, size_t* bytes_flushed);
#endif /* _MSL_COMMON_BUFFER_IO_H */
#endif /* _MSL_COMMON_BUFFER_IO_H */
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_CHAR_IO_H
#define _MSL_COMMON_CHAR_IO_H
#include "ansi_files.h"
#include <ansi_files.h>
#ifdef __cplusplus
extern "C" {
@@ -14,4 +14,4 @@ int __put_char(int c, FILE* stream);
}
#endif
#endif /* _MSL_COMMON_CHAR_IO_H */
#endif /* _MSL_COMMON_CHAR_IO_H */
@@ -0,0 +1,37 @@
#ifndef _MSL_CLIMITS_H
#define _MSL_CLIMITS_H
#ifdef __cplusplus
extern "C" {
#endif
#define CHAR_BIT 8
#define SCHAR_MIN (-0x7F - 1)
#define SCHAR_MAX 0x7F
#define UCHAR_MAX 0xFF
#define CHAR_MIN 0
#define CHAR_MAX SCHAR_MAX
#define SHRT_MIN (-0x7FFF - 1)
#define SHRT_MAX 0x7FFF
#define USHRT_MAX 0xFFFF
#define INT_MIN (-0x7FFFFFFF - 1)
#define INT_MAX 0x7FFFFFFF
#define UINT_MAX 0xFFFFFFFF
#define LONG_MIN (-0x7FFFFFFFL - 1)
#define LONG_MAX 0x7FFFFFFFL
#define ULONG_MAX 0xFFFFFFFFUL
#define LLONG_MIN (-0x7FFFFFFFFFFFFFFFLL - 1)
#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
#ifdef __cplusplus
}
#endif
#endif
@@ -1,60 +1,126 @@
#ifndef STD_CMATH_H_
#define STD_CMATH_H_
#ifndef MSL_CMATH_H_
#define MSL_CMATH_H_
namespace std {
template<typename T>
inline double fabs(T x) {
return ::fabs(x);
#include <float.h>
#define NAN (*(float*) __float_nan)
#define HUGE_VALF (*(float*) __float_huge)
#define M_PI 3.14159265358979323846f
#define M_SQRT3 1.73205f
#define DEG_TO_RAD(degrees) (degrees * (M_PI / 180.0f))
#define RAD_TO_DEG(radians) (radians * (180.0f / M_PI))
#ifdef __cplusplus
extern "C" {
#endif
extern double __frsqrte(double);
extern float __fres(float);
extern double __fabs(double);
extern float __fabsf(float);
int abs(int);
double acos(double);
float acosf(float);
double asin(double);
double atan(double);
double atan2(double, double);
double ceil(double);
double copysign(double, double);
double cos(double);
float cosf(float);
double exp(double);
double floor(double);
double fmod(double, double);
double frexp(double, int*);
double ldexp(double, int);
double modf(double, double*);
double pow(double, double);
float powf(float, float);
double sin(double);
float sinf(float);
double sqrt(double);
double tan(double);
float tanf(float);
inline float expf(float x) {
return exp(x);
}
inline float fabs(float num) {
return ::fabsf(num);
inline float ceilf(float num) {
return ceil(num);
}
inline float fabsf(float num) {
return ::fabsf(num);
inline double fabs(double f) {
return __fabs(f);
}
inline float sqrt(float x) {
return ::sqrtf(x);
inline float fabsf(float f) {
return (float)fabs((double)f);
}
inline float abs(float x) {
return ::fabsf(x);
inline float floorf(float num) {
return floor(num);
}
inline float fmod(float x, float y) {
return ::fmod(x, y);
inline float fmodf(float f1, float f2) {
return fmod(f1, f2);
}
inline float ceil(float num) {
return ::ceilf(num);
#include "global.h"
#if PLATFORM_WII || PLATFORM_SHIELD
inline float sqrtf(float mag) {
return sqrt(mag);
}
#else
#ifdef DECOMPCTX
// Hack to mitigate fake mismatches when building from decompctx output
// (which doesn't support precompiled headers).
//
// When built without a PCH, these constants would end up .rodata instead of .data
// which causes a variety of knock-on effects in individual functions' assembly.
//
// Making them into globals is a bit of a hack, but it generally fixes later
// .data and .rodata offsets and allows individual functions to match.
static double _half = 0.5;
static double _three = 3.0;
#endif
inline float sqrtf(float mag) {
#ifndef DECOMPCTX
// part of the same hack, these are defined outside of the function when using decompctx
static const double _half = 0.5;
static const double _three = 3.0;
#endif
if (mag > 0.0f) {
double dmag = (double)mag;
double tmpd = __frsqrte(dmag);
tmpd = _half * tmpd * (_three - tmpd * tmpd * dmag);
tmpd = _half * tmpd * (_three - tmpd * tmpd * dmag);
tmpd = _half * tmpd * (_three - tmpd * tmpd * dmag);
return (float)(dmag * tmpd);
} else if (mag < 0.0) {
return NAN;
} else if (isnan(mag)) {
return NAN;
} else {
return mag;
}
}
#endif
inline float atan2f(float y, float x) {
return (float)atan2(y, x);
}
inline float floor(float num) {
return ::floorf(num);
}
inline float sinf(float x) { return sin(x); }
inline float cosf(float x) { return cos(x); }
inline float tanf(float x) { return tan(x); }
inline float acosf(float x) { return acos(x); }
inline float tan(float num) {
return ::i_tanf(num);
}
inline float tanf(float num) {
return ::i_tanf(num);
}
inline float acos(float num) {
return ::acosf(num);
}
inline float pow(float x, float y) {
return ::pow(x, y);
}
inline float pow(float x, int y) {
// FIXME: Needs to use powf
return ::pow(x, y);
}
} // namespace std
#ifdef __cplusplus
};
#endif
#endif
@@ -0,0 +1,6 @@
#ifndef _MSL_CSTDARG_H_
#define _MSL_CSTDARG_H_
#include <va_list.h>
#endif
@@ -0,0 +1,25 @@
#ifndef _MSL_CSTDDEF_H_
#define _MSL_CSTDDEF_H_
#ifdef __cplusplus
extern "C" {
#endif
#define offsetof(type, member) ((size_t)&(((type*)0)->member))
#ifndef NULL
#define NULL 0
#endif
typedef unsigned long size_t;
typedef long ptrdiff_t;
#ifndef __cplusplus
typedef unsigned short wchar_t;
#endif
#ifdef __cplusplus
};
#endif
#endif
@@ -0,0 +1,16 @@
#ifndef MSL_CSTDIO_H_
#define MSL_CSTDIO_H_
#include <char_io.h>
#include <file_io.h>
#include <printf.h>
#include <extras.h>
#include <scanf.h>
#include <va_list.h>
#include <cstddef.h>
#define stdin (&__files._stdin)
#define stdout (&__files._stdout)
#define stderr (&__files._stderr)
#endif
@@ -0,0 +1,8 @@
#ifndef MSL_CSTDLIB_H_
#define MSL_CSTDLIB_H_
#include <abort_exit.h>
#include <arith.h>
#include <strtoul.h>
#endif
@@ -1,23 +1,31 @@
#ifndef STD_CSTRING_H_
#define STD_CSTRING_H_
#ifndef _MSL_CSTRING_H
#define _MSL_CSTRING_H
#include "string.h"
namespace std {
using ::strlen;
using ::strcpy;
using ::wcslen;
using ::strncpy;
using ::strcmp;
using ::strncmp;
using ::strcat;
using ::memset;
using ::memcpy;
inline char* strchr(char* str, int c) {
return ::strchr(str, c);
}
}; // namespace std
#include <cstddef.h>
#include <ansi_files.h>
#include <extras.h>
#ifdef __cplusplus
extern "C" {
#endif
void* memcpy(void* dst, const void* src, size_t n);
void* memset(void* dst, int val, size_t n);
int memcmp(const void* lhs, const void* rhs, size_t count);
void* __memrchr(const void* ptr, int ch, size_t count);
void* memchr(const void* ptr, int ch, size_t count);
void* memmove(void* dst, const void* src, size_t n);
char* strrchr(const char* str, int c);
char* strchr(const char* str, int c);
int strncmp(const char* str1, const char* str2, size_t n);
int strcmp(const char* str1, const char* str2);
char* strcat(char* dst, const char* src);
char* strncpy(char* dst, const char* src, size_t n);
char* strcpy(char* dst, const char* src);
size_t strlen(const char* str);
#ifdef __cplusplus
};
#endif
#endif /* _MSL_COMMON_STRING_H */
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_DIRECT_IO_H
#define _MSL_COMMON_DIRECT_IO_H
#include "ansi_files.h"
#include <ansi_files.h>
#ifdef __cplusplus
extern "C" {
@@ -14,4 +14,4 @@ size_t fwrite(const void* buffer, size_t size, size_t count, FILE* stream);
}
#endif
#endif /* _MSL_COMMON_DIRECT_IO_H */
#endif /* _MSL_COMMON_DIRECT_IO_H */
@@ -1,15 +1,18 @@
#ifndef _MSL_COMMON_EXTRAS_H
#define _MSL_COMMON_EXTRAS_H
#include <cstddef.h>
#ifdef __cplusplus
extern "C" {
#endif
int strnicmp(const char* str1, const char* str2, int n);
int stricmp(const char* str1, const char* str2);
size_t wcslen(const wchar_t* s);
#ifdef __cplusplus
}
#endif
#endif /* _MSL_COMMON_EXTRAS_H */
#endif /* _MSL_COMMON_EXTRAS_H */
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_FILE_IO_H
#define _MSL_COMMON_FILE_IO_H
#include "ansi_files.h"
#include <ansi_files.h>
#ifdef __cplusplus
extern "C" {
@@ -15,4 +15,4 @@ int fclose(FILE* file);
}
#endif
#endif /* _MSL_COMMON_FILE_IO_H */
#endif /* _MSL_COMMON_FILE_IO_H */
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_FLOAT_H
#define _MSL_COMMON_FLOAT_H
#include "fdlibm.h"
#include <fdlibm.h>
#define FP_SNAN 0
#define FP_QNAN 1
@@ -1,130 +1,62 @@
#ifndef MSL_MATH_H_
#define MSL_MATH_H_
#include "global.h"
#include "float.h"
#include <cmath.h>
#define NAN (*(float*) __float_nan)
#define HUGE_VALF (*(float*) __float_huge)
#define M_PI 3.14159265358979323846f
#define M_SQRT3 1.73205f
#define DEG_TO_RAD(degrees) (degrees * (M_PI / 180.0f))
#define RAD_TO_DEG(radians) (radians * (180.0f / M_PI))
#ifdef __cplusplus
extern "C" {
#endif
int abs(int);
double acos(double);
float acosf(float);
double asin(double);
double atan(double);
double atan2(double, double);
double ceil(double);
inline float ceilf(float num) {
return ceil(num);
namespace std {
template<typename T>
inline double fabs(T x) {
return ::fabs(x);
}
double copysign(double, double);
double cos(double);
float cosf(float);
double exp(double);
inline float expf(float x) {
return exp(x);
inline float fabs(float num) {
return ::fabsf(num);
}
extern double __frsqrte(double);
extern float __fres(float);
extern double __fabs(double);
extern float __fabsf(float);
inline double fabs(double f) {
return __fabs(f);
}
inline double fabsf2(float f) {
return __fabsf(f);
}
inline float fabsf(float f) {
return fabsf2(f);
inline float fabsf(float num) {
return ::fabsf(num);
}
double floor(double);
inline float floorf(float num) {
return floor(num);
inline float sqrt(float x) {
return ::sqrtf(x);
}
double fmod(double, double);
inline float fmodf(float f1, float f2) {
return fmod(f1, f2);
inline float abs(float x) {
return ::fabsf(x);
}
double frexp(double, int*);
double ldexp(double, int);
double modf(double, double*);
double pow(double, double);
float powf(float, float);
double sin(double);
float sinf(float);
double sqrt(double);
double tan(double);
float tanf(float);
#if PLATFORM_WII || PLATFORM_SHIELD
inline float sqrtf(float mag) {
return sqrt(mag);
}
#else
#ifdef DECOMPCTX
// Hack to mitigate fake mismatches when building from decompctx output
// (which doesn't support precompiled headers).
//
// When built without a PCH, these constants would end up .rodata instead of .data
// which causes a variety of knock-on effects in individual functions' assembly.
//
// Making them into globals is a bit of a hack, but it generally fixes later
// .data and .rodata offsets and allows individual functions to match.
static double _half = 0.5;
static double _three = 3.0;
#endif
inline float sqrtf(float mag) {
#ifndef DECOMPCTX
// part of the same hack, these are defined outside of the function when using decompctx
static const double _half = 0.5;
static const double _three = 3.0;
#endif
if (mag > 0.0f) {
double dmag = (double)mag;
double tmpd = __frsqrte(dmag);
tmpd = _half * tmpd * (_three - tmpd * tmpd * dmag);
tmpd = _half * tmpd * (_three - tmpd * tmpd * dmag);
tmpd = _half * tmpd * (_three - tmpd * tmpd * dmag);
return (float)(dmag * tmpd);
} else if (mag < 0.0) {
return NAN;
} else if (isnan(mag)) {
return NAN;
} else {
return mag;
}
}
#endif
inline float atan2f(float y, float x) {
return (float)atan2(y, x);
inline float fmod(float x, float y) {
return ::fmod(x, y);
}
inline float i_sinf(float x) { return sin(x); }
inline float i_cosf(float x) { return cos(x); }
inline float i_tanf(float x) { return tan(x); }
inline float i_acosf(float x) { return acos(x); }
inline float ceil(float num) {
return ::ceilf(num);
}
#ifdef __cplusplus
};
#endif
inline float floor(float num) {
return ::floorf(num);
}
inline float tan(float num) {
return ::tanf(num);
}
inline float tanf(float num) {
return ::tanf(num);
}
inline float acos(float num) {
return ::acosf(num);
}
inline float pow(float x, float y) {
return ::pow(x, y);
}
inline float pow(float x, int y) {
// FIXME: Needs to use powf
return ::pow(x, y);
}
} // namespace std
#endif
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_MBSTRING_H
#define _MSL_COMMON_MBSTRING_H
#include "wchar_io.h"
#include <wchar_io.h>
#ifdef __cplusplus
extern "C" {
@@ -13,4 +13,4 @@ size_t wcstombs(char* dst, const wchar_t* src, size_t n);
}
#endif
#endif /* _MSL_COMMON_MBSTRING_H */
#endif /* _MSL_COMMON_MBSTRING_H */
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_MEM_FUNCS_H
#define _MSL_COMMON_MEM_FUNCS_H
#include "stddef.h"
#include <cstddef.h>
#ifdef __cplusplus
extern "C" {
@@ -16,4 +16,4 @@ void __copy_longs_aligned(void* dst, const void* src, size_t n);
}
#endif
#endif /* _MSL_COMMON_MEM_FUNCS_H */
#endif /* _MSL_COMMON_MEM_FUNCS_H */
@@ -1,8 +1,8 @@
#ifndef _MSL_COMMON_PRINTF_H
#define _MSL_COMMON_PRINTF_H
#include "ansi_files.h"
#include "__va_arg.h"
#include <ansi_files.h>
#include <cstdarg.h>
#ifdef __cplusplus
extern "C" {
@@ -18,13 +18,6 @@ int vprintf(const char* format, va_list arg);
int vswprintf(wchar_t* s, size_t n, const wchar_t* format, va_list arg);
#if defined(__cplusplus)
namespace std {
extern "C" { using ::vsnprintf; }
extern "C" { using ::vswprintf; }
}
#endif
#ifdef __cplusplus
}
#endif
@@ -1,7 +1,7 @@
#ifndef _MSL_COMMON_SCANF_H
#define _MSL_COMMON_SCANF_H
#include "ansi_files.h"
#include <ansi_files.h>
#ifdef __cplusplus
extern "C" {
@@ -0,0 +1,18 @@
#ifndef _MSL_STDARG_H_
#define _MSL_STDARG_H_
#include <cstdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
namespace std {
using ::va_list;
}
#ifdef __cplusplus
};
#endif
#endif
@@ -1,23 +1,16 @@
#ifndef _STDDEF_H_
#define _STDDEF_H_
#ifndef _MSL_STDDEF_H_
#define _MSL_STDDEF_H_
#include <cstddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined __INTELLISENSE__
typedef unsigned int size_t;
typedef int ptrdiff_t;
#else
typedef unsigned long size_t;
typedef long ptrdiff_t;
#endif
#define offsetof(type, member) ((size_t)&(((type*)0)->member))
#ifndef NULL
#define NULL (0)
#endif
namespace std {
using ::ptrdiff_t;
using ::size_t;
}
#ifdef __cplusplus
};
@@ -1,14 +1,30 @@
#ifndef MSL_STDIO_H_
#define MSL_STDIO_H_
#include "char_io.h"
#include "file_io.h"
#include "printf.h"
#include "extras.h"
#include "scanf.h"
#include <cstdio.h>
#include <stddef.h>
#include <stdarg.h>
#define stdin (&__files._stdin)
#define stdout (&__files._stdout)
#define stderr (&__files._stderr)
#ifdef __cplusplus
extern "C" {
#endif
namespace std {
using ::fputs;
using ::fflush;
using ::fclose;
using ::fprintf;
using ::printf;
using ::sprintf;
using ::snprintf;
using ::vsnprintf;
using ::vprintf;
using ::vswprintf;
using ::sscanf;
}
#ifdef __cplusplus
};
#endif
#endif
@@ -1,8 +1,24 @@
#ifndef MSL_STDLIB_H_
#define MSL_STDLIB_H_
#ifndef _MSL_STDLIB_H_
#define _MSL_STDLIB_H_
#include "abort_exit.h"
#include "arith.h"
#include "strtoul.h"
#include <cstdlib.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
namespace std {
using ::strtol;
using ::strtoul;
using ::div;
using ::exit;
using ::abort;
using ::atoi;
using ::atof;
}
#ifdef __cplusplus
};
#endif
#endif
@@ -1,32 +1,30 @@
#ifndef _MSL_COMMON_STRING_H
#define _MSL_COMMON_STRING_H
#ifndef MSL_STRING_H_
#define MSL_STRING_H_
#include "stddef.h"
#include "ansi_files.h"
#include <cstring.h>
namespace std {
using ::memcpy;
using ::memset;
using ::memcmp;
using ::memchr;
using ::memmove;
using ::strrchr;
using ::strlen;
using ::strncmp;
using ::strcmp;
using ::strcat;
using ::strncpy;
using ::strcpy;
using ::strnicmp;
using ::stricmp;
using ::wcslen;
inline char* strchr(char* str, int c) {
return ::strchr(str, c);
}
}; // namespace std
#ifdef __cplusplus
extern "C" {
#endif
void* memcpy(void* dst, const void* src, size_t n);
void* memset(void* dst, int val, size_t n);
int memcmp(const void* lhs, const void* rhs, size_t count);
void* __memrchr(const void* ptr, int ch, size_t count);
void* memchr(const void* ptr, int ch, size_t count);
void* memmove(void* dst, const void* src, size_t n);
char* strrchr(const char* str, int c);
char* strchr(const char* str, int c);
int strncmp(const char* str1, const char* str2, size_t n);
int strcmp(const char* str1, const char* str2);
char* strcat(char* dst, const char* src);
char* strncpy(char* dst, const char* src, size_t n);
char* strcpy(char* dst, const char* src);
size_t strlen(const char* str);
size_t wcslen(const wchar_t* s);
#ifdef __cplusplus
};
#endif
#endif /* _MSL_COMMON_STRING_H */
@@ -9,9 +9,11 @@ long strtol(const char* str, char** end, int base);
unsigned long strtoul(const char* str, char** end, int base);
unsigned long __strtoul(int base, int max_width, int (*ReadProc)(void*, int, int), void* ReadProcArg, int* chars_scanned, int* negative,
int* overflow);
int atoi(const char* str);
float atof(const char* str);
#ifdef __cplusplus
}
#endif
#endif /* _MSL_COMMON_STRTOUL_H */
#endif /* _MSL_COMMON_STRTOUL_H */
@@ -1,5 +1,5 @@
#ifndef __VA_ARG_H
#define __VA_ARG_H
#ifndef MSL_VA_LIST_H
#define MSL_VA_LIST_H
#ifdef __cplusplus
extern "C" {
@@ -35,10 +35,6 @@ void* __va_arg(_va_list_struct*, int);
#define __va_copy(a, b) (*(a) = *(b))
#if defined(__cplusplus)
namespace std { extern "C" { using ::va_list; } }
#endif
#ifdef __cplusplus
}
#endif
@@ -1,12 +1,8 @@
#ifndef _MSL_COMMON_WCHAR_IO_H
#define _MSL_COMMON_WCHAR_IO_H
#include "ansi_files.h"
#ifndef __cplusplus
typedef unsigned short wchar_t;
#endif
#include <ansi_files.h>
int fwide(FILE* file, int mode);
#endif /* _MSL_COMMON_WCHAR_IO_H */
#endif /* _MSL_COMMON_WCHAR_IO_H */
@@ -1,6 +1,6 @@
#include "abort_exit.h"
#include "critical_regions.h"
#include "stddef.h"
#include "cstddef.h"
extern void (*_dtors[])(void);
@@ -1,6 +1,6 @@
#include "alloc.h"
#include "critical_regions.h"
#include <string.h>
#include <cstring.h>
typedef struct Block {
struct Block* prev;
@@ -1,5 +1,5 @@
#include "mbstring.h"
#include "string.h"
#include "cstring.h"
inline static int unicode_to_UTF8(char* s, wchar_t wchar) {
int number_of_bytes;
@@ -1,4 +1,4 @@
#include "string.h"
#include "cstring.h"
void* memmove(void* dst, const void* src, size_t n) {
unsigned char* csrc;
@@ -3,8 +3,8 @@
#include "critical_regions.h"
#include "ctype.h"
#include "scanf.h"
#include "stdio.h"
#include "string.h"
#include "cstdio.h"
#include "cstring.h"
#include "wchar_io.h"
#define TARGET_FLOAT_BITS 64
@@ -1,4 +1,4 @@
#include "string.h"
#include "cstring.h"
#define K1 0x80808080
#define K2 0xFEFEFEFF
@@ -1,7 +1,7 @@
#include "strtoul.h"
#include "ctype.h"
#include "errno.h"
#include "limits.h"
#include "climits.h"
#include "scanf.h"
enum scan_states {
@@ -34,7 +34,7 @@
* Function needed: sqrt
*/
#include "math.h"
#include "cmath.h"
#ifdef __STDC__
static const double
@@ -101,4 +101,4 @@ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
w = r*s+c;
return 2.0*(df+w);
}
}
}
@@ -40,7 +40,7 @@
*
*/
#include "math.h"
#include "cmath.h"
#ifdef __STDC__
static const double
@@ -112,4 +112,4 @@ double __ieee754_asin(x) double x;
return t;
else
return -t;
}
}
@@ -112,7 +112,7 @@
#include "types.h"
#include "errno.h"
#include "math.h"
#include "cmath.h"
#ifndef _DOUBLE_IS_32BITS
@@ -404,4 +404,4 @@ double __ieee754_pow(x, y) double x, y;
#endif /* defined(_DOUBLE_IS_32BITS) */
// EOF e_pow.c
// EOF e_pow.c
@@ -17,7 +17,7 @@
* use __kernel_rem_pio2()
*/
#include "math.h"
#include "cmath.h"
/*
* Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
@@ -176,4 +176,4 @@ int __ieee754_rem_pio2(x, y) double x, y[];
return -n;
}
return n;
}
}
@@ -81,7 +81,7 @@
*/
#include "errno.h"
#include "math.h"
#include "cmath.h"
#ifdef __STDC__
static const double one = 1.0, tiny = 1.0e-300;
@@ -458,4 +458,4 @@ B. sqrt(x) by Reciproot Iteration
(4) Special cases (see (4) of Section A).
*/
*/
@@ -99,7 +99,7 @@
* = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
*/
#include "math.h"
#include "cmath.h"
static const double one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
pio4 = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */
pio4lo = 3.06161699786838301793e-17, /* 0x3C81A626, 0x33145C07 */
@@ -177,4 +177,4 @@ double __kernel_tan(double x, double y, int iy)
}
}
// EOF k_tan.c
// EOF k_tan.c
@@ -11,7 +11,7 @@
* ====================================================
*/
#include "math.h" /* for isfinite macro */
#include "cmath.h" /* for isfinite macro */
static const double
two54
@@ -55,4 +55,4 @@ double ldexp(double x, int n)
k += 54; /* subnormal result */
__HI(x) = (hx & 0x800fffff) | (k << 20);
return x * twom54;
}
}
@@ -1,6 +1,6 @@
#include "ansi_fp.h"
#include "ansi_fp.h"
#include "limits.h"
#include "climits.h"
#include "float.h"
static int __count_trailing_zerol(unsigned long x) {
@@ -1,7 +1,7 @@
#ifndef MWCPLUSLIB_H
#define MWCPLUSLIB_H
#include <stddef.h>
#include <cstddef.h>
#ifdef __cplusplus
extern "C" {
@@ -1,5 +1,5 @@
#include "__va_arg.h"
#include <stdint.h>
#include <cstdarg.h>
#include <cstdint.h>
#undef __va_arg
+1 -1
View File
@@ -5,7 +5,7 @@
#include "SSystem/SComponent/c_math.h"
#include "SSystem/SComponent/c_m3d.h"
#include <cmath.h>
#include <math.h>
s16 cM_rad2s(f32 rad) {
s32 s = (std::fmod(rad, 2 * M_PI) * (0x8000 / M_PI));

Some files were not shown because too many files have changed in this diff Show More