diff --git a/.clang-format b/.clang-format index 7912b862..5681a5dd 100644 --- a/.clang-format +++ b/.clang-format @@ -54,6 +54,7 @@ InsertBraces: True KeepEmptyLinesAtTheStartOfBlocks: False MaxEmptyLinesToKeep: 1 Language: Cpp +Standard: C++03 PointerAlignment: Right SortIncludes: CaseSensitive SpaceAfterCStyleCast: False diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..3dd31e6e --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +# E203: whitespace before ':' +# E501: line too long +extend-ignore = E203,E501 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8c8dbdf..3e1f0811 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,20 +6,22 @@ on: jobs: build: + # This is a *private* build container. + # See docs/github_actions.md for more information. container: ghcr.io/zeldaret/ss-build:main runs-on: ubuntu-latest strategy: fail-fast: false matrix: + # Add game versions here version: [SOUE01] steps: - # Checkout the repository (shallow clone) + # Checkout the repository - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 0 submodules: recursive # Set Git config @@ -40,10 +42,13 @@ jobs: # Upload progress if we're on the main branch - name: Upload progress + # If you're using a different branch, change this to match if: github.ref == 'refs/heads/main' continue-on-error: true env: + # Replace with your project slug PROGRESS_SLUG: ss + # Set the API key in your repository secrets PROGRESS_API_KEY: ${{ secrets.PROGRESS_API_KEY }} run: | python tools/upload_progress.py -b https://progress.decomp.club/ \ diff --git a/.gitignore b/.gitignore index f4c8fb5c..275db754 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,35 @@ +# IDE folders +.idea/ +.vs/ + +# Caches __pycache__ -.vscode/c_cpp_properties.json +.mypy_cache +.cache/ -# game files +# Original files orig/*/* -!orig/SOUE01/README.md !orig/*/.gitkeep +*.dol +*.rel +*.elf +*.o +*.map +*.MAP -# ninja stuff -build +# Build files +build/ +.ninja_* build.ninja -.ninja_deps -.ninja_log -# tools -tools/dtk -tools/mwcc_compiler/* -!tools/mwcc_compiler/.gitkeep -/tools/objdiff.exe +# decompctx output +ctx.* +*.ctx +# Generated configs objdiff.json -ctx.c +compile_commands.json + +# Miscellaneous +/*.txt +*.exe diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..33544369 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,12 @@ +{ + "recommendations": [ + "llvm-vs-code-extensions.vscode-clangd", + "ms-python.black-formatter", + "ms-python.flake8", + ], + "unwantedRecommendations": [ + "ms-vscode.cmake-tools", + "ms-vscode.cpptools-extension-pack", + "ms-vscode.cpptools", + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 33737cf2..6a1a17be 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "[c]": { "files.encoding": "utf8", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" }, "[cpp]": { "files.encoding": "utf8", @@ -10,26 +10,14 @@ // "[python]": { // "editor.defaultFormatter": "ms-python.black-formatter" // }, + // "editor.tabSize": 2, + "files.autoSave": "onFocusChange", "files.insertFinalNewline": true, "files.trimFinalNewlines": true, - "search.useIgnoreFiles": false, - "search.exclude": { - "build/*/config.json": true, - "build/**/*.MAP": true, - "build.ninja": true, - ".ninja_*": true, - "objdiff.json": true - }, "files.associations": { - "*.inc": "cpp", - "xutility": "cpp", - "type_traits": "cpp", - "xtr1common": "cpp", - "limits": "cpp", - "utility": "cpp", - "initializer_list": "cpp", - "new": "cpp", - "cstdlib": "cpp", - "xmemory": "cpp" - } + "*.inc": "c", + ".clangd": "yaml" + }, + // Disable C/C++ IntelliSense, use clangd instead + "C_Cpp.intelliSenseEngine": "disabled", } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..e5688c71 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + // Use Ctrl+Shift+B to run build tasks. + // Or "Run Build Task" in the Command Palette. + "version": "2.0.0", + "tasks": [ + { + "label": "ninja", + "type": "shell", + "command": "ninja", + "group": { + "kind": "build", + "isDefault": true + } + }, + ] +} diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 2d4804e1..07c5cc60 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -1947,11 +1947,11 @@ egg/util/eggException.cpp: .data start:0x8056F420 end:0x8056F438 .sbss start:0x80576900 end:0x80576920 -Runtime.PPCEABI.H/global_destructor_chain.c: +PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c: .text start:0x804C65C0 end:0x804C6620 .sbss start:0x80576930 end:0x80576938 -Runtime.PPCEABI.H/__init_cpp_exceptions.cpp: +PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp: .text start:0x804C71A8 end:0x804C7218 .ctors start:0x804DB640 end:0x804DB644 rename:.ctors$10 .dtors start:0x804DB9E0 end:0x804DB9E4 rename:.dtors$10 diff --git a/configure.py b/configure.py index 3c481c37..c071d0bd 100644 --- a/configure.py +++ b/configure.py @@ -124,10 +124,9 @@ config = ProjectConfig() config.version = str(args.version) version_num = VERSIONS.index(config.version) - -# Apply arguments config.build_dir = args.build_dir config.dtk_path = args.dtk +config.objdiff_path = args.objdiff config.binutils_path = args.binutils config.compilers_path = args.compilers config.generate_map = args.map @@ -136,14 +135,15 @@ config.progress = args.progress if not is_windows(): config.wrapper = args.wrapper +# Don't build asm unless we're --non-matching if not config.non_matching: config.asm_dir = None # Tool versions config.binutils_tag = "2.42-1" config.compilers_tag = "20240706" -config.dtk_tag = "v1.0.0" -config.objdiff_tag = "v2.2.1" +config.dtk_tag = "v1.1.2" +config.objdiff_tag = "v2.3.2" config.sjiswrap_tag = "v1.1.1" config.wibo_tag = "0.6.11" @@ -167,7 +167,7 @@ config.ldflags.append("-gdwarf-2") # -gdwarf-2 for Wii linkers if args.map: config.ldflags.append("-mapunused") - config.ldflags.append("-listclosure") # For Wii linkers + config.ldflags.append("-listclosure") # For Wii linkers # Use for any additional files that should cause a re-configure when modified config.reconfig_deps = [] @@ -193,8 +193,14 @@ "-str reuse", "-enc SJIS", "-i include", - "-i include/MSL_C", f"-i build/{config.version}/include", + "-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", f"-DGAME_VERSION={version_num}", ] @@ -243,12 +249,7 @@ ] # nw4r flags -cflags_nw4r = [ - *cflags_base, - "-ipa file", - "-fp_contract off", - "" -] +cflags_nw4r = [*cflags_base, "-ipa file", "-fp_contract off", ""] # REL flags cflags_rel = [ @@ -271,6 +272,7 @@ def Rel(status, rel_name, cpp_name, extra_cflags=[]): ], } + def MultiRel(rel_name, objects, extra_cflags=[]): return { "lib": rel_name, @@ -295,7 +297,7 @@ def EGGLib(lib_name, objects): def nw4rLib(lib_name, objects, extra_cflags=[]): return { "lib": lib_name, - "mw_version": "Wii/1.3", # most seem to be around 1.2, snd is 1.6 + "mw_version": "Wii/1.3", # most seem to be around 1.2, snd is 1.6 "cflags": cflags_nw4r + extra_cflags, "progress_category": "nw4r", "host": False, @@ -305,9 +307,11 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Matching = True NonMatching = False -Equivalent = config.non_matching # Object should be linked when configured with --non-matching +Equivalent = ( + config.non_matching +) # Object should be linked when configured with --non-matching -config.warn_missing_config = False +config.warn_missing_config = False config.warn_missing_source = False config.libs = [ { @@ -525,8 +529,12 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): "progress_category": "core", "host": False, "objects": [ - Object(Matching, "Runtime.PPCEABI.H/global_destructor_chain.c"), - Object(Matching, "Runtime.PPCEABI.H/__init_cpp_exceptions.cpp"), + Object( + Matching, "PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c" + ), + Object( + Matching, "PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp" + ), ], }, # NW4R @@ -569,7 +577,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Object(NonMatching, "nw4r/math/math_triangular.cpp"), Object(NonMatching, "nw4r/math/math_types.cpp"), Object(NonMatching, "nw4r/math/math_geometry.cpp"), - ] + ], ), nw4rLib( "g3d", @@ -636,7 +644,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Object(NonMatching, "nw4r/g3d/g3d_fog.cpp"), Object(NonMatching, "nw4r/g3d/g3d_light.cpp"), Object(NonMatching, "nw4r/g3d/g3d_calcvtx.cpp"), - ] + ], ), nw4rLib( "snd", @@ -715,7 +723,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Object(NonMatching, "nw4r/snd/snd_WsdFile.cpp"), Object(NonMatching, "nw4r/snd/snd_WsdPlayer.cpp"), Object(NonMatching, "nw4r/snd/snd_adpcm.cpp"), - ] + ], ), nw4rLib( "lyt", @@ -796,7 +804,7 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Object(NonMatching, "egg/gfx/eggDrawPathUnk2.cpp"), Object(NonMatching, "egg/gfx/eggFog.cpp"), Object(NonMatching, "egg/gfx/eggFrustum.cpp"), - Object(NonMatching, "egg/gfx/eggG3DUtility.cpp"), # Unknown Guess + Object(NonMatching, "egg/gfx/eggG3DUtility.cpp"), # Unknown Guess Object(NonMatching, "egg/gfx/eggGfxEngine.cpp"), Object(NonMatching, "egg/gfx/eggGlobalDrawState.cpp"), Object(NonMatching, "egg/gfx/eggGXUtility.cpp"), @@ -807,14 +815,14 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Object(NonMatching, "egg/gfx/eggModelEx.cpp"), Object(NonMatching, "egg/gfx/eggPostEffectBase.cpp"), Object(NonMatching, "egg/gfx/eggPostEffectBlur.cpp"), - Object(NonMatching, "egg/gfx/eggPostEffectUnk1.cpp"), # Unknown + Object(NonMatching, "egg/gfx/eggPostEffectUnk1.cpp"), # Unknown Object(NonMatching, "egg/gfx/eggPostEffectUnk2.cpp"), # Unknown Object(NonMatching, "egg/gfx/eggPostEffectMask.cpp"), Object(NonMatching, "egg/gfx/eggPostEffectMaskDOF.cpp"), Object(NonMatching, "egg/gfx/eggPostEffectSimple.cpp"), Object(NonMatching, "egg/gfx/eggScreen.cpp"), Object(NonMatching, "egg/gfx/eggScreenEffectBase.cpp"), - Object(NonMatching, "egg/gfx/eggScreenEffectBlur.cpp"), # Unknown Guess + Object(NonMatching, "egg/gfx/eggScreenEffectBlur.cpp"), # Unknown Guess Object(NonMatching, "egg/gfx/eggStateEfb.cpp"), Object(NonMatching, "egg/gfx/eggStateGX.cpp"), Object(NonMatching, "egg/gfx/eggTextureBuffer.cpp"), @@ -865,12 +873,12 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Object( Matching, "REL/__init_cpp_exceptions.cpp", - source="Runtime.PPCEABI.H/__init_cpp_exceptions.cpp", + source="PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp", ), Object( Matching, "REL/global_destructor_chain.c", - source="Runtime.PPCEABI.H/global_destructor_chain.c", + source="PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c", ), ], }, @@ -998,8 +1006,16 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_npc_akumakun", "REL/d/a/npc/d_a_npc_akumakun.cpp"), Rel(NonMatching, "d_a_npc_aku_human", "REL/d/a/npc/d_a_npc_aku_human.cpp"), Rel(NonMatching, "d_a_npc_aqua_dragon", "REL/d/a/npc/d_a_npc_aqua_dragon.cpp"), - Rel(NonMatching, "d_a_npc_azukariya_father", "REL/d/a/npc/d_a_npc_azukariya_father.cpp"), - Rel(NonMatching, "d_a_npc_azukariya_night", "REL/d/a/npc/d_a_npc_azukariya_night.cpp"), + Rel( + NonMatching, + "d_a_npc_azukariya_father", + "REL/d/a/npc/d_a_npc_azukariya_father.cpp", + ), + Rel( + NonMatching, + "d_a_npc_azukariya_night", + "REL/d/a/npc/d_a_npc_azukariya_night.cpp", + ), Rel(NonMatching, "d_a_npc_bamboo_goron", "REL/d/a/npc/d_a_npc_bamboo_goron.cpp"), Rel(NonMatching, "d_a_npc_bbrvl", "REL/d/a/npc/d_a_npc_bbrvl.cpp"), Rel(NonMatching, "d_a_npc_bee", "REL/d/a/npc/d_a_npc_bee.cpp"), @@ -1012,11 +1028,25 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_npc_daishinkan", "REL/d/a/npc/d_a_npc_daishinkan.cpp"), Rel(NonMatching, "d_a_npc_daishinkan_n", "REL/d/a/npc/d_a_npc_daishinkan_n.cpp"), Rel(NonMatching, "d_a_npc_desertrobot", "REL/d/a/npc/d_a_npc_desertrobot.cpp"), - Rel(NonMatching, "d_a_npc_desertrobot_captain", "REL/d/a/npc/d_a_npc_desertrobot_captain.cpp"), - Rel(NonMatching, "d_a_npc_dive_game_judge", "REL/d/a/npc/d_a_npc_dive_game_judge.cpp"), + Rel( + NonMatching, + "d_a_npc_desertrobot_captain", + "REL/d/a/npc/d_a_npc_desertrobot_captain.cpp", + ), + Rel( + NonMatching, + "d_a_npc_dive_game_judge", + "REL/d/a/npc/d_a_npc_dive_game_judge.cpp", + ), Rel(NonMatching, "d_a_npc_douguyanight", "REL/d/a/npc/d_a_npc_douguyanight.cpp"), - Rel(NonMatching, "d_a_npc_douguya_mother", "REL/d/a/npc/d_a_npc_douguya_mother.cpp"), - Rel(NonMatching, "d_a_npc_douguya_mother_lod", "REL/d/a/npc/d_a_npc_douguya_mother_lod.cpp"), + Rel( + NonMatching, "d_a_npc_douguya_mother", "REL/d/a/npc/d_a_npc_douguya_mother.cpp" + ), + Rel( + NonMatching, + "d_a_npc_douguya_mother_lod", + "REL/d/a/npc/d_a_npc_douguya_mother_lod.cpp", + ), Rel(NonMatching, "d_a_npc_fire_dragon", "REL/d/a/npc/d_a_npc_fire_dragon.cpp"), Rel(NonMatching, "d_a_npc_girahim", "REL/d/a/npc/d_a_npc_girahim.cpp"), Rel(NonMatching, "d_a_npc_goddess_zelda", "REL/d/a/npc/d_a_npc_goddess_zelda.cpp"), @@ -1024,9 +1054,17 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_npc_grc", "REL/d/a/npc/d_a_npc_grc.cpp"), Rel(NonMatching, "d_a_npc_grd", "REL/d/a/npc/d_a_npc_grd.cpp"), Rel(NonMatching, "d_a_npc_honeycomb", "REL/d/a/npc/d_a_npc_honeycomb.cpp"), - Rel(NonMatching, "d_a_npc_insect_capture_game_kobun", "REL/d/a/npc/d_a_npc_insect_capture_game_kobun.cpp"), + Rel( + NonMatching, + "d_a_npc_insect_capture_game_kobun", + "REL/d/a/npc/d_a_npc_insect_capture_game_kobun.cpp", + ), Rel(NonMatching, "d_a_npc_junk_mother", "REL/d/a/npc/d_a_npc_junk_mother.cpp"), - Rel(NonMatching, "d_a_npc_junk_mother_lod", "REL/d/a/npc/d_a_npc_junk_mother_lod.cpp"), + Rel( + NonMatching, + "d_a_npc_junk_mother_lod", + "REL/d/a/npc/d_a_npc_junk_mother_lod.cpp", + ), Rel(NonMatching, "d_a_npc_junk_night", "REL/d/a/npc/d_a_npc_junk_night.cpp"), Rel(NonMatching, "d_a_npc_kensei", "REL/d/a/npc/d_a_npc_kensei.cpp"), Rel(NonMatching, "d_a_npc_knight_leader", "REL/d/a/npc/d_a_npc_knight_leader.cpp"), @@ -1038,8 +1076,16 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_npc_kyui_first", "REL/d/a/npc/d_a_npc_kyui_first.cpp"), Rel(NonMatching, "d_a_npc_kyui_third", "REL/d/a/npc/d_a_npc_kyui_third.cpp"), Rel(NonMatching, "d_a_npc_kyui_wizard", "REL/d/a/npc/d_a_npc_kyui_wizard.cpp"), - Rel(NonMatching, "d_a_npc_medicinewifenight", "REL/d/a/npc/d_a_npc_medicinewifenight.cpp"), - Rel(NonMatching, "d_a_npc_medicine_husband_night", "REL/d/a/npc/d_a_npc_medicine_husband_night.cpp"), + Rel( + NonMatching, + "d_a_npc_medicinewifenight", + "REL/d/a/npc/d_a_npc_medicinewifenight.cpp", + ), + Rel( + NonMatching, + "d_a_npc_medicine_husband_night", + "REL/d/a/npc/d_a_npc_medicine_husband_night.cpp", + ), Rel(NonMatching, "d_a_npc_mole", "REL/d/a/npc/d_a_npc_mole.cpp"), Rel(NonMatching, "d_a_npc_mole_elder", "REL/d/a/npc/d_a_npc_mole_elder.cpp"), Rel(NonMatching, "d_a_npc_mole_es_nml", "REL/d/a/npc/d_a_npc_mole_es_nml.cpp"), @@ -1051,53 +1097,117 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_npc_mole_tackle", "REL/d/a/npc/d_a_npc_mole_tackle.cpp"), Rel(NonMatching, "d_a_npc_old_impa", "REL/d/a/npc/d_a_npc_old_impa.cpp"), Rel(NonMatching, "d_a_npc_ord_kyui", "REL/d/a/npc/d_a_npc_ord_kyui.cpp"), - Rel(NonMatching, "d_a_npc_pumpkin_clay_shooting", "REL/d/a/npc/d_a_npc_pumpkin_clay_shooting.cpp"), - Rel(NonMatching, "d_a_npc_pumpkin_daughter", "REL/d/a/npc/d_a_npc_pumpkin_daughter.cpp"), - Rel(NonMatching, "d_a_npc_pumpkin_master", "REL/d/a/npc/d_a_npc_pumpkin_master.cpp"), + Rel( + NonMatching, + "d_a_npc_pumpkin_clay_shooting", + "REL/d/a/npc/d_a_npc_pumpkin_clay_shooting.cpp", + ), + Rel( + NonMatching, + "d_a_npc_pumpkin_daughter", + "REL/d/a/npc/d_a_npc_pumpkin_daughter.cpp", + ), + Rel( + NonMatching, "d_a_npc_pumpkin_master", "REL/d/a/npc/d_a_npc_pumpkin_master.cpp" + ), Rel(NonMatching, "d_a_npc_regret_rival", "REL/d/a/npc/d_a_npc_regret_rival.cpp"), Rel(NonMatching, "d_a_npc_rescue", "REL/d/a/npc/d_a_npc_rescue.cpp"), Rel(NonMatching, "d_a_npc_rival", "REL/d/a/npc/d_a_npc_rival.cpp"), Rel(NonMatching, "d_a_npc_rival_lod", "REL/d/a/npc/d_a_npc_rival_lod.cpp"), Rel(NonMatching, "d_a_npc_salbage_morry", "REL/d/a/npc/d_a_npc_salbage_morry.cpp"), Rel(NonMatching, "d_a_npc_salbage_robot", "REL/d/a/npc/d_a_npc_salbage_robot.cpp"), - Rel(NonMatching, "d_a_npc_salbage_robot_fly", "REL/d/a/npc/d_a_npc_salbage_robot_fly.cpp"), - Rel(NonMatching, "d_a_npc_salbage_robot_fly_base", "REL/d/a/npc/d_a_npc_salbage_robot_fly_base.cpp"), - Rel(NonMatching, "d_a_npc_salbage_robot_repair", "REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp"), + Rel( + NonMatching, + "d_a_npc_salbage_robot_fly", + "REL/d/a/npc/d_a_npc_salbage_robot_fly.cpp", + ), + Rel( + NonMatching, + "d_a_npc_salbage_robot_fly_base", + "REL/d/a/npc/d_a_npc_salbage_robot_fly_base.cpp", + ), + Rel( + NonMatching, + "d_a_npc_salbage_robot_repair", + "REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp", + ), Rel(NonMatching, "d_a_npc_salesman_s", "REL/d/a/npc/d_a_npc_salesman_s.cpp"), Rel(NonMatching, "d_a_npc_saltalk", "REL/d/a/npc/d_a_npc_saltalk.cpp"), - Rel(NonMatching, "d_a_npc_senpaia_mother", "REL/d/a/npc/d_a_npc_senpaia_mother.cpp"), - Rel(NonMatching, "d_a_npc_senpaia_mother_lod", "REL/d/a/npc/d_a_npc_senpaia_mother_lod.cpp"), + Rel( + NonMatching, "d_a_npc_senpaia_mother", "REL/d/a/npc/d_a_npc_senpaia_mother.cpp" + ), + Rel( + NonMatching, + "d_a_npc_senpaia_mother_lod", + "REL/d/a/npc/d_a_npc_senpaia_mother_lod.cpp", + ), Rel(NonMatching, "d_a_npc_senpai", "REL/d/a/npc/d_a_npc_senpai.cpp"), Rel(NonMatching, "d_a_npc_senpai_b", "REL/d/a/npc/d_a_npc_senpai_b.cpp"), Rel(NonMatching, "d_a_npc_shinkan2", "REL/d/a/npc/d_a_npc_shinkan2.cpp"), Rel(NonMatching, "d_a_npc_shinkan", "REL/d/a/npc/d_a_npc_shinkan.cpp"), Rel(NonMatching, "d_a_npc_sorajima_boy", "REL/d/a/npc/d_a_npc_sorajima_boy.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_father", "REL/d/a/npc/d_a_npc_sorajima_father.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_female", "REL/d/a/npc/d_a_npc_sorajima_female.cpp"), + Rel( + NonMatching, + "d_a_npc_sorajima_father", + "REL/d/a/npc/d_a_npc_sorajima_father.cpp", + ), + Rel( + NonMatching, + "d_a_npc_sorajima_female", + "REL/d/a/npc/d_a_npc_sorajima_female.cpp", + ), Rel(NonMatching, "d_a_npc_sorajima_girl", "REL/d/a/npc/d_a_npc_sorajima_girl.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_male2", "REL/d/a/npc/d_a_npc_sorajima_male2.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_male3", "REL/d/a/npc/d_a_npc_sorajima_male3.cpp"), + Rel( + NonMatching, "d_a_npc_sorajima_male2", "REL/d/a/npc/d_a_npc_sorajima_male2.cpp" + ), + Rel( + NonMatching, "d_a_npc_sorajima_male3", "REL/d/a/npc/d_a_npc_sorajima_male3.cpp" + ), Rel(NonMatching, "d_a_npc_sorajima_male", "REL/d/a/npc/d_a_npc_sorajima_male.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_man_d", "REL/d/a/npc/d_a_npc_sorajima_man_d.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_man_e", "REL/d/a/npc/d_a_npc_sorajima_man_e.cpp"), - Rel(NonMatching, "d_a_npc_sorajima_mother", "REL/d/a/npc/d_a_npc_sorajima_mother.cpp"), + Rel( + NonMatching, "d_a_npc_sorajima_man_d", "REL/d/a/npc/d_a_npc_sorajima_man_d.cpp" + ), + Rel( + NonMatching, "d_a_npc_sorajima_man_e", "REL/d/a/npc/d_a_npc_sorajima_man_e.cpp" + ), + Rel( + NonMatching, + "d_a_npc_sorajima_mother", + "REL/d/a/npc/d_a_npc_sorajima_mother.cpp", + ), Rel(NonMatching, "d_a_npc_suisei", "REL/d/a/npc/d_a_npc_suisei.cpp"), Rel(NonMatching, "d_a_npc_suisei_normal", "REL/d/a/npc/d_a_npc_suisei_normal.cpp"), Rel(NonMatching, "d_a_npc_suisei_sub", "REL/d/a/npc/d_a_npc_suisei_sub.cpp"), Rel(NonMatching, "d_a_npc_terry", "REL/d/a/npc/d_a_npc_terry.cpp"), Rel(NonMatching, "d_a_npc_testman", "REL/d/a/npc/d_a_npc_testman.cpp"), - Rel(NonMatching, "d_a_npc_thunder_dragon", "REL/d/a/npc/d_a_npc_thunder_dragon.cpp"), - Rel(NonMatching, "d_a_npc_thunder_dragon_bone", "REL/d/a/npc/d_a_npc_thunder_dragon_bone.cpp"), - Rel(NonMatching, "d_a_npc_thunder_dragon_skull", "REL/d/a/npc/d_a_npc_thunder_dragon_skull.cpp"), + Rel( + NonMatching, "d_a_npc_thunder_dragon", "REL/d/a/npc/d_a_npc_thunder_dragon.cpp" + ), + Rel( + NonMatching, + "d_a_npc_thunder_dragon_bone", + "REL/d/a/npc/d_a_npc_thunder_dragon_bone.cpp", + ), + Rel( + NonMatching, + "d_a_npc_thunder_dragon_skull", + "REL/d/a/npc/d_a_npc_thunder_dragon_skull.cpp", + ), Rel(NonMatching, "d_a_npc_toilet_ghost", "REL/d/a/npc/d_a_npc_toilet_ghost.cpp"), Rel(NonMatching, "d_a_npc_uranaiya", "REL/d/a/npc/d_a_npc_uranaiya.cpp"), - Rel(NonMatching, "d_a_npc_volcano_f2_salbo", "REL/d/a/npc/d_a_npc_volcano_f2_salbo.cpp"), + Rel( + NonMatching, + "d_a_npc_volcano_f2_salbo", + "REL/d/a/npc/d_a_npc_volcano_f2_salbo.cpp", + ), Rel(NonMatching, "d_a_npc_young_impa", "REL/d/a/npc/d_a_npc_young_impa.cpp"), Rel(NonMatching, "d_a_npc_zelda", "REL/d/a/npc/d_a_npc_zelda.cpp"), Rel(NonMatching, "d_a_nusi_base", "REL/d/a/d_a_nusi_base.cpp"), Rel(NonMatching, "d_a_nusi_npc", "REL/d/a/d_a_nusi_npc.cpp"), Rel(NonMatching, "d_a_obj_amber", "REL/d/a/obj/d_a_obj_amber.cpp"), - Rel(NonMatching, "d_a_obj_ancient_jewels", "REL/d/a/obj/d_a_obj_ancient_jewels.cpp"), + Rel( + NonMatching, "d_a_obj_ancient_jewels", "REL/d/a/obj/d_a_obj_ancient_jewels.cpp" + ), # matching except for IScnObjCallback weak function order issue Rel(NonMatching, "d_a_obj_appear_bridge", "REL/d/a/obj/d_a_obj_appear_bridge.cpp"), Rel(NonMatching, "d_a_obj_arrow_switch", "REL/d/a/obj/d_a_obj_arrow_switch.cpp"), @@ -1106,34 +1216,54 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_B300_sand", "REL/d/a/obj/d_a_obj_B300_sand.cpp"), Rel(NonMatching, "d_a_obj_ballista", "REL/d/a/obj/d_a_obj_ballista.cpp"), Rel(NonMatching, "d_a_obj_ballista_f3", "REL/d/a/obj/d_a_obj_ballista_f3.cpp"), - Rel(NonMatching, "d_a_obj_ballista_handle", "REL/d/a/obj/d_a_obj_ballista_handle.cpp"), + Rel( + NonMatching, + "d_a_obj_ballista_handle", + "REL/d/a/obj/d_a_obj_ballista_handle.cpp", + ), Rel(NonMatching, "d_a_obj_bamboo", "REL/d/a/obj/d_a_obj_bamboo.cpp"), Rel(Matching, "d_a_obj_bamboo_island", "REL/d/a/obj/d_a_obj_bamboo_island.cpp"), Rel(NonMatching, "d_a_obj_barrel", "REL/d/a/obj/d_a_obj_barrel.cpp"), Rel(NonMatching, "d_a_obj_bblargebomb", "REL/d/a/obj/d_a_obj_bblargebomb.cpp"), Rel(NonMatching, "d_a_obj_bbstone", "REL/d/a/obj/d_a_obj_bbstone.cpp"), Rel(NonMatching, "d_a_obj_bb_bridge", "REL/d/a/obj/d_a_obj_bb_bridge.cpp"), - Rel(NonMatching, "d_a_obj_bb_broken_parts", "REL/d/a/obj/d_a_obj_bb_broken_parts.cpp"), + Rel( + NonMatching, + "d_a_obj_bb_broken_parts", + "REL/d/a/obj/d_a_obj_bb_broken_parts.cpp", + ), Rel(NonMatching, "d_a_obj_bb_objects", "REL/d/a/obj/d_a_obj_bb_objects.cpp"), Rel(NonMatching, "d_a_obj_bell", "REL/d/a/obj/d_a_obj_bell.cpp"), Rel(NonMatching, "d_a_obj_belt_cvr", "REL/d/a/obj/d_a_obj_belt_cvr.cpp"), Rel(NonMatching, "d_a_obj_belt_obstacle", "REL/d/a/obj/d_a_obj_belt_obstacle.cpp"), Rel(NonMatching, "d_a_obj_bg", "REL/d/a/obj/d_a_obj_bg.cpp"), - Rel(NonMatching, "d_a_obj_bigbomb_flower", "REL/d/a/obj/d_a_obj_bigbomb_flower.cpp"), + Rel( + NonMatching, "d_a_obj_bigbomb_flower", "REL/d/a/obj/d_a_obj_bigbomb_flower.cpp" + ), Rel(NonMatching, "d_a_obj_bird_sp", "REL/d/a/obj/d_a_obj_bird_sp.cpp"), Rel(NonMatching, "d_a_obj_bird_statue", "REL/d/a/obj/d_a_obj_bird_statue.cpp"), Rel(NonMatching, "d_a_obj_blade", "REL/d/a/obj/d_a_obj_blade.cpp"), Rel(NonMatching, "d_a_obj_blast_rock", "REL/d/a/obj/d_a_obj_blast_rock.cpp"), Rel(NonMatching, "d_a_obj_block_rope", "REL/d/a/obj/d_a_obj_block_rope.cpp"), - Rel(NonMatching, "d_a_obj_block_underground", "REL/d/a/obj/d_a_obj_block_underground.cpp"), + Rel( + NonMatching, + "d_a_obj_block_underground", + "REL/d/a/obj/d_a_obj_block_underground.cpp", + ), Rel(NonMatching, "d_a_obj_blow_coal", "REL/d/a/obj/d_a_obj_blow_coal.cpp"), Rel(NonMatching, "d_a_obj_boat", "REL/d/a/obj/d_a_obj_boat.cpp"), Rel(NonMatching, "d_a_obj_boxcage_F300", "REL/d/a/obj/d_a_obj_boxcage_F300.cpp"), Rel(NonMatching, "d_a_obj_bridge_bone", "REL/d/a/obj/d_a_obj_bridge_bone.cpp"), - Rel(NonMatching, "d_a_obj_bridge_building", "REL/d/a/obj/d_a_obj_bridge_building.cpp"), + Rel( + NonMatching, + "d_a_obj_bridge_building", + "REL/d/a/obj/d_a_obj_bridge_building.cpp", + ), Rel(NonMatching, "d_a_obj_bridge_fall", "REL/d/a/obj/d_a_obj_bridge_fall.cpp"), Rel(NonMatching, "d_a_obj_bridge_step", "REL/d/a/obj/d_a_obj_bridge_step.cpp"), - Rel(NonMatching, "d_a_obj_bridge_stretch", "REL/d/a/obj/d_a_obj_bridge_stretch.cpp"), + Rel( + NonMatching, "d_a_obj_bridge_stretch", "REL/d/a/obj/d_a_obj_bridge_stretch.cpp" + ), Rel(NonMatching, "d_a_obj_bridge_time", "REL/d/a/obj/d_a_obj_bridge_time.cpp"), Rel(NonMatching, "d_a_obj_bstone", "REL/d/a/obj/d_a_obj_bstone.cpp"), Rel(NonMatching, "d_a_obj_bubble", "REL/d/a/obj/d_a_obj_bubble.cpp"), @@ -1148,7 +1278,9 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_city", "REL/d/a/obj/d_a_obj_city.cpp"), Rel(NonMatching, "d_a_obj_city_water", "REL/d/a/obj/d_a_obj_city_water.cpp"), Rel(NonMatching, "d_a_obj_claw_shot_tg", "REL/d/a/obj/d_a_obj_claw_shot_tg.cpp"), - Rel(NonMatching, "d_a_obj_clearness_wall", "REL/d/a/obj/d_a_obj_clearness_wall.cpp"), + Rel( + NonMatching, "d_a_obj_clearness_wall", "REL/d/a/obj/d_a_obj_clearness_wall.cpp" + ), Rel(NonMatching, "d_a_obj_clef", "REL/d/a/obj/d_a_obj_clef.cpp"), Rel(NonMatching, "d_a_obj_cloud_dive", "REL/d/a/obj/d_a_obj_cloud_dive.cpp"), Rel(NonMatching, "d_a_obj_col", "REL/d/a/obj/d_a_obj_col.cpp"), @@ -1163,23 +1295,43 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_desert_ago", "REL/d/a/obj/d_a_obj_desert_ago.cpp"), Rel(NonMatching, "d_a_obj_desert_debris", "REL/d/a/obj/d_a_obj_desert_debris.cpp"), Rel(NonMatching, "d_a_obj_desert_meter", "REL/d/a/obj/d_a_obj_desert_meter.cpp"), - Rel(NonMatching, "d_a_obj_display_only_nbs", "REL/d/a/obj/d_a_obj_display_only_nbs.cpp"), + Rel( + NonMatching, + "d_a_obj_display_only_nbs", + "REL/d/a/obj/d_a_obj_display_only_nbs.cpp", + ), Rel(NonMatching, "d_a_obj_distant_ship", "REL/d/a/obj/d_a_obj_distant_ship.cpp"), - Rel(NonMatching, "d_a_obj_diviner_crystal", "REL/d/a/obj/d_a_obj_diviner_crystal.cpp"), + Rel( + NonMatching, + "d_a_obj_diviner_crystal", + "REL/d/a/obj/d_a_obj_diviner_crystal.cpp", + ), Rel(NonMatching, "d_a_obj_door", "REL/d/a/obj/d_a_obj_door.cpp"), Rel(NonMatching, "d_a_obj_door_bossD101", "REL/d/a/obj/d_a_obj_door_bossD101.cpp"), Rel(NonMatching, "d_a_obj_door_boss", "REL/d/a/obj/d_a_obj_door_boss.cpp"), - Rel(NonMatching, "d_a_obj_door_dungeonD200", "REL/d/a/obj/d_a_obj_door_dungeonD200.cpp"), + Rel( + NonMatching, + "d_a_obj_door_dungeonD200", + "REL/d/a/obj/d_a_obj_door_dungeonD200.cpp", + ), Rel(NonMatching, "d_a_obj_door_dungeon", "REL/d/a/obj/d_a_obj_door_dungeon.cpp"), - Rel(NonMatching, "d_a_obj_dormitory_gate", "REL/d/a/obj/d_a_obj_dormitory_gate.cpp"), + Rel( + NonMatching, "d_a_obj_dormitory_gate", "REL/d/a/obj/d_a_obj_dormitory_gate.cpp" + ), Rel(NonMatching, "d_a_obj_down_lava", "REL/d/a/obj/d_a_obj_down_lava.cpp"), Rel(NonMatching, "d_a_obj_drum", "REL/d/a/obj/d_a_obj_drum.cpp"), Rel(NonMatching, "d_a_obj_dungeon_ship", "REL/d/a/obj/d_a_obj_dungeon_ship.cpp"), - Rel(NonMatching, "d_a_obj_electric_light", "REL/d/a/obj/d_a_obj_electric_light.cpp"), + Rel( + NonMatching, "d_a_obj_electric_light", "REL/d/a/obj/d_a_obj_electric_light.cpp" + ), Rel(NonMatching, "d_a_obj_evil_field", "REL/d/a/obj/d_a_obj_evil_field.cpp"), Rel(NonMatching, "d_a_obj_F302_light", "REL/d/a/obj/d_a_obj_F302_light.cpp"), - Rel(NonMatching, "d_a_obj_F400_gate_leaf", "REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp"), - Rel(NonMatching, "d_a_obj_F400_gate_seal", "REL/d/a/obj/d_a_obj_F400_gate_seal.cpp"), + Rel( + NonMatching, "d_a_obj_F400_gate_leaf", "REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp" + ), + Rel( + NonMatching, "d_a_obj_F400_gate_seal", "REL/d/a/obj/d_a_obj_F400_gate_seal.cpp" + ), Rel(NonMatching, "d_a_obj_farmland", "REL/d/a/obj/d_a_obj_farmland.cpp"), Rel(NonMatching, "d_a_obj_fence", "REL/d/a/obj/d_a_obj_fence.cpp"), Rel(NonMatching, "d_a_obj_fence_boko2", "REL/d/a/obj/d_a_obj_fence_boko2.cpp"), @@ -1191,20 +1343,40 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_fire_obstacle", "REL/d/a/obj/d_a_obj_fire_obstacle.cpp"), Rel(NonMatching, "d_a_obj_fire_pillar", "REL/d/a/obj/d_a_obj_fire_pillar.cpp"), Rel(NonMatching, "d_a_obj_flag", "REL/d/a/obj/d_a_obj_flag.cpp"), - Rel(NonMatching, "d_a_obj_flower_ancient", "REL/d/a/obj/d_a_obj_flower_ancient.cpp"), - Rel(NonMatching, "d_a_obj_flying_clawshot_target", "REL/d/a/obj/d_a_obj_flying_clawshot_target.cpp"), + Rel( + NonMatching, "d_a_obj_flower_ancient", "REL/d/a/obj/d_a_obj_flower_ancient.cpp" + ), + Rel( + NonMatching, + "d_a_obj_flying_clawshot_target", + "REL/d/a/obj/d_a_obj_flying_clawshot_target.cpp", + ), Rel(NonMatching, "d_a_obj_fortune_ring", "REL/d/a/obj/d_a_obj_fortune_ring.cpp"), Rel(NonMatching, "d_a_obj_fruitB", "REL/d/a/obj/d_a_obj_fruitB.cpp"), Rel(NonMatching, "d_a_obj_fruit", "REL/d/a/obj/d_a_obj_fruit.cpp"), - Rel(NonMatching, "d_a_obj_fruit_guts_leaf", "REL/d/a/obj/d_a_obj_fruit_guts_leaf.cpp"), + Rel( + NonMatching, + "d_a_obj_fruit_guts_leaf", + "REL/d/a/obj/d_a_obj_fruit_guts_leaf.cpp", + ), Rel(NonMatching, "d_a_obj_fruit_tree", "REL/d/a/obj/d_a_obj_fruit_tree.cpp"), Rel(NonMatching, "d_a_obj_gear", "REL/d/a/obj/d_a_obj_gear.cpp"), - Rel(NonMatching, "d_a_obj_girahimu_floor", "REL/d/a/obj/d_a_obj_girahimu_floor.cpp"), - Rel(NonMatching, "d_a_obj_girahimu_knife", "REL/d/a/obj/d_a_obj_girahimu_knife.cpp"), - Rel(NonMatching, "d_a_obj_girahimu_sword_link", "REL/d/a/obj/d_a_obj_girahimu_sword_link.cpp"), + Rel( + NonMatching, "d_a_obj_girahimu_floor", "REL/d/a/obj/d_a_obj_girahimu_floor.cpp" + ), + Rel( + NonMatching, "d_a_obj_girahimu_knife", "REL/d/a/obj/d_a_obj_girahimu_knife.cpp" + ), + Rel( + NonMatching, + "d_a_obj_girahimu_sword_link", + "REL/d/a/obj/d_a_obj_girahimu_sword_link.cpp", + ), Rel(NonMatching, "d_a_obj_girahim_foot", "REL/d/a/obj/d_a_obj_girahim_foot.cpp"), Rel(NonMatching, "d_a_obj_goddess_cube", "REL/d/a/obj/d_a_obj_goddess_cube.cpp"), - Rel(NonMatching, "d_a_obj_goddess_statue", "REL/d/a/obj/d_a_obj_goddess_statue.cpp"), + Rel( + NonMatching, "d_a_obj_goddess_statue", "REL/d/a/obj/d_a_obj_goddess_statue.cpp" + ), Rel(NonMatching, "d_a_obj_god_mark", "REL/d/a/obj/d_a_obj_god_mark.cpp"), Rel(NonMatching, "d_a_obj_grass_coil", "REL/d/a/obj/d_a_obj_grass_coil.cpp"), Rel(NonMatching, "d_a_obj_grave", "REL/d/a/obj/d_a_obj_grave.cpp"), @@ -1221,12 +1393,19 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_iron_stage", "REL/d/a/obj/d_a_obj_iron_stage.cpp"), Rel(NonMatching, "d_a_obj_island_LOD", "REL/d/a/obj/d_a_obj_island_LOD.cpp"), Rel(NonMatching, "d_a_obj_island_nusi", "REL/d/a/obj/d_a_obj_island_nusi.cpp"), - Rel(NonMatching, "d_a_obj_item_heart_container", "REL/d/a/obj/d_a_obj_item_heart_container.cpp"), + Rel( + NonMatching, + "d_a_obj_item_heart_container", + "REL/d/a/obj/d_a_obj_item_heart_container.cpp", + ), Rel(NonMatching, "d_a_obj_ivy_rope", "REL/d/a/obj/d_a_obj_ivy_rope.cpp"), - MultiRel("d_a_obj_junk_repairing", [ - Object(Matching, "REL/d/a/obj/d_a_obj_junk_repairing.cpp"), - Object(Matching, "REL/d/a/obj/d_a_obj_junk_repairing_data.cpp"), - ]), + MultiRel( + "d_a_obj_junk_repairing", + [ + Object(Matching, "REL/d/a/obj/d_a_obj_junk_repairing.cpp"), + Object(Matching, "REL/d/a/obj/d_a_obj_junk_repairing_data.cpp"), + ], + ), Rel(NonMatching, "d_a_obj_kanban_stone", "REL/d/a/obj/d_a_obj_kanban_stone.cpp"), Rel(NonMatching, "d_a_obj_kibako", "REL/d/a/obj/d_a_obj_kibako.cpp"), Rel(NonMatching, "d_a_obj_kumite_wall", "REL/d/a/obj/d_a_obj_kumite_wall.cpp"), @@ -1235,10 +1414,22 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(Matching, "d_a_obj_lava_F200", "REL/d/a/obj/d_a_obj_lava_F200.cpp"), Rel(NonMatching, "d_a_obj_lava_plate", "REL/d/a/obj/d_a_obj_lava_plate.cpp"), Rel(NonMatching, "d_a_obj_leaf_swing", "REL/d/a/obj/d_a_obj_leaf_swing.cpp"), - Rel(NonMatching, "d_a_obj_lighthouse_harp", "REL/d/a/obj/d_a_obj_lighthouse_harp.cpp"), - Rel(NonMatching, "d_a_obj_lighthouse_light", "REL/d/a/obj/d_a_obj_lighthouse_light.cpp"), + Rel( + NonMatching, + "d_a_obj_lighthouse_harp", + "REL/d/a/obj/d_a_obj_lighthouse_harp.cpp", + ), + Rel( + NonMatching, + "d_a_obj_lighthouse_light", + "REL/d/a/obj/d_a_obj_lighthouse_light.cpp", + ), Rel(NonMatching, "d_a_obj_light_line", "REL/d/a/obj/d_a_obj_light_line.cpp"), - Rel(NonMatching, "d_a_obj_light_shaft_small", "REL/d/a/obj/d_a_obj_light_shaft_small.cpp"), + Rel( + NonMatching, + "d_a_obj_light_shaft_small", + "REL/d/a/obj/d_a_obj_light_shaft_small.cpp", + ), Rel(NonMatching, "d_a_obj_lock", "REL/d/a/obj/d_a_obj_lock.cpp"), Rel(NonMatching, "d_a_obj_log", "REL/d/a/obj/d_a_obj_log.cpp"), Rel(NonMatching, "d_a_obj_log_water", "REL/d/a/obj/d_a_obj_log_water.cpp"), @@ -1255,9 +1446,15 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_musasabi", "REL/d/a/obj/d_a_obj_musasabi.cpp"), Rel(NonMatching, "d_a_obj_mushroom", "REL/d/a/obj/d_a_obj_mushroom.cpp"), Rel(NonMatching, "d_a_obj_needle_desert", "REL/d/a/obj/d_a_obj_needle_desert.cpp"), - Rel(NonMatching, "d_a_obj_needle_underground", "REL/d/a/obj/d_a_obj_needle_underground.cpp"), + Rel( + NonMatching, + "d_a_obj_needle_underground", + "REL/d/a/obj/d_a_obj_needle_underground.cpp", + ), Rel(NonMatching, "d_a_obj_oct_grass", "REL/d/a/obj/d_a_obj_oct_grass.cpp"), - Rel(NonMatching, "d_a_obj_oct_grass_leaf", "REL/d/a/obj/d_a_obj_oct_grass_leaf.cpp"), + Rel( + NonMatching, "d_a_obj_oct_grass_leaf", "REL/d/a/obj/d_a_obj_oct_grass_leaf.cpp" + ), Rel(NonMatching, "d_a_obj_paint", "REL/d/a/obj/d_a_obj_paint.cpp"), Rel(NonMatching, "d_a_obj_pinwheel", "REL/d/a/obj/d_a_obj_pinwheel.cpp"), Rel(NonMatching, "d_a_obj_pipe", "REL/d/a/obj/d_a_obj_pipe.cpp"), @@ -1265,7 +1462,9 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_pole_stony", "REL/d/a/obj/d_a_obj_pole_stony.cpp"), Rel(Matching, "d_a_obj_pool_cock", "REL/d/a/obj/d_a_obj_pool_cock.cpp"), Rel(NonMatching, "d_a_obj_pot_sal", "REL/d/a/obj/d_a_obj_pot_sal.cpp"), - Rel(NonMatching, "d_a_obj_propeller_lift", "REL/d/a/obj/d_a_obj_propeller_lift.cpp"), + Rel( + NonMatching, "d_a_obj_propeller_lift", "REL/d/a/obj/d_a_obj_propeller_lift.cpp" + ), Rel(NonMatching, "d_a_obj_propera", "REL/d/a/obj/d_a_obj_propera.cpp"), Rel(NonMatching, "d_a_obj_pumpkin_bar", "REL/d/a/obj/d_a_obj_pumpkin_bar.cpp"), Rel(Matching, "d_a_obj_pumpkin_leaf", "REL/d/a/obj/d_a_obj_pumpkin_leaf.cpp"), @@ -1282,10 +1481,20 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_roll_rock", "REL/d/a/obj/d_a_obj_roll_rock.cpp"), Rel(NonMatching, "d_a_obj_rope_base", "REL/d/a/obj/d_a_obj_rope_base.cpp"), Rel(NonMatching, "d_a_obj_rope_igaiga", "REL/d/a/obj/d_a_obj_rope_igaiga.cpp"), - Rel(NonMatching, "d_a_obj_rotation_light", "REL/d/a/obj/d_a_obj_rotation_light.cpp"), + Rel( + NonMatching, "d_a_obj_rotation_light", "REL/d/a/obj/d_a_obj_rotation_light.cpp" + ), Rel(NonMatching, "d_a_obj_roulette", "REL/d/a/obj/d_a_obj_roulette.cpp"), - Rel(NonMatching, "d_a_obj_roulette_island_c", "REL/d/a/obj/d_a_obj_roulette_island_c.cpp"), - Rel(NonMatching, "d_a_obj_roulette_island_r", "REL/d/a/obj/d_a_obj_roulette_island_r.cpp"), + Rel( + NonMatching, + "d_a_obj_roulette_island_c", + "REL/d/a/obj/d_a_obj_roulette_island_c.cpp", + ), + Rel( + NonMatching, + "d_a_obj_roulette_island_r", + "REL/d/a/obj/d_a_obj_roulette_island_r.cpp", + ), Rel(NonMatching, "d_a_obj_ro_at_target", "REL/d/a/obj/d_a_obj_ro_at_target.cpp"), Rel(NonMatching, "d_a_obj_ruined_save", "REL/d/a/obj/d_a_obj_ruined_save.cpp"), Rel(NonMatching, "d_a_obj_sail", "REL/d/a/obj/d_a_obj_sail.cpp"), @@ -1301,18 +1510,34 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_ship_window", "REL/d/a/obj/d_a_obj_ship_window.cpp"), Rel(NonMatching, "d_a_obj_shrine_after", "REL/d/a/obj/d_a_obj_shrine_after.cpp"), Rel(NonMatching, "d_a_obj_shrine_before", "REL/d/a/obj/d_a_obj_shrine_before.cpp"), - Rel(NonMatching, "d_a_obj_shrine_bef_inside", "REL/d/a/obj/d_a_obj_shrine_bef_inside.cpp"), + Rel( + NonMatching, + "d_a_obj_shrine_bef_inside", + "REL/d/a/obj/d_a_obj_shrine_bef_inside.cpp", + ), Rel(NonMatching, "d_a_obj_shutter", "REL/d/a/obj/d_a_obj_shutter.cpp"), - Rel(NonMatching, "d_a_obj_shutter_change_scene", "REL/d/a/obj/d_a_obj_shutter_change_scene.cpp"), + Rel( + NonMatching, + "d_a_obj_shutter_change_scene", + "REL/d/a/obj/d_a_obj_shutter_change_scene.cpp", + ), Rel(NonMatching, "d_a_obj_shutter_fence", "REL/d/a/obj/d_a_obj_shutter_fence.cpp"), - Rel(NonMatching, "d_a_obj_shutter_waterD101", "REL/d/a/obj/d_a_obj_shutter_waterD101.cpp"), + Rel( + NonMatching, + "d_a_obj_shutter_waterD101", + "REL/d/a/obj/d_a_obj_shutter_waterD101.cpp", + ), Rel(NonMatching, "d_a_obj_side_shutter", "REL/d/a/obj/d_a_obj_side_shutter.cpp"), Rel(NonMatching, "d_a_obj_sink_floor_f", "REL/d/a/obj/d_a_obj_sink_floor_f.cpp"), Rel(NonMatching, "d_a_obj_siren_2dmap", "REL/d/a/obj/d_a_obj_siren_2dmap.cpp"), Rel(NonMatching, "d_a_obj_siren_barrier", "REL/d/a/obj/d_a_obj_siren_barrier.cpp"), Rel(NonMatching, "d_a_obj_skull", "REL/d/a/obj/d_a_obj_skull.cpp"), Rel(NonMatching, "d_a_obj_slice_log", "REL/d/a/obj/d_a_obj_slice_log.cpp"), - Rel(NonMatching, "d_a_obj_slice_log_parts", "REL/d/a/obj/d_a_obj_slice_log_parts.cpp"), + Rel( + NonMatching, + "d_a_obj_slice_log_parts", + "REL/d/a/obj/d_a_obj_slice_log_parts.cpp", + ), Rel(Matching, "d_a_obj_smoke", "REL/d/a/obj/d_a_obj_smoke.cpp"), Rel(NonMatching, "d_a_obj_soil", "REL/d/a/obj/d_a_obj_soil.cpp"), Rel(NonMatching, "d_a_obj_spider_line", "REL/d/a/obj/d_a_obj_spider_line.cpp"), @@ -1321,19 +1546,27 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_stage_crack", "REL/d/a/obj/d_a_obj_stage_crack.cpp"), Rel(NonMatching, "d_a_obj_stage_debris", "REL/d/a/obj/d_a_obj_stage_debris.cpp"), Rel(NonMatching, "d_a_obj_stage_kraken", "REL/d/a/obj/d_a_obj_stage_kraken.cpp"), - Rel(NonMatching, "d_a_obj_stage_kraken_parts", "REL/d/a/obj/d_a_obj_stage_kraken_parts.cpp"), + Rel( + NonMatching, + "d_a_obj_stage_kraken_parts", + "REL/d/a/obj/d_a_obj_stage_kraken_parts.cpp", + ), Rel(NonMatching, "d_a_obj_stage_sink", "REL/d/a/obj/d_a_obj_stage_sink.cpp"), Rel(NonMatching, "d_a_obj_stage_water", "REL/d/a/obj/d_a_obj_stage_water.cpp"), Rel(NonMatching, "d_a_obj_step_gumarm", "REL/d/a/obj/d_a_obj_step_gumarm.cpp"), Rel(NonMatching, "d_a_obj_step_statue", "REL/d/a/obj/d_a_obj_step_statue.cpp"), - Rel(NonMatching, "d_a_obj_step_time_slip", "REL/d/a/obj/d_a_obj_step_time_slip.cpp"), + Rel( + NonMatching, "d_a_obj_step_time_slip", "REL/d/a/obj/d_a_obj_step_time_slip.cpp" + ), Rel(NonMatching, "d_a_obj_stone_stand", "REL/d/a/obj/d_a_obj_stone_stand.cpp"), Rel(NonMatching, "d_a_obj_stopper_rock", "REL/d/a/obj/d_a_obj_stopper_rock.cpp"), Rel(NonMatching, "d_a_obj_stopping_rope", "REL/d/a/obj/d_a_obj_stopping_rope.cpp"), Rel(NonMatching, "d_a_obj_stream_lava", "REL/d/a/obj/d_a_obj_stream_lava.cpp"), Rel(Matching, "d_a_obj_sun_light", "REL/d/a/obj/d_a_obj_sun_light.cpp"), Rel(NonMatching, "d_a_obj_swhit", "REL/d/a/obj/d_a_obj_swhit.cpp"), - Rel(NonMatching, "d_a_obj_switch_shutter", "REL/d/a/obj/d_a_obj_switch_shutter.cpp"), + Rel( + NonMatching, "d_a_obj_switch_shutter", "REL/d/a/obj/d_a_obj_switch_shutter.cpp" + ), Rel(NonMatching, "d_a_obj_switch_wall", "REL/d/a/obj/d_a_obj_switch_wall.cpp"), Rel(NonMatching, "d_a_obj_sword_candle", "REL/d/a/obj/d_a_obj_sword_candle.cpp"), Rel(NonMatching, "d_a_obj_sword_stab", "REL/d/a/obj/d_a_obj_sword_stab.cpp"), @@ -1352,7 +1585,9 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_tarzan_pole", "REL/d/a/obj/d_a_obj_tarzan_pole.cpp"), Rel(NonMatching, "d_a_obj_tenijima", "REL/d/a/obj/d_a_obj_tenijima.cpp"), Rel(NonMatching, "d_a_obj_teni_rail", "REL/d/a/obj/d_a_obj_teni_rail.cpp"), - Rel(NonMatching, "d_a_obj_teni_rail_post", "REL/d/a/obj/d_a_obj_teni_rail_post.cpp"), + Rel( + NonMatching, "d_a_obj_teni_rail_post", "REL/d/a/obj/d_a_obj_teni_rail_post.cpp" + ), Rel(NonMatching, "d_a_obj_terry_bicycle", "REL/d/a/obj/d_a_obj_terry_bicycle.cpp"), Rel(NonMatching, "d_a_obj_terry_gimmick", "REL/d/a/obj/d_a_obj_terry_gimmick.cpp"), Rel(NonMatching, "d_a_obj_terry_hole", "REL/d/a/obj/d_a_obj_terry_hole.cpp"), @@ -1362,58 +1597,126 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_time_base", "REL/d/a/obj/d_a_obj_time_base.cpp"), Rel(NonMatching, "d_a_obj_time_block", "REL/d/a/obj/d_a_obj_time_block.cpp"), Rel(NonMatching, "d_a_obj_time_boat", "REL/d/a/obj/d_a_obj_time_boat.cpp"), - Rel(NonMatching, "d_a_obj_time_boat_bullet", "REL/d/a/obj/d_a_obj_time_boat_bullet.cpp"), + Rel( + NonMatching, + "d_a_obj_time_boat_bullet", + "REL/d/a/obj/d_a_obj_time_boat_bullet.cpp", + ), Rel(NonMatching, "d_a_obj_time_door", "REL/d/a/obj/d_a_obj_time_door.cpp"), - Rel(NonMatching, "d_a_obj_time_door_before", "REL/d/a/obj/d_a_obj_time_door_before.cpp"), + Rel( + NonMatching, + "d_a_obj_time_door_before", + "REL/d/a/obj/d_a_obj_time_door_before.cpp", + ), Rel(NonMatching, "d_a_obj_time_stage_bg", "REL/d/a/obj/d_a_obj_time_stage_bg.cpp"), Rel(NonMatching, "d_a_obj_time_stone", "REL/d/a/obj/d_a_obj_time_stone.cpp"), - Rel(Matching, "d_a_obj_toD3_stone_figure", "REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp"), + Rel( + Matching, + "d_a_obj_toD3_stone_figure", + "REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp", + ), Rel(NonMatching, "d_a_obj_toge_trap", "REL/d/a/obj/d_a_obj_toge_trap.cpp"), Rel(NonMatching, "d_a_obj_tornado", "REL/d/a/obj/d_a_obj_tornado.cpp"), Rel(NonMatching, "d_a_obj_tower_bomb", "REL/d/a/obj/d_a_obj_tower_bomb.cpp"), Rel(NonMatching, "d_a_obj_tower_D101", "REL/d/a/obj/d_a_obj_tower_D101.cpp"), - Rel(NonMatching, "d_a_obj_tower_gearD101", "REL/d/a/obj/d_a_obj_tower_gearD101.cpp"), - Rel(NonMatching, "d_a_obj_tower_hand_D101", "REL/d/a/obj/d_a_obj_tower_hand_D101.cpp"), - Rel(NonMatching, "d_a_obj_trap_bird_wood", "REL/d/a/obj/d_a_obj_trap_bird_wood.cpp"), + Rel( + NonMatching, "d_a_obj_tower_gearD101", "REL/d/a/obj/d_a_obj_tower_gearD101.cpp" + ), + Rel( + NonMatching, + "d_a_obj_tower_hand_D101", + "REL/d/a/obj/d_a_obj_tower_hand_D101.cpp", + ), + Rel( + NonMatching, "d_a_obj_trap_bird_wood", "REL/d/a/obj/d_a_obj_trap_bird_wood.cpp" + ), Rel(NonMatching, "d_a_obj_trap_rock_1", "REL/d/a/obj/d_a_obj_trap_rock_1.cpp"), - Rel(NonMatching, "d_a_obj_treasure_island", "REL/d/a/obj/d_a_obj_treasure_island.cpp"), - Rel(NonMatching, "d_a_obj_treasure_island_b", "REL/d/a/obj/d_a_obj_treasure_island_b.cpp"), + Rel( + NonMatching, + "d_a_obj_treasure_island", + "REL/d/a/obj/d_a_obj_treasure_island.cpp", + ), + Rel( + NonMatching, + "d_a_obj_treasure_island_b", + "REL/d/a/obj/d_a_obj_treasure_island_b.cpp", + ), Rel(Matching, "d_a_obj_triforce", "REL/d/a/obj/d_a_obj_triforce.cpp"), Rel(NonMatching, "d_a_obj_trolley", "REL/d/a/obj/d_a_obj_trolley.cpp"), - Rel(NonMatching, "d_a_obj_trolley_shutter", "REL/d/a/obj/d_a_obj_trolley_shutter.cpp"), + Rel( + NonMatching, + "d_a_obj_trolley_shutter", + "REL/d/a/obj/d_a_obj_trolley_shutter.cpp", + ), Rel(NonMatching, "d_a_obj_truck", "REL/d/a/obj/d_a_obj_truck.cpp"), - Rel(NonMatching, "d_a_obj_truck_rail_col", "REL/d/a/obj/d_a_obj_truck_rail_col.cpp"), + Rel( + NonMatching, "d_a_obj_truck_rail_col", "REL/d/a/obj/d_a_obj_truck_rail_col.cpp" + ), Rel(NonMatching, "d_a_obj_truck_stopper", "REL/d/a/obj/d_a_obj_truck_stopper.cpp"), Rel(NonMatching, "d_a_obj_tr_shutter_cs", "REL/d/a/obj/d_a_obj_tr_shutter_cs.cpp"), Rel(NonMatching, "d_a_obj_tubo", "REL/d/a/obj/d_a_obj_tubo.cpp"), Rel(NonMatching, "d_a_obj_tubo_big", "REL/d/a/obj/d_a_obj_tubo_big.cpp"), Rel(NonMatching, "d_a_obj_tumble_weed", "REL/d/a/obj/d_a_obj_tumble_weed.cpp"), Rel(NonMatching, "d_a_obj_underground", "REL/d/a/obj/d_a_obj_underground.cpp"), - Rel(NonMatching, "d_a_obj_underground_switch", "REL/d/a/obj/d_a_obj_underground_switch.cpp"), + Rel( + NonMatching, + "d_a_obj_underground_switch", + "REL/d/a/obj/d_a_obj_underground_switch.cpp", + ), Rel(NonMatching, "d_a_obj_under_cloud", "REL/d/a/obj/d_a_obj_under_cloud.cpp"), Rel(NonMatching, "d_a_obj_updown_lava", "REL/d/a/obj/d_a_obj_updown_lava.cpp"), Rel(NonMatching, "d_a_obj_utajima", "REL/d/a/obj/d_a_obj_utajima.cpp"), - Rel(NonMatching, "d_a_obj_utajima_island", "REL/d/a/obj/d_a_obj_utajima_island.cpp"), + Rel( + NonMatching, "d_a_obj_utajima_island", "REL/d/a/obj/d_a_obj_utajima_island.cpp" + ), Rel(NonMatching, "d_a_obj_utajima_lv2", "REL/d/a/obj/d_a_obj_utajima_lv2.cpp"), - Rel(NonMatching, "d_a_obj_utajima_main_mecha", "REL/d/a/obj/d_a_obj_utajima_main_mecha.cpp"), - Rel(NonMatching, "d_a_obj_utajima_pedestal", "REL/d/a/obj/d_a_obj_utajima_pedestal.cpp"), - Rel(NonMatching, "d_a_obj_utajima_stopper", "REL/d/a/obj/d_a_obj_utajima_stopper.cpp"), - Rel(NonMatching, "d_a_obj_uta_demo_pedest", "REL/d/a/obj/d_a_obj_uta_demo_pedest.cpp"), + Rel( + NonMatching, + "d_a_obj_utajima_main_mecha", + "REL/d/a/obj/d_a_obj_utajima_main_mecha.cpp", + ), + Rel( + NonMatching, + "d_a_obj_utajima_pedestal", + "REL/d/a/obj/d_a_obj_utajima_pedestal.cpp", + ), + Rel( + NonMatching, + "d_a_obj_utajima_stopper", + "REL/d/a/obj/d_a_obj_utajima_stopper.cpp", + ), + Rel( + NonMatching, + "d_a_obj_uta_demo_pedest", + "REL/d/a/obj/d_a_obj_uta_demo_pedest.cpp", + ), Rel(NonMatching, "d_a_obj_vacu_dust", "REL/d/a/obj/d_a_obj_vacu_dust.cpp"), - Rel(NonMatching, "d_a_obj_vacu_dust_parts", "REL/d/a/obj/d_a_obj_vacu_dust_parts.cpp"), + Rel( + NonMatching, + "d_a_obj_vacu_dust_parts", + "REL/d/a/obj/d_a_obj_vacu_dust_parts.cpp", + ), Rel(NonMatching, "d_a_obj_vd_bullet", "REL/d/a/obj/d_a_obj_vd_bullet.cpp"), Rel(NonMatching, "d_a_obj_vent_fan", "REL/d/a/obj/d_a_obj_vent_fan.cpp"), Rel(NonMatching, "d_a_obj_vortex", "REL/d/a/obj/d_a_obj_vortex.cpp"), Rel(NonMatching, "d_a_obj_warp", "REL/d/a/obj/d_a_obj_warp.cpp"), Rel(NonMatching, "d_a_obj_warp_hole", "REL/d/a/obj/d_a_obj_warp_hole.cpp"), - Rel(NonMatching, "d_a_obj_waterfall_D100", "REL/d/a/obj/d_a_obj_waterfall_D100.cpp"), - Rel(NonMatching, "d_a_obj_waterfall_D101", "REL/d/a/obj/d_a_obj_waterfall_D101.cpp"), - Rel(NonMatching, "d_a_obj_waterfall_F102", "REL/d/a/obj/d_a_obj_waterfall_F102.cpp"), + Rel( + NonMatching, "d_a_obj_waterfall_D100", "REL/d/a/obj/d_a_obj_waterfall_D100.cpp" + ), + Rel( + NonMatching, "d_a_obj_waterfall_D101", "REL/d/a/obj/d_a_obj_waterfall_D101.cpp" + ), + Rel( + NonMatching, "d_a_obj_waterfall_F102", "REL/d/a/obj/d_a_obj_waterfall_F102.cpp" + ), Rel(NonMatching, "d_a_obj_water_F100", "REL/d/a/obj/d_a_obj_water_F100.cpp"), Rel(NonMatching, "d_a_obj_water_igaiga", "REL/d/a/obj/d_a_obj_water_igaiga.cpp"), Rel(NonMatching, "d_a_obj_water_jar", "REL/d/a/obj/d_a_obj_water_jar.cpp"), Rel(NonMatching, "d_a_obj_water_nut", "REL/d/a/obj/d_a_obj_water_nut.cpp"), - Rel(NonMatching, "d_a_obj_water_nut_leaf", "REL/d/a/obj/d_a_obj_water_nut_leaf.cpp"), + Rel( + NonMatching, "d_a_obj_water_nut_leaf", "REL/d/a/obj/d_a_obj_water_nut_leaf.cpp" + ), Rel(NonMatching, "d_a_obj_water_shield", "REL/d/a/obj/d_a_obj_water_shield.cpp"), Rel(NonMatching, "d_a_obj_water_surface", "REL/d/a/obj/d_a_obj_water_surface.cpp"), Rel(NonMatching, "d_a_obj_water_switch", "REL/d/a/obj/d_a_obj_water_switch.cpp"), @@ -1421,7 +1724,11 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_a_obj_wind03", "REL/d/a/obj/d_a_obj_wind03.cpp"), Rel(NonMatching, "d_a_obj_wind04", "REL/d/a/obj/d_a_obj_wind04.cpp"), Rel(NonMatching, "d_a_obj_windmill", "REL/d/a/obj/d_a_obj_windmill.cpp"), - Rel(NonMatching, "d_a_obj_windmill_desert", "REL/d/a/obj/d_a_obj_windmill_desert.cpp"), + Rel( + NonMatching, + "d_a_obj_windmill_desert", + "REL/d/a/obj/d_a_obj_windmill_desert.cpp", + ), Rel(NonMatching, "d_a_obj_wind", "REL/d/a/obj/d_a_obj_wind.cpp"), Rel(NonMatching, "d_a_obj_wood_board", "REL/d/a/obj/d_a_obj_wood_board.cpp"), Rel(NonMatching, "d_a_or_cannon_bullet", "REL/d/a/d_a_or_cannon_bullet.cpp"), @@ -1473,7 +1780,11 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_t_map_mark", "REL/d/t/d_t_map_mark.cpp"), Rel(NonMatching, "d_t_megami_diving", "REL/d/t/d_t_megami_diving.cpp"), Rel(NonMatching, "d_t_miechan", "REL/d/t/d_t_miechan.cpp"), - Rel(NonMatching, "d_t_minigame_insect_capture", "REL/d/t/d_t_minigame_insect_capture.cpp"), + Rel( + NonMatching, + "d_t_minigame_insect_capture", + "REL/d/t/d_t_minigame_insect_capture.cpp", + ), Rel(NonMatching, "d_t_mist", "REL/d/t/d_t_mist.cpp"), Rel(NonMatching, "d_t_mole_mgr", "REL/d/t/d_t_mole_mgr.cpp"), Rel(Matching, "d_t_mole_prohibit", "REL/d/t/d_t_mole_prohibit.cpp"), @@ -1489,13 +1800,23 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): Rel(NonMatching, "d_t_ride_rock_set", "REL/d/t/d_t_ride_rock_set.cpp"), Rel(Matching, "d_t_rock_boat", "REL/d/t/d_t_rock_boat.cpp"), Rel(NonMatching, "d_t_roll_attack_log", "REL/d/t/d_t_roll_attack_log.cpp"), - Rel(NonMatching, "d_t_ro_at_target_manager", "REL/d/t/d_t_ro_at_target_manager.cpp"), + Rel( + NonMatching, "d_t_ro_at_target_manager", "REL/d/t/d_t_ro_at_target_manager.cpp" + ), Rel(NonMatching, "d_t_scene_change", "REL/d/t/d_t_scene_change.cpp"), Rel(NonMatching, "d_t_ship_flood", "REL/d/t/d_t_ship_flood.cpp"), Rel(NonMatching, "d_t_ship_slope", "REL/d/t/d_t_ship_slope.cpp"), Rel(Matching, "d_t_ship_window", "REL/d/t/d_t_ship_window.cpp"), - Rel(NonMatching, "d_t_shutter_fence_forbiddance", "REL/d/t/d_t_shutter_fence_forbiddance.cpp"), - Rel(NonMatching, "d_t_shutter_fence_permission", "REL/d/t/d_t_shutter_fence_permission.cpp"), + Rel( + NonMatching, + "d_t_shutter_fence_forbiddance", + "REL/d/t/d_t_shutter_fence_forbiddance.cpp", + ), + Rel( + NonMatching, + "d_t_shutter_fence_permission", + "REL/d/t/d_t_shutter_fence_permission.cpp", + ), Rel(NonMatching, "d_t_siren_time_attack", "REL/d/t/d_t_siren_time_attack.cpp"), Rel(NonMatching, "d_t_skyEnemy", "REL/d/t/d_t_skyEnemy.cpp"), Rel(NonMatching, "d_t_sound", "REL/d/t/d_t_sound.cpp"), @@ -1531,7 +1852,6 @@ def nw4rLib(lib_name, objects, extra_cflags=[]): generate_build(config) elif args.mode == "progress": # Print progress and write progress.json - config.progress_each_module = args.verbose calculate_progress(config) else: sys.exit("Unknown mode: " + args.mode) diff --git a/include/DynamicLink.h b/include/DynamicLink.h index c63c3077..b4638c68 100644 --- a/include/DynamicLink.h +++ b/include/DynamicLink.h @@ -1,18 +1,19 @@ #ifndef DYNAMICLINK_H #define DYNAMICLINK_H -#include -#include -#include -#include +#include "common.h" +#include "m/m_dvd.h" +#include "nw4r/db/db_mapFile.h" +#include "rvl/OS.h" // IWYU pragma: export class DbMapFile { public: - DbMapFile(): mMapFileHandle(nullptr) {} + DbMapFile() : mMapFileHandle(nullptr) {} ~DbMapFile(); void RegisterOnDvd(const char *, const OSModuleInfo *); void Unregister(); + private: nw4r::db::MapFileHandle mMapFileHandle; nw4r::db::MapFile mMapFile; @@ -23,14 +24,14 @@ class DbMapFile { struct DynamicModuleControlBase { /* 0x00 */ u16 mLinkCount; /* 0x02 */ u16 mDoLinkCount; - /* 0x04 */ DynamicModuleControlBase* mPrev; - /* 0x08 */ DynamicModuleControlBase* mNext; + /* 0x04 */ DynamicModuleControlBase *mPrev; + /* 0x08 */ DynamicModuleControlBase *mNext; /* 0x0C */ /*vtable*/ /* 802df100 */ virtual ~DynamicModuleControlBase(); - /* 802df340 */ virtual const char* getModuleName() const; + /* 802df340 */ virtual const char *getModuleName() const; /* 802df350 */ virtual int getModuleSize() const; - /* 802df360 */ virtual const char* getModuleTypeString() const; + /* 802df360 */ virtual const char *getModuleTypeString() const; /* 802df370 */ virtual void dump(); /* 802df380 */ virtual bool do_load(); /* 802df390 */ virtual BOOL do_load_async(); @@ -42,28 +43,34 @@ struct DynamicModuleControlBase { /* 802df290 */ BOOL unlink(); /* 802df310 */ BOOL load_async(); - static inline DynamicModuleControlBase* getFirstClass() { return mFirst; } - inline DynamicModuleControlBase* getNextClass() { return mNext; } - bool isLinked() const { return mLinkCount != 0; } + static inline DynamicModuleControlBase *getFirstClass() { + return mFirst; + } + inline DynamicModuleControlBase *getNextClass() { + return mNext; + } + bool isLinked() const { + return mLinkCount != 0; + } - static DynamicModuleControlBase* mFirst; - static DynamicModuleControlBase* mLast; + static DynamicModuleControlBase *mFirst; + static DynamicModuleControlBase *mLast; }; struct DynamicModuleControl : DynamicModuleControlBase { - /* 802df4c0 */ virtual const char* getModuleName() const; + /* 802df4c0 */ virtual const char *getModuleName() const; /* 802df450 */ virtual ~DynamicModuleControl(); /* 802dfb10 */ virtual int getModuleSize() const; - /* 802dfb70 */ virtual const char* getModuleTypeString() const; + /* 802dfb70 */ virtual const char *getModuleTypeString() const; /* 802df800 */ virtual void dump(); /* 802df5d0 */ virtual bool do_load(); /* 802df710 */ virtual BOOL do_load_async(); /* 802df7a0 */ virtual bool do_unload(); /* 802df810 */ virtual BOOL do_link(); /* 802dfa60 */ virtual bool do_unlink(); - /* 802df3d0 */ DynamicModuleControl(char const*, EGG::ExpHeap *); + /* 802df3d0 */ DynamicModuleControl(char const *, EGG::ExpHeap *); /* 802df4d0 */ static void initialize(EGG::ExpHeap *heap); - /* 802df530 */ static u32 callback(void*); + /* 802df530 */ static u32 callback(void *); void checkHeapStatus(); /* 0x10 */ UNKWORD unk_16; diff --git a/include/MSL_C/MSL_Common/Src/FILE_POS.h b/include/MSL_C/MSL_Common/Src/FILE_POS.h deleted file mode 100644 index 867b1919..00000000 --- a/include/MSL_C/MSL_Common/Src/FILE_POS.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSL_COMMON_SRC_FILE_POS_H -#define MSL_COMMON_SRC_FILE_POS_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int fseek(FILE* file, long offset, int mode); -int _fseek(FILE* file, fpos_t offset, int mode); -long ftell(FILE* file); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_FILE_POS_H */ diff --git a/include/MSL_C/MSL_Common/Src/alloc.h b/include/MSL_C/MSL_Common/Src/alloc.h deleted file mode 100644 index 36617e39..00000000 --- a/include/MSL_C/MSL_Common/Src/alloc.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef MSL_COMMON_SRC_ALLOC_H -#define MSL_COMMON_SRC_ALLOC_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void free(FILE* file); -void __pool_free(int** param_1, unsigned int** param_2); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_ALLOC_H */ diff --git a/include/MSL_C/MSL_Common/Src/arith.h b/include/MSL_C/MSL_Common/Src/arith.h deleted file mode 100644 index 0cf3316b..00000000 --- a/include/MSL_C/MSL_Common/Src/arith.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MSL_COMMON_SRC_ARITH_H -#define MSL_COMMON_SRC_ARITH_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct { - int quot; /* quotient */ - int rem; /* remainder */ -} div_t; - -div_t div(int numerator, int denominator); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_ARITH_H */ diff --git a/include/MSL_C/MSL_Common/Src/buffer_io.h b/include/MSL_C/MSL_Common/Src/buffer_io.h deleted file mode 100644 index e020d543..00000000 --- a/include/MSL_C/MSL_Common/Src/buffer_io.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef MSL_COMMON_SRC_BUFFER_IO_H -#define MSL_COMMON_SRC_BUFFER_IO_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -enum { __align_buffer, __dont_align_buffer }; - -void __prep_buffer(FILE* file); -int __flush_buffer(FILE* file, size_t* bytes_flushed); - -#endif /* MSL_COMMON_SRC_BUFFER_IO_H */ diff --git a/include/MSL_C/MSL_Common/Src/char_io.h b/include/MSL_C/MSL_Common/Src/char_io.h deleted file mode 100644 index 47f7ac4e..00000000 --- a/include/MSL_C/MSL_Common/Src/char_io.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef MSL_COMMON_SRC_CHAR_IO_H -#define MSL_COMMON_SRC_CHAR_IO_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int fputs(const char* str, FILE* stream); -int __put_char(int c, FILE* stream); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_CHAR_IO_H */ diff --git a/include/MSL_C/MSL_Common/Src/file_io.h b/include/MSL_C/MSL_Common/Src/file_io.h deleted file mode 100644 index 0fe74469..00000000 --- a/include/MSL_C/MSL_Common/Src/file_io.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MSL_COMMON_SRC_FILE_IO_H -#define MSL_COMMON_SRC_FILE_IO_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int __msl_strnicmp(const char* str1, const char* str2, size_t n); -int fflush(FILE* file); -int fclose(FILE* file); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_FILE_IO_H */ diff --git a/include/MSL_C/MSL_Common/Src/float.h b/include/MSL_C/MSL_Common/Src/float.h deleted file mode 100644 index 0f3e5cd4..00000000 --- a/include/MSL_C/MSL_Common/Src/float.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef MSL_COMMON_SRC_FLOAT_H -#define MSL_COMMON_SRC_FLOAT_H - -#include "MSL_C/MSL_Common/Src/fdlibm.h" - -#define FP_SNAN 0 -#define FP_QNAN 1 -#define FP_INFINITE 2 -#define FP_ZERO 3 -#define FP_NORMAL 4 -#define FP_SUBNORMAL 5 - -#define FP_NAN FP_QNAN - -#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) : __fpclassifyd(x)) -#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) : __signbitd(x)) -#define isfinite(x) ((fpclassify(x) > 2)) - -#define __signbitf(x) ((*(unsigned char *)&(x)) & 0x80) - -// TODO: OK? -#define __signbitd(x) ((*(unsigned char *)&(x)) & 0x80) - -extern unsigned long __float_nan[]; -extern unsigned long __float_huge[]; -extern unsigned long __float_max[]; -extern unsigned long __float_epsilon[]; - -inline int __fpclassifyf(float __value) { - unsigned long integer = *(unsigned long *)&__value; - - switch (integer & 0x7f800000) { - case 0x7f800000: - if ((integer & 0x7fffff) != 0) { - return FP_QNAN; - } - return FP_INFINITE; - - case 0: - if ((integer & 0x7fffff) != 0) { - return FP_SUBNORMAL; - } - return FP_ZERO; - } - - return FP_NORMAL; -} - -inline int __fpclassifyd(double __value) { - switch (__HI(__value) & 0x7ff00000) { - case 0x7ff00000: { - if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff)) { - return FP_QNAN; - } else { - return FP_INFINITE; - } - break; - } - case 0: { - if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff)) { - return FP_SUBNORMAL; - } else { - return FP_ZERO; - } - break; - } - } - return FP_NORMAL; -} - -#endif /* MSL_COMMON_SRC_FLOAT_H */ diff --git a/include/MSL_C/MSL_Common/Src/limits b/include/MSL_C/MSL_Common/Src/limits deleted file mode 100644 index 3a3f49b9..00000000 --- a/include/MSL_C/MSL_Common/Src/limits +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _STD_LIMITS_H -#define _STD_LIMITS_H - -namespace std { -template -class numeric_limits { -public: - inline static T min(); - inline static T max(); -}; - -template <> -class numeric_limits { -public: - inline static char min() { return -0x80; } - inline static char max() { return 0x7F; } -}; - -template <> -class numeric_limits { -public: - inline static short min() { return -0x8000; } - inline static short max() { return 0x7FFF; } -}; - -template <> -class numeric_limits { -public: - inline static int min() { return -0x80000000; } - inline static int max() { return 0x7FFFFFFF; } -}; - -template <> -class numeric_limits { -public: - inline static long min() { return -0x80000000; } - inline static long max() { return 0x7FFFFFFF; } -}; - -template <> -class numeric_limits { -public: - inline static unsigned char min() { return 0x0; } - inline static unsigned char max() { return 0xFF; } -}; - -template <> -class numeric_limits { -public: - inline static unsigned short min() { return 0x0; } - inline static unsigned short max() { return 0xFFFF; } -}; - -template <> -class numeric_limits { -public: - inline static unsigned int min() { return 0x0; } - inline static unsigned int max() { return 0xFFFFFFFF; } -}; - -template <> -class numeric_limits { -public: - inline static unsigned long min() { return 0x0; } - inline static unsigned long max() { return 0xFFFFFFFF; } -}; - -} // namespace std - -#endif diff --git a/include/MSL_C/MSL_Common/Src/limits.h b/include/MSL_C/MSL_Common/Src/limits.h deleted file mode 100644 index dfc3623c..00000000 --- a/include/MSL_C/MSL_Common/Src/limits.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef MSL_LIMITS_H -#define MSL_LIMITS_H -#include -#ifdef __cplusplus -extern "C" { -#endif - -#define CHAR_BIT 8 - -#define SCHAR_MIN -127 -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -#define CHAR_MIN 0 -#define CHAR_MAX SCHAR_MAX - -#define SHRT_MIN -32767 -#define SHRT_MAX 32767 -#define USHRT_MAX 65535 - -#define INT_MIN -2147483647 -#define INT_MAX 2147483647 - -#define LONG_MIN INT_MIN -#define LONG_MAX INT_MAX -#define ULONG_MAX 4294967295 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/include/MSL_C/MSL_Common/Src/mbstring.h b/include/MSL_C/MSL_Common/Src/mbstring.h deleted file mode 100644 index e42bcd0e..00000000 --- a/include/MSL_C/MSL_Common/Src/mbstring.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSL_COMMON_SRC_MBSTRING_H -#define MSL_COMMON_SRC_MBSTRING_H - -#include "MSL_C/MSL_Common/Src/wchar_io.h" - -#ifdef __cplusplus -extern "C" { -#endif - -size_t wcstombs(char* dst, const wchar_t* src, size_t n); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_MBSTRING_H */ diff --git a/include/MSL_C/MSL_Common/Src/mem.h b/include/MSL_C/MSL_Common/Src/mem.h deleted file mode 100644 index 1cca85f1..00000000 --- a/include/MSL_C/MSL_Common/Src/mem.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MSL_COMMON_SRC_MEM_H -#define MSL_COMMON_SRC_MEM_H - -#include "MSL_C/MSL_Common/Src/stddef.h" - -#ifdef __cplusplus -extern "C" { -#endif - -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); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_MEM_H */ diff --git a/include/MSL_C/MSL_Common/Src/misc_io.h b/include/MSL_C/MSL_Common/Src/misc_io.h deleted file mode 100644 index 38604629..00000000 --- a/include/MSL_C/MSL_Common/Src/misc_io.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef MSL_COMMON_SRC_MISC_IO_H -#define MSL_COMMON_SRC_MISC_IO_H - -#ifdef __cplusplus -extern "C" { -#endif - -void __stdio_atexit(void); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_MISC_IO_H */ diff --git a/include/MSL_C/MSL_Common/Src/printf.h b/include/MSL_C/MSL_Common/Src/printf.h deleted file mode 100644 index 5e35c0f4..00000000 --- a/include/MSL_C/MSL_Common/Src/printf.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MSL_COMMON_SRC_PRINTF_H -#define MSL_COMMON_SRC_PRINTF_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" -#include "Runtime.PPCEABI.H/__va_arg.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int fprintf(FILE* stream, const char* format, ...); -int printf(const char* format, ...); -int sprintf(char* str, const char* format, ...); -int snprintf(char* str, size_t n, const char* format, ...); -int vsnprintf(char* str, size_t n, const char* format, va_list arg); -int vprintf(const char* format, va_list arg); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_PRINTF_H */ diff --git a/include/MSL_C/MSL_Common/Src/scanf.h b/include/MSL_C/MSL_Common/Src/scanf.h deleted file mode 100644 index d0a323df..00000000 --- a/include/MSL_C/MSL_Common/Src/scanf.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef MSL_COMMON_SRC_SCANF_H -#define MSL_COMMON_SRC_SCANF_H - -#ifdef __cplusplus -extern "C" { -#endif - -int __StringRead(char* str, int ch, int behavior); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_SCANF_H */ diff --git a/include/MSL_C/MSL_Common/Src/signal.h b/include/MSL_C/MSL_Common/Src/signal.h deleted file mode 100644 index 5906c8e8..00000000 --- a/include/MSL_C/MSL_Common/Src/signal.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef MSL_COMMON_SRC_SIGNAL_H -#define MSL_COMMON_SRC_SIGNAL_H - -#ifdef __cplusplus -extern "C" { -#endif - -int raise(int sig); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_SIGNAL_H */ diff --git a/include/MSL_C/MSL_Common/Src/string.h b/include/MSL_C/MSL_Common/Src/string.h deleted file mode 100644 index b4bcd08d..00000000 --- a/include/MSL_C/MSL_Common/Src/string.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef MSL_COMMON_SRC_STRING_H -#define MSL_COMMON_SRC_STRING_H - -#include "MSL_C/MSL_Common/Src/stddef.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); - -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); -int sscanf(const char *buffer, const char *format, ...); -size_t strlen(const char* str); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_STRING_H */ diff --git a/include/MSL_C/MSL_Common/Src/strtoul.h b/include/MSL_C/MSL_Common/Src/strtoul.h deleted file mode 100644 index a2888157..00000000 --- a/include/MSL_C/MSL_Common/Src/strtoul.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef MSL_COMMON_SRC_STRTOUL_H -#define MSL_COMMON_SRC_STRTOUL_H - -#ifdef __cplusplus -extern "C" { -#endif - -long strtol(const char* str, char** endptr, int base); -unsigned long strtoul(const char* str, char** endptr, int base); -unsigned long __strtoul(const char* str, char** endptr, int base); - -#ifdef __cplusplus -} -#endif - -#endif /* MSL_COMMON_SRC_STRTOUL_H */ diff --git a/include/MSL_C/MSL_Common/Src/wchar_io.h b/include/MSL_C/MSL_Common/Src/wchar_io.h deleted file mode 100644 index be6fb637..00000000 --- a/include/MSL_C/MSL_Common/Src/wchar_io.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef MSL_COMMON_SRC_WCHAR_IO_H -#define MSL_COMMON_SRC_WCHAR_IO_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif - -int fwide(FILE* file, int mode); - -#endif /* MSL_COMMON_SRC_WCHAR_IO_H */ diff --git a/include/MSL_C/MSL_Common/Src/wmem.h b/include/MSL_C/MSL_Common/Src/wmem.h deleted file mode 100644 index 33c89e57..00000000 --- a/include/MSL_C/MSL_Common/Src/wmem.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef MSL_WMEM_H -#define MSL_WMEM_H -#include -#ifdef __cplusplus -extern "C" { -#endif - -void *wmemcpy(void *, const void *, size_t); -void *wmemchr(const void *, int, size_t); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/include/MSL_C/MSL_Common_Embedded/Src/ansi_fp.h b/include/MSL_C/MSL_Common_Embedded/Src/ansi_fp.h deleted file mode 100644 index d4aac53f..00000000 --- a/include/MSL_C/MSL_Common_Embedded/Src/ansi_fp.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MSL_COMMON_EMBEDDED_SRC_ANSI_FP_H -#define MSL_COMMON_EMBEDDED_SRC_ANSI_FP_H - -#endif /* MSL_COMMON_EMBEDDED_SRC_ANSI_FP_H */ diff --git a/include/MSL_C/Math/Double_precision/e_acos.h b/include/MSL_C/Math/Double_precision/e_acos.h deleted file mode 100644 index f2e104c3..00000000 --- a/include/MSL_C/Math/Double_precision/e_acos.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_ACOS_H -#define MATH_DOUBLE_PRECISION_E_ACOS_H - -#endif /* MATH_DOUBLE_PRECISION_E_ACOS_H */ diff --git a/include/MSL_C/Math/Double_precision/e_asin.h b/include/MSL_C/Math/Double_precision/e_asin.h deleted file mode 100644 index c6ce59d9..00000000 --- a/include/MSL_C/Math/Double_precision/e_asin.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_ASIN_H -#define MATH_DOUBLE_PRECISION_E_ASIN_H - -#endif /* MATH_DOUBLE_PRECISION_E_ASIN_H */ diff --git a/include/MSL_C/Math/Double_precision/e_atan2.h b/include/MSL_C/Math/Double_precision/e_atan2.h deleted file mode 100644 index 4bbc9a36..00000000 --- a/include/MSL_C/Math/Double_precision/e_atan2.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_ATAN2_H -#define MATH_DOUBLE_PRECISION_E_ATAN2_H - -#endif /* MATH_DOUBLE_PRECISION_E_ATAN2_H */ diff --git a/include/MSL_C/Math/Double_precision/e_exp.h b/include/MSL_C/Math/Double_precision/e_exp.h deleted file mode 100644 index 3ce11ba1..00000000 --- a/include/MSL_C/Math/Double_precision/e_exp.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_EXP_H -#define MATH_DOUBLE_PRECISION_E_EXP_H - -#endif /* MATH_DOUBLE_PRECISION_E_EXP_H */ diff --git a/include/MSL_C/Math/Double_precision/e_fmod.h b/include/MSL_C/Math/Double_precision/e_fmod.h deleted file mode 100644 index 28be3497..00000000 --- a/include/MSL_C/Math/Double_precision/e_fmod.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_FMOD_H -#define MATH_DOUBLE_PRECISION_E_FMOD_H - -#endif /* MATH_DOUBLE_PRECISION_E_FMOD_H */ diff --git a/include/MSL_C/Math/Double_precision/e_pow.h b/include/MSL_C/Math/Double_precision/e_pow.h deleted file mode 100644 index 6143b168..00000000 --- a/include/MSL_C/Math/Double_precision/e_pow.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_POW_H -#define MATH_DOUBLE_PRECISION_E_POW_H - -#endif /* MATH_DOUBLE_PRECISION_E_POW_H */ diff --git a/include/MSL_C/Math/Double_precision/e_rem_pio2.h b/include/MSL_C/Math/Double_precision/e_rem_pio2.h deleted file mode 100644 index d020608c..00000000 --- a/include/MSL_C/Math/Double_precision/e_rem_pio2.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_REM_PIO2_H -#define MATH_DOUBLE_PRECISION_E_REM_PIO2_H - -#endif /* MATH_DOUBLE_PRECISION_E_REM_PIO2_H */ diff --git a/include/MSL_C/Math/Double_precision/e_sqrt.h b/include/MSL_C/Math/Double_precision/e_sqrt.h deleted file mode 100644 index 5804aad8..00000000 --- a/include/MSL_C/Math/Double_precision/e_sqrt.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_E_SQRT_H -#define MATH_DOUBLE_PRECISION_E_SQRT_H - -#endif /* MATH_DOUBLE_PRECISION_E_SQRT_H */ diff --git a/include/MSL_C/Math/Double_precision/k_cos.h b/include/MSL_C/Math/Double_precision/k_cos.h deleted file mode 100644 index e8827795..00000000 --- a/include/MSL_C/Math/Double_precision/k_cos.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_K_COS_H -#define MATH_DOUBLE_PRECISION_K_COS_H - -#endif /* MATH_DOUBLE_PRECISION_K_COS_H */ diff --git a/include/MSL_C/Math/Double_precision/k_rem_pio2.h b/include/MSL_C/Math/Double_precision/k_rem_pio2.h deleted file mode 100644 index 090a21cd..00000000 --- a/include/MSL_C/Math/Double_precision/k_rem_pio2.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_K_REM_PIO2_H -#define MATH_DOUBLE_PRECISION_K_REM_PIO2_H - -#endif /* MATH_DOUBLE_PRECISION_K_REM_PIO2_H */ diff --git a/include/MSL_C/Math/Double_precision/k_sin.h b/include/MSL_C/Math/Double_precision/k_sin.h deleted file mode 100644 index 23232823..00000000 --- a/include/MSL_C/Math/Double_precision/k_sin.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_K_SIN_H -#define MATH_DOUBLE_PRECISION_K_SIN_H - -#endif /* MATH_DOUBLE_PRECISION_K_SIN_H */ diff --git a/include/MSL_C/Math/Double_precision/k_tan.h b/include/MSL_C/Math/Double_precision/k_tan.h deleted file mode 100644 index 6e9427bd..00000000 --- a/include/MSL_C/Math/Double_precision/k_tan.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_K_TAN_H -#define MATH_DOUBLE_PRECISION_K_TAN_H - -#endif /* MATH_DOUBLE_PRECISION_K_TAN_H */ diff --git a/include/MSL_C/Math/Double_precision/s_atan.h b/include/MSL_C/Math/Double_precision/s_atan.h deleted file mode 100644 index 38ff7ec7..00000000 --- a/include/MSL_C/Math/Double_precision/s_atan.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_ATAN_H -#define MATH_DOUBLE_PRECISION_S_ATAN_H - -#endif /* MATH_DOUBLE_PRECISION_S_ATAN_H */ diff --git a/include/MSL_C/Math/Double_precision/s_ceil.h b/include/MSL_C/Math/Double_precision/s_ceil.h deleted file mode 100644 index 059f3f78..00000000 --- a/include/MSL_C/Math/Double_precision/s_ceil.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_CEIL_H -#define MATH_DOUBLE_PRECISION_S_CEIL_H - -#endif /* MATH_DOUBLE_PRECISION_S_CEIL_H */ diff --git a/include/MSL_C/Math/Double_precision/s_copysign.h b/include/MSL_C/Math/Double_precision/s_copysign.h deleted file mode 100644 index 62b07474..00000000 --- a/include/MSL_C/Math/Double_precision/s_copysign.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_COPYSIGN_H -#define MATH_DOUBLE_PRECISION_S_COPYSIGN_H - -#endif /* MATH_DOUBLE_PRECISION_S_COPYSIGN_H */ diff --git a/include/MSL_C/Math/Double_precision/s_cos.h b/include/MSL_C/Math/Double_precision/s_cos.h deleted file mode 100644 index 25f41b26..00000000 --- a/include/MSL_C/Math/Double_precision/s_cos.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_COS_H -#define MATH_DOUBLE_PRECISION_S_COS_H - -#endif /* MATH_DOUBLE_PRECISION_S_COS_H */ diff --git a/include/MSL_C/Math/Double_precision/s_floor.h b/include/MSL_C/Math/Double_precision/s_floor.h deleted file mode 100644 index 97f029f6..00000000 --- a/include/MSL_C/Math/Double_precision/s_floor.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_FLOOR_H -#define MATH_DOUBLE_PRECISION_S_FLOOR_H - -#endif /* MATH_DOUBLE_PRECISION_S_FLOOR_H */ diff --git a/include/MSL_C/Math/Double_precision/s_frexp.h b/include/MSL_C/Math/Double_precision/s_frexp.h deleted file mode 100644 index 4b2737e6..00000000 --- a/include/MSL_C/Math/Double_precision/s_frexp.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_FREXP_H -#define MATH_DOUBLE_PRECISION_S_FREXP_H - -#endif /* MATH_DOUBLE_PRECISION_S_FREXP_H */ diff --git a/include/MSL_C/Math/Double_precision/s_ldexp.h b/include/MSL_C/Math/Double_precision/s_ldexp.h deleted file mode 100644 index a989a334..00000000 --- a/include/MSL_C/Math/Double_precision/s_ldexp.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_LDEXP_H -#define MATH_DOUBLE_PRECISION_S_LDEXP_H - -#endif /* MATH_DOUBLE_PRECISION_S_LDEXP_H */ diff --git a/include/MSL_C/Math/Double_precision/s_modf.h b/include/MSL_C/Math/Double_precision/s_modf.h deleted file mode 100644 index 550b845c..00000000 --- a/include/MSL_C/Math/Double_precision/s_modf.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_MODF_H -#define MATH_DOUBLE_PRECISION_S_MODF_H - -#endif /* MATH_DOUBLE_PRECISION_S_MODF_H */ diff --git a/include/MSL_C/Math/Double_precision/s_sin.h b/include/MSL_C/Math/Double_precision/s_sin.h deleted file mode 100644 index c7bb02e1..00000000 --- a/include/MSL_C/Math/Double_precision/s_sin.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_SIN_H -#define MATH_DOUBLE_PRECISION_S_SIN_H - -#endif /* MATH_DOUBLE_PRECISION_S_SIN_H */ diff --git a/include/MSL_C/Math/Double_precision/s_tan.h b/include/MSL_C/Math/Double_precision/s_tan.h deleted file mode 100644 index e7076407..00000000 --- a/include/MSL_C/Math/Double_precision/s_tan.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_S_TAN_H -#define MATH_DOUBLE_PRECISION_S_TAN_H - -#endif /* MATH_DOUBLE_PRECISION_S_TAN_H */ diff --git a/include/MSL_C/Math/Double_precision/w_acos.h b/include/MSL_C/Math/Double_precision/w_acos.h deleted file mode 100644 index 4bb7fb2b..00000000 --- a/include/MSL_C/Math/Double_precision/w_acos.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_ACOS_H -#define MATH_DOUBLE_PRECISION_W_ACOS_H - -#endif /* MATH_DOUBLE_PRECISION_W_ACOS_H */ diff --git a/include/MSL_C/Math/Double_precision/w_asin.h b/include/MSL_C/Math/Double_precision/w_asin.h deleted file mode 100644 index 4a5074f1..00000000 --- a/include/MSL_C/Math/Double_precision/w_asin.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_ASIN_H -#define MATH_DOUBLE_PRECISION_W_ASIN_H - -#endif /* MATH_DOUBLE_PRECISION_W_ASIN_H */ diff --git a/include/MSL_C/Math/Double_precision/w_atan2.h b/include/MSL_C/Math/Double_precision/w_atan2.h deleted file mode 100644 index 13eb5ee3..00000000 --- a/include/MSL_C/Math/Double_precision/w_atan2.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_ATAN2_H -#define MATH_DOUBLE_PRECISION_W_ATAN2_H - -#endif /* MATH_DOUBLE_PRECISION_W_ATAN2_H */ diff --git a/include/MSL_C/Math/Double_precision/w_exp.h b/include/MSL_C/Math/Double_precision/w_exp.h deleted file mode 100644 index 3566b000..00000000 --- a/include/MSL_C/Math/Double_precision/w_exp.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_EXP_H -#define MATH_DOUBLE_PRECISION_W_EXP_H - -#endif /* MATH_DOUBLE_PRECISION_W_EXP_H */ diff --git a/include/MSL_C/Math/Double_precision/w_fmod.h b/include/MSL_C/Math/Double_precision/w_fmod.h deleted file mode 100644 index 11308c81..00000000 --- a/include/MSL_C/Math/Double_precision/w_fmod.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_FMOD_H -#define MATH_DOUBLE_PRECISION_W_FMOD_H - -double fmod(double, double); - -#endif /* MATH_DOUBLE_PRECISION_W_FMOD_H */ diff --git a/include/MSL_C/Math/Double_precision/w_pow.h b/include/MSL_C/Math/Double_precision/w_pow.h deleted file mode 100644 index af6bbd6e..00000000 --- a/include/MSL_C/Math/Double_precision/w_pow.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_POW_H -#define MATH_DOUBLE_PRECISION_W_POW_H - -#endif /* MATH_DOUBLE_PRECISION_W_POW_H */ diff --git a/include/MSL_C/Math/Double_precision/w_sqrt.h b/include/MSL_C/Math/Double_precision/w_sqrt.h deleted file mode 100644 index 43de3b1a..00000000 --- a/include/MSL_C/Math/Double_precision/w_sqrt.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MATH_DOUBLE_PRECISION_W_SQRT_H -#define MATH_DOUBLE_PRECISION_W_SQRT_H - -#endif /* MATH_DOUBLE_PRECISION_W_SQRT_H */ diff --git a/include/MSL_C/PPC_EABI/Src/uart_console_io_gcn.h b/include/MSL_C/PPC_EABI/Src/uart_console_io_gcn.h deleted file mode 100644 index a821c1e8..00000000 --- a/include/MSL_C/PPC_EABI/Src/uart_console_io_gcn.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef PPC_EABI_SRC_UART_CONSOLE_IO_GCN_H -#define PPC_EABI_SRC_UART_CONSOLE_IO_GCN_H - -#include "MSL_C/MSL_Common/Src/ansi_files.h" - -#endif /* PPC_EABI_SRC_UART_CONSOLE_IO_GCN_H */ diff --git a/include/MSL_C/algorithm.h b/include/MSL_C/algorithm.h deleted file mode 100644 index dc2684d3..00000000 --- a/include/MSL_C/algorithm.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef MSL_ALGORITHM_H_ -#define MSL_ALGORITHM_H_ - -namespace std { -template -ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T& val); - -template -ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T& val); - -template -InputIt find_if(InputIt first, InputIt last, UnaryPredicate p); -} // namespace std - -#endif diff --git a/include/MSL_C/bitset.h b/include/MSL_C/bitset.h deleted file mode 100644 index e48e32ef..00000000 --- a/include/MSL_C/bitset.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef MSL_BITSET_H_ -#define MSL_BITSET_H_ - -namespace std { -template -class bitset { - bitset(); - - void set(size_t pos, bool val); - void reset(size_t pos); - bool test(size_t pos) const; -}; -} // namespace std - -#endif diff --git a/include/MSL_C/climits b/include/MSL_C/climits deleted file mode 100644 index 7510db74..00000000 --- a/include/MSL_C/climits +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef MSL_CPP_CLIMITS_H -#define MSL_CPP_CLIMITS_H -#include -#endif diff --git a/include/MSL_C/float.h b/include/MSL_C/float.h deleted file mode 100644 index d5ffa175..00000000 --- a/include/MSL_C/float.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef MSL_FLOAT_H_ -#define MSL_FLOAT_H_ - -#include "MSL_C/MSL_Common/Src/float.h" - -#define FLT_MAX 3.402823466e+38f -#define FLT_EPSILON 1.192092896e-07f -#define FLT_MIN 1.175494351e-38f - -#define DBL_EPSILON 1.1920929e-07 - -#endif diff --git a/include/MSL_C/limits.h b/include/MSL_C/limits.h deleted file mode 100644 index 7aabf2ec..00000000 --- a/include/MSL_C/limits.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef MSL_LIMITS_H -#define MSL_LIMITS_H -#ifdef __cplusplus -extern "C" { -#endif - -#define CHAR_BIT 8 - -#define SCHAR_MIN -127 -#define SCHAR_MAX 127 -#define UCHAR_MAX 255 - -#define CHAR_MIN 0 -#define CHAR_MAX SCHAR_MAX - -#define SHRT_MIN -32767 -#define SHRT_MAX 32767 -#define USHRT_MAX 65535 - -#define INT_MIN -2147483647 -#define INT_MAX 2147483647 - -#define LONG_MIN INT_MIN -#define LONG_MAX INT_MAX -#define ULONG_MAX 4294967295 - -#ifdef __cplusplus -} -#endif -#endif diff --git a/include/MSL_C/math.h b/include/MSL_C/math.h deleted file mode 100644 index f09c6fdd..00000000 --- a/include/MSL_C/math.h +++ /dev/null @@ -1,123 +0,0 @@ -#ifndef MSL_MATH_H_ -#define MSL_MATH_H_ - -#include "MSL_C/MSL_Common/Src/float.h" - -#define NAN (*(float *)__float_nan) -#define HUGE_VALF (*(float *)__float_huge) - -#define M_PI 3.14159265358979323846f - -#define DEG_TO_RAD(degrees) (degrees * (M_PI / 180.0f)) - -#ifdef __cplusplus -extern "C" { -#endif - -int abs(int); -int labs(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 ceil(double); -float ceilf(float); -double frexp(double, int *); -double ldexp(double, int); -double modf(double, double *); -double pow(double, double); -double sin(double); -float sinf(float); -double tan(double); -float tanf(float); -double floor(double); -float floorf(float); -double fmod(double, double); -float fmodf(float, float); -float fmodff(float, float *); - -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 fmodf(float f1, float f2) { - return fmod(f1, f2); -} - -inline float modff(float x, float *iptr) { - float frac; - double intg; - - frac = modf((double)x, &intg); - *iptr = intg; - - return frac; -} -inline double sqrt_step(double tmpd, float mag) { - return tmpd * 0.5 * (3.0 - mag * (tmpd * tmpd)); -} - -extern inline float sqrtf(float x) { - const double _half = .5; - const double _three = 3.0; - volatile float y; - if (x > 0.0f) { - double guess = __frsqrte((double)x); // returns an approximation to - guess = _half * guess * (_three - guess * guess * x); // now have 12 sig bits - guess = _half * guess * (_three - guess * guess * x); // now have 24 sig bits - guess = _half * guess * (_three - guess * guess * x); // now have 32 sig bits - y = (float)(x * guess); - return y; - } - return x; -} - -extern inline double sqrt(double x) { - if (x > 0.0) { - double guess = __frsqrte(x); /* returns an approximation to */ - guess = .5 * guess * (3.0 - guess * guess * x); /* now have 8 sig bits */ - guess = .5 * guess * (3.0 - guess * guess * x); /* now have 16 sig bits */ - guess = .5 * guess * (3.0 - guess * guess * x); /* now have 32 sig bits */ - guess = .5 * guess * (3.0 - guess * guess * x); /* now have > 53 sig bits */ - return x * guess; - } else if (x == 0) { - return 0; - } else if (x) { - return NAN; - } - - return HUGE_VALF; -} - -inline float atan2f(float y, float x) { - return (float)atan2(y, x); -} - -// these are duplicated due to sinf/cosf having a symbol, but -// still being used as inlines elsewhere -inline float i_sinf(float x) { - return sin(x); -} - -inline float i_cosf(float x) { - return cos(x); -} - -#ifdef __cplusplus -}; -#endif - -#endif diff --git a/include/MSL_C/new.h b/include/MSL_C/new.h deleted file mode 100644 index 17053c7f..00000000 --- a/include/MSL_C/new.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef MSL_NEW_H_ -#define MSL_NEW_H_ - -#include "MSL_C/MSL_Common/Src/stddef.h" - -inline void* operator new(size_t size, void* ptr) { - return ptr; -} - -#endif diff --git a/include/MSL_C/stdlib.h b/include/MSL_C/stdlib.h deleted file mode 100644 index d4d32225..00000000 --- a/include/MSL_C/stdlib.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef MSL_STDLIB_H_ -#define MSL_STDLIB_H_ - -#include "MSL_C/MSL_Common/Src/abort_exit.h" -#include "MSL_C/MSL_Common/Src/arith.h" -#include "MSL_C/MSL_Common/Src/mbstring.h" -#include "MSL_C/MSL_Common/Src/strtoul.h" - -#endif diff --git a/include/MSL_C/string.h b/include/MSL_C/string.h deleted file mode 100644 index 418cdc48..00000000 --- a/include/MSL_C/string.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef MSL_STRING_H_ -#define MSL_STRING_H_ - -#include "MSL_C/MSL_Common/Src/extras.h" -#include "MSL_C/MSL_Common/Src/mem.h" -#include "MSL_C/MSL_Common/Src/string.h" -#include "MSL_C/MSL_Common/Src/printf.h" - -#endif diff --git a/include/MSL_C/wchar.h b/include/MSL_C/wchar.h deleted file mode 100644 index 36cb4a92..00000000 --- a/include/MSL_C/wchar.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef MSL_WCHAR_H -#define MSL_WCHAR_H -#include - -#include -#include -#include -#include -#ifdef __cplusplus -extern "C" { -#endif - -#define WCHAR_MIN SHRT_MIN -#define WCHAR_MAX USHRT_MAX - -#ifdef __cplusplus -} -#endif -#endif diff --git a/include/Runtime.PPCEABI.H/ptmf.h b/include/Runtime.PPCEABI.H/ptmf.h deleted file mode 100644 index cc22aa42..00000000 --- a/include/Runtime.PPCEABI.H/ptmf.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef PTMF_H -#define PTMF_H - -typedef struct __ptmf { - long this_delta; // self-explanatory - long v_offset; // vtable offset - union { - void* f_addr; // function address - long ve_offset; // virtual function entry offset (of vtable) - } f_data; -} __ptmf; - -const __ptmf __ptmf_null; -long __ptmf_test(__ptmf* ptmf); -void __ptmf_cmpr(register __ptmf* this, register __ptmf* other); -void __ptmf_scall(...); - -#endif /* PTMF_H */ diff --git a/include/UnknownTypeBelongings.h b/include/UnknownTypeBelongings.h index 572059c0..b34592e5 100644 --- a/include/UnknownTypeBelongings.h +++ b/include/UnknownTypeBelongings.h @@ -1,7 +1,7 @@ #ifndef DECOMP_UNKNOWN_TYPES_H #define DECOMP_UNKNOWN_TYPES_H -#include +#include "common.h" // MOST LIKELY mVEC struct Vec3f { diff --git a/include/c/c_lib.h b/include/c/c_lib.h index 823955aa..9d15e72a 100644 --- a/include/c/c_lib.h +++ b/include/c/c_lib.h @@ -1,12 +1,12 @@ #ifndef C_CLIB_H #define C_CLIB_H -#include -#include +#include "common.h" +#include "m/m_vec.h" namespace cLib { -s32 targetAngleY(const mVec3_c& target, const mVec3_c& source); +s32 targetAngleY(const mVec3_c &target, const mVec3_c &source); } // namespace cLib diff --git a/include/c/c_list.h b/include/c/c_list.h index d4287ade..8fdba626 100644 --- a/include/c/c_list.h +++ b/include/c/c_list.h @@ -3,7 +3,7 @@ // This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/cLib/c_list.hpp -#include +#include "common.h" /// @brief A doubly-linked list node. See cListMg_c. /// @note Unofficial name. diff --git a/include/c/c_math.h b/include/c/c_math.h index d54c94d9..9c051d65 100644 --- a/include/c/c_math.h +++ b/include/c/c_math.h @@ -1,7 +1,7 @@ #ifndef C_LIB_CMATH #define C_LIB_CMATH -#include +#include "common.h" namespace cM { s16 atan2s(f32, f32); @@ -11,10 +11,9 @@ int rndInt(int max); f32 rndF(f32 max); f32 rndFX(f32 amp); - template -T calcTimer(T* value) { - if (*(T*)value != 0) { +T calcTimer(T *value) { + if (*(T *)value != 0) { *value = *value - 1; } return *value; diff --git a/include/c/c_owner_set.h b/include/c/c_owner_set.h index ceb72b5d..1ae6f15c 100644 --- a/include/c/c_owner_set.h +++ b/include/c/c_owner_set.h @@ -4,7 +4,7 @@ // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/cLib/c_owner_set.hpp -#include +#include "common.h" /// @file /// @brief A set node with a pointer to the owning container. See cOwnerSetMg_c. diff --git a/include/c/c_tree.h b/include/c/c_tree.h index 58daa267..8f2a42f1 100644 --- a/include/c/c_tree.h +++ b/include/c/c_tree.h @@ -3,7 +3,7 @@ // This file was ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/cLib/c_tree.hpp -#include +#include "common.h" /// @brief A tree node. See cTreeMg_c. /// @details The tree is represented as a doubly-linked LCRS tree. diff --git a/include/common.h b/include/common.h index 4cda72d9..514ed30b 100644 --- a/include/common.h +++ b/include/common.h @@ -16,44 +16,62 @@ #define CLEAR_PATH(x) __memclr((x), sizeof((x))) -#define ALIGN(x) __attribute__((aligned(x))) +#define READU32_BE(ptr, offset) \ + (((u32)ptr[offset] << 24) | ((u32)ptr[offset + 1] << 16) | ((u32)ptr[offset + 2] << 8) | (u32)ptr[offset + 3]); + +#define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT))) + +// To remove some warnings +#ifdef __MWERKS__ #define DECL_SECTION(x) __declspec(section x) #define DECL_WEAK __declspec(weak) #define DONT_INLINE __attribute__((never_inline)) +#define FORCE_INLINE inline +#define AT_ADDRESS(xyz) : (xyz) +#else +#define DECL_SECTION(x) +#define AT_ADDRESS(xyz) +#define DECL_WEAK +#define DONT_INLINE +#define FORCE_INLINE +#define asm +#define nofralloc +// Quick Fixup +#define __alloca(x) ((void *)x) +#endif -// TODO - Fix MSL (stddef.h) -#define offsetof(ST, M) ((size_t) & (((ST *)0)->M)) +#ifdef NON_MATCHING +#define DECOMP_FORCEACTIVE(module, ...) +#define DECOMP_FORCELITERAL(module, x) +#define DECOMP_FORCEDTOR(module, cls) +#else +// Force reference specific data +#define __CONCAT(x, y) x##y +#define CONCAT(x, y) __CONCAT(x, y) + +#define DECOMP_FORCEACTIVE(module, ...) \ + void fake_function(...); \ + void CONCAT(FORCEACTIVE##module, __LINE__)(void); \ + void CONCAT(FORCEACTIVE##module, __LINE__)(void) { \ + fake_function(__VA_ARGS__); \ + } -// Codewarrior tricks for matching decomp -// (Functions are given prototypes for -requireprotos) -#ifdef __MWERKS__ -// Force BSS order -#define CW_FORCE_BSS(module, ...) \ - void fake_function(...); \ - void FORCE_BSS##module##x(void); \ - void FORCE_BSS##module##x(void) { \ - fake_function(__VA_ARGS__); \ +// Force literal ordering, such as floats in sdata2 +#define DECOMP_FORCELITERAL(module, ...) \ + void CONCAT(FORCELITERAL##module, __LINE__)(void); \ + void CONCAT(FORCELITERAL##module, __LINE__)(void) { \ + (__VA_ARGS__); \ } -// Force strings into pool -#define CW_FORCE_STRINGS(module, ...) \ - void fake_function(...); \ - void FORCE_STRINGS##module(void); \ - void FORCE_STRINGS##module(void) { \ - fake_function(__VA_ARGS__); \ + +// Force reference destructor +#define DECOMP_FORCEDTOR(module, cls) \ + void CONCAT(FORCEDTOR##module##cls, __LINE__)(void) { \ + cls dummy; \ + dummy.~cls(); \ } -#else -#define CW_FORCE_BSS(module, ...) -#define CW_FORCE_STRINGS(module, ...) #endif -#include - -// For VSCode -#ifdef __INTELLISENSE__ -#define asm -#define __attribute__(x) -#define __declspec(x) -#endif +#include "stddef.h" typedef signed char s8; typedef signed short s16; @@ -70,7 +88,10 @@ typedef double f64; typedef int UNKWORD; typedef void UNKTYPE; -enum { FALSE, TRUE }; +enum { + FALSE, + TRUE +}; typedef int BOOL; typedef unsigned char byte_t; @@ -120,4 +141,16 @@ class NonCopyable { }; #endif +#define INT32_MAX (0x7fffffff) +#define UINT32_MAX (0xffffffff) + +#define FLOAT_MIN (1.175494351e-38f) +#define FLOAT_MAX (3.40282346638528860e+38f) + +#ifdef __MWERKS__ +#define AT_ADDRESS(xyz) : (xyz) +#else +#define AT_ADDRESS(xyz) +#endif + #endif diff --git a/include/context_bte.h b/include/context_bte.h index fcb17b14..6e0eb7ca 100644 --- a/include/context_bte.h +++ b/include/context_bte.h @@ -1,7 +1,7 @@ #ifndef CONTEXT_BTE_H #define CONTEXT_BTE_H -#include +#include "stdint.h" /* Contains the context of the BTE library that the WPAD library needs to * compile. @@ -743,7 +743,11 @@ typedef struct { ** has detected that the controller status has changed. This asynchronous event ** is enabled/disabled by calling BTM_RegisterForDeviceStatusNotif(). */ -enum { BTM_DEV_STATUS_UP, BTM_DEV_STATUS_DOWN, BTM_DEV_STATUS_CMD_TOUT }; +enum { + BTM_DEV_STATUS_UP, + BTM_DEV_STATUS_DOWN, + BTM_DEV_STATUS_CMD_TOUT +}; typedef UINT8 tBTM_DEV_STATUS; typedef void(tBTM_DEV_STATUS_CB)(tBTM_DEV_STATUS status); @@ -947,8 +951,10 @@ tBTM_STATUS BTM_WritePageTimeout(UINT16 timeout); void BTM_SetDefaultLinkPolicy(UINT16 settings); void BTM_SetDefaultLinkSuperTout(UINT16 timeout); -BOOLEAN BTM_SecAddDevice(BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name, BD_FEATURES features, - UINT32 trusted_mask[], LINK_KEY link_key); +BOOLEAN BTM_SecAddDevice( + BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name, BD_FEATURES features, UINT32 trusted_mask[], + LINK_KEY link_key +); void *GKI_getbuf(UINT16 size); diff --git a/include/d/a/b/d_a_b_asura.h b/include/d/a/b/d_a_b_asura.h index 1658e2a4..2d5c85db 100644 --- a/include/d/a/b/d_a_b_asura.h +++ b/include/d/a/b/d_a_b_asura.h @@ -1,9 +1,9 @@ #ifndef D_A_B_ASURA_H #define D_A_B_ASURA_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBAsura_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_asura_arm.h b/include/d/a/b/d_a_b_asura_arm.h index 1a9e6fdc..cb0a54f0 100644 --- a/include/d/a/b/d_a_b_asura_arm.h +++ b/include/d/a/b/d_a_b_asura_arm.h @@ -1,9 +1,9 @@ #ifndef D_A_B_ASURA_ARM_H #define D_A_B_ASURA_ARM_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcAsuraArm_c : public dAcObjBase_c { public: diff --git a/include/d/a/b/d_a_b_asura_foot.h b/include/d/a/b/d_a_b_asura_foot.h index 441ea935..e9f9fbf0 100644 --- a/include/d/a/b/d_a_b_asura_foot.h +++ b/include/d/a/b/d_a_b_asura_foot.h @@ -1,9 +1,9 @@ #ifndef D_A_B_ASURA_FOOT_H #define D_A_B_ASURA_FOOT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcAsuraFoot_c : public dAcObjBase_c { public: diff --git a/include/d/a/b/d_a_b_bbshockwave.h b/include/d/a/b/d_a_b_bbshockwave.h index 0fe4ca1f..1d3ddb16 100644 --- a/include/d/a/b/d_a_b_bbshockwave.h +++ b/include/d/a/b/d_a_b_bbshockwave.h @@ -1,7 +1,7 @@ #ifndef D_A_B_BBSHOCKWAVE_H #define D_A_B_BBSHOCKWAVE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcBBbshockwave_c : public dAcObjBase_c { public: diff --git a/include/d/a/b/d_a_b_bigboss.h b/include/d/a/b/d_a_b_bigboss.h index 68686b09..98090395 100644 --- a/include/d/a/b/d_a_b_bigboss.h +++ b/include/d/a/b/d_a_b_bigboss.h @@ -1,9 +1,9 @@ #ifndef D_A_B_BIGBOSS_H #define D_A_B_BIGBOSS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBBigBoss_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_bigboss2.h b/include/d/a/b/d_a_b_bigboss2.h index c554f69f..c4677ae8 100644 --- a/include/d/a/b/d_a_b_bigboss2.h +++ b/include/d/a/b/d_a_b_bigboss2.h @@ -1,9 +1,9 @@ #ifndef D_A_B_BIGBOSS2_H #define D_A_B_BIGBOSS2_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBBigBoss2_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_bigboss3.h b/include/d/a/b/d_a_b_bigboss3.h index 18e538cd..f250b1dd 100644 --- a/include/d/a/b/d_a_b_bigboss3.h +++ b/include/d/a/b/d_a_b_bigboss3.h @@ -1,9 +1,9 @@ #ifndef D_A_B_BIGBOSS3_H #define D_A_B_BIGBOSS3_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBBigBoss3_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_bigbossbase.h b/include/d/a/b/d_a_b_bigbossbase.h index 24f7138d..3dd0099a 100644 --- a/include/d/a/b/d_a_b_bigbossbase.h +++ b/include/d/a/b/d_a_b_bigbossbase.h @@ -1,7 +1,7 @@ #ifndef D_A_B_BIGBOSSBASE_H #define D_A_B_BIGBOSSBASE_H -#include +#include "d/a/e/d_a_en_base.h" class dAcBBigbossbase_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu.h b/include/d/a/b/d_a_b_girahimu.h index c781fad0..5d977c11 100644 --- a/include/d/a/b/d_a_b_girahimu.h +++ b/include/d/a/b/d_a_b_girahimu.h @@ -1,9 +1,9 @@ #ifndef D_A_B_GIRAHIMU_H #define D_A_B_GIRAHIMU_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimu_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu2.h b/include/d/a/b/d_a_b_girahimu2.h index deba753a..90fca0c8 100644 --- a/include/d/a/b/d_a_b_girahimu2.h +++ b/include/d/a/b/d_a_b_girahimu2.h @@ -1,9 +1,9 @@ #ifndef D_A_B_GIRAHIMU2_H #define D_A_B_GIRAHIMU2_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimu2_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu3_base.h b/include/d/a/b/d_a_b_girahimu3_base.h index 45ec2171..c7a9ecd2 100644 --- a/include/d/a/b/d_a_b_girahimu3_base.h +++ b/include/d/a/b/d_a_b_girahimu3_base.h @@ -1,9 +1,9 @@ #ifndef D_A_B_GIRAHIMU3_BASE_H #define D_A_B_GIRAHIMU3_BASE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimu3Base_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu3_first.h b/include/d/a/b/d_a_b_girahimu3_first.h index f0f0e455..92eeaa5d 100644 --- a/include/d/a/b/d_a_b_girahimu3_first.h +++ b/include/d/a/b/d_a_b_girahimu3_first.h @@ -1,7 +1,7 @@ #ifndef D_A_B_GIRAHIMU3_FIRST_H #define D_A_B_GIRAHIMU3_FIRST_H -#include +#include "d/a/e/d_a_en_base.h" class dAcGirahimu3First_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu3_second.h b/include/d/a/b/d_a_b_girahimu3_second.h index da875277..e0097d12 100644 --- a/include/d/a/b/d_a_b_girahimu3_second.h +++ b/include/d/a/b/d_a_b_girahimu3_second.h @@ -1,9 +1,9 @@ #ifndef D_A_B_GIRAHIMU3_SECOND_H #define D_A_B_GIRAHIMU3_SECOND_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimu3Second_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu3_third.h b/include/d/a/b/d_a_b_girahimu3_third.h index 57505260..375bab29 100644 --- a/include/d/a/b/d_a_b_girahimu3_third.h +++ b/include/d/a/b/d_a_b_girahimu3_third.h @@ -1,9 +1,9 @@ #ifndef D_A_B_GIRAHIMU3_THIRD_H #define D_A_B_GIRAHIMU3_THIRD_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimu3Third_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_girahimu_base.h b/include/d/a/b/d_a_b_girahimu_base.h index 6dfe5ac4..fa3b5c45 100644 --- a/include/d/a/b/d_a_b_girahimu_base.h +++ b/include/d/a/b/d_a_b_girahimu_base.h @@ -1,9 +1,9 @@ #ifndef D_A_B_GIRAHIMU_BASE_H #define D_A_B_GIRAHIMU_BASE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimuBase_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_kr.h b/include/d/a/b/d_a_b_kr.h index 2ad8d977..e4a42140 100644 --- a/include/d/a/b/d_a_b_kr.h +++ b/include/d/a/b/d_a_b_kr.h @@ -1,9 +1,9 @@ #ifndef D_A_B_KR_H #define D_A_B_KR_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBkr_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_kr_arm.h b/include/d/a/b/d_a_b_kr_arm.h index 3c957043..761ee984 100644 --- a/include/d/a/b/d_a_b_kr_arm.h +++ b/include/d/a/b/d_a_b_kr_arm.h @@ -1,9 +1,9 @@ #ifndef D_A_B_KR_ARM_H #define D_A_B_KR_ARM_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBkra_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_kr_hair.h b/include/d/a/b/d_a_b_kr_hair.h index 499a6d34..579502ed 100644 --- a/include/d/a/b/d_a_b_kr_hair.h +++ b/include/d/a/b/d_a_b_kr_hair.h @@ -1,9 +1,9 @@ #ifndef D_A_B_KR_HAIR_H #define D_A_B_KR_HAIR_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBkrh_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_lastboss.h b/include/d/a/b/d_a_b_lastboss.h index ec3bae7c..1d01a3f3 100644 --- a/include/d/a/b/d_a_b_lastboss.h +++ b/include/d/a/b/d_a_b_lastboss.h @@ -1,9 +1,9 @@ #ifndef D_A_B_LASTBOSS_H #define D_A_B_LASTBOSS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBlastboss_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_mg.h b/include/d/a/b/d_a_b_mg.h index 1579154e..95a04d54 100644 --- a/include/d/a/b/d_a_b_mg.h +++ b/include/d/a/b/d_a_b_mg.h @@ -1,9 +1,9 @@ #ifndef D_A_B_MG_H #define D_A_B_MG_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBmg_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_nusi.h b/include/d/a/b/d_a_b_nusi.h index 26448ccb..04724f20 100644 --- a/include/d/a/b/d_a_b_nusi.h +++ b/include/d/a/b/d_a_b_nusi.h @@ -1,9 +1,9 @@ #ifndef D_A_B_NUSI_H #define D_A_B_NUSI_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNusi_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_nusi_bullet.h b/include/d/a/b/d_a_b_nusi_bullet.h index 05280de5..6417ff6e 100644 --- a/include/d/a/b/d_a_b_nusi_bullet.h +++ b/include/d/a/b/d_a_b_nusi_bullet.h @@ -1,9 +1,9 @@ #ifndef D_A_B_NUSI_BULLET_H #define D_A_B_NUSI_BULLET_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNusi_Bullet_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_nusi_tentakle.h b/include/d/a/b/d_a_b_nusi_tentakle.h index 79d308a5..21ec871f 100644 --- a/include/d/a/b/d_a_b_nusi_tentakle.h +++ b/include/d/a/b/d_a_b_nusi_tentakle.h @@ -1,9 +1,9 @@ #ifndef D_A_B_NUSI_TENTAKLE_H #define D_A_B_NUSI_TENTAKLE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNusiTentakle_c : public dAcEnBase_c { public: diff --git a/include/d/a/b/d_a_b_vd.h b/include/d/a/b/d_a_b_vd.h index e7aef93e..9c5c95f4 100644 --- a/include/d/a/b/d_a_b_vd.h +++ b/include/d/a/b/d_a_b_vd.h @@ -1,9 +1,9 @@ #ifndef D_A_B_VD_H #define D_A_B_VD_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBvd_c : public dAcEnBase_c { public: diff --git a/include/d/a/d_a_asura_bullet.h b/include/d/a/d_a_asura_bullet.h index e502e7b0..19fcc3da 100644 --- a/include/d/a/d_a_asura_bullet.h +++ b/include/d/a/d_a_asura_bullet.h @@ -1,9 +1,9 @@ #ifndef D_A_ASURA_BULLET_H #define D_A_ASURA_BULLET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcAsuraBullet_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_avater_bullet.h b/include/d/a/d_a_avater_bullet.h index be3df366..4cb7204f 100644 --- a/include/d/a/d_a_avater_bullet.h +++ b/include/d/a/d_a_avater_bullet.h @@ -1,9 +1,9 @@ #ifndef D_A_AVATER_BULLET_H #define D_A_AVATER_BULLET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcAvater_Bullet_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_avater_race_mng.h b/include/d/a/d_a_avater_race_mng.h index 47266b80..39852293 100644 --- a/include/d/a/d_a_avater_race_mng.h +++ b/include/d/a/d_a_avater_race_mng.h @@ -1,9 +1,9 @@ #ifndef D_A_AVATER_RACE_MNG_H #define D_A_AVATER_RACE_MNG_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAvater_Race_Mng_c : public dAcBase_c { public: diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index 043f5205..bf7fbb9c 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -3,15 +3,13 @@ #include "UnknownTypeBelongings.h" #include "d/d_base.h" -#include "d/d_heap.h" #include "m/m_allocator.h" - -// #include "m/types_m.h" #include "m/m_angle.h" #include "m/m_vec.h" -#include "toBeSorted/room_manager.h" +#include "stddef.h" #include "toBeSorted/tlist.h" + class dAcBase_c; struct SoundSource { @@ -70,7 +68,7 @@ class dAcBase_c : public dBase_c { public: /* 0x68 */ mHeapAllocator_c heap_allocator; /* 0x84 */ ObjInfo *obj_info; - /* 0x88 */ TList sound_list; + /* 0x88 */ TList sound_list; /* 0x94 */ SoundSource *sound_source; /* 0x98 */ mVec3_c *obj_pos; /* 0x9C */ mVec3_c pos_copy; diff --git a/include/d/a/d_a_bird.h b/include/d/a/d_a_bird.h index 5c8bf9ca..af91133f 100644 --- a/include/d/a/d_a_bird.h +++ b/include/d/a/d_a_bird.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_H #define D_A_BIRD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_kobunA.h b/include/d/a/d_a_bird_kobunA.h index aa5c77b1..3cc9294a 100644 --- a/include/d/a/d_a_bird_kobunA.h +++ b/include/d/a/d_a_bird_kobunA.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_KOBUNA_H #define D_A_BIRD_KOBUNA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_KobunA_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_kobunB.h b/include/d/a/d_a_bird_kobunB.h index 54d1334b..fc2f9482 100644 --- a/include/d/a/d_a_bird_kobunB.h +++ b/include/d/a/d_a_bird_kobunB.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_KOBUNB_H #define D_A_BIRD_KOBUNB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_KobunB_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_mob.h b/include/d/a/d_a_bird_mob.h index 77fcd569..9e180518 100644 --- a/include/d/a/d_a_bird_mob.h +++ b/include/d/a/d_a_bird_mob.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_MOB_H #define D_A_BIRD_MOB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBirdMob_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_npc.h b/include/d/a/d_a_bird_npc.h index a478c36a..e6312267 100644 --- a/include/d/a/d_a_bird_npc.h +++ b/include/d/a/d_a_bird_npc.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_NPC_H #define D_A_BIRD_NPC_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_Npc_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_rival.h b/include/d/a/d_a_bird_rival.h index 82d19aed..c5f23aad 100644 --- a/include/d/a/d_a_bird_rival.h +++ b/include/d/a/d_a_bird_rival.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_RIVAL_H #define D_A_BIRD_RIVAL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_Rival_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_target.h b/include/d/a/d_a_bird_target.h index 9e10155f..541d219d 100644 --- a/include/d/a/d_a_bird_target.h +++ b/include/d/a/d_a_bird_target.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_TARGET_H #define D_A_BIRD_TARGET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_Target_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bird_zelda_training.h b/include/d/a/d_a_bird_zelda_training.h index 1ea9025e..a3615f96 100644 --- a/include/d/a/d_a_bird_zelda_training.h +++ b/include/d/a/d_a_bird_zelda_training.h @@ -1,9 +1,9 @@ #ifndef D_A_BIRD_ZELDA_TRAINING_H #define D_A_BIRD_ZELDA_TRAINING_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dBird_ZeldaTraining_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bomb.h b/include/d/a/d_a_bomb.h index 95b91897..3f2ce62d 100644 --- a/include/d/a/d_a_bomb.h +++ b/include/d/a/d_a_bomb.h @@ -2,14 +2,15 @@ #define D_A_BOMB_H #include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_s_acch.h" +#include "d/col/bg/d_bg_s_lin_chk.h" +#include "d/col/cc/d_cc_shape_colliders.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" +#include "toBeSorted/effects_struct.h" -#include -#include -#include -#include -#include -#include -#include class dAcBomb_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bombf.h b/include/d/a/d_a_bombf.h index 71eb14f9..7306ed03 100644 --- a/include/d/a/d_a_bombf.h +++ b/include/d/a/d_a_bombf.h @@ -1,9 +1,9 @@ #ifndef D_A_BOMBF_H #define D_A_BOMBF_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBombf_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bullet_gue.h b/include/d/a/d_a_bullet_gue.h index 1642fa32..9ffa58d7 100644 --- a/include/d/a/d_a_bullet_gue.h +++ b/include/d/a/d_a_bullet_gue.h @@ -1,9 +1,9 @@ #ifndef D_A_BULLET_GUE_H #define D_A_BULLET_GUE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBulletGue_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_bullet_maguppo.h b/include/d/a/d_a_bullet_maguppo.h index f56ffd62..5c96153c 100644 --- a/include/d/a/d_a_bullet_maguppo.h +++ b/include/d/a/d_a_bullet_maguppo.h @@ -1,9 +1,9 @@ #ifndef D_A_BULLET_MAGUPPO_H #define D_A_BULLET_MAGUPPO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcBulletMaguppo_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_co_test.h b/include/d/a/d_a_co_test.h index 3117dbcb..dfe6a839 100644 --- a/include/d/a/d_a_co_test.h +++ b/include/d/a/d_a_co_test.h @@ -1,9 +1,9 @@ #ifndef D_A_CO_TEST_H #define D_A_CO_TEST_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcCoTest : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_col_stp.h b/include/d/a/d_a_col_stp.h index 9543b3ba..77654a16 100644 --- a/include/d/a/d_a_col_stp.h +++ b/include/d/a/d_a_col_stp.h @@ -1,7 +1,7 @@ #ifndef D_A_COL_STP_H #define D_A_COL_STP_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcColStp_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_control.h b/include/d/a/d_a_control.h index 19528707..683ad875 100644 --- a/include/d/a/d_a_control.h +++ b/include/d/a/d_a_control.h @@ -1,9 +1,9 @@ #ifndef D_A_CONTROL_H #define D_A_CONTROL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEnCl_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_demo_npc_bird.h b/include/d/a/d_a_demo_npc_bird.h index 40375a08..14ddae37 100644 --- a/include/d/a/d_a_demo_npc_bird.h +++ b/include/d/a/d_a_demo_npc_bird.h @@ -1,9 +1,9 @@ #ifndef D_A_DEMO_NPC_BIRD_H #define D_A_DEMO_NPC_BIRD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcDemoNpcBird_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_eel.h b/include/d/a/d_a_eel.h index bbc89d31..3fc9e756 100644 --- a/include/d/a/d_a_eel.h +++ b/include/d/a/d_a_eel.h @@ -1,7 +1,7 @@ #ifndef D_A_EEL_H #define D_A_EEL_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcEel_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_fish.h b/include/d/a/d_a_fish.h index 39970950..cfaceb5f 100644 --- a/include/d/a/d_a_fish.h +++ b/include/d/a/d_a_fish.h @@ -1,7 +1,7 @@ #ifndef D_A_FISH_H #define D_A_FISH_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcFish_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_fish_mgr.h b/include/d/a/d_a_fish_mgr.h index fd1d624b..1cdd1d34 100644 --- a/include/d/a/d_a_fish_mgr.h +++ b/include/d/a/d_a_fish_mgr.h @@ -1,7 +1,7 @@ #ifndef D_A_FISH_MGR_H #define D_A_FISH_MGR_H -#include +#include "d/a/d_a_base.h" class dAcFishMgr_c : public dAcBase_c { public: diff --git a/include/d/a/d_a_fly_slb.h b/include/d/a/d_a_fly_slb.h index 2e2ac619..f6821bb0 100644 --- a/include/d/a/d_a_fly_slb.h +++ b/include/d/a/d_a_fly_slb.h @@ -1,9 +1,9 @@ #ifndef D_A_FLY_SLB_H #define D_A_FLY_SLB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcFlySlb_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_girahimu_sword_beam.h b/include/d/a/d_a_girahimu_sword_beam.h index 3feffabb..41a14965 100644 --- a/include/d/a/d_a_girahimu_sword_beam.h +++ b/include/d/a/d_a_girahimu_sword_beam.h @@ -1,9 +1,9 @@ #ifndef D_A_GIRAHIMU_SWORD_BEAM_H #define D_A_GIRAHIMU_SWORD_BEAM_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGirahimuSwordBeam_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_heartf.h b/include/d/a/d_a_heartf.h index d7175b6f..bfeaa51a 100644 --- a/include/d/a/d_a_heartf.h +++ b/include/d/a/d_a_heartf.h @@ -1,9 +1,9 @@ #ifndef D_A_HEARTF_H #define D_A_HEARTF_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcHeartf_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_hidory_fire.h b/include/d/a/d_a_hidory_fire.h index db81e76e..5795db97 100644 --- a/include/d/a/d_a_hidory_fire.h +++ b/include/d/a/d_a_hidory_fire.h @@ -1,9 +1,9 @@ #ifndef D_A_HIDORY_FIRE_H #define D_A_HIDORY_FIRE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcHidoryFire_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_ant.h b/include/d/a/d_a_insect_ant.h index 1d9c3062..32e982ea 100644 --- a/include/d/a/d_a_insect_ant.h +++ b/include/d/a/d_a_insect_ant.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_ANT_H #define D_A_INSECT_ANT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectAnt_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_beetle.h b/include/d/a/d_a_insect_beetle.h index 32764555..84515a90 100644 --- a/include/d/a/d_a_insect_beetle.h +++ b/include/d/a/d_a_insect_beetle.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_BEETLE_H #define D_A_INSECT_BEETLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectBeetle_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_butterfly.h b/include/d/a/d_a_insect_butterfly.h index 782d513c..84c32694 100644 --- a/include/d/a/d_a_insect_butterfly.h +++ b/include/d/a/d_a_insect_butterfly.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_BUTTERFLY_H #define D_A_INSECT_BUTTERFLY_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectButterfly_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_cicada.h b/include/d/a/d_a_insect_cicada.h index 3e11c97e..9166ff4c 100644 --- a/include/d/a/d_a_insect_cicada.h +++ b/include/d/a/d_a_insect_cicada.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_CICADA_H #define D_A_INSECT_CICADA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectCicada_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_dragonfly.h b/include/d/a/d_a_insect_dragonfly.h index f53a597f..0f5c9572 100644 --- a/include/d/a/d_a_insect_dragonfly.h +++ b/include/d/a/d_a_insect_dragonfly.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_DRAGONFLY_H #define D_A_INSECT_DRAGONFLY_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectDragonfly_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_firefly.h b/include/d/a/d_a_insect_firefly.h index d591efd8..b03af30d 100644 --- a/include/d/a/d_a_insect_firefly.h +++ b/include/d/a/d_a_insect_firefly.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_FIREFLY_H #define D_A_INSECT_FIREFLY_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectFirefly_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_grasshopper.h b/include/d/a/d_a_insect_grasshopper.h index e0e4532b..43e83645 100644 --- a/include/d/a/d_a_insect_grasshopper.h +++ b/include/d/a/d_a_insect_grasshopper.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_GRASSHOPPER_H #define D_A_INSECT_GRASSHOPPER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectGrasshopper_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_ladybug.h b/include/d/a/d_a_insect_ladybug.h index 09c09f8c..de272be4 100644 --- a/include/d/a/d_a_insect_ladybug.h +++ b/include/d/a/d_a_insect_ladybug.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_LADYBUG_H #define D_A_INSECT_LADYBUG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectLadybug_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_insect_scarab.h b/include/d/a/d_a_insect_scarab.h index b28041e0..a91229b1 100644 --- a/include/d/a/d_a_insect_scarab.h +++ b/include/d/a/d_a_insect_scarab.h @@ -1,9 +1,9 @@ #ifndef D_A_INSECT_SCARAB_H #define D_A_INSECT_SCARAB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInsectScarab_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_invisible.h b/include/d/a/d_a_invisible.h index 7e470826..4311a604 100644 --- a/include/d/a/d_a_invisible.h +++ b/include/d/a/d_a_invisible.h @@ -1,9 +1,9 @@ #ifndef D_A_INVISIBLE_H #define D_A_INVISIBLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcInvisible : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_kanban.h b/include/d/a/d_a_kanban.h index 2eba6b9e..a50a31c2 100644 --- a/include/d/a/d_a_kanban.h +++ b/include/d/a/d_a_kanban.h @@ -1,9 +1,9 @@ #ifndef D_A_KANBAN_H #define D_A_KANBAN_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcKanban_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_knight_leader_bird.h b/include/d/a/d_a_knight_leader_bird.h index 44f5224e..4a473cc4 100644 --- a/include/d/a/d_a_knight_leader_bird.h +++ b/include/d/a/d_a_knight_leader_bird.h @@ -1,9 +1,9 @@ #ifndef D_A_KNIGHT_LEADER_BIRD_H #define D_A_KNIGHT_LEADER_BIRD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcKnightLeaderBird_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_little_bird.h b/include/d/a/d_a_little_bird.h index 38f3c6c3..ed70796b 100644 --- a/include/d/a/d_a_little_bird.h +++ b/include/d/a/d_a_little_bird.h @@ -1,9 +1,9 @@ #ifndef D_A_LITTLE_BIRD_H #define D_A_LITTLE_BIRD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcLittleBird_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_little_bird_mgr.h b/include/d/a/d_a_little_bird_mgr.h index 5c5111d0..e45b4a80 100644 --- a/include/d/a/d_a_little_bird_mgr.h +++ b/include/d/a/d_a_little_bird_mgr.h @@ -1,9 +1,9 @@ #ifndef D_A_LITTLE_BIRD_MGR_H #define D_A_LITTLE_BIRD_MGR_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcLittleBirdMgr_c : public dAcBase_c { public: diff --git a/include/d/a/d_a_message.h b/include/d/a/d_a_message.h index fd3e9cdf..63885e08 100644 --- a/include/d/a/d_a_message.h +++ b/include/d/a/d_a_message.h @@ -1,7 +1,7 @@ #ifndef D_A_MESSAGE_H #define D_A_MESSAGE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcMessage_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_morita_test.h b/include/d/a/d_a_morita_test.h index b5e7004f..1592234f 100644 --- a/include/d/a/d_a_morita_test.h +++ b/include/d/a/d_a_morita_test.h @@ -1,9 +1,9 @@ #ifndef D_A_MORITA_TEST_H #define D_A_MORITA_TEST_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcJtest_c : public dAcEnBase_c { public: diff --git a/include/d/a/d_a_nusi_base.h b/include/d/a/d_a_nusi_base.h index d6985d4c..bbee3685 100644 --- a/include/d/a/d_a_nusi_base.h +++ b/include/d/a/d_a_nusi_base.h @@ -1,9 +1,9 @@ #ifndef D_A_NUSI_BASE_H #define D_A_NUSI_BASE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNusiBase_c : public dAcEnBase_c { public: diff --git a/include/d/a/d_a_nusi_npc.h b/include/d/a/d_a_nusi_npc.h index 26e4c057..1af40b00 100644 --- a/include/d/a/d_a_nusi_npc.h +++ b/include/d/a/d_a_nusi_npc.h @@ -1,9 +1,9 @@ #ifndef D_A_NUSI_NPC_H #define D_A_NUSI_NPC_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNusiNpc_c : public dAcEnBase_c { public: diff --git a/include/d/a/d_a_or_cannon_bullet.h b/include/d/a/d_a_or_cannon_bullet.h index f76f5592..10eb8c83 100644 --- a/include/d/a/d_a_or_cannon_bullet.h +++ b/include/d/a/d_a_or_cannon_bullet.h @@ -1,9 +1,9 @@ #ifndef D_A_OR_CANNON_BULLET_H #define D_A_OR_CANNON_BULLET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOrCannBullet_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index cc81aa3a..a5969ffd 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_base.h" class dAcPy_c : public dAcObjBase_c { // See Below for some info diff --git a/include/d/a/d_a_pumpkin.h b/include/d/a/d_a_pumpkin.h index a9d4d701..f28d678d 100644 --- a/include/d/a/d_a_pumpkin.h +++ b/include/d/a/d_a_pumpkin.h @@ -1,9 +1,9 @@ #ifndef D_A_PUMPKIN_H #define D_A_PUMPKIN_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcPumpkin_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_shop_sample.h b/include/d/a/d_a_shop_sample.h index a2edcd1b..73f3b001 100644 --- a/include/d/a/d_a_shop_sample.h +++ b/include/d/a/d_a_shop_sample.h @@ -1,9 +1,9 @@ #ifndef D_A_SHOP_SAMPLE_H #define D_A_SHOP_SAMPLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcShopSample_c : public dAcObjBase_c { public: diff --git a/include/d/a/d_a_t_wood_area.h b/include/d/a/d_a_t_wood_area.h index 5f07ceef..a964d342 100644 --- a/include/d/a/d_a_t_wood_area.h +++ b/include/d/a/d_a_t_wood_area.h @@ -1,10 +1,10 @@ #ifndef D_A_T_WOOD_AREA_H #define D_A_T_WOOD_AREA_H -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "f/f_list_nd.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcTWoodArea_c : public dAcObjBase_c { public: diff --git a/include/d/a/e/d_a_e_am.h b/include/d/a/e/d_a_e_am.h index 21c1c42d..655500aa 100644 --- a/include/d/a/e/d_a_e_am.h +++ b/include/d/a/e/d_a_e_am.h @@ -1,9 +1,9 @@ #ifndef D_A_E_AM_H #define D_A_E_AM_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEAm_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_battleshipfish.h b/include/d/a/e/d_a_e_battleshipfish.h index e3fdefe2..1a086d2f 100644 --- a/include/d/a/e/d_a_e_battleshipfish.h +++ b/include/d/a/e/d_a_e_battleshipfish.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BATTLESHIPFISH_H #define D_A_E_BATTLESHIPFISH_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbfish_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bc.h b/include/d/a/e/d_a_e_bc.h index 52ca3900..950e74ad 100644 --- a/include/d/a/e/d_a_e_bc.h +++ b/include/d/a/e/d_a_e_bc.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BC_H #define D_A_E_BC_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbc_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bc_arrow.h b/include/d/a/e/d_a_e_bc_arrow.h index 10257f1e..35d2ec49 100644 --- a/include/d/a/e/d_a_e_bc_arrow.h +++ b/include/d/a/e/d_a_e_bc_arrow.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BC_ARROW_H #define D_A_E_BC_ARROW_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbcarrow_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bcal.h b/include/d/a/e/d_a_e_bcal.h index 4237f290..2195909e 100644 --- a/include/d/a/e/d_a_e_bcal.h +++ b/include/d/a/e/d_a_e_bcal.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BCAL_H #define D_A_E_BCAL_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbcaL_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bcal_arrow.h b/include/d/a/e/d_a_e_bcal_arrow.h index 17888b33..dc4000f2 100644 --- a/include/d/a/e/d_a_e_bcal_arrow.h +++ b/include/d/a/e/d_a_e_bcal_arrow.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BCAL_ARROW_H #define D_A_E_BCAL_ARROW_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbcalarrow_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bce.h b/include/d/a/e/d_a_e_bce.h index 468424ea..02e13f4e 100644 --- a/include/d/a/e/d_a_e_bce.h +++ b/include/d/a/e/d_a_e_bce.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BCE_H #define D_A_E_BCE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbce_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bcz.h b/include/d/a/e/d_a_e_bcz.h index 4eb8b507..bcaec44c 100644 --- a/include/d/a/e/d_a_e_bcz.h +++ b/include/d/a/e/d_a_e_bcz.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BCZ_H #define D_A_E_BCZ_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEBcZ_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_beamos.h b/include/d/a/e/d_a_e_beamos.h index 713b60aa..24b887e9 100644 --- a/include/d/a/e/d_a_e_beamos.h +++ b/include/d/a/e/d_a_e_beamos.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BEAMOS_H #define D_A_E_BEAMOS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbeamos : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_bs.h b/include/d/a/e/d_a_e_bs.h index 2bc49e14..575313c6 100644 --- a/include/d/a/e/d_a_e_bs.h +++ b/include/d/a/e/d_a_e_bs.h @@ -1,9 +1,9 @@ #ifndef D_A_E_BS_H #define D_A_E_BS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEbs_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_cactus.h b/include/d/a/e/d_a_e_cactus.h index 3e89e58f..7dda45aa 100644 --- a/include/d/a/e/d_a_e_cactus.h +++ b/include/d/a/e/d_a_e_cactus.h @@ -1,7 +1,7 @@ #ifndef D_A_E_CACTUS_H #define D_A_E_CACTUS_H -#include +#include "d/a/e/d_a_en_base.h" class dAcEcactus_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_captain.h b/include/d/a/e/d_a_e_captain.h index 19ad7b1b..a868bbb8 100644 --- a/include/d/a/e/d_a_e_captain.h +++ b/include/d/a/e/d_a_e_captain.h @@ -1,9 +1,9 @@ #ifndef D_A_E_CAPTAIN_H #define D_A_E_CAPTAIN_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEcaptain_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_chaser_b.h b/include/d/a/e/d_a_e_chaser_b.h index ec1de6bf..b749e0b5 100644 --- a/include/d/a/e/d_a_e_chaser_b.h +++ b/include/d/a/e/d_a_e_chaser_b.h @@ -1,9 +1,9 @@ #ifndef D_A_E_CHASER_B_H #define D_A_E_CHASER_B_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEChb_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_eye.h b/include/d/a/e/d_a_e_eye.h index 0bf7e671..8814dd31 100644 --- a/include/d/a/e/d_a_e_eye.h +++ b/include/d/a/e/d_a_e_eye.h @@ -1,9 +1,9 @@ #ifndef D_A_E_EYE_H #define D_A_E_EYE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEEye_c : public dAcObjBase_c { public: diff --git a/include/d/a/e/d_a_e_ge.h b/include/d/a/e/d_a_e_ge.h index 618f3224..c97b4a2d 100644 --- a/include/d/a/e/d_a_e_ge.h +++ b/include/d/a/e/d_a_e_ge.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GE_H #define D_A_E_GE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEge_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_geko.h b/include/d/a/e/d_a_e_geko.h index 9f89e5de..b299c1a2 100644 --- a/include/d/a/e/d_a_e_geko.h +++ b/include/d/a/e/d_a_e_geko.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GEKO_H #define D_A_E_GEKO_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEgeko_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_gerock.h b/include/d/a/e/d_a_e_gerock.h index 8c6f5f3f..e9dbd27d 100644 --- a/include/d/a/e/d_a_e_gerock.h +++ b/include/d/a/e/d_a_e_gerock.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GEROCK_H #define D_A_E_GEROCK_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEgerock_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_gue.h b/include/d/a/e/d_a_e_gue.h index da9267ea..f88a58a6 100644 --- a/include/d/a/e/d_a_e_gue.h +++ b/include/d/a/e/d_a_e_gue.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GUE_H #define D_A_E_GUE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEgue_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_gumarm.h b/include/d/a/e/d_a_e_gumarm.h index d09a89c7..249d1f79 100644 --- a/include/d/a/e/d_a_e_gumarm.h +++ b/include/d/a/e/d_a_e_gumarm.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GUMARM_H #define D_A_E_GUMARM_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcGumarm_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_gunho.h b/include/d/a/e/d_a_e_gunho.h index f926a4b7..c9f19a0a 100644 --- a/include/d/a/e/d_a_e_gunho.h +++ b/include/d/a/e/d_a_e_gunho.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GUNHO_H #define D_A_E_GUNHO_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEgunho_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_gunhob.h b/include/d/a/e/d_a_e_gunhob.h index af82dcb1..d854828d 100644 --- a/include/d/a/e/d_a_e_gunhob.h +++ b/include/d/a/e/d_a_e_gunhob.h @@ -1,9 +1,9 @@ #ifndef D_A_E_GUNHOB_H #define D_A_E_GUNHOB_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEgunhob_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_hb.h b/include/d/a/e/d_a_e_hb.h index 08a01f00..ef40a2f0 100644 --- a/include/d/a/e/d_a_e_hb.h +++ b/include/d/a/e/d_a_e_hb.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HB_H #define D_A_E_HB_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEhb_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_hb_leaf.h b/include/d/a/e/d_a_e_hb_leaf.h index ba0c3877..429b7f8e 100644 --- a/include/d/a/e/d_a_e_hb_leaf.h +++ b/include/d/a/e/d_a_e_hb_leaf.h @@ -1,11 +1,11 @@ #ifndef D_A_E_HB_LEAF_H #define D_A_E_HB_LEAF_H -#include -#include -#include -#include -#include +#include "c/c_math.h" +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmmdl.h" +#include "m/m3d/m_anmtexpat.h" +#include "toBeSorted/time_area_mgr.h" class dAcEhb_leaf_c : public dAcObjBase_c { public: @@ -27,10 +27,10 @@ class dAcEhb_leaf_c : public dAcObjBase_c { m3d::anmTexPat_c mAnm; // 0x398 TimeAreaStruct mTimeAreaStruct; // 0x3C4 - mVec3_c mStartingPos; // 0x3D0 - u16 someRot; // 0x3DC - u8 field_0x3DE; // 0x3DE - u8 mType; // 0x3DF + mVec3_c mStartingPos; // 0x3D0 + u16 someRot; // 0x3DC + u8 field_0x3DE; // 0x3DE + u8 mType; // 0x3DF bool isHidden() { return mType != 0 && mTimeAreaStruct.isNearZero() ? true : false; diff --git a/include/d/a/e/d_a_e_hidokari.h b/include/d/a/e/d_a_e_hidokari.h index d97b744f..c7c20d90 100644 --- a/include/d/a/e/d_a_e_hidokari.h +++ b/include/d/a/e/d_a_e_hidokari.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HIDOKARI_H #define D_A_E_HIDOKARI_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEhidokari_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_hidokaris.h b/include/d/a/e/d_a_e_hidokaris.h index 51ec3b57..bd0cff48 100644 --- a/include/d/a/e/d_a_e_hidokaris.h +++ b/include/d/a/e/d_a_e_hidokaris.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HIDOKARIS_H #define D_A_E_HIDOKARIS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEhidokaris_c : public dAcObjBase_c { public: diff --git a/include/d/a/e/d_a_e_hidory.h b/include/d/a/e/d_a_e_hidory.h index 8417b469..be270dc8 100644 --- a/include/d/a/e/d_a_e_hidory.h +++ b/include/d/a/e/d_a_e_hidory.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HIDORY_H #define D_A_E_HIDORY_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEHidory_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_hoc.h b/include/d/a/e/d_a_e_hoc.h index d29e1d27..a15b44ea 100644 --- a/include/d/a/e/d_a_e_hoc.h +++ b/include/d/a/e/d_a_e_hoc.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HOC_H #define D_A_E_HOC_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEhoc_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_hp.h b/include/d/a/e/d_a_e_hp.h index 0fd45fac..dd8bdc5c 100644 --- a/include/d/a/e/d_a_e_hp.h +++ b/include/d/a/e/d_a_e_hp.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HP_H #define D_A_E_HP_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEHp_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_hydra.h b/include/d/a/e/d_a_e_hydra.h index 09cdab1e..b59c68c1 100644 --- a/include/d/a/e/d_a_e_hydra.h +++ b/include/d/a/e/d_a_e_hydra.h @@ -1,9 +1,9 @@ #ifndef D_A_E_HYDRA_H #define D_A_E_HYDRA_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEhydra_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_kg.h b/include/d/a/e/d_a_e_kg.h index c34c80b5..658d48bd 100644 --- a/include/d/a/e/d_a_e_kg.h +++ b/include/d/a/e/d_a_e_kg.h @@ -1,9 +1,9 @@ #ifndef D_A_E_KG_H #define D_A_E_KG_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEkg_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_ks.h b/include/d/a/e/d_a_e_ks.h index bd69b029..2c92b881 100644 --- a/include/d/a/e/d_a_e_ks.h +++ b/include/d/a/e/d_a_e_ks.h @@ -1,9 +1,9 @@ #ifndef D_A_E_KS_H #define D_A_E_KS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEKs_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_kumite_gira.h b/include/d/a/e/d_a_e_kumite_gira.h index 4dfff51d..ea6dfbe6 100644 --- a/include/d/a/e/d_a_e_kumite_gira.h +++ b/include/d/a/e/d_a_e_kumite_gira.h @@ -1,9 +1,9 @@ #ifndef D_A_E_KUMITE_GIRA_H #define D_A_E_KUMITE_GIRA_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEKumiteGira_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_liza_tail.h b/include/d/a/e/d_a_e_liza_tail.h index 492fc716..1d5e9ce0 100644 --- a/include/d/a/e/d_a_e_liza_tail.h +++ b/include/d/a/e/d_a_e_liza_tail.h @@ -1,9 +1,9 @@ #ifndef D_A_E_LIZA_TAIL_H #define D_A_E_LIZA_TAIL_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEliza_tail_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_lizarufos.h b/include/d/a/e/d_a_e_lizarufos.h index 72dc39d0..21c5cc07 100644 --- a/include/d/a/e/d_a_e_lizarufos.h +++ b/include/d/a/e/d_a_e_lizarufos.h @@ -1,9 +1,9 @@ #ifndef D_A_E_LIZARUFOS_H #define D_A_E_LIZARUFOS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcELizarufos_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_magma.h b/include/d/a/e/d_a_e_magma.h index 6bd52dca..4d128667 100644 --- a/include/d/a/e/d_a_e_magma.h +++ b/include/d/a/e/d_a_e_magma.h @@ -1,9 +1,9 @@ #ifndef D_A_E_MAGMA_H #define D_A_E_MAGMA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEmagma_c : public dAcObjBase_c { public: diff --git a/include/d/a/e/d_a_e_maguppo.h b/include/d/a/e/d_a_e_maguppo.h index 6661dcdc..2263f1ac 100644 --- a/include/d/a/e/d_a_e_maguppo.h +++ b/include/d/a/e/d_a_e_maguppo.h @@ -1,9 +1,9 @@ #ifndef D_A_E_MAGUPPO_H #define D_A_E_MAGUPPO_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEmaguppo_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_mr.h b/include/d/a/e/d_a_e_mr.h index 48a39cf1..ca7649f5 100644 --- a/include/d/a/e/d_a_e_mr.h +++ b/include/d/a/e/d_a_e_mr.h @@ -1,9 +1,9 @@ #ifndef D_A_E_MR_H #define D_A_E_MR_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEmr_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_mr_shield.h b/include/d/a/e/d_a_e_mr_shield.h index a507001c..8bd559aa 100644 --- a/include/d/a/e/d_a_e_mr_shield.h +++ b/include/d/a/e/d_a_e_mr_shield.h @@ -1,9 +1,9 @@ #ifndef D_A_E_MR_SHIELD_H #define D_A_E_MR_SHIELD_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcE_Mr_Shield_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_oc.h b/include/d/a/e/d_a_e_oc.h index f5256df1..f4e3e007 100644 --- a/include/d/a/e/d_a_e_oc.h +++ b/include/d/a/e/d_a_e_oc.h @@ -1,9 +1,9 @@ #ifndef D_A_E_OC_H #define D_A_E_OC_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEoc_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_or.h b/include/d/a/e/d_a_e_or.h index 7c47b560..363c0ef0 100644 --- a/include/d/a/e/d_a_e_or.h +++ b/include/d/a/e/d_a_e_or.h @@ -1,9 +1,9 @@ #ifndef D_A_E_OR_H #define D_A_E_OR_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEor_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_or_cannon.h b/include/d/a/e/d_a_e_or_cannon.h index 37d447a4..10619b94 100644 --- a/include/d/a/e/d_a_e_or_cannon.h +++ b/include/d/a/e/d_a_e_or_cannon.h @@ -1,9 +1,9 @@ #ifndef D_A_E_OR_CANNON_H #define D_A_E_OR_CANNON_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEorCannon_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_ph.h b/include/d/a/e/d_a_e_ph.h index 2b4f213f..6af35a8a 100644 --- a/include/d/a/e/d_a_e_ph.h +++ b/include/d/a/e/d_a_e_ph.h @@ -1,9 +1,9 @@ #ifndef D_A_E_PH_H #define D_A_E_PH_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEPh_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_po.h b/include/d/a/e/d_a_e_po.h index 1da4a506..fe1b26a4 100644 --- a/include/d/a/e/d_a_e_po.h +++ b/include/d/a/e/d_a_e_po.h @@ -1,9 +1,9 @@ #ifndef D_A_E_PO_H #define D_A_E_PO_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEPo_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_remly.h b/include/d/a/e/d_a_e_remly.h index f14c9b88..74b9375d 100644 --- a/include/d/a/e/d_a_e_remly.h +++ b/include/d/a/e/d_a_e_remly.h @@ -1,9 +1,9 @@ #ifndef D_A_E_REMLY_H #define D_A_E_REMLY_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEremly_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_rupee_gue.h b/include/d/a/e/d_a_e_rupee_gue.h index 0d61d3b4..9a204c94 100644 --- a/include/d/a/e/d_a_e_rupee_gue.h +++ b/include/d/a/e/d_a_e_rupee_gue.h @@ -1,9 +1,9 @@ #ifndef D_A_E_RUPEE_GUE_H #define D_A_E_RUPEE_GUE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcErupeeGue_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_sf.h b/include/d/a/e/d_a_e_sf.h index 79360d85..f285e02e 100644 --- a/include/d/a/e/d_a_e_sf.h +++ b/include/d/a/e/d_a_e_sf.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SF_H #define D_A_E_SF_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEsf_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_sf4.h b/include/d/a/e/d_a_e_sf4.h index 00b59045..3560c1a2 100644 --- a/include/d/a/e/d_a_e_sf4.h +++ b/include/d/a/e/d_a_e_sf4.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SF4_H #define D_A_E_SF4_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEsf4_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_siren.h b/include/d/a/e/d_a_e_siren.h index 9188889c..aaf05db2 100644 --- a/include/d/a/e/d_a_e_siren.h +++ b/include/d/a/e/d_a_e_siren.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SIREN_H #define D_A_E_SIREN_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcESiren_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_skytail.h b/include/d/a/e/d_a_e_skytail.h index 2e7746a0..1ebe879b 100644 --- a/include/d/a/e/d_a_e_skytail.h +++ b/include/d/a/e/d_a_e_skytail.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SKYTAIL_H #define D_A_E_SKYTAIL_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcESkytail_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_sm.h b/include/d/a/e/d_a_e_sm.h index f30e3739..707fb6f1 100644 --- a/include/d/a/e/d_a_e_sm.h +++ b/include/d/a/e/d_a_e_sm.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SM_H #define D_A_E_SM_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEsm_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_spark.h b/include/d/a/e/d_a_e_spark.h index 35d1dc98..1fd92add 100644 --- a/include/d/a/e/d_a_e_spark.h +++ b/include/d/a/e/d_a_e_spark.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SPARK_H #define D_A_E_SPARK_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEspark_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_st.h b/include/d/a/e/d_a_e_st.h index 50ea6930..a35e502d 100644 --- a/include/d/a/e/d_a_e_st.h +++ b/include/d/a/e/d_a_e_st.h @@ -1,9 +1,9 @@ #ifndef D_A_E_ST_H #define D_A_E_ST_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEst_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_st_wire.h b/include/d/a/e/d_a_e_st_wire.h index 5628efdf..3c8e75c3 100644 --- a/include/d/a/e/d_a_e_st_wire.h +++ b/include/d/a/e/d_a_e_st_wire.h @@ -1,9 +1,9 @@ #ifndef D_A_E_ST_WIRE_H #define D_A_E_ST_WIRE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEstwire_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_syakomaito.h b/include/d/a/e/d_a_e_syakomaito.h index 115f58a1..ad31ad45 100644 --- a/include/d/a/e/d_a_e_syakomaito.h +++ b/include/d/a/e/d_a_e_syakomaito.h @@ -1,9 +1,9 @@ #ifndef D_A_E_SYAKOMAITO_H #define D_A_E_SYAKOMAITO_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcESyakomaito_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_tn2.h b/include/d/a/e/d_a_e_tn2.h index 7fa85266..3a9269b4 100644 --- a/include/d/a/e/d_a_e_tn2.h +++ b/include/d/a/e/d_a_e_tn2.h @@ -1,9 +1,9 @@ #ifndef D_A_E_TN2_H #define D_A_E_TN2_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEtn2_c : public dAcEnBase_c { public: diff --git a/include/d/a/e/d_a_e_ws.h b/include/d/a/e/d_a_e_ws.h index 30e7b067..6080f034 100644 --- a/include/d/a/e/d_a_e_ws.h +++ b/include/d/a/e/d_a_e_ws.h @@ -1,9 +1,9 @@ #ifndef D_A_E_WS_H #define D_A_E_WS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcEws_c : public dAcEnBase_c { public: diff --git a/include/d/a/npc/d_a_npc_aku_human.h b/include/d/a/npc/d_a_npc_aku_human.h index e392d6ca..d18e05d0 100644 --- a/include/d/a/npc/d_a_npc_aku_human.h +++ b/include/d/a/npc/d_a_npc_aku_human.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_AKU_HUMAN_H #define D_A_NPC_AKU_HUMAN_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcAkuHuman_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_akumakun.h b/include/d/a/npc/d_a_npc_akumakun.h index bda0aeb5..6c2e69f7 100644 --- a/include/d/a/npc/d_a_npc_akumakun.h +++ b/include/d/a/npc/d_a_npc_akumakun.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_AKUMAKUN_H #define D_A_NPC_AKUMAKUN_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcAkumakun_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_aqua_dragon.h b/include/d/a/npc/d_a_npc_aqua_dragon.h index ce5539df..1a69bf6e 100644 --- a/include/d/a/npc/d_a_npc_aqua_dragon.h +++ b/include/d/a/npc/d_a_npc_aqua_dragon.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_AQUA_DRAGON_H #define D_A_NPC_AQUA_DRAGON_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcAdr_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_azukariya_father.h b/include/d/a/npc/d_a_npc_azukariya_father.h index f08b5053..572a29f9 100644 --- a/include/d/a/npc/d_a_npc_azukariya_father.h +++ b/include/d/a/npc/d_a_npc_azukariya_father.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_AZUKARIYA_FATHER_H #define D_A_NPC_AZUKARIYA_FATHER_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcAzukariyaFather_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_azukariya_night.h b/include/d/a/npc/d_a_npc_azukariya_night.h index c4a66a4f..da407a5b 100644 --- a/include/d/a/npc/d_a_npc_azukariya_night.h +++ b/include/d/a/npc/d_a_npc_azukariya_night.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_AZUKARIYA_NIGHT_H #define D_A_NPC_AZUKARIYA_NIGHT_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcAzukariyaNight_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_bamboo_goron.h b/include/d/a/npc/d_a_npc_bamboo_goron.h index 189ed35c..9a0636e7 100644 --- a/include/d/a/npc/d_a_npc_bamboo_goron.h +++ b/include/d/a/npc/d_a_npc_bamboo_goron.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_BAMBOO_GORON_H #define D_A_NPC_BAMBOO_GORON_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcBgr_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_bbrvl.h b/include/d/a/npc/d_a_npc_bbrvl.h index 7fbf6828..3d66c67c 100644 --- a/include/d/a/npc/d_a_npc_bbrvl.h +++ b/include/d/a/npc/d_a_npc_bbrvl.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_BBRVL_H #define D_A_NPC_BBRVL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcBBRvl_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_bee.h b/include/d/a/npc/d_a_npc_bee.h index 6ceaee0c..855e6c25 100644 --- a/include/d/a/npc/d_a_npc_bee.h +++ b/include/d/a/npc/d_a_npc_bee.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_BEE_H #define D_A_NPC_BEE_H -#include +#include "d/a/e/d_a_en_base.h" class dAcNpcBee_c : public dAcEnBase_c { public: diff --git a/include/d/a/npc/d_a_npc_bird.h b/include/d/a/npc/d_a_npc_bird.h index 93267d11..66d06012 100644 --- a/include/d/a/npc/d_a_npc_bird.h +++ b/include/d/a/npc/d_a_npc_bird.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_BIRD_H #define D_A_NPC_BIRD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dNpc_Bird_c : public dAcObjBase_c { public: diff --git a/include/d/a/npc/d_a_npc_bird_sowoman.h b/include/d/a/npc/d_a_npc_bird_sowoman.h index e949b169..9bd86fc3 100644 --- a/include/d/a/npc/d_a_npc_bird_sowoman.h +++ b/include/d/a/npc/d_a_npc_bird_sowoman.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_BIRD_SOWOMAN_H #define D_A_NPC_BIRD_SOWOMAN_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcBdsw_c : public dAcObjBase_c { public: diff --git a/include/d/a/npc/d_a_npc_bird_zelda.h b/include/d/a/npc/d_a_npc_bird_zelda.h index de9ba356..09433fe8 100644 --- a/include/d/a/npc/d_a_npc_bird_zelda.h +++ b/include/d/a/npc/d_a_npc_bird_zelda.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_BIRD_ZELDA_H #define D_A_NPC_BIRD_ZELDA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcBdz_c : public dAcObjBase_c { public: diff --git a/include/d/a/npc/d_a_npc_ce_friend.h b/include/d/a/npc/d_a_npc_ce_friend.h index cd579976..ebda1753 100644 --- a/include/d/a/npc/d_a_npc_ce_friend.h +++ b/include/d/a/npc/d_a_npc_ce_friend.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_CE_FRIEND_H #define D_A_NPC_CE_FRIEND_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcCeFriend_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_ce_lady.h b/include/d/a/npc/d_a_npc_ce_lady.h index 4203c069..a6e411f4 100644 --- a/include/d/a/npc/d_a_npc_ce_lady.h +++ b/include/d/a/npc/d_a_npc_ce_lady.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_CE_LADY_H #define D_A_NPC_CE_LADY_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcCeLady_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_chef.h b/include/d/a/npc/d_a_npc_chef.h index dd8c1b51..6a2dc511 100644 --- a/include/d/a/npc/d_a_npc_chef.h +++ b/include/d/a/npc/d_a_npc_chef.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_CHEF_H #define D_A_NPC_CHEF_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcChef_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_daishinkan.h b/include/d/a/npc/d_a_npc_daishinkan.h index 1085460e..abf33694 100644 --- a/include/d/a/npc/d_a_npc_daishinkan.h +++ b/include/d/a/npc/d_a_npc_daishinkan.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_DAISHINKAN_H #define D_A_NPC_DAISHINKAN_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcDsk_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_daishinkan_n.h b/include/d/a/npc/d_a_npc_daishinkan_n.h index debdd389..fb6d006b 100644 --- a/include/d/a/npc/d_a_npc_daishinkan_n.h +++ b/include/d/a/npc/d_a_npc_daishinkan_n.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_DAISHINKAN_N_H #define D_A_NPC_DAISHINKAN_N_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcDaishinkanN_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_desertrobot.h b/include/d/a/npc/d_a_npc_desertrobot.h index 19649e98..095a713a 100644 --- a/include/d/a/npc/d_a_npc_desertrobot.h +++ b/include/d/a/npc/d_a_npc_desertrobot.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_DESERTROBOT_H #define D_A_NPC_DESERTROBOT_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcDrb_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_desertrobot_captain.h b/include/d/a/npc/d_a_npc_desertrobot_captain.h index 6f5e91b7..ac5f2e8c 100644 --- a/include/d/a/npc/d_a_npc_desertrobot_captain.h +++ b/include/d/a/npc/d_a_npc_desertrobot_captain.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_DESERTROBOT_CAPTAIN_H #define D_A_NPC_DESERTROBOT_CAPTAIN_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcDrbC_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_dive_game_judge.h b/include/d/a/npc/d_a_npc_dive_game_judge.h index 80b64a37..3428ee4f 100644 --- a/include/d/a/npc/d_a_npc_dive_game_judge.h +++ b/include/d/a/npc/d_a_npc_dive_game_judge.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_DIVE_GAME_JUDGE_H #define D_A_NPC_DIVE_GAME_JUDGE_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcDiveGameJudge_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_douguya_mother.h b/include/d/a/npc/d_a_npc_douguya_mother.h index ec3e9f5a..5c47a002 100644 --- a/include/d/a/npc/d_a_npc_douguya_mother.h +++ b/include/d/a/npc/d_a_npc_douguya_mother.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_DOUGUYA_MOTHER_H #define D_A_NPC_DOUGUYA_MOTHER_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcDouguyaMother_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_douguya_mother_lod.h b/include/d/a/npc/d_a_npc_douguya_mother_lod.h index c0c27ee6..9beb04d7 100644 --- a/include/d/a/npc/d_a_npc_douguya_mother_lod.h +++ b/include/d/a/npc/d_a_npc_douguya_mother_lod.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_DOUGUYA_MOTHER_LOD_H #define D_A_NPC_DOUGUYA_MOTHER_LOD_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcDouguyaMotherLOD_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_douguyanight.h b/include/d/a/npc/d_a_npc_douguyanight.h index f44860ad..3113a73f 100644 --- a/include/d/a/npc/d_a_npc_douguyanight.h +++ b/include/d/a/npc/d_a_npc_douguyanight.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_DOUGUYANIGHT_H #define D_A_NPC_DOUGUYANIGHT_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcDouguyaNight_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_fire_dragon.h b/include/d/a/npc/d_a_npc_fire_dragon.h index c3d83904..ac86689d 100644 --- a/include/d/a/npc/d_a_npc_fire_dragon.h +++ b/include/d/a/npc/d_a_npc_fire_dragon.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_FIRE_DRAGON_H #define D_A_NPC_FIRE_DRAGON_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcFdr_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_girahim.h b/include/d/a/npc/d_a_npc_girahim.h index 7bbf4282..65542ce9 100644 --- a/include/d/a/npc/d_a_npc_girahim.h +++ b/include/d/a/npc/d_a_npc_girahim.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_GIRAHIM_H #define D_A_NPC_GIRAHIM_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcGhm_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_goddess_zelda.h b/include/d/a/npc/d_a_npc_goddess_zelda.h index ac7557e7..45ed454c 100644 --- a/include/d/a/npc/d_a_npc_goddess_zelda.h +++ b/include/d/a/npc/d_a_npc_goddess_zelda.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_GODDESS_ZELDA_H #define D_A_NPC_GODDESS_ZELDA_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcGzl_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_gra.h b/include/d/a/npc/d_a_npc_gra.h index 99499726..d52941be 100644 --- a/include/d/a/npc/d_a_npc_gra.h +++ b/include/d/a/npc/d_a_npc_gra.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_GRA_H #define D_A_NPC_GRA_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcGra_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_grc.h b/include/d/a/npc/d_a_npc_grc.h index 5ba3175d..e54c5da6 100644 --- a/include/d/a/npc/d_a_npc_grc.h +++ b/include/d/a/npc/d_a_npc_grc.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_GRC_H #define D_A_NPC_GRC_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcGrc_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_grd.h b/include/d/a/npc/d_a_npc_grd.h index 331666a6..a4f8eba3 100644 --- a/include/d/a/npc/d_a_npc_grd.h +++ b/include/d/a/npc/d_a_npc_grd.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_GRD_H #define D_A_NPC_GRD_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcGrd_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_honeycomb.h b/include/d/a/npc/d_a_npc_honeycomb.h index dd81f626..a0c3c7dd 100644 --- a/include/d/a/npc/d_a_npc_honeycomb.h +++ b/include/d/a/npc/d_a_npc_honeycomb.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_HONEYCOMB_H #define D_A_NPC_HONEYCOMB_H -#include +#include "d/a/e/d_a_en_base.h" class dAcNpcHc_c : public dAcEnBase_c { public: diff --git a/include/d/a/npc/d_a_npc_insect_capture_game_kobun.h b/include/d/a/npc/d_a_npc_insect_capture_game_kobun.h index cf1c0768..f352035a 100644 --- a/include/d/a/npc/d_a_npc_insect_capture_game_kobun.h +++ b/include/d/a/npc/d_a_npc_insect_capture_game_kobun.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_INSECT_CAPTURE_GAME_KOBUN_H #define D_A_NPC_INSECT_CAPTURE_GAME_KOBUN_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcIcgKobun_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_junk_mother.h b/include/d/a/npc/d_a_npc_junk_mother.h index 7f48f9a5..5f5b5ac7 100644 --- a/include/d/a/npc/d_a_npc_junk_mother.h +++ b/include/d/a/npc/d_a_npc_junk_mother.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_JUNK_MOTHER_H #define D_A_NPC_JUNK_MOTHER_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcJunkMother_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_junk_mother_lod.h b/include/d/a/npc/d_a_npc_junk_mother_lod.h index cd6c9b0b..28ad0723 100644 --- a/include/d/a/npc/d_a_npc_junk_mother_lod.h +++ b/include/d/a/npc/d_a_npc_junk_mother_lod.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_JUNK_MOTHER_LOD_H #define D_A_NPC_JUNK_MOTHER_LOD_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcJunkMotherLOD_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_junk_night.h b/include/d/a/npc/d_a_npc_junk_night.h index 12a24e0c..bf3f7476 100644 --- a/include/d/a/npc/d_a_npc_junk_night.h +++ b/include/d/a/npc/d_a_npc_junk_night.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_JUNK_NIGHT_H #define D_A_NPC_JUNK_NIGHT_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcJunkNight_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kensei.h b/include/d/a/npc/d_a_npc_kensei.h index 89776463..2d2c77eb 100644 --- a/include/d/a/npc/d_a_npc_kensei.h +++ b/include/d/a/npc/d_a_npc_kensei.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KENSEI_H #define D_A_NPC_KENSEI_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKensei_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_knight_leader.h b/include/d/a/npc/d_a_npc_knight_leader.h index 1ad0687d..3c9b5459 100644 --- a/include/d/a/npc/d_a_npc_knight_leader.h +++ b/include/d/a/npc/d_a_npc_knight_leader.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KNIGHT_LEADER_H #define D_A_NPC_KNIGHT_LEADER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKnightLeader_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kobun.h b/include/d/a/npc/d_a_npc_kobun.h index 517fbd46..981bb4b7 100644 --- a/include/d/a/npc/d_a_npc_kobun.h +++ b/include/d/a/npc/d_a_npc_kobun.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KOBUN_H #define D_A_NPC_KOBUN_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKbn_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kobun2.h b/include/d/a/npc/d_a_npc_kobun2.h index c20ac04d..460adc7f 100644 --- a/include/d/a/npc/d_a_npc_kobun2.h +++ b/include/d/a/npc/d_a_npc_kobun2.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KOBUN2_H #define D_A_NPC_KOBUN2_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKbn2_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kobun_b_night.h b/include/d/a/npc/d_a_npc_kobun_b_night.h index 11f20f94..27787d97 100644 --- a/include/d/a/npc/d_a_npc_kobun_b_night.h +++ b/include/d/a/npc/d_a_npc_kobun_b_night.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_KOBUN_B_NIGHT_H #define D_A_NPC_KOBUN_B_NIGHT_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcKobunBNight_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kyui4.h b/include/d/a/npc/d_a_npc_kyui4.h index d8e22735..631c2a4a 100644 --- a/include/d/a/npc/d_a_npc_kyui4.h +++ b/include/d/a/npc/d_a_npc_kyui4.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KYUI4_H #define D_A_NPC_KYUI4_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKyui4_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kyui_elder.h b/include/d/a/npc/d_a_npc_kyui_elder.h index cb122cc8..30552eae 100644 --- a/include/d/a/npc/d_a_npc_kyui_elder.h +++ b/include/d/a/npc/d_a_npc_kyui_elder.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KYUI_ELDER_H #define D_A_NPC_KYUI_ELDER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKyuiElder_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kyui_first.h b/include/d/a/npc/d_a_npc_kyui_first.h index 2652461e..7f55b400 100644 --- a/include/d/a/npc/d_a_npc_kyui_first.h +++ b/include/d/a/npc/d_a_npc_kyui_first.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KYUI_FIRST_H #define D_A_NPC_KYUI_FIRST_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKyuiFirst_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kyui_third.h b/include/d/a/npc/d_a_npc_kyui_third.h index 1fef96e8..82e3ab7e 100644 --- a/include/d/a/npc/d_a_npc_kyui_third.h +++ b/include/d/a/npc/d_a_npc_kyui_third.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KYUI_THIRD_H #define D_A_NPC_KYUI_THIRD_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKyuiThird_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_kyui_wizard.h b/include/d/a/npc/d_a_npc_kyui_wizard.h index 19a5c3da..01327c66 100644 --- a/include/d/a/npc/d_a_npc_kyui_wizard.h +++ b/include/d/a/npc/d_a_npc_kyui_wizard.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_KYUI_WIZARD_H #define D_A_NPC_KYUI_WIZARD_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcKyuiWizard_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_medicine_husband_night.h b/include/d/a/npc/d_a_npc_medicine_husband_night.h index d7283449..32537e02 100644 --- a/include/d/a/npc/d_a_npc_medicine_husband_night.h +++ b/include/d/a/npc/d_a_npc_medicine_husband_night.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_MEDICINE_HUSBAND_NIGHT_H #define D_A_NPC_MEDICINE_HUSBAND_NIGHT_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcMedicineHusbandNight_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_medicinewifenight.h b/include/d/a/npc/d_a_npc_medicinewifenight.h index bba15246..d1d8d3f8 100644 --- a/include/d/a/npc/d_a_npc_medicinewifenight.h +++ b/include/d/a/npc/d_a_npc_medicinewifenight.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_MEDICINEWIFENIGHT_H #define D_A_NPC_MEDICINEWIFENIGHT_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcMedicineWifeNight_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole.h b/include/d/a/npc/d_a_npc_mole.h index c983ee70..1f1c366d 100644 --- a/include/d/a/npc/d_a_npc_mole.h +++ b/include/d/a/npc/d_a_npc_mole.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_H #define D_A_NPC_MOLE_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMole_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_elder.h b/include/d/a/npc/d_a_npc_mole_elder.h index 6d852e4c..a1f6c589 100644 --- a/include/d/a/npc/d_a_npc_mole_elder.h +++ b/include/d/a/npc/d_a_npc_mole_elder.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_ELDER_H #define D_A_NPC_MOLE_ELDER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMoleElder_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_es_nml.h b/include/d/a/npc/d_a_npc_mole_es_nml.h index c789570e..657412be 100644 --- a/include/d/a/npc/d_a_npc_mole_es_nml.h +++ b/include/d/a/npc/d_a_npc_mole_es_nml.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_ES_NML_H #define D_A_NPC_MOLE_ES_NML_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMoleEsNml_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_mg.h b/include/d/a/npc/d_a_npc_mole_mg.h index e0dd7cd2..8787d6fa 100644 --- a/include/d/a/npc/d_a_npc_mole_mg.h +++ b/include/d/a/npc/d_a_npc_mole_mg.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_MG_H #define D_A_NPC_MOLE_MG_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMoleMg_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_normal.h b/include/d/a/npc/d_a_npc_mole_normal.h index 5fe1ca5d..1fbf497a 100644 --- a/include/d/a/npc/d_a_npc_mole_normal.h +++ b/include/d/a/npc/d_a_npc_mole_normal.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_NORMAL_H #define D_A_NPC_MOLE_NORMAL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class NPC_MOLE_NML_CLASS : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_normal2.h b/include/d/a/npc/d_a_npc_mole_normal2.h index 74fe47fc..d409b304 100644 --- a/include/d/a/npc/d_a_npc_mole_normal2.h +++ b/include/d/a/npc/d_a_npc_mole_normal2.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_NORMAL2_H #define D_A_NPC_MOLE_NORMAL2_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class NPC_MOLE_NML_CLASS : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_sal.h b/include/d/a/npc/d_a_npc_mole_sal.h index 70d43140..31f9d85f 100644 --- a/include/d/a/npc/d_a_npc_mole_sal.h +++ b/include/d/a/npc/d_a_npc_mole_sal.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_SAL_H #define D_A_NPC_MOLE_SAL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMoleSal_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_tackle.h b/include/d/a/npc/d_a_npc_mole_tackle.h index e1646486..e45bb2a6 100644 --- a/include/d/a/npc/d_a_npc_mole_tackle.h +++ b/include/d/a/npc/d_a_npc_mole_tackle.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_TACKLE_H #define D_A_NPC_MOLE_TACKLE_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMoleTackle_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_mole_tackle2.h b/include/d/a/npc/d_a_npc_mole_tackle2.h index a164dae2..52bd046a 100644 --- a/include/d/a/npc/d_a_npc_mole_tackle2.h +++ b/include/d/a/npc/d_a_npc_mole_tackle2.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_MOLE_TACKLE2_H #define D_A_NPC_MOLE_TACKLE2_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcMoleTackle2_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_old_impa.h b/include/d/a/npc/d_a_npc_old_impa.h index 223c8697..38ad1bee 100644 --- a/include/d/a/npc/d_a_npc_old_impa.h +++ b/include/d/a/npc/d_a_npc_old_impa.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_OLD_IMPA_H #define D_A_NPC_OLD_IMPA_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcOim_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_ord_kyui.h b/include/d/a/npc/d_a_npc_ord_kyui.h index 5c92acc5..6fd9e74e 100644 --- a/include/d/a/npc/d_a_npc_ord_kyui.h +++ b/include/d/a/npc/d_a_npc_ord_kyui.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_ORD_KYUI_H #define D_A_NPC_ORD_KYUI_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcOrdKyui_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_pumpkin_clay_shooting.h b/include/d/a/npc/d_a_npc_pumpkin_clay_shooting.h index f693e973..5f1d0509 100644 --- a/include/d/a/npc/d_a_npc_pumpkin_clay_shooting.h +++ b/include/d/a/npc/d_a_npc_pumpkin_clay_shooting.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_PUMPKIN_CLAY_SHOOTING_H #define D_A_NPC_PUMPKIN_CLAY_SHOOTING_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcPcs_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_pumpkin_daughter.h b/include/d/a/npc/d_a_npc_pumpkin_daughter.h index 4fbbdd81..3b3436d4 100644 --- a/include/d/a/npc/d_a_npc_pumpkin_daughter.h +++ b/include/d/a/npc/d_a_npc_pumpkin_daughter.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_PUMPKIN_DAUGHTER_H #define D_A_NPC_PUMPKIN_DAUGHTER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcPdu_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_pumpkin_master.h b/include/d/a/npc/d_a_npc_pumpkin_master.h index 39728ae6..9f81d4fe 100644 --- a/include/d/a/npc/d_a_npc_pumpkin_master.h +++ b/include/d/a/npc/d_a_npc_pumpkin_master.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_PUMPKIN_MASTER_H #define D_A_NPC_PUMPKIN_MASTER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcPma_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_regret_rival.h b/include/d/a/npc/d_a_npc_regret_rival.h index 72101a85..4fddb084 100644 --- a/include/d/a/npc/d_a_npc_regret_rival.h +++ b/include/d/a/npc/d_a_npc_regret_rival.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_REGRET_RIVAL_H #define D_A_NPC_REGRET_RIVAL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcRegretRvl_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_rescue.h b/include/d/a/npc/d_a_npc_rescue.h index 8f448fed..a7ed919d 100644 --- a/include/d/a/npc/d_a_npc_rescue.h +++ b/include/d/a/npc/d_a_npc_rescue.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_RESCUE_H #define D_A_NPC_RESCUE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcRescue_c : public dAcObjBase_c { public: diff --git a/include/d/a/npc/d_a_npc_rival.h b/include/d/a/npc/d_a_npc_rival.h index d6b94369..f5126ae1 100644 --- a/include/d/a/npc/d_a_npc_rival.h +++ b/include/d/a/npc/d_a_npc_rival.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_RIVAL_H #define D_A_NPC_RIVAL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcRvl_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_rival_lod.h b/include/d/a/npc/d_a_npc_rival_lod.h index f0dd9ab3..0a5d54e5 100644 --- a/include/d/a/npc/d_a_npc_rival_lod.h +++ b/include/d/a/npc/d_a_npc_rival_lod.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_RIVAL_LOD_H #define D_A_NPC_RIVAL_LOD_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcRivalLOD_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_salbage_morry.h b/include/d/a/npc/d_a_npc_salbage_morry.h index 17a53f3f..5470abcd 100644 --- a/include/d/a/npc/d_a_npc_salbage_morry.h +++ b/include/d/a/npc/d_a_npc_salbage_morry.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SALBAGE_MORRY_H #define D_A_NPC_SALBAGE_MORRY_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSalbageMorry_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_salbage_robot.h b/include/d/a/npc/d_a_npc_salbage_robot.h index a1c20dc3..b1267b30 100644 --- a/include/d/a/npc/d_a_npc_salbage_robot.h +++ b/include/d/a/npc/d_a_npc_salbage_robot.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SALBAGE_ROBOT_H #define D_A_NPC_SALBAGE_ROBOT_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSlb_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_salbage_robot_fly.h b/include/d/a/npc/d_a_npc_salbage_robot_fly.h index 74d215df..568ce95a 100644 --- a/include/d/a/npc/d_a_npc_salbage_robot_fly.h +++ b/include/d/a/npc/d_a_npc_salbage_robot_fly.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SALBAGE_ROBOT_FLY_H #define D_A_NPC_SALBAGE_ROBOT_FLY_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSalbageRobotFly_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_salbage_robot_fly_base.h b/include/d/a/npc/d_a_npc_salbage_robot_fly_base.h index 1615aa53..85b23270 100644 --- a/include/d/a/npc/d_a_npc_salbage_robot_fly_base.h +++ b/include/d/a/npc/d_a_npc_salbage_robot_fly_base.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_SALBAGE_ROBOT_FLY_BASE_H #define D_A_NPC_SALBAGE_ROBOT_FLY_BASE_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcSalbageRobotFlyBase_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_salbage_robot_repair.h b/include/d/a/npc/d_a_npc_salbage_robot_repair.h index 7a83de29..f0713af5 100644 --- a/include/d/a/npc/d_a_npc_salbage_robot_repair.h +++ b/include/d/a/npc/d_a_npc_salbage_robot_repair.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SALBAGE_ROBOT_REPAIR_H #define D_A_NPC_SALBAGE_ROBOT_REPAIR_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSalbageRobotRepair_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_salesman_s.h b/include/d/a/npc/d_a_npc_salesman_s.h index 2102f13c..4f02bc73 100644 --- a/include/d/a/npc/d_a_npc_salesman_s.h +++ b/include/d/a/npc/d_a_npc_salesman_s.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SALESMAN_S_H #define D_A_NPC_SALESMAN_S_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSalesmanS_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_saltalk.h b/include/d/a/npc/d_a_npc_saltalk.h index 9d56e85b..86060934 100644 --- a/include/d/a/npc/d_a_npc_saltalk.h +++ b/include/d/a/npc/d_a_npc_saltalk.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SALTALK_H #define D_A_NPC_SALTALK_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSltk_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_senpai.h b/include/d/a/npc/d_a_npc_senpai.h index 55773f1d..63447edb 100644 --- a/include/d/a/npc/d_a_npc_senpai.h +++ b/include/d/a/npc/d_a_npc_senpai.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SENPAI_H #define D_A_NPC_SENPAI_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSenpai_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_senpai_b.h b/include/d/a/npc/d_a_npc_senpai_b.h index e4939eea..993d1884 100644 --- a/include/d/a/npc/d_a_npc_senpai_b.h +++ b/include/d/a/npc/d_a_npc_senpai_b.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SENPAI_B_H #define D_A_NPC_SENPAI_B_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSenpaiB_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_senpaia_mother.h b/include/d/a/npc/d_a_npc_senpaia_mother.h index 7a70f27a..af12f6ef 100644 --- a/include/d/a/npc/d_a_npc_senpaia_mother.h +++ b/include/d/a/npc/d_a_npc_senpaia_mother.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_SENPAIA_MOTHER_H #define D_A_NPC_SENPAIA_MOTHER_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcSenpaiAMother_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_senpaia_mother_lod.h b/include/d/a/npc/d_a_npc_senpaia_mother_lod.h index 54de0f8f..6c92adee 100644 --- a/include/d/a/npc/d_a_npc_senpaia_mother_lod.h +++ b/include/d/a/npc/d_a_npc_senpaia_mother_lod.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_SENPAIA_MOTHER_LOD_H #define D_A_NPC_SENPAIA_MOTHER_LOD_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcSenpaiAMotherLOD_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_shinkan.h b/include/d/a/npc/d_a_npc_shinkan.h index fb522fea..0edb9458 100644 --- a/include/d/a/npc/d_a_npc_shinkan.h +++ b/include/d/a/npc/d_a_npc_shinkan.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SHINKAN_H #define D_A_NPC_SHINKAN_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSkn_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_shinkan2.h b/include/d/a/npc/d_a_npc_shinkan2.h index 78dc4df9..1ac19812 100644 --- a/include/d/a/npc/d_a_npc_shinkan2.h +++ b/include/d/a/npc/d_a_npc_shinkan2.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SHINKAN2_H #define D_A_NPC_SHINKAN2_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSkn2_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_boy.h b/include/d/a/npc/d_a_npc_sorajima_boy.h index 1b0e83ab..fa0dff0e 100644 --- a/include/d/a/npc/d_a_npc_sorajima_boy.h +++ b/include/d/a/npc/d_a_npc_sorajima_boy.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_BOY_H #define D_A_NPC_SORAJIMA_BOY_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSorajimaBoy_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_father.h b/include/d/a/npc/d_a_npc_sorajima_father.h index 341e8ea9..b9200bef 100644 --- a/include/d/a/npc/d_a_npc_sorajima_father.h +++ b/include/d/a/npc/d_a_npc_sorajima_father.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_FATHER_H #define D_A_NPC_SORAJIMA_FATHER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSorajimaFather_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_female.h b/include/d/a/npc/d_a_npc_sorajima_female.h index 1e6bc17d..89b9d9cb 100644 --- a/include/d/a/npc/d_a_npc_sorajima_female.h +++ b/include/d/a/npc/d_a_npc_sorajima_female.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_FEMALE_H #define D_A_NPC_SORAJIMA_FEMALE_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSorajimaFemale_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_girl.h b/include/d/a/npc/d_a_npc_sorajima_girl.h index 35f3f85e..5809f1f5 100644 --- a/include/d/a/npc/d_a_npc_sorajima_girl.h +++ b/include/d/a/npc/d_a_npc_sorajima_girl.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_GIRL_H #define D_A_NPC_SORAJIMA_GIRL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSorajimaGirl_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_male.h b/include/d/a/npc/d_a_npc_sorajima_male.h index 19373bfa..510be1b5 100644 --- a/include/d/a/npc/d_a_npc_sorajima_male.h +++ b/include/d/a/npc/d_a_npc_sorajima_male.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_MALE_H #define D_A_NPC_SORAJIMA_MALE_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSorajimaMale_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_male2.h b/include/d/a/npc/d_a_npc_sorajima_male2.h index 0c2c2670..166977cc 100644 --- a/include/d/a/npc/d_a_npc_sorajima_male2.h +++ b/include/d/a/npc/d_a_npc_sorajima_male2.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_MALE2_H #define D_A_NPC_SORAJIMA_MALE2_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSma2_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_male3.h b/include/d/a/npc/d_a_npc_sorajima_male3.h index b74321b8..ed4bfa8e 100644 --- a/include/d/a/npc/d_a_npc_sorajima_male3.h +++ b/include/d/a/npc/d_a_npc_sorajima_male3.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_MALE3_H #define D_A_NPC_SORAJIMA_MALE3_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSma3_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_man_d.h b/include/d/a/npc/d_a_npc_sorajima_man_d.h index c02c8eeb..ca21144d 100644 --- a/include/d/a/npc/d_a_npc_sorajima_man_d.h +++ b/include/d/a/npc/d_a_npc_sorajima_man_d.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_SORAJIMA_MAN_D_H #define D_A_NPC_SORAJIMA_MAN_D_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcSoManD_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_man_e.h b/include/d/a/npc/d_a_npc_sorajima_man_e.h index 74c8f504..029a09f7 100644 --- a/include/d/a/npc/d_a_npc_sorajima_man_e.h +++ b/include/d/a/npc/d_a_npc_sorajima_man_e.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_SORAJIMA_MAN_E_H #define D_A_NPC_SORAJIMA_MAN_E_H -#include +#include "d/a/npc/d_a_npc.h" class dAcNpcSoManE_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_sorajima_mother.h b/include/d/a/npc/d_a_npc_sorajima_mother.h index 7bf6a703..cb206408 100644 --- a/include/d/a/npc/d_a_npc_sorajima_mother.h +++ b/include/d/a/npc/d_a_npc_sorajima_mother.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SORAJIMA_MOTHER_H #define D_A_NPC_SORAJIMA_MOTHER_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSorajimaMother_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_suisei.h b/include/d/a/npc/d_a_npc_suisei.h index 252d4967..e6ffabff 100644 --- a/include/d/a/npc/d_a_npc_suisei.h +++ b/include/d/a/npc/d_a_npc_suisei.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SUISEI_H #define D_A_NPC_SUISEI_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSuisei_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_suisei_normal.h b/include/d/a/npc/d_a_npc_suisei_normal.h index fd17866c..45b583c4 100644 --- a/include/d/a/npc/d_a_npc_suisei_normal.h +++ b/include/d/a/npc/d_a_npc_suisei_normal.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SUISEI_NORMAL_H #define D_A_NPC_SUISEI_NORMAL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSuiseiNml_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_suisei_sub.h b/include/d/a/npc/d_a_npc_suisei_sub.h index 648c03f0..c17f7905 100644 --- a/include/d/a/npc/d_a_npc_suisei_sub.h +++ b/include/d/a/npc/d_a_npc_suisei_sub.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_SUISEI_SUB_H #define D_A_NPC_SUISEI_SUB_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSuiseiSub_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_terry.h b/include/d/a/npc/d_a_npc_terry.h index 3de02e32..0f1bf82f 100644 --- a/include/d/a/npc/d_a_npc_terry.h +++ b/include/d/a/npc/d_a_npc_terry.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_TERRY_H #define D_A_NPC_TERRY_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcTerry_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_testman.h b/include/d/a/npc/d_a_npc_testman.h index d0468729..df65a714 100644 --- a/include/d/a/npc/d_a_npc_testman.h +++ b/include/d/a/npc/d_a_npc_testman.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_TESTMAN_H #define D_A_NPC_TESTMAN_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcTmn_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_thunder_dragon.h b/include/d/a/npc/d_a_npc_thunder_dragon.h index b70433ee..ff6f917b 100644 --- a/include/d/a/npc/d_a_npc_thunder_dragon.h +++ b/include/d/a/npc/d_a_npc_thunder_dragon.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_THUNDER_DRAGON_H #define D_A_NPC_THUNDER_DRAGON_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcTdr_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_thunder_dragon_bone.h b/include/d/a/npc/d_a_npc_thunder_dragon_bone.h index 26fdc06e..40bcb34b 100644 --- a/include/d/a/npc/d_a_npc_thunder_dragon_bone.h +++ b/include/d/a/npc/d_a_npc_thunder_dragon_bone.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_THUNDER_DRAGON_BONE_H #define D_A_NPC_THUNDER_DRAGON_BONE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcTdrB_c : public dAcObjBase_c { public: diff --git a/include/d/a/npc/d_a_npc_thunder_dragon_skull.h b/include/d/a/npc/d_a_npc_thunder_dragon_skull.h index 99f7ab2c..33c8e0a1 100644 --- a/include/d/a/npc/d_a_npc_thunder_dragon_skull.h +++ b/include/d/a/npc/d_a_npc_thunder_dragon_skull.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_THUNDER_DRAGON_SKULL_H #define D_A_NPC_THUNDER_DRAGON_SKULL_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcTds_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_toilet_ghost.h b/include/d/a/npc/d_a_npc_toilet_ghost.h index 631ca425..83eabb65 100644 --- a/include/d/a/npc/d_a_npc_toilet_ghost.h +++ b/include/d/a/npc/d_a_npc_toilet_ghost.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_TOILET_GHOST_H #define D_A_NPC_TOILET_GHOST_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcToiletGhost_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_uranaiya.h b/include/d/a/npc/d_a_npc_uranaiya.h index eb3663d1..e7bb7293 100644 --- a/include/d/a/npc/d_a_npc_uranaiya.h +++ b/include/d/a/npc/d_a_npc_uranaiya.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_URANAIYA_H #define D_A_NPC_URANAIYA_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSha_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_volcano_f2_salbo.h b/include/d/a/npc/d_a_npc_volcano_f2_salbo.h index ebb90612..4c96ac24 100644 --- a/include/d/a/npc/d_a_npc_volcano_f2_salbo.h +++ b/include/d/a/npc/d_a_npc_volcano_f2_salbo.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_VOLCANO_F2_SALBO_H #define D_A_NPC_VOLCANO_F2_SALBO_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcSlb2_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_young_impa.h b/include/d/a/npc/d_a_npc_young_impa.h index 307ee1b4..24d4b84b 100644 --- a/include/d/a/npc/d_a_npc_young_impa.h +++ b/include/d/a/npc/d_a_npc_young_impa.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_YOUNG_IMPA_H #define D_A_NPC_YOUNG_IMPA_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcYim_c : public dAcNpc_c { public: diff --git a/include/d/a/npc/d_a_npc_zelda.h b/include/d/a/npc/d_a_npc_zelda.h index 4ccd8190..9b0eca7e 100644 --- a/include/d/a/npc/d_a_npc_zelda.h +++ b/include/d/a/npc/d_a_npc_zelda.h @@ -1,9 +1,9 @@ #ifndef D_A_NPC_ZELDA_H #define D_A_NPC_ZELDA_H -#include -#include -#include +#include "d/a/npc/d_a_npc.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcNpcZld_c : public dAcNpc_c { public: diff --git a/include/d/a/obj/d_a_obj_B300_sand.h b/include/d/a/obj/d_a_obj_B300_sand.h index ce318b09..b6cf9ee6 100644 --- a/include/d/a/obj/d_a_obj_B300_sand.h +++ b/include/d/a/obj/d_a_obj_B300_sand.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_B300_SAND_H #define D_A_OBJ_B300_SAND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOB300Sand_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_D300.h b/include/d/a/obj/d_a_obj_D300.h index 9f0e4caa..90b4ab34 100644 --- a/include/d/a/obj/d_a_obj_D300.h +++ b/include/d/a/obj/d_a_obj_D300.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_D300_H #define D_A_OBJ_D300_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOD300_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_D3_dummy.h b/include/d/a/obj/d_a_obj_D3_dummy.h index edf6433b..5de8e220 100644 --- a/include/d/a/obj/d_a_obj_D3_dummy.h +++ b/include/d/a/obj/d_a_obj_D3_dummy.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_D3_DUMMY_H #define D_A_OBJ_D3_DUMMY_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOD3Dummy_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_F302_light.h b/include/d/a/obj/d_a_obj_F302_light.h index b7fc5b34..346ed3d2 100644 --- a/include/d/a/obj/d_a_obj_F302_light.h +++ b/include/d/a/obj/d_a_obj_F302_light.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_F302_LIGHT_H #define D_A_OBJ_F302_LIGHT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOF302Light_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_F400_gate_leaf.h b/include/d/a/obj/d_a_obj_F400_gate_leaf.h index 129890a0..a31e3ba8 100644 --- a/include/d/a/obj/d_a_obj_F400_gate_leaf.h +++ b/include/d/a/obj/d_a_obj_F400_gate_leaf.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_F400_GATE_LEAF_H #define D_A_OBJ_F400_GATE_LEAF_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOF400GateLeaf_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_F400_gate_seal.h b/include/d/a/obj/d_a_obj_F400_gate_seal.h index 825ed0c5..f4f2714e 100644 --- a/include/d/a/obj/d_a_obj_F400_gate_seal.h +++ b/include/d/a/obj/d_a_obj_F400_gate_seal.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_F400_GATE_SEAL_H #define D_A_OBJ_F400_GATE_SEAL_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOF400GateSeal_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_amber.h b/include/d/a/obj/d_a_obj_amber.h index 3cece710..ef02a89a 100644 --- a/include/d/a/obj/d_a_obj_amber.h +++ b/include/d/a/obj/d_a_obj_amber.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_AMBER_H #define D_A_OBJ_AMBER_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOAmber_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ancient_jewels.h b/include/d/a/obj/d_a_obj_ancient_jewels.h index b0f00334..5357e031 100644 --- a/include/d/a/obj/d_a_obj_ancient_jewels.h +++ b/include/d/a/obj/d_a_obj_ancient_jewels.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ANCIENT_JEWELS_H #define D_A_OBJ_ANCIENT_JEWELS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOAncientJewels_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_appear_bridge.h b/include/d/a/obj/d_a_obj_appear_bridge.h index f48819a6..69278e8b 100644 --- a/include/d/a/obj/d_a_obj_appear_bridge.h +++ b/include/d/a/obj/d_a_obj_appear_bridge.h @@ -1,15 +1,15 @@ #ifndef D_A_OBJ_APPEAR_BRIDGE_H #define D_A_OBJ_APPEAR_BRIDGE_H -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "m/m3d/m_anmmatclr.h" +#include "m/m3d/m_anmtexsrt.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" +#include "toBeSorted/actor_event.h" +#include "toBeSorted/stage_render_stuff.h" class dAcOappearBridge_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_arrow_switch.h b/include/d/a/obj/d_a_obj_arrow_switch.h index f91f4d91..61160c34 100644 --- a/include/d/a/obj/d_a_obj_arrow_switch.h +++ b/include/d/a/obj/d_a_obj_arrow_switch.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ARROW_SWITCH_H #define D_A_OBJ_ARROW_SWITCH_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOarrowSwitch_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_asura_pillar.h b/include/d/a/obj/d_a_obj_asura_pillar.h index 03ba025c..511c3f0b 100644 --- a/include/d/a/obj/d_a_obj_asura_pillar.h +++ b/include/d/a/obj/d_a_obj_asura_pillar.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ASURA_PILLAR_H #define D_A_OBJ_ASURA_PILLAR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcAsuraPillar_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_asura_sword.h b/include/d/a/obj/d_a_obj_asura_sword.h index 8fa106bc..13322c30 100644 --- a/include/d/a/obj/d_a_obj_asura_sword.h +++ b/include/d/a/obj/d_a_obj_asura_sword.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ASURA_SWORD_H #define D_A_OBJ_ASURA_SWORD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcAsuraSword_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ballista.h b/include/d/a/obj/d_a_obj_ballista.h index f21e4603..487a4443 100644 --- a/include/d/a/obj/d_a_obj_ballista.h +++ b/include/d/a/obj/d_a_obj_ballista.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BALLISTA_H #define D_A_OBJ_BALLISTA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBallista_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ballista_f3.h b/include/d/a/obj/d_a_obj_ballista_f3.h index 1949c1d9..b47a871d 100644 --- a/include/d/a/obj/d_a_obj_ballista_f3.h +++ b/include/d/a/obj/d_a_obj_ballista_f3.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BALLISTA_F3_H #define D_A_OBJ_BALLISTA_F3_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBallistaF3_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ballista_handle.h b/include/d/a/obj/d_a_obj_ballista_handle.h index 59a57c2f..306e7961 100644 --- a/include/d/a/obj/d_a_obj_ballista_handle.h +++ b/include/d/a/obj/d_a_obj_ballista_handle.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BALLISTA_HANDLE_H #define D_A_OBJ_BALLISTA_HANDLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBallistaHandle_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bamboo.h b/include/d/a/obj/d_a_obj_bamboo.h index 32860b91..562c2459 100644 --- a/include/d/a/obj/d_a_obj_bamboo.h +++ b/include/d/a/obj/d_a_obj_bamboo.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BAMBOO_H #define D_A_OBJ_BAMBOO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObamboo_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bamboo_island.h b/include/d/a/obj/d_a_obj_bamboo_island.h index 2d85e099..959063b9 100644 --- a/include/d/a/obj/d_a_obj_bamboo_island.h +++ b/include/d/a/obj/d_a_obj_bamboo_island.h @@ -1,9 +1,10 @@ #ifndef D_A_OBJ_BAMBOO_ISLAND_H #define D_A_OBJ_BAMBOO_ISLAND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" class dAcObambooIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_barrel.h b/include/d/a/obj/d_a_obj_barrel.h index 207f9932..67ecc6b6 100644 --- a/include/d/a/obj/d_a_obj_barrel.h +++ b/include/d/a/obj/d_a_obj_barrel.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BARREL_H #define D_A_OBJ_BARREL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBarrel_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index e562a392..9d8eafce 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -9,7 +9,6 @@ #include "m/m_mtx.h" #include "m/m_vec.h" #include "m/types_m.h" -#include "nw4r/g3d/g3d_resfile.h" // Size: 0xA8 struct ActorCarryStruct { diff --git a/include/d/a/obj/d_a_obj_bb_bridge.h b/include/d/a/obj/d_a_obj_bb_bridge.h index 81ba7433..05ab26fb 100644 --- a/include/d/a/obj/d_a_obj_bb_bridge.h +++ b/include/d/a/obj/d_a_obj_bb_bridge.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BB_BRIDGE_H #define D_A_OBJ_BB_BRIDGE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObbBridge_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bb_broken_parts.h b/include/d/a/obj/d_a_obj_bb_broken_parts.h index 51306a47..c8305c66 100644 --- a/include/d/a/obj/d_a_obj_bb_broken_parts.h +++ b/include/d/a/obj/d_a_obj_bb_broken_parts.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BB_BROKEN_PARTS_H #define D_A_OBJ_BB_BROKEN_PARTS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObbBrokenParts_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bb_objects.h b/include/d/a/obj/d_a_obj_bb_objects.h index b36340ff..b904d08a 100644 --- a/include/d/a/obj/d_a_obj_bb_objects.h +++ b/include/d/a/obj/d_a_obj_bb_objects.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BB_OBJECTS_H #define D_A_OBJ_BB_OBJECTS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObbObjects_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bblargebomb.h b/include/d/a/obj/d_a_obj_bblargebomb.h index 381304c1..aa5d98fa 100644 --- a/include/d/a/obj/d_a_obj_bblargebomb.h +++ b/include/d/a/obj/d_a_obj_bblargebomb.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BBLARGEBOMB_H #define D_A_OBJ_BBLARGEBOMB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBblargebomb_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bbstone.h b/include/d/a/obj/d_a_obj_bbstone.h index 433c435d..5ab1e4c1 100644 --- a/include/d/a/obj/d_a_obj_bbstone.h +++ b/include/d/a/obj/d_a_obj_bbstone.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BBSTONE_H #define D_A_OBJ_BBSTONE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBBStone : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bell.h b/include/d/a/obj/d_a_obj_bell.h index 7e34a8a3..f1ad90c6 100644 --- a/include/d/a/obj/d_a_obj_bell.h +++ b/include/d/a/obj/d_a_obj_bell.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BELL_H #define D_A_OBJ_BELL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObell_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_belt_cvr.h b/include/d/a/obj/d_a_obj_belt_cvr.h index a79f224c..388cda22 100644 --- a/include/d/a/obj/d_a_obj_belt_cvr.h +++ b/include/d/a/obj/d_a_obj_belt_cvr.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BELT_CVR_H #define D_A_OBJ_BELT_CVR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObeltCvr_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_belt_obstacle.h b/include/d/a/obj/d_a_obj_belt_obstacle.h index 3783bacb..8083dca5 100644 --- a/include/d/a/obj/d_a_obj_belt_obstacle.h +++ b/include/d/a/obj/d_a_obj_belt_obstacle.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BELT_OBSTACLE_H #define D_A_OBJ_BELT_OBSTACLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObeltObstacle_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bg.h b/include/d/a/obj/d_a_obj_bg.h index 02b1e3e5..1950200c 100644 --- a/include/d/a/obj/d_a_obj_bg.h +++ b/include/d/a/obj/d_a_obj_bg.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BG_H #define D_A_OBJ_BG_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcObg_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bigbomb_flower.h b/include/d/a/obj/d_a_obj_bigbomb_flower.h index 67aa2b3f..a28414a0 100644 --- a/include/d/a/obj/d_a_obj_bigbomb_flower.h +++ b/include/d/a/obj/d_a_obj_bigbomb_flower.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BIGBOMB_FLOWER_H #define D_A_OBJ_BIGBOMB_FLOWER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBBombFlower_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bird_sp.h b/include/d/a/obj/d_a_obj_bird_sp.h index bcf85805..efeb9a2e 100644 --- a/include/d/a/obj/d_a_obj_bird_sp.h +++ b/include/d/a/obj/d_a_obj_bird_sp.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BIRD_SP_H #define D_A_OBJ_BIRD_SP_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcObjBirdSp_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bird_statue.h b/include/d/a/obj/d_a_obj_bird_statue.h index 665bba76..7e47c69d 100644 --- a/include/d/a/obj/d_a_obj_bird_statue.h +++ b/include/d/a/obj/d_a_obj_bird_statue.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BIRD_STATUE_H #define D_A_OBJ_BIRD_STATUE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOBirdStatue_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_blade.h b/include/d/a/obj/d_a_obj_blade.h index 1bc42019..d2a7f71c 100644 --- a/include/d/a/obj/d_a_obj_blade.h +++ b/include/d/a/obj/d_a_obj_blade.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BLADE_H #define D_A_OBJ_BLADE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOblade_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_blast_rock.h b/include/d/a/obj/d_a_obj_blast_rock.h index c3525304..53a640c4 100644 --- a/include/d/a/obj/d_a_obj_blast_rock.h +++ b/include/d/a/obj/d_a_obj_blast_rock.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BLAST_ROCK_H #define D_A_OBJ_BLAST_ROCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBlastRock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_block_rope.h b/include/d/a/obj/d_a_obj_block_rope.h index 271c22ae..20f485da 100644 --- a/include/d/a/obj/d_a_obj_block_rope.h +++ b/include/d/a/obj/d_a_obj_block_rope.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BLOCK_ROPE_H #define D_A_OBJ_BLOCK_ROPE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOblockRope_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_block_underground.h b/include/d/a/obj/d_a_obj_block_underground.h index 6dd30a1e..2acb43cd 100644 --- a/include/d/a/obj/d_a_obj_block_underground.h +++ b/include/d/a/obj/d_a_obj_block_underground.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BLOCK_UNDERGROUND_H #define D_A_OBJ_BLOCK_UNDERGROUND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOBlockUnderground : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_blow_coal.h b/include/d/a/obj/d_a_obj_blow_coal.h index a157bf96..f01e1b69 100644 --- a/include/d/a/obj/d_a_obj_blow_coal.h +++ b/include/d/a/obj/d_a_obj_blow_coal.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BLOW_COAL_H #define D_A_OBJ_BLOW_COAL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOblowCoal_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_boat.h b/include/d/a/obj/d_a_obj_boat.h index 4632f8e3..4d5b9ed1 100644 --- a/include/d/a/obj/d_a_obj_boat.h +++ b/include/d/a/obj/d_a_obj_boat.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BOAT_H #define D_A_OBJ_BOAT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBoat_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_boxcage_F300.h b/include/d/a/obj/d_a_obj_boxcage_F300.h index fdf0ebd5..3c629d41 100644 --- a/include/d/a/obj/d_a_obj_boxcage_F300.h +++ b/include/d/a/obj/d_a_obj_boxcage_F300.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BOXCAGE_F300_H #define D_A_OBJ_BOXCAGE_F300_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBoxCageF300_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bridge_bone.h b/include/d/a/obj/d_a_obj_bridge_bone.h index 358c27a7..74cd3920 100644 --- a/include/d/a/obj/d_a_obj_bridge_bone.h +++ b/include/d/a/obj/d_a_obj_bridge_bone.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BRIDGE_BONE_H #define D_A_OBJ_BRIDGE_BONE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBridgeBone_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bridge_building.h b/include/d/a/obj/d_a_obj_bridge_building.h index b3c78d94..dca2d0e4 100644 --- a/include/d/a/obj/d_a_obj_bridge_building.h +++ b/include/d/a/obj/d_a_obj_bridge_building.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BRIDGE_BUILDING_H #define D_A_OBJ_BRIDGE_BUILDING_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObridgeBuilding_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bridge_fall.h b/include/d/a/obj/d_a_obj_bridge_fall.h index cc9a9950..6162a5f2 100644 --- a/include/d/a/obj/d_a_obj_bridge_fall.h +++ b/include/d/a/obj/d_a_obj_bridge_fall.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BRIDGE_FALL_H #define D_A_OBJ_BRIDGE_FALL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBridgeFall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bridge_step.h b/include/d/a/obj/d_a_obj_bridge_step.h index 2b815fb9..3d4d4212 100644 --- a/include/d/a/obj/d_a_obj_bridge_step.h +++ b/include/d/a/obj/d_a_obj_bridge_step.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BRIDGE_STEP_H #define D_A_OBJ_BRIDGE_STEP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBridgeStep_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bridge_stretch.h b/include/d/a/obj/d_a_obj_bridge_stretch.h index 6b1b0474..4fa5a1ef 100644 --- a/include/d/a/obj/d_a_obj_bridge_stretch.h +++ b/include/d/a/obj/d_a_obj_bridge_stretch.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BRIDGE_STRETCH_H #define D_A_OBJ_BRIDGE_STRETCH_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObridgeStretch_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bridge_time.h b/include/d/a/obj/d_a_obj_bridge_time.h index 0ad12663..bba3fa3a 100644 --- a/include/d/a/obj/d_a_obj_bridge_time.h +++ b/include/d/a/obj/d_a_obj_bridge_time.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BRIDGE_TIME_H #define D_A_OBJ_BRIDGE_TIME_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOBridgeTime_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bstone.h b/include/d/a/obj/d_a_obj_bstone.h index 38fac84c..8b481249 100644 --- a/include/d/a/obj/d_a_obj_bstone.h +++ b/include/d/a/obj/d_a_obj_bstone.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BSTONE_H #define D_A_OBJ_BSTONE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcObstonec : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bubble.h b/include/d/a/obj/d_a_obj_bubble.h index 4823ed48..bbab03ff 100644 --- a/include/d/a/obj/d_a_obj_bubble.h +++ b/include/d/a/obj/d_a_obj_bubble.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BUBBLE_H #define D_A_OBJ_BUBBLE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcObubble_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_building.h b/include/d/a/obj/d_a_obj_building.h index 7a71c440..82f65a45 100644 --- a/include/d/a/obj/d_a_obj_building.h +++ b/include/d/a/obj/d_a_obj_building.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BUILDING_H #define D_A_OBJ_BUILDING_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOBuilding_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_bulb_switch.h b/include/d/a/obj/d_a_obj_bulb_switch.h index 18ffb546..de28f462 100644 --- a/include/d/a/obj/d_a_obj_bulb_switch.h +++ b/include/d/a/obj/d_a_obj_bulb_switch.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_BULB_SWITCH_H #define D_A_OBJ_BULB_SWITCH_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObulbSwitch_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_cannon.h b/include/d/a/obj/d_a_obj_cannon.h index 4c37b88b..0885926e 100644 --- a/include/d/a/obj/d_a_obj_cannon.h +++ b/include/d/a/obj/d_a_obj_cannon.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CANNON_H #define D_A_OBJ_CANNON_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOcannon_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_cannon_cover.h b/include/d/a/obj/d_a_obj_cannon_cover.h index 2ab19301..0a16cd9a 100644 --- a/include/d/a/obj/d_a_obj_cannon_cover.h +++ b/include/d/a/obj/d_a_obj_cannon_cover.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CANNON_COVER_H #define D_A_OBJ_CANNON_COVER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOcannonCover_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_carry_stone.h b/include/d/a/obj/d_a_obj_carry_stone.h index ce7d2434..24f89305 100644 --- a/include/d/a/obj/d_a_obj_carry_stone.h +++ b/include/d/a/obj/d_a_obj_carry_stone.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CARRY_STONE_H #define D_A_OBJ_CARRY_STONE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOcarryStone_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_chair.h b/include/d/a/obj/d_a_obj_chair.h index abfe7440..89e3712d 100644 --- a/include/d/a/obj/d_a_obj_chair.h +++ b/include/d/a/obj/d_a_obj_chair.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CHAIR_H #define D_A_OBJ_CHAIR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOChair_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_chandelier.h b/include/d/a/obj/d_a_obj_chandelier.h index cd74c2d8..5435eba5 100644 --- a/include/d/a/obj/d_a_obj_chandelier.h +++ b/include/d/a/obj/d_a_obj_chandelier.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CHANDELIER_H #define D_A_OBJ_CHANDELIER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOChandelier_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_chest.h b/include/d/a/obj/d_a_obj_chest.h index 29c4d3de..52752c20 100644 --- a/include/d/a/obj/d_a_obj_chest.h +++ b/include/d/a/obj/d_a_obj_chest.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CHEST_H #define D_A_OBJ_CHEST_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOChest_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_city.h b/include/d/a/obj/d_a_obj_city.h index db63d3df..1550c2c6 100644 --- a/include/d/a/obj/d_a_obj_city.h +++ b/include/d/a/obj/d_a_obj_city.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_CITY_H #define D_A_OBJ_CITY_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOcity_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_city_water.h b/include/d/a/obj/d_a_obj_city_water.h index 56618114..2a9bd723 100644 --- a/include/d/a/obj/d_a_obj_city_water.h +++ b/include/d/a/obj/d_a_obj_city_water.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_CITY_WATER_H #define D_A_OBJ_CITY_WATER_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOcityWater_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_claw_shot_tg.h b/include/d/a/obj/d_a_obj_claw_shot_tg.h index b07d14ca..c889b32c 100644 --- a/include/d/a/obj/d_a_obj_claw_shot_tg.h +++ b/include/d/a/obj/d_a_obj_claw_shot_tg.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CLAW_SHOT_TG_H #define D_A_OBJ_CLAW_SHOT_TG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOclawShotTg_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_clearness_wall.h b/include/d/a/obj/d_a_obj_clearness_wall.h index b451129d..d2b62bb8 100644 --- a/include/d/a/obj/d_a_obj_clearness_wall.h +++ b/include/d/a/obj/d_a_obj_clearness_wall.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_CLEARNESS_WALL_H #define D_A_OBJ_CLEARNESS_WALL_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOclearnessWall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_clef.h b/include/d/a/obj/d_a_obj_clef.h index 3646b3e5..aeb1f672 100644 --- a/include/d/a/obj/d_a_obj_clef.h +++ b/include/d/a/obj/d_a_obj_clef.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CLEF_H #define D_A_OBJ_CLEF_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOClef_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_cloud_dive.h b/include/d/a/obj/d_a_obj_cloud_dive.h index ee719fdd..c13b75f9 100644 --- a/include/d/a/obj/d_a_obj_cloud_dive.h +++ b/include/d/a/obj/d_a_obj_cloud_dive.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CLOUD_DIVE_H #define D_A_OBJ_CLOUD_DIVE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOcloudDive_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_col.h b/include/d/a/obj/d_a_obj_col.h index 3ca5c1ae..908250bb 100644 --- a/include/d/a/obj/d_a_obj_col.h +++ b/include/d/a/obj/d_a_obj_col.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_COL_H #define D_A_OBJ_COL_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOCol_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_control_panel.h b/include/d/a/obj/d_a_obj_control_panel.h index 4227766c..82463855 100644 --- a/include/d/a/obj/d_a_obj_control_panel.h +++ b/include/d/a/obj/d_a_obj_control_panel.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CONTROL_PANEL_H #define D_A_OBJ_CONTROL_PANEL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOCtrlPnl_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_cumul_cloud.h b/include/d/a/obj/d_a_obj_cumul_cloud.h index d50111e3..b0ab6dca 100644 --- a/include/d/a/obj/d_a_obj_cumul_cloud.h +++ b/include/d/a/obj/d_a_obj_cumul_cloud.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_CUMUL_CLOUD_H #define D_A_OBJ_CUMUL_CLOUD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOcumulCloud_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_daynight.h b/include/d/a/obj/d_a_obj_daynight.h index 83f1b463..b3cf8ca1 100644 --- a/include/d/a/obj/d_a_obj_daynight.h +++ b/include/d/a/obj/d_a_obj_daynight.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DAYNIGHT_H #define D_A_OBJ_DAYNIGHT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODayNight_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_decoA.h b/include/d/a/obj/d_a_obj_decoA.h index d6fb4d8c..a1a9f6a6 100644 --- a/include/d/a/obj/d_a_obj_decoA.h +++ b/include/d/a/obj/d_a_obj_decoA.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DECOA_H #define D_A_OBJ_DECOA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODecoA_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_decoB.h b/include/d/a/obj/d_a_obj_decoB.h index c5df6560..c6efb152 100644 --- a/include/d/a/obj/d_a_obj_decoB.h +++ b/include/d/a/obj/d_a_obj_decoB.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DECOB_H #define D_A_OBJ_DECOB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODecoB_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_desert.h b/include/d/a/obj/d_a_obj_desert.h index 370f51ba..8c646da5 100644 --- a/include/d/a/obj/d_a_obj_desert.h +++ b/include/d/a/obj/d_a_obj_desert.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DESERT_H #define D_A_OBJ_DESERT_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcODesert : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_desert_ago.h b/include/d/a/obj/d_a_obj_desert_ago.h index 179f5b72..6a782c83 100644 --- a/include/d/a/obj/d_a_obj_desert_ago.h +++ b/include/d/a/obj/d_a_obj_desert_ago.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DESERT_AGO_H #define D_A_OBJ_DESERT_AGO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODesertAgo_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_desert_debris.h b/include/d/a/obj/d_a_obj_desert_debris.h index 20d3d659..49df5995 100644 --- a/include/d/a/obj/d_a_obj_desert_debris.h +++ b/include/d/a/obj/d_a_obj_desert_debris.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DESERT_DEBRIS_H #define D_A_OBJ_DESERT_DEBRIS_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOdesertDebris_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_desert_meter.h b/include/d/a/obj/d_a_obj_desert_meter.h index f81a8dce..f0144755 100644 --- a/include/d/a/obj/d_a_obj_desert_meter.h +++ b/include/d/a/obj/d_a_obj_desert_meter.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DESERT_METER_H #define D_A_OBJ_DESERT_METER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODesertMeter_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_display_only_nbs.h b/include/d/a/obj/d_a_obj_display_only_nbs.h index 5d60ae5d..1824ea15 100644 --- a/include/d/a/obj/d_a_obj_display_only_nbs.h +++ b/include/d/a/obj/d_a_obj_display_only_nbs.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DISPLAY_ONLY_NBS_H #define D_A_OBJ_DISPLAY_ONLY_NBS_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOdisplayOnlyNbs_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_distant_ship.h b/include/d/a/obj/d_a_obj_distant_ship.h index cbedc8c6..42261420 100644 --- a/include/d/a/obj/d_a_obj_distant_ship.h +++ b/include/d/a/obj/d_a_obj_distant_ship.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DISTANT_SHIP_H #define D_A_OBJ_DISTANT_SHIP_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOdistantShip_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_diviner_crystal.h b/include/d/a/obj/d_a_obj_diviner_crystal.h index f4d88340..4c96fd48 100644 --- a/include/d/a/obj/d_a_obj_diviner_crystal.h +++ b/include/d/a/obj/d_a_obj_diviner_crystal.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DIVINER_CRYSTAL_H #define D_A_OBJ_DIVINER_CRYSTAL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODivinerCrystal_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index cbb04e05..fa6c4c35 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DOOR_H #define D_A_OBJ_DOOR_H -#include +#include "d/a/obj/d_a_obj_door_base.h" class dAcOdoor_c : public dAcObjDoor_c { public: diff --git a/include/d/a/obj/d_a_obj_door_boss.h b/include/d/a/obj/d_a_obj_door_boss.h index 64c06ff1..945238a2 100644 --- a/include/d/a/obj/d_a_obj_door_boss.h +++ b/include/d/a/obj/d_a_obj_door_boss.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DOOR_BOSS_H #define D_A_OBJ_DOOR_BOSS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_door_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOdoorBoss_c : public dAcObjDoor_c { public: diff --git a/include/d/a/obj/d_a_obj_door_bossD101.h b/include/d/a/obj/d_a_obj_door_bossD101.h index 8b9eae4f..67effd8c 100644 --- a/include/d/a/obj/d_a_obj_door_bossD101.h +++ b/include/d/a/obj/d_a_obj_door_bossD101.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DOOR_BOSSD101_H #define D_A_OBJ_DOOR_BOSSD101_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODoorBossD101_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_door_dungeon.h b/include/d/a/obj/d_a_obj_door_dungeon.h index a001a926..751b46a3 100644 --- a/include/d/a/obj/d_a_obj_door_dungeon.h +++ b/include/d/a/obj/d_a_obj_door_dungeon.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DOOR_DUNGEON_H #define D_A_OBJ_DOOR_DUNGEON_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcObjDoorDungeon_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_door_dungeonD200.h b/include/d/a/obj/d_a_obj_door_dungeonD200.h index 4c612f25..2004f8c3 100644 --- a/include/d/a/obj/d_a_obj_door_dungeonD200.h +++ b/include/d/a/obj/d_a_obj_door_dungeonD200.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_DOOR_DUNGEOND200_H #define D_A_OBJ_DOOR_DUNGEOND200_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcObjDoorDungeonD200_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_dormitory_gate.h b/include/d/a/obj/d_a_obj_dormitory_gate.h index 9865e593..7fe21da3 100644 --- a/include/d/a/obj/d_a_obj_dormitory_gate.h +++ b/include/d/a/obj/d_a_obj_dormitory_gate.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DORMITORY_GATE_H #define D_A_OBJ_DORMITORY_GATE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODormitoryGate_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_down_lava.h b/include/d/a/obj/d_a_obj_down_lava.h index 4079f8d2..33df7988 100644 --- a/include/d/a/obj/d_a_obj_down_lava.h +++ b/include/d/a/obj/d_a_obj_down_lava.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DOWN_LAVA_H #define D_A_OBJ_DOWN_LAVA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOdownLava_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_drum.h b/include/d/a/obj/d_a_obj_drum.h index 27474fdf..ec44852f 100644 --- a/include/d/a/obj/d_a_obj_drum.h +++ b/include/d/a/obj/d_a_obj_drum.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DRUM_H #define D_A_OBJ_DRUM_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOdrum_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_dungeon_ship.h b/include/d/a/obj/d_a_obj_dungeon_ship.h index 52f51c36..edf93860 100644 --- a/include/d/a/obj/d_a_obj_dungeon_ship.h +++ b/include/d/a/obj/d_a_obj_dungeon_ship.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_DUNGEON_SHIP_H #define D_A_OBJ_DUNGEON_SHIP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcODungeonShip_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_electric_light.h b/include/d/a/obj/d_a_obj_electric_light.h index 86c1bb05..8e11d10c 100644 --- a/include/d/a/obj/d_a_obj_electric_light.h +++ b/include/d/a/obj/d_a_obj_electric_light.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ELECTRIC_LIGHT_H #define D_A_OBJ_ELECTRIC_LIGHT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOelectricLight_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_evil_field.h b/include/d/a/obj/d_a_obj_evil_field.h index a71e1a12..b6a953f6 100644 --- a/include/d/a/obj/d_a_obj_evil_field.h +++ b/include/d/a/obj/d_a_obj_evil_field.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_EVIL_FIELD_H #define D_A_OBJ_EVIL_FIELD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOevilField_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fairy.h b/include/d/a/obj/d_a_obj_fairy.h index df30e8a5..4340372a 100644 --- a/include/d/a/obj/d_a_obj_fairy.h +++ b/include/d/a/obj/d_a_obj_fairy.h @@ -1,11 +1,11 @@ #ifndef D_A_OBJ_FAIRY_H #define D_A_OBJ_FAIRY_H -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmmdl.h" +#include "m/m3d/m_shadow.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObjFairy_c : public dAcObjBase_c { public: @@ -18,7 +18,6 @@ class dAcObjFairy_c : public dAcObjBase_c { virtual int actorExecute() override; virtual int draw() override; - STATE_FUNC_DECLARE(dAcObjFairy_c, Wait); STATE_FUNC_DECLARE(dAcObjFairy_c, Avoid); STATE_FUNC_DECLARE(dAcObjFairy_c, PlayerAvoid); @@ -27,9 +26,7 @@ class dAcObjFairy_c : public dAcObjBase_c { STATE_FUNC_DECLARE(dAcObjFairy_c, CureEnd); STATE_FUNC_DECLARE(dAcObjFairy_c, CatchDemo); - private: - bool shouldAvoidLink() const; bool isCuring() const; bool canTargetWithBugNet() const; @@ -43,8 +40,8 @@ class dAcObjFairy_c : public dAcObjBase_c { /* 0xA50 */ STATE_MGR_DECLARE(dAcObjFairy_c); /* 0xA8C */ u8 field_0xA8C[0xB89 - 0xA8C]; /* 0xB89 */ u8 field_0xB89; - + // TODO collision, effects }; -#endif +#endif diff --git a/include/d/a/obj/d_a_obj_farmland.h b/include/d/a/obj/d_a_obj_farmland.h index 578ab379..fe75d1cf 100644 --- a/include/d/a/obj/d_a_obj_farmland.h +++ b/include/d/a/obj/d_a_obj_farmland.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FARMLAND_H #define D_A_OBJ_FARMLAND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFarmLand_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fence.h b/include/d/a/obj/d_a_obj_fence.h index d13fbad2..720c41fa 100644 --- a/include/d/a/obj/d_a_obj_fence.h +++ b/include/d/a/obj/d_a_obj_fence.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FENCE_H #define D_A_OBJ_FENCE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFence_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fence_boko.h b/include/d/a/obj/d_a_obj_fence_boko.h index 7a85310f..a85d1c3d 100644 --- a/include/d/a/obj/d_a_obj_fence_boko.h +++ b/include/d/a/obj/d_a_obj_fence_boko.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_FENCE_BOKO_H #define D_A_OBJ_FENCE_BOKO_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOfenceBoko_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fence_boko2.h b/include/d/a/obj/d_a_obj_fence_boko2.h index 530fbae4..f0086c6b 100644 --- a/include/d/a/obj/d_a_obj_fence_boko2.h +++ b/include/d/a/obj/d_a_obj_fence_boko2.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_FENCE_BOKO2_H #define D_A_OBJ_FENCE_BOKO2_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOfenceBoko2_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fence_iron.h b/include/d/a/obj/d_a_obj_fence_iron.h index 928f8af3..c32bf627 100644 --- a/include/d/a/obj/d_a_obj_fence_iron.h +++ b/include/d/a/obj/d_a_obj_fence_iron.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FENCE_IRON_H #define D_A_OBJ_FENCE_IRON_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOfenceIron_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fence_konsai.h b/include/d/a/obj/d_a_obj_fence_konsai.h index c5570920..99f9a760 100644 --- a/include/d/a/obj/d_a_obj_fence_konsai.h +++ b/include/d/a/obj/d_a_obj_fence_konsai.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_FENCE_KONSAI_H #define D_A_OBJ_FENCE_KONSAI_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOfenceKonsai_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fire.h b/include/d/a/obj/d_a_obj_fire.h index 3e1a548b..44a185ab 100644 --- a/include/d/a/obj/d_a_obj_fire.h +++ b/include/d/a/obj/d_a_obj_fire.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FIRE_H #define D_A_OBJ_FIRE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOfire_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fire_obstacle.h b/include/d/a/obj/d_a_obj_fire_obstacle.h index 145dca68..9eb4d271 100644 --- a/include/d/a/obj/d_a_obj_fire_obstacle.h +++ b/include/d/a/obj/d_a_obj_fire_obstacle.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FIRE_OBSTACLE_H #define D_A_OBJ_FIRE_OBSTACLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOfireObstacle_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fire_pillar.h b/include/d/a/obj/d_a_obj_fire_pillar.h index 6378b53c..c5fda7d4 100644 --- a/include/d/a/obj/d_a_obj_fire_pillar.h +++ b/include/d/a/obj/d_a_obj_fire_pillar.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FIRE_PILLAR_H #define D_A_OBJ_FIRE_PILLAR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOfirePillar_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_firewall.h b/include/d/a/obj/d_a_obj_firewall.h index 7369b9af..54cde572 100644 --- a/include/d/a/obj/d_a_obj_firewall.h +++ b/include/d/a/obj/d_a_obj_firewall.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FIREWALL_H #define D_A_OBJ_FIREWALL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFireWall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_flag.h b/include/d/a/obj/d_a_obj_flag.h index 51ec63c2..35ac761a 100644 --- a/include/d/a/obj/d_a_obj_flag.h +++ b/include/d/a/obj/d_a_obj_flag.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FLAG_H #define D_A_OBJ_FLAG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFlag_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_flower_ancient.h b/include/d/a/obj/d_a_obj_flower_ancient.h index 9bc2a847..860290fa 100644 --- a/include/d/a/obj/d_a_obj_flower_ancient.h +++ b/include/d/a/obj/d_a_obj_flower_ancient.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FLOWER_ANCIENT_H #define D_A_OBJ_FLOWER_ANCIENT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFlowerAncient_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_flying_clawshot_target.h b/include/d/a/obj/d_a_obj_flying_clawshot_target.h index c62e031c..844a720d 100644 --- a/include/d/a/obj/d_a_obj_flying_clawshot_target.h +++ b/include/d/a/obj/d_a_obj_flying_clawshot_target.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_FLYING_CLAWSHOT_TARGET_H #define D_A_OBJ_FLYING_CLAWSHOT_TARGET_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOFlyingClawshotTarget_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fortune_ring.h b/include/d/a/obj/d_a_obj_fortune_ring.h index 5237c75b..5e10b440 100644 --- a/include/d/a/obj/d_a_obj_fortune_ring.h +++ b/include/d/a/obj/d_a_obj_fortune_ring.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FORTUNE_RING_H #define D_A_OBJ_FORTUNE_RING_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOfortuneRing_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fruit.h b/include/d/a/obj/d_a_obj_fruit.h index 429479ed..8b5189e7 100644 --- a/include/d/a/obj/d_a_obj_fruit.h +++ b/include/d/a/obj/d_a_obj_fruit.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FRUIT_H #define D_A_OBJ_FRUIT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFruit_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fruitB.h b/include/d/a/obj/d_a_obj_fruitB.h index c1ec694f..aa3870ce 100644 --- a/include/d/a/obj/d_a_obj_fruitB.h +++ b/include/d/a/obj/d_a_obj_fruitB.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FRUITB_H #define D_A_OBJ_FRUITB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFruitB_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fruit_guts_leaf.h b/include/d/a/obj/d_a_obj_fruit_guts_leaf.h index 729c9e76..7a49ed64 100644 --- a/include/d/a/obj/d_a_obj_fruit_guts_leaf.h +++ b/include/d/a/obj/d_a_obj_fruit_guts_leaf.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_FRUIT_GUTS_LEAF_H #define D_A_OBJ_FRUIT_GUTS_LEAF_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOFruitGutsLeaf_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_fruit_tree.h b/include/d/a/obj/d_a_obj_fruit_tree.h index 82178c06..f35c45fa 100644 --- a/include/d/a/obj/d_a_obj_fruit_tree.h +++ b/include/d/a/obj/d_a_obj_fruit_tree.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_FRUIT_TREE_H #define D_A_OBJ_FRUIT_TREE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOFruitTree_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_gear.h b/include/d/a/obj/d_a_obj_gear.h index a0cd18bc..c489d3b1 100644 --- a/include/d/a/obj/d_a_obj_gear.h +++ b/include/d/a/obj/d_a_obj_gear.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GEAR_H #define D_A_OBJ_GEAR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOGear_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_girahim_foot.h b/include/d/a/obj/d_a_obj_girahim_foot.h index 1cd812d9..01476278 100644 --- a/include/d/a/obj/d_a_obj_girahim_foot.h +++ b/include/d/a/obj/d_a_obj_girahim_foot.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GIRAHIM_FOOT_H #define D_A_OBJ_GIRAHIM_FOOT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOgirahimFoot_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_girahimu_floor.h b/include/d/a/obj/d_a_obj_girahimu_floor.h index c27e4337..f0174792 100644 --- a/include/d/a/obj/d_a_obj_girahimu_floor.h +++ b/include/d/a/obj/d_a_obj_girahimu_floor.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GIRAHIMU_FLOOR_H #define D_A_OBJ_GIRAHIMU_FLOOR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOGirahimuFloor_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_girahimu_knife.h b/include/d/a/obj/d_a_obj_girahimu_knife.h index 0f476ffc..28bf6f9f 100644 --- a/include/d/a/obj/d_a_obj_girahimu_knife.h +++ b/include/d/a/obj/d_a_obj_girahimu_knife.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GIRAHIMU_KNIFE_H #define D_A_OBJ_GIRAHIMU_KNIFE_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObjGirahimuKnife_c : public dAcEnBase_c { public: diff --git a/include/d/a/obj/d_a_obj_girahimu_sword_link.h b/include/d/a/obj/d_a_obj_girahimu_sword_link.h index 58c00016..fe74fec5 100644 --- a/include/d/a/obj/d_a_obj_girahimu_sword_link.h +++ b/include/d/a/obj/d_a_obj_girahimu_sword_link.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GIRAHIMU_SWORD_LINK_H #define D_A_OBJ_GIRAHIMU_SWORD_LINK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObjGirahimuSwordLink_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_god_mark.h b/include/d/a/obj/d_a_obj_god_mark.h index 8e77f771..40542738 100644 --- a/include/d/a/obj/d_a_obj_god_mark.h +++ b/include/d/a/obj/d_a_obj_god_mark.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GOD_MARK_H #define D_A_OBJ_GOD_MARK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOgodMark_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_goddess_cube.h b/include/d/a/obj/d_a_obj_goddess_cube.h index 73671d0a..f050cd52 100644 --- a/include/d/a/obj/d_a_obj_goddess_cube.h +++ b/include/d/a/obj/d_a_obj_goddess_cube.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GODDESS_CUBE_H #define D_A_OBJ_GODDESS_CUBE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOGoddessCube_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_goddess_statue.h b/include/d/a/obj/d_a_obj_goddess_statue.h index 67e97634..6ce560ff 100644 --- a/include/d/a/obj/d_a_obj_goddess_statue.h +++ b/include/d/a/obj/d_a_obj_goddess_statue.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GODDESS_STATUE_H #define D_A_OBJ_GODDESS_STATUE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOGoddessStatue_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_grass_coil.h b/include/d/a/obj/d_a_obj_grass_coil.h index 85313ccb..b557c3e0 100644 --- a/include/d/a/obj/d_a_obj_grass_coil.h +++ b/include/d/a/obj/d_a_obj_grass_coil.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GRASS_COIL_H #define D_A_OBJ_GRASS_COIL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOgrassCoil_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_grave.h b/include/d/a/obj/d_a_obj_grave.h index b1417122..153e8d28 100644 --- a/include/d/a/obj/d_a_obj_grave.h +++ b/include/d/a/obj/d_a_obj_grave.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GRAVE_H #define D_A_OBJ_GRAVE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOGrave_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ground_cover.h b/include/d/a/obj/d_a_obj_ground_cover.h index 0b94aa47..694f3224 100644 --- a/include/d/a/obj/d_a_obj_ground_cover.h +++ b/include/d/a/obj/d_a_obj_ground_cover.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GROUND_COVER_H #define D_A_OBJ_GROUND_COVER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOgroundCover_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_guard_log.h b/include/d/a/obj/d_a_obj_guard_log.h index e96a5adc..27070faf 100644 --- a/include/d/a/obj/d_a_obj_guard_log.h +++ b/include/d/a/obj/d_a_obj_guard_log.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_GUARD_LOG_H #define D_A_OBJ_GUARD_LOG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOguardLog_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_harp_hint.h b/include/d/a/obj/d_a_obj_harp_hint.h index c4fd1a66..80198e35 100644 --- a/include/d/a/obj/d_a_obj_harp_hint.h +++ b/include/d/a/obj/d_a_obj_harp_hint.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_HARP_HINT_H #define D_A_OBJ_HARP_HINT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOHarpHint_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_himo.h b/include/d/a/obj/d_a_obj_himo.h index 0b171d1f..227003bd 100644 --- a/include/d/a/obj/d_a_obj_himo.h +++ b/include/d/a/obj/d_a_obj_himo.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_HIMO_H #define D_A_OBJ_HIMO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOhimo_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_hit_lever_sw.h b/include/d/a/obj/d_a_obj_hit_lever_sw.h index 237b3d7c..4c61bf91 100644 --- a/include/d/a/obj/d_a_obj_hit_lever_sw.h +++ b/include/d/a/obj/d_a_obj_hit_lever_sw.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_HIT_LEVER_SW_H #define D_A_OBJ_HIT_LEVER_SW_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOhitLeverSw_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_hole.h b/include/d/a/obj/d_a_obj_hole.h index 1ad9d2da..55b261cf 100644 --- a/include/d/a/obj/d_a_obj_hole.h +++ b/include/d/a/obj/d_a_obj_hole.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_HOLE_H #define D_A_OBJ_HOLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOhole_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_hole_minigame.h b/include/d/a/obj/d_a_obj_hole_minigame.h index 7664fb89..f33ea7ea 100644 --- a/include/d/a/obj/d_a_obj_hole_minigame.h +++ b/include/d/a/obj/d_a_obj_hole_minigame.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_HOLE_MINIGAME_H #define D_A_OBJ_HOLE_MINIGAME_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOholeMinigame_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_impa_door.h b/include/d/a/obj/d_a_obj_impa_door.h index 38dcce5c..c30c6606 100644 --- a/include/d/a/obj/d_a_obj_impa_door.h +++ b/include/d/a/obj/d_a_obj_impa_door.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_IMPA_DOOR_H #define D_A_OBJ_IMPA_DOOR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOimpaDoor_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_insect_island.h b/include/d/a/obj/d_a_obj_insect_island.h index 31e52913..8b4bb5ca 100644 --- a/include/d/a/obj/d_a_obj_insect_island.h +++ b/include/d/a/obj/d_a_obj_insect_island.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_INSECT_ISLAND_H #define D_A_OBJ_INSECT_ISLAND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOinsectIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_into_hole.h b/include/d/a/obj/d_a_obj_into_hole.h index c9915433..29533968 100644 --- a/include/d/a/obj/d_a_obj_into_hole.h +++ b/include/d/a/obj/d_a_obj_into_hole.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_INTO_HOLE_H #define D_A_OBJ_INTO_HOLE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcArrow_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_iron_stage.h b/include/d/a/obj/d_a_obj_iron_stage.h index dce551f2..d28905de 100644 --- a/include/d/a/obj/d_a_obj_iron_stage.h +++ b/include/d/a/obj/d_a_obj_iron_stage.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_IRON_STAGE_H #define D_A_OBJ_IRON_STAGE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOironStage_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_island_LOD.h b/include/d/a/obj/d_a_obj_island_LOD.h index 53b44cab..c6fb5449 100644 --- a/include/d/a/obj/d_a_obj_island_LOD.h +++ b/include/d/a/obj/d_a_obj_island_LOD.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_ISLAND_LOD_H #define D_A_OBJ_ISLAND_LOD_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOislandLOD_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_island_nusi.h b/include/d/a/obj/d_a_obj_island_nusi.h index 7a58fdb7..4ef59671 100644 --- a/include/d/a/obj/d_a_obj_island_nusi.h +++ b/include/d/a/obj/d_a_obj_island_nusi.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ISLAND_NUSI_H #define D_A_OBJ_ISLAND_NUSI_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOislandNusi_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_item_heart_container.h b/include/d/a/obj/d_a_obj_item_heart_container.h index c66c0b10..b7702ad8 100644 --- a/include/d/a/obj/d_a_obj_item_heart_container.h +++ b/include/d/a/obj/d_a_obj_item_heart_container.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ITEM_HEART_CONTAINER_H #define D_A_OBJ_ITEM_HEART_CONTAINER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOItemHeartContainer_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ivy_rope.h b/include/d/a/obj/d_a_obj_ivy_rope.h index ab1f9b6e..f873d816 100644 --- a/include/d/a/obj/d_a_obj_ivy_rope.h +++ b/include/d/a/obj/d_a_obj_ivy_rope.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_IVY_ROPE_H #define D_A_OBJ_IVY_ROPE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOivyRope_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_junk_repairing.h b/include/d/a/obj/d_a_obj_junk_repairing.h index 12d656fb..99917a0a 100644 --- a/include/d/a/obj/d_a_obj_junk_repairing.h +++ b/include/d/a/obj/d_a_obj_junk_repairing.h @@ -1,11 +1,11 @@ #ifndef D_A_OBJ_JUNK_REPAIRING_H #define D_A_OBJ_JUNK_REPAIRING_H -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_shadow.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dMyShadowCircle_c : public m3d::mShadowCircle_c {}; diff --git a/include/d/a/obj/d_a_obj_kanban_stone.h b/include/d/a/obj/d_a_obj_kanban_stone.h index 700c1c26..68945c16 100644 --- a/include/d/a/obj/d_a_obj_kanban_stone.h +++ b/include/d/a/obj/d_a_obj_kanban_stone.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_KANBAN_STONE_H #define D_A_OBJ_KANBAN_STONE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOKanbanStone_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_kibako.h b/include/d/a/obj/d_a_obj_kibako.h index 97110f51..1b4f24d4 100644 --- a/include/d/a/obj/d_a_obj_kibako.h +++ b/include/d/a/obj/d_a_obj_kibako.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_KIBAKO_H #define D_A_OBJ_KIBAKO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOkibako_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_kumite_wall.h b/include/d/a/obj/d_a_obj_kumite_wall.h index 5c488387..b01f66e6 100644 --- a/include/d/a/obj/d_a_obj_kumite_wall.h +++ b/include/d/a/obj/d_a_obj_kumite_wall.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_KUMITE_WALL_H #define D_A_OBJ_KUMITE_WALL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOkumiteWall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lamp.h b/include/d/a/obj/d_a_obj_lamp.h index aa25f389..251a1bfe 100644 --- a/include/d/a/obj/d_a_obj_lamp.h +++ b/include/d/a/obj/d_a_obj_lamp.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LAMP_H #define D_A_OBJ_LAMP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLamp_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lava_F200.h b/include/d/a/obj/d_a_obj_lava_F200.h index 8024801e..40ea3ece 100644 --- a/include/d/a/obj/d_a_obj_lava_F200.h +++ b/include/d/a/obj/d_a_obj_lava_F200.h @@ -1,10 +1,11 @@ #ifndef D_A_OBJ_LAVA_F200_H #define D_A_OBJ_LAVA_F200_H -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmmatclr.h" +#include "m/m3d/m_anmtexsrt.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" class dAcOlavaF200_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lava_d201.h b/include/d/a/obj/d_a_obj_lava_d201.h index b3ca006b..f9489f4a 100644 --- a/include/d/a/obj/d_a_obj_lava_d201.h +++ b/include/d/a/obj/d_a_obj_lava_d201.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LAVA_D201_H #define D_A_OBJ_LAVA_D201_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLavaD201_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lava_plate.h b/include/d/a/obj/d_a_obj_lava_plate.h index 48cb3a96..8ed81b3f 100644 --- a/include/d/a/obj/d_a_obj_lava_plate.h +++ b/include/d/a/obj/d_a_obj_lava_plate.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LAVA_PLATE_H #define D_A_OBJ_LAVA_PLATE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLavaPlate_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_leaf_swing.h b/include/d/a/obj/d_a_obj_leaf_swing.h index 6d1ff084..d9be189b 100644 --- a/include/d/a/obj/d_a_obj_leaf_swing.h +++ b/include/d/a/obj/d_a_obj_leaf_swing.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LEAF_SWING_H #define D_A_OBJ_LEAF_SWING_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOleafSwing_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_light_line.h b/include/d/a/obj/d_a_obj_light_line.h index ca69e2cc..3e5edf6a 100644 --- a/include/d/a/obj/d_a_obj_light_line.h +++ b/include/d/a/obj/d_a_obj_light_line.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LIGHT_LINE_H #define D_A_OBJ_LIGHT_LINE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOlightLine_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_light_shaft_small.h b/include/d/a/obj/d_a_obj_light_shaft_small.h index b885b394..fef27133 100644 --- a/include/d/a/obj/d_a_obj_light_shaft_small.h +++ b/include/d/a/obj/d_a_obj_light_shaft_small.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LIGHT_SHAFT_SMALL_H #define D_A_OBJ_LIGHT_SHAFT_SMALL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLightShaftSmall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lighthouse_harp.h b/include/d/a/obj/d_a_obj_lighthouse_harp.h index 8fb55478..2c5f764e 100644 --- a/include/d/a/obj/d_a_obj_lighthouse_harp.h +++ b/include/d/a/obj/d_a_obj_lighthouse_harp.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LIGHTHOUSE_HARP_H #define D_A_OBJ_LIGHTHOUSE_HARP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOlighthouseHarp_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lighthouse_light.h b/include/d/a/obj/d_a_obj_lighthouse_light.h index 58bddc55..875aaf1a 100644 --- a/include/d/a/obj/d_a_obj_lighthouse_light.h +++ b/include/d/a/obj/d_a_obj_lighthouse_light.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LIGHTHOUSE_LIGHT_H #define D_A_OBJ_LIGHTHOUSE_LIGHT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOlighthouseLight_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lock.h b/include/d/a/obj/d_a_obj_lock.h index ca3d5a02..4da6ba02 100644 --- a/include/d/a/obj/d_a_obj_lock.h +++ b/include/d/a/obj/d_a_obj_lock.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LOCK_H #define D_A_OBJ_LOCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_log.h b/include/d/a/obj/d_a_obj_log.h index c82fa874..2ae9d120 100644 --- a/include/d/a/obj/d_a_obj_log.h +++ b/include/d/a/obj/d_a_obj_log.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LOG_H #define D_A_OBJ_LOG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOlog_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_log_water.h b/include/d/a/obj/d_a_obj_log_water.h index 26bae430..08fc36d9 100644 --- a/include/d/a/obj/d_a_obj_log_water.h +++ b/include/d/a/obj/d_a_obj_log_water.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LOG_WATER_H #define D_A_OBJ_LOG_WATER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOlogWater_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lotus.h b/include/d/a/obj/d_a_obj_lotus.h index 32bbef3b..7e0955d4 100644 --- a/include/d/a/obj/d_a_obj_lotus.h +++ b/include/d/a/obj/d_a_obj_lotus.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LOTUS_H #define D_A_OBJ_LOTUS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLotus_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lotus_flower.h b/include/d/a/obj/d_a_obj_lotus_flower.h index d1a8a231..4e14d4ad 100644 --- a/include/d/a/obj/d_a_obj_lotus_flower.h +++ b/include/d/a/obj/d_a_obj_lotus_flower.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LOTUS_FLOWER_H #define D_A_OBJ_LOTUS_FLOWER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLotusFlower_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_lotus_seed.h b/include/d/a/obj/d_a_obj_lotus_seed.h index 3d360d2a..43875326 100644 --- a/include/d/a/obj/d_a_obj_lotus_seed.h +++ b/include/d/a/obj/d_a_obj_lotus_seed.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_LOTUS_SEED_H #define D_A_OBJ_LOTUS_SEED_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOLotusSeed_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_mapparts.h b/include/d/a/obj/d_a_obj_mapparts.h index 6bdd0fcd..7242dd91 100644 --- a/include/d/a/obj/d_a_obj_mapparts.h +++ b/include/d/a/obj/d_a_obj_mapparts.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_MAPPARTS_H #define D_A_OBJ_MAPPARTS_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOMapparts_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_megami_island.h b/include/d/a/obj/d_a_obj_megami_island.h index abeb4802..40de5e12 100644 --- a/include/d/a/obj/d_a_obj_megami_island.h +++ b/include/d/a/obj/d_a_obj_megami_island.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_MEGAMI_ISLAND_H #define D_A_OBJ_MEGAMI_ISLAND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOmegamiIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_mg_pumpkin.h b/include/d/a/obj/d_a_obj_mg_pumpkin.h index 0e79b5ef..2aac75ad 100644 --- a/include/d/a/obj/d_a_obj_mg_pumpkin.h +++ b/include/d/a/obj/d_a_obj_mg_pumpkin.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_MG_PUMPKIN_H #define D_A_OBJ_MG_PUMPKIN_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOMgPumpkin_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_mole_cover.h b/include/d/a/obj/d_a_obj_mole_cover.h index 93651f09..a03a8323 100644 --- a/include/d/a/obj/d_a_obj_mole_cover.h +++ b/include/d/a/obj/d_a_obj_mole_cover.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_MOLE_COVER_H #define D_A_OBJ_MOLE_COVER_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOmoleCover_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_mole_soil.h b/include/d/a/obj/d_a_obj_mole_soil.h index 34342bf8..41ce6361 100644 --- a/include/d/a/obj/d_a_obj_mole_soil.h +++ b/include/d/a/obj/d_a_obj_mole_soil.h @@ -1,10 +1,10 @@ #ifndef D_A_OBJ_MOLE_SOIL_H #define D_A_OBJ_MOLE_SOIL_H -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dAcOmoleSoil_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_move_elec.h b/include/d/a/obj/d_a_obj_move_elec.h index c899297b..36943a5d 100644 --- a/include/d/a/obj/d_a_obj_move_elec.h +++ b/include/d/a/obj/d_a_obj_move_elec.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_MOVE_ELEC_H #define D_A_OBJ_MOVE_ELEC_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOMoveElec_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_move_lift_vol.h b/include/d/a/obj/d_a_obj_move_lift_vol.h index b7fa995e..46967c52 100644 --- a/include/d/a/obj/d_a_obj_move_lift_vol.h +++ b/include/d/a/obj/d_a_obj_move_lift_vol.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_MOVE_LIFT_VOL_H #define D_A_OBJ_MOVE_LIFT_VOL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOmoveLiftVol_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_musasabi.h b/include/d/a/obj/d_a_obj_musasabi.h index 923c5722..79b87fdd 100644 --- a/include/d/a/obj/d_a_obj_musasabi.h +++ b/include/d/a/obj/d_a_obj_musasabi.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_MUSASABI_H #define D_A_OBJ_MUSASABI_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOmusasabi_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_mushroom.h b/include/d/a/obj/d_a_obj_mushroom.h index ffec733a..2822e634 100644 --- a/include/d/a/obj/d_a_obj_mushroom.h +++ b/include/d/a/obj/d_a_obj_mushroom.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_MUSHROOM_H #define D_A_OBJ_MUSHROOM_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOMushRoom_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_needle_desert.h b/include/d/a/obj/d_a_obj_needle_desert.h index f573d5b7..6162cbed 100644 --- a/include/d/a/obj/d_a_obj_needle_desert.h +++ b/include/d/a/obj/d_a_obj_needle_desert.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_NEEDLE_DESERT_H #define D_A_OBJ_NEEDLE_DESERT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcONeedleDesert_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_needle_underground.h b/include/d/a/obj/d_a_obj_needle_underground.h index b64fb6ee..1817e765 100644 --- a/include/d/a/obj/d_a_obj_needle_underground.h +++ b/include/d/a/obj/d_a_obj_needle_underground.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_NEEDLE_UNDERGROUND_H #define D_A_OBJ_NEEDLE_UNDERGROUND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcONeedleUnderground_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_oct_grass.h b/include/d/a/obj/d_a_obj_oct_grass.h index 887682b3..55366023 100644 --- a/include/d/a/obj/d_a_obj_oct_grass.h +++ b/include/d/a/obj/d_a_obj_oct_grass.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_OCT_GRASS_H #define D_A_OBJ_OCT_GRASS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOOctGrass_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_oct_grass_leaf.h b/include/d/a/obj/d_a_obj_oct_grass_leaf.h index 48cae41d..e7a71231 100644 --- a/include/d/a/obj/d_a_obj_oct_grass_leaf.h +++ b/include/d/a/obj/d_a_obj_oct_grass_leaf.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_OCT_GRASS_LEAF_H #define D_A_OBJ_OCT_GRASS_LEAF_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOOctGrassLeaf_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_paint.h b/include/d/a/obj/d_a_obj_paint.h index 6815f9cd..8041faf2 100644 --- a/include/d/a/obj/d_a_obj_paint.h +++ b/include/d/a/obj/d_a_obj_paint.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PAINT_H #define D_A_OBJ_PAINT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOpaint_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pinwheel.h b/include/d/a/obj/d_a_obj_pinwheel.h index d836302d..b9cfea0b 100644 --- a/include/d/a/obj/d_a_obj_pinwheel.h +++ b/include/d/a/obj/d_a_obj_pinwheel.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PINWHEEL_H #define D_A_OBJ_PINWHEEL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOpinwheel_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pipe.h b/include/d/a/obj/d_a_obj_pipe.h index b6611a24..9a8e3778 100644 --- a/include/d/a/obj/d_a_obj_pipe.h +++ b/include/d/a/obj/d_a_obj_pipe.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PIPE_H #define D_A_OBJ_PIPE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOPipe_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_piston.h b/include/d/a/obj/d_a_obj_piston.h index 8b038b2c..da4dee1a 100644 --- a/include/d/a/obj/d_a_obj_piston.h +++ b/include/d/a/obj/d_a_obj_piston.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PISTON_H #define D_A_OBJ_PISTON_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOPiston_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pole_stony.h b/include/d/a/obj/d_a_obj_pole_stony.h index 368af1cd..35052ffe 100644 --- a/include/d/a/obj/d_a_obj_pole_stony.h +++ b/include/d/a/obj/d_a_obj_pole_stony.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_POLE_STONY_H #define D_A_OBJ_POLE_STONY_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOPoleStony_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pool_cock.h b/include/d/a/obj/d_a_obj_pool_cock.h index 5ab41eb0..941cdfa3 100644 --- a/include/d/a/obj/d_a_obj_pool_cock.h +++ b/include/d/a/obj/d_a_obj_pool_cock.h @@ -1,11 +1,10 @@ #ifndef D_A_OBJ_POOL_COCK_H #define D_A_OBJ_POOL_COCK_H -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dAcOPoolCock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pot_sal.h b/include/d/a/obj/d_a_obj_pot_sal.h index 110bb49e..f9d6e50c 100644 --- a/include/d/a/obj/d_a_obj_pot_sal.h +++ b/include/d/a/obj/d_a_obj_pot_sal.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_POT_SAL_H #define D_A_OBJ_POT_SAL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOpotSal_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_propeller_lift.h b/include/d/a/obj/d_a_obj_propeller_lift.h index 1c43289e..0a5c1366 100644 --- a/include/d/a/obj/d_a_obj_propeller_lift.h +++ b/include/d/a/obj/d_a_obj_propeller_lift.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PROPELLER_LIFT_H #define D_A_OBJ_PROPELLER_LIFT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOPropellerLift_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_propera.h b/include/d/a/obj/d_a_obj_propera.h index 2d06092f..1326f80b 100644 --- a/include/d/a/obj/d_a_obj_propera.h +++ b/include/d/a/obj/d_a_obj_propera.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PROPERA_H #define D_A_OBJ_PROPERA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObjPropera_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pumpkin_bar.h b/include/d/a/obj/d_a_obj_pumpkin_bar.h index 84c99965..c1c06e63 100644 --- a/include/d/a/obj/d_a_obj_pumpkin_bar.h +++ b/include/d/a/obj/d_a_obj_pumpkin_bar.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_PUMPKIN_BAR_H #define D_A_OBJ_PUMPKIN_BAR_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOpumpkinBar_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_pumpkin_leaf.h b/include/d/a/obj/d_a_obj_pumpkin_leaf.h index cfbc91a0..f22c2e44 100644 --- a/include/d/a/obj/d_a_obj_pumpkin_leaf.h +++ b/include/d/a/obj/d_a_obj_pumpkin_leaf.h @@ -1,10 +1,10 @@ #ifndef D_A_OBJ_PUMPKIN_LEAF_H #define D_A_OBJ_PUMPKIN_LEAF_H -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dAcOPumpkinLeaf_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_push_block.h b/include/d/a/obj/d_a_obj_push_block.h index 8f7aa333..7409d6e6 100644 --- a/include/d/a/obj/d_a_obj_push_block.h +++ b/include/d/a/obj/d_a_obj_push_block.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_PUSH_BLOCK_H #define D_A_OBJ_PUSH_BLOCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOpushBlk_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_puzzle_island.h b/include/d/a/obj/d_a_obj_puzzle_island.h index 0914d9b9..9300e35f 100644 --- a/include/d/a/obj/d_a_obj_puzzle_island.h +++ b/include/d/a/obj/d_a_obj_puzzle_island.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_PUZZLE_ISLAND_H #define D_A_OBJ_PUZZLE_ISLAND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOpuzzleIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rail_end.h b/include/d/a/obj/d_a_obj_rail_end.h index 2e151627..e1b18237 100644 --- a/include/d/a/obj/d_a_obj_rail_end.h +++ b/include/d/a/obj/d_a_obj_rail_end.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_RAIL_END_H #define D_A_OBJ_RAIL_END_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcORailEnd_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rail_post.h b/include/d/a/obj/d_a_obj_rail_post.h index d4a7164b..7e9e32e9 100644 --- a/include/d/a/obj/d_a_obj_rail_post.h +++ b/include/d/a/obj/d_a_obj_rail_post.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_RAIL_POST_H #define D_A_OBJ_RAIL_POST_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcORailPost : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ride_rock.h b/include/d/a/obj/d_a_obj_ride_rock.h index 784f8126..01224acb 100644 --- a/include/d/a/obj/d_a_obj_ride_rock.h +++ b/include/d/a/obj/d_a_obj_ride_rock.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_RIDE_ROCK_H #define D_A_OBJ_RIDE_ROCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOrideRock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ring.h b/include/d/a/obj/d_a_obj_ring.h index 5b5b69e7..f43c2f40 100644 --- a/include/d/a/obj/d_a_obj_ring.h +++ b/include/d/a/obj/d_a_obj_ring.h @@ -1,10 +1,10 @@ #ifndef D_A_OBJ_RING_H #define D_A_OBJ_RING_H -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOring_c : public dAcObjBase_c { public: @@ -24,15 +24,12 @@ class dAcOring_c : public dAcObjBase_c { } private: - static u32 ROT_PER_TICK; m3d::smdl_c mModel; STATE_MGR_DECLARE(dAcOring_c); u8 field_0x388; f32 field_0x38C; - - }; #endif diff --git a/include/d/a/obj/d_a_obj_ro_at_target.h b/include/d/a/obj/d_a_obj_ro_at_target.h index c0ab3d77..11e48c6e 100644 --- a/include/d/a/obj/d_a_obj_ro_at_target.h +++ b/include/d/a/obj/d_a_obj_ro_at_target.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_RO_AT_TARGET_H #define D_A_OBJ_RO_AT_TARGET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOroAtTarget_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rock_boat.h b/include/d/a/obj/d_a_obj_rock_boat.h index 43da6a2c..85278c87 100644 --- a/include/d/a/obj/d_a_obj_rock_boat.h +++ b/include/d/a/obj/d_a_obj_rock_boat.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROCK_BOAT_H #define D_A_OBJ_ROCK_BOAT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcORockBoat_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rock_dragon.h b/include/d/a/obj/d_a_obj_rock_dragon.h index 5fa47c57..144e9c21 100644 --- a/include/d/a/obj/d_a_obj_rock_dragon.h +++ b/include/d/a/obj/d_a_obj_rock_dragon.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROCK_DRAGON_H #define D_A_OBJ_ROCK_DRAGON_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcORockDragon_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rock_sky.h b/include/d/a/obj/d_a_obj_rock_sky.h index a4743c02..9246562f 100644 --- a/include/d/a/obj/d_a_obj_rock_sky.h +++ b/include/d/a/obj/d_a_obj_rock_sky.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_ROCK_SKY_H #define D_A_OBJ_ROCK_SKY_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOrockSky_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_roll_pillar.h b/include/d/a/obj/d_a_obj_roll_pillar.h index c26db1d9..2d43fa13 100644 --- a/include/d/a/obj/d_a_obj_roll_pillar.h +++ b/include/d/a/obj/d_a_obj_roll_pillar.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROLL_PILLAR_H #define D_A_OBJ_ROLL_PILLAR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcORollPillar_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_roll_rock.h b/include/d/a/obj/d_a_obj_roll_rock.h index 8510da92..8956787e 100644 --- a/include/d/a/obj/d_a_obj_roll_rock.h +++ b/include/d/a/obj/d_a_obj_roll_rock.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROLL_ROCK_H #define D_A_OBJ_ROLL_ROCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOrollRock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rope_base.h b/include/d/a/obj/d_a_obj_rope_base.h index 0837fcec..8c43a7c1 100644 --- a/include/d/a/obj/d_a_obj_rope_base.h +++ b/include/d/a/obj/d_a_obj_rope_base.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_ROPE_BASE_H #define D_A_OBJ_ROPE_BASE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOropeBase_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rope_igaiga.h b/include/d/a/obj/d_a_obj_rope_igaiga.h index 41c1d235..1b64f23f 100644 --- a/include/d/a/obj/d_a_obj_rope_igaiga.h +++ b/include/d/a/obj/d_a_obj_rope_igaiga.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROPE_IGAIGA_H #define D_A_OBJ_ROPE_IGAIGA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOropeIgaiga_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_rotation_light.h b/include/d/a/obj/d_a_obj_rotation_light.h index f2ff2ddc..89951450 100644 --- a/include/d/a/obj/d_a_obj_rotation_light.h +++ b/include/d/a/obj/d_a_obj_rotation_light.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_ROTATION_LIGHT_H #define D_A_OBJ_ROTATION_LIGHT_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOrotationLight_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_roulette.h b/include/d/a/obj/d_a_obj_roulette.h index b35fb298..3563269e 100644 --- a/include/d/a/obj/d_a_obj_roulette.h +++ b/include/d/a/obj/d_a_obj_roulette.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROULETTE_H #define D_A_OBJ_ROULETTE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObjRoulette_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_roulette_island_c.h b/include/d/a/obj/d_a_obj_roulette_island_c.h index 6ad0fbe4..f7da6dcd 100644 --- a/include/d/a/obj/d_a_obj_roulette_island_c.h +++ b/include/d/a/obj/d_a_obj_roulette_island_c.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROULETTE_ISLAND_C_H #define D_A_OBJ_ROULETTE_ISLAND_C_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOrouletteIslandC_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_roulette_island_r.h b/include/d/a/obj/d_a_obj_roulette_island_r.h index 516664c9..309a4f71 100644 --- a/include/d/a/obj/d_a_obj_roulette_island_r.h +++ b/include/d/a/obj/d_a_obj_roulette_island_r.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_ROULETTE_ISLAND_R_H #define D_A_OBJ_ROULETTE_ISLAND_R_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOrouletteIslandR_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ruined_save.h b/include/d/a/obj/d_a_obj_ruined_save.h index 915825f8..34ada361 100644 --- a/include/d/a/obj/d_a_obj_ruined_save.h +++ b/include/d/a/obj/d_a_obj_ruined_save.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_RUINED_SAVE_H #define D_A_OBJ_RUINED_SAVE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOruinedSave_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sail.h b/include/d/a/obj/d_a_obj_sail.h index decbdacf..51422320 100644 --- a/include/d/a/obj/d_a_obj_sail.h +++ b/include/d/a/obj/d_a_obj_sail.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SAIL_H #define D_A_OBJ_SAIL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSail_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sand_D301.h b/include/d/a/obj/d_a_obj_sand_D301.h index 8041a08a..44bffbb8 100644 --- a/include/d/a/obj/d_a_obj_sand_D301.h +++ b/include/d/a/obj/d_a_obj_sand_D301.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SAND_D301_H #define D_A_OBJ_SAND_D301_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSandD301_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sand_floor.h b/include/d/a/obj/d_a_obj_sand_floor.h index eff6a9c4..90c9caf6 100644 --- a/include/d/a/obj/d_a_obj_sand_floor.h +++ b/include/d/a/obj/d_a_obj_sand_floor.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SAND_FLOOR_H #define D_A_OBJ_SAND_FLOOR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSandFloor_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sandbag.h b/include/d/a/obj/d_a_obj_sandbag.h index 2d6c8576..6be2837c 100644 --- a/include/d/a/obj/d_a_obj_sandbag.h +++ b/include/d/a/obj/d_a_obj_sandbag.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SANDBAG_H #define D_A_OBJ_SANDBAG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSandbag_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_save.h b/include/d/a/obj/d_a_obj_save.h index 28e2e778..0c5a7e6e 100644 --- a/include/d/a/obj/d_a_obj_save.h +++ b/include/d/a/obj/d_a_obj_save.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SAVE_H #define D_A_OBJ_SAVE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSave_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_scattersand.h b/include/d/a/obj/d_a_obj_scattersand.h index 04b9d0d1..f56ef208 100644 --- a/include/d/a/obj/d_a_obj_scattersand.h +++ b/include/d/a/obj/d_a_obj_scattersand.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_SCATTERSAND_H #define D_A_OBJ_SCATTERSAND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOScatterSand : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sea_F301.h b/include/d/a/obj/d_a_obj_sea_F301.h index abd0a7ae..c45c86ab 100644 --- a/include/d/a/obj/d_a_obj_sea_F301.h +++ b/include/d/a/obj/d_a_obj_sea_F301.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SEA_F301_H #define D_A_OBJ_SEA_F301_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSeaF301_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sealed_door.h b/include/d/a/obj/d_a_obj_sealed_door.h index 21d615e9..ab2ea418 100644 --- a/include/d/a/obj/d_a_obj_sealed_door.h +++ b/include/d/a/obj/d_a_obj_sealed_door.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SEALED_DOOR_H #define D_A_OBJ_SEALED_DOOR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOsealedDoor_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_seat_sword.h b/include/d/a/obj/d_a_obj_seat_sword.h index f3577727..a6944d64 100644 --- a/include/d/a/obj/d_a_obj_seat_sword.h +++ b/include/d/a/obj/d_a_obj_seat_sword.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SEAT_SWORD_H #define D_A_OBJ_SEAT_SWORD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSeatSword_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_shed.h b/include/d/a/obj/d_a_obj_shed.h index 16da86e9..9d472ef2 100644 --- a/include/d/a/obj/d_a_obj_shed.h +++ b/include/d/a/obj/d_a_obj_shed.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SHED_H #define D_A_OBJ_SHED_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOShed_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_ship_window.h b/include/d/a/obj/d_a_obj_ship_window.h index c60d1a11..ece2c7bf 100644 --- a/include/d/a/obj/d_a_obj_ship_window.h +++ b/include/d/a/obj/d_a_obj_ship_window.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SHIP_WINDOW_H #define D_A_OBJ_SHIP_WINDOW_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOshipWindow_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_shrine_after.h b/include/d/a/obj/d_a_obj_shrine_after.h index ba9983aa..ccc6aad5 100644 --- a/include/d/a/obj/d_a_obj_shrine_after.h +++ b/include/d/a/obj/d_a_obj_shrine_after.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_SHRINE_AFTER_H #define D_A_OBJ_SHRINE_AFTER_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOshrineAfter_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_shrine_bef_inside.h b/include/d/a/obj/d_a_obj_shrine_bef_inside.h index f8c2c0e5..937d6c5e 100644 --- a/include/d/a/obj/d_a_obj_shrine_bef_inside.h +++ b/include/d/a/obj/d_a_obj_shrine_bef_inside.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_SHRINE_BEF_INSIDE_H #define D_A_OBJ_SHRINE_BEF_INSIDE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOshrineBefInside_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_shrine_before.h b/include/d/a/obj/d_a_obj_shrine_before.h index 1aa9ba97..96c8d257 100644 --- a/include/d/a/obj/d_a_obj_shrine_before.h +++ b/include/d/a/obj/d_a_obj_shrine_before.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_SHRINE_BEFORE_H #define D_A_OBJ_SHRINE_BEFORE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOshrineBefore_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_shutter.h b/include/d/a/obj/d_a_obj_shutter.h index b7c7ae99..e2fa570a 100644 --- a/include/d/a/obj/d_a_obj_shutter.h +++ b/include/d/a/obj/d_a_obj_shutter.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SHUTTER_H #define D_A_OBJ_SHUTTER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_door_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOShutter_c : public dAcObjDoor_c { public: diff --git a/include/d/a/obj/d_a_obj_shutter_change_scene.h b/include/d/a/obj/d_a_obj_shutter_change_scene.h index 9f7786c8..8479e760 100644 --- a/include/d/a/obj/d_a_obj_shutter_change_scene.h +++ b/include/d/a/obj/d_a_obj_shutter_change_scene.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SHUTTER_CHANGE_SCENE_H #define D_A_OBJ_SHUTTER_CHANGE_SCENE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_door_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOShutterChangeScene_c : public dAcObjDoor_c { public: diff --git a/include/d/a/obj/d_a_obj_shutter_fence.h b/include/d/a/obj/d_a_obj_shutter_fence.h index 329c8d90..3f3b1061 100644 --- a/include/d/a/obj/d_a_obj_shutter_fence.h +++ b/include/d/a/obj/d_a_obj_shutter_fence.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SHUTTER_FENCE_H #define D_A_OBJ_SHUTTER_FENCE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOshutterfence_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_shutter_waterD101.h b/include/d/a/obj/d_a_obj_shutter_waterD101.h index 7238d9ac..d2db5253 100644 --- a/include/d/a/obj/d_a_obj_shutter_waterD101.h +++ b/include/d/a/obj/d_a_obj_shutter_waterD101.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SHUTTER_WATERD101_H #define D_A_OBJ_SHUTTER_WATERD101_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOShutterWaterD101_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_side_shutter.h b/include/d/a/obj/d_a_obj_side_shutter.h index 6ae6e245..ed99a8be 100644 --- a/include/d/a/obj/d_a_obj_side_shutter.h +++ b/include/d/a/obj/d_a_obj_side_shutter.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SIDE_SHUTTER_H #define D_A_OBJ_SIDE_SHUTTER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOsideShutter_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sink_floor_f.h b/include/d/a/obj/d_a_obj_sink_floor_f.h index 5c21515b..41d56728 100644 --- a/include/d/a/obj/d_a_obj_sink_floor_f.h +++ b/include/d/a/obj/d_a_obj_sink_floor_f.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SINK_FLOOR_F_H #define D_A_OBJ_SINK_FLOOR_F_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSinkFloorF_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_siren_2dmap.h b/include/d/a/obj/d_a_obj_siren_2dmap.h index 22ba8ef2..70721873 100644 --- a/include/d/a/obj/d_a_obj_siren_2dmap.h +++ b/include/d/a/obj/d_a_obj_siren_2dmap.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_SIREN_2DMAP_H #define D_A_OBJ_SIREN_2DMAP_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOsiren2dmap_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_siren_barrier.h b/include/d/a/obj/d_a_obj_siren_barrier.h index cb2c26b4..fc891409 100644 --- a/include/d/a/obj/d_a_obj_siren_barrier.h +++ b/include/d/a/obj/d_a_obj_siren_barrier.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_SIREN_BARRIER_H #define D_A_OBJ_SIREN_BARRIER_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOSirenBarrier_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_skull.h b/include/d/a/obj/d_a_obj_skull.h index b1fc58fc..05a0da74 100644 --- a/include/d/a/obj/d_a_obj_skull.h +++ b/include/d/a/obj/d_a_obj_skull.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SKULL_H #define D_A_OBJ_SKULL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSkull_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_slice_log.h b/include/d/a/obj/d_a_obj_slice_log.h index 780e312d..fe50eb78 100644 --- a/include/d/a/obj/d_a_obj_slice_log.h +++ b/include/d/a/obj/d_a_obj_slice_log.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SLICE_LOG_H #define D_A_OBJ_SLICE_LOG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOsliceLog_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_slice_log_parts.h b/include/d/a/obj/d_a_obj_slice_log_parts.h index 7c142873..0691def7 100644 --- a/include/d/a/obj/d_a_obj_slice_log_parts.h +++ b/include/d/a/obj/d_a_obj_slice_log_parts.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SLICE_LOG_PARTS_H #define D_A_OBJ_SLICE_LOG_PARTS_H -#include -#include -#include +#include "d/a/e/d_a_en_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOsliceLogParts_c : public dAcEnBase_c { public: diff --git a/include/d/a/obj/d_a_obj_smoke.h b/include/d/a/obj/d_a_obj_smoke.h index dd1f404b..9cd943c6 100644 --- a/include/d/a/obj/d_a_obj_smoke.h +++ b/include/d/a/obj/d_a_obj_smoke.h @@ -1,11 +1,11 @@ #ifndef D_A_OBJ_SMOKE_H #define D_A_OBJ_SMOKE_H -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmtexsrt.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dAcOsmoke_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_soil.h b/include/d/a/obj/d_a_obj_soil.h index 46793891..c4e24b31 100644 --- a/include/d/a/obj/d_a_obj_soil.h +++ b/include/d/a/obj/d_a_obj_soil.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SOIL_H #define D_A_OBJ_SOIL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOsoil_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_spider_line.h b/include/d/a/obj/d_a_obj_spider_line.h index dfd86dff..edd7ef00 100644 --- a/include/d/a/obj/d_a_obj_spider_line.h +++ b/include/d/a/obj/d_a_obj_spider_line.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SPIDER_LINE_H #define D_A_OBJ_SPIDER_LINE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dObjSpiderLine_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_spike.h b/include/d/a/obj/d_a_obj_spike.h index 8a81d4ea..cadb8407 100644 --- a/include/d/a/obj/d_a_obj_spike.h +++ b/include/d/a/obj/d_a_obj_spike.h @@ -1,13 +1,13 @@ #ifndef D_A_O_SPIKE_H #define D_A_O_SPIKE_H -#include -#include -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/cc/d_cc_shape_colliders.h" +#include "m/m3d/m_smdl.h" +#include "m/m_vec.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" +#include "s/s_StateID.hpp" class dAcOspike_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_cover.h b/include/d/a/obj/d_a_obj_stage_cover.h index 746e8b03..086c4e26 100644 --- a/include/d/a/obj/d_a_obj_stage_cover.h +++ b/include/d/a/obj/d_a_obj_stage_cover.h @@ -1,10 +1,10 @@ #ifndef D_A_OBJ_STAGE_COVER_H #define D_A_OBJ_STAGE_COVER_H -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dAcOstageCover_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_crack.h b/include/d/a/obj/d_a_obj_stage_crack.h index 1c897a2c..2d1339d2 100644 --- a/include/d/a/obj/d_a_obj_stage_crack.h +++ b/include/d/a/obj/d_a_obj_stage_crack.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STAGE_CRACK_H #define D_A_OBJ_STAGE_CRACK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstageCrack_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_debris.h b/include/d/a/obj/d_a_obj_stage_debris.h index 24a82b60..7e482fda 100644 --- a/include/d/a/obj/d_a_obj_stage_debris.h +++ b/include/d/a/obj/d_a_obj_stage_debris.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STAGE_DEBRIS_H #define D_A_OBJ_STAGE_DEBRIS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstageDebris_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_kraken.h b/include/d/a/obj/d_a_obj_stage_kraken.h index 1c8e3565..1b0ab998 100644 --- a/include/d/a/obj/d_a_obj_stage_kraken.h +++ b/include/d/a/obj/d_a_obj_stage_kraken.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STAGE_KRAKEN_H #define D_A_OBJ_STAGE_KRAKEN_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstageKraken_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_kraken_parts.h b/include/d/a/obj/d_a_obj_stage_kraken_parts.h index 4ec71b0b..a2c434a1 100644 --- a/include/d/a/obj/d_a_obj_stage_kraken_parts.h +++ b/include/d/a/obj/d_a_obj_stage_kraken_parts.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STAGE_KRAKEN_PARTS_H #define D_A_OBJ_STAGE_KRAKEN_PARTS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstageKrakenParts_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_sink.h b/include/d/a/obj/d_a_obj_stage_sink.h index 8a673fe2..c8da109e 100644 --- a/include/d/a/obj/d_a_obj_stage_sink.h +++ b/include/d/a/obj/d_a_obj_stage_sink.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STAGE_SINK_H #define D_A_OBJ_STAGE_SINK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstageSink_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stage_water.h b/include/d/a/obj/d_a_obj_stage_water.h index 6047495f..0a9f70d4 100644 --- a/include/d/a/obj/d_a_obj_stage_water.h +++ b/include/d/a/obj/d_a_obj_stage_water.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STAGE_WATER_H #define D_A_OBJ_STAGE_WATER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstageWater_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_step_gumarm.h b/include/d/a/obj/d_a_obj_step_gumarm.h index 7e6619cc..5e382bf2 100644 --- a/include/d/a/obj/d_a_obj_step_gumarm.h +++ b/include/d/a/obj/d_a_obj_step_gumarm.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STEP_GUMARM_H #define D_A_OBJ_STEP_GUMARM_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOStepGumarm_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_step_statue.h b/include/d/a/obj/d_a_obj_step_statue.h index b452e0b3..8a7548a9 100644 --- a/include/d/a/obj/d_a_obj_step_statue.h +++ b/include/d/a/obj/d_a_obj_step_statue.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STEP_STATUE_H #define D_A_OBJ_STEP_STATUE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOStepStatue_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_step_time_slip.h b/include/d/a/obj/d_a_obj_step_time_slip.h index 317b7f3a..cf920a77 100644 --- a/include/d/a/obj/d_a_obj_step_time_slip.h +++ b/include/d/a/obj/d_a_obj_step_time_slip.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STEP_TIME_SLIP_H #define D_A_OBJ_STEP_TIME_SLIP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOStepTimeSlip_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stone_stand.h b/include/d/a/obj/d_a_obj_stone_stand.h index d1b1a079..8482bdf2 100644 --- a/include/d/a/obj/d_a_obj_stone_stand.h +++ b/include/d/a/obj/d_a_obj_stone_stand.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STONE_STAND_H #define D_A_OBJ_STONE_STAND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOStoneStand_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stopper_rock.h b/include/d/a/obj/d_a_obj_stopper_rock.h index 198a4990..11e9c190 100644 --- a/include/d/a/obj/d_a_obj_stopper_rock.h +++ b/include/d/a/obj/d_a_obj_stopper_rock.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STOPPER_ROCK_H #define D_A_OBJ_STOPPER_ROCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstopperRock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stopping_rope.h b/include/d/a/obj/d_a_obj_stopping_rope.h index 41ddf030..222698c1 100644 --- a/include/d/a/obj/d_a_obj_stopping_rope.h +++ b/include/d/a/obj/d_a_obj_stopping_rope.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STOPPING_ROPE_H #define D_A_OBJ_STOPPING_ROPE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOStoppingRope_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_stream_lava.h b/include/d/a/obj/d_a_obj_stream_lava.h index f73598ab..a4226a87 100644 --- a/include/d/a/obj/d_a_obj_stream_lava.h +++ b/include/d/a/obj/d_a_obj_stream_lava.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_STREAM_LAVA_H #define D_A_OBJ_STREAM_LAVA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOstreamLava_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sun_light.h b/include/d/a/obj/d_a_obj_sun_light.h index b3badc71..c3c0c8e5 100644 --- a/include/d/a/obj/d_a_obj_sun_light.h +++ b/include/d/a/obj/d_a_obj_sun_light.h @@ -1,11 +1,11 @@ #ifndef D_A_OBJ_SUN_LIGHT_H #define D_A_OBJ_SUN_LIGHT_H -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmtexsrt.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" class dAcOsunLight_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_bank.h b/include/d/a/obj/d_a_obj_sw_bank.h index 2f0bbf4f..8e8117bb 100644 --- a/include/d/a/obj/d_a_obj_sw_bank.h +++ b/include/d/a/obj/d_a_obj_sw_bank.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_BANK_H #define D_A_OBJ_SW_BANK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwBank_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_bank_small.h b/include/d/a/obj/d_a_obj_sw_bank_small.h index 96ddef6e..2e9502f5 100644 --- a/include/d/a/obj/d_a_obj_sw_bank_small.h +++ b/include/d/a/obj/d_a_obj_sw_bank_small.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_BANK_SMALL_H #define D_A_OBJ_SW_BANK_SMALL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwBankSmall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_dir.h b/include/d/a/obj/d_a_obj_sw_dir.h index d8d409d9..ba067f76 100644 --- a/include/d/a/obj/d_a_obj_sw_dir.h +++ b/include/d/a/obj/d_a_obj_sw_dir.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_DIR_H #define D_A_OBJ_SW_DIR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwDir_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_dir_door.h b/include/d/a/obj/d_a_obj_sw_dir_door.h index 9ec71c2f..77794810 100644 --- a/include/d/a/obj/d_a_obj_sw_dir_door.h +++ b/include/d/a/obj/d_a_obj_sw_dir_door.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_DIR_DOOR_H #define D_A_OBJ_SW_DIR_DOOR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwDirDoor_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_harp.h b/include/d/a/obj/d_a_obj_sw_harp.h index 8431b5a1..e1999504 100644 --- a/include/d/a/obj/d_a_obj_sw_harp.h +++ b/include/d/a/obj/d_a_obj_sw_harp.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_HARP_H #define D_A_OBJ_SW_HARP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwHarp_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_sword_beam.h b/include/d/a/obj/d_a_obj_sw_sword_beam.h index 1a6ca275..a3c6703c 100644 --- a/include/d/a/obj/d_a_obj_sw_sword_beam.h +++ b/include/d/a/obj/d_a_obj_sw_sword_beam.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_SWORD_BEAM_H #define D_A_OBJ_SW_SWORD_BEAM_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwSwordBeam_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_syako.h b/include/d/a/obj/d_a_obj_sw_syako.h index 3fba42d8..39781114 100644 --- a/include/d/a/obj/d_a_obj_sw_syako.h +++ b/include/d/a/obj/d_a_obj_sw_syako.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_SYAKO_H #define D_A_OBJ_SW_SYAKO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwSyako_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sw_whiplever.h b/include/d/a/obj/d_a_obj_sw_whiplever.h index 3a099cb0..cdc5499c 100644 --- a/include/d/a/obj/d_a_obj_sw_whiplever.h +++ b/include/d/a/obj/d_a_obj_sw_whiplever.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SW_WHIPLEVER_H #define D_A_OBJ_SW_WHIPLEVER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwWhipLever_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_swhit.h b/include/d/a/obj/d_a_obj_swhit.h index 56d2e8c5..fec7f019 100644 --- a/include/d/a/obj/d_a_obj_swhit.h +++ b/include/d/a/obj/d_a_obj_swhit.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SWHIT_H #define D_A_OBJ_SWHIT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOswhit_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_switch.h b/include/d/a/obj/d_a_obj_switch.h index 66eae621..df5b2d54 100644 --- a/include/d/a/obj/d_a_obj_switch.h +++ b/include/d/a/obj/d_a_obj_switch.h @@ -1,12 +1,12 @@ #ifndef D_A_OBJ_SWITCH_H #define D_A_OBJ_SWITCH_H -#include -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "m/m3d/m_mdl.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" +#include "toBeSorted/time_area_mgr.h" // OBJ_VSD? class dAcOScatterSand_tmp : public dAcObjBase_c { diff --git a/include/d/a/obj/d_a_obj_switch_shutter.h b/include/d/a/obj/d_a_obj_switch_shutter.h index a68e91c9..8e13afa6 100644 --- a/include/d/a/obj/d_a_obj_switch_shutter.h +++ b/include/d/a/obj/d_a_obj_switch_shutter.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SWITCH_SHUTTER_H #define D_A_OBJ_SWITCH_SHUTTER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwShutter_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_switch_wall.h b/include/d/a/obj/d_a_obj_switch_wall.h index 7bda307c..a132aea0 100644 --- a/include/d/a/obj/d_a_obj_switch_wall.h +++ b/include/d/a/obj/d_a_obj_switch_wall.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SWITCH_WALL_H #define D_A_OBJ_SWITCH_WALL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOswitchWall_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sword_candle.h b/include/d/a/obj/d_a_obj_sword_candle.h index 0b68c12f..3afc0b7a 100644 --- a/include/d/a/obj/d_a_obj_sword_candle.h +++ b/include/d/a/obj/d_a_obj_sword_candle.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SWORD_CANDLE_H #define D_A_OBJ_SWORD_CANDLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwordCandle_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_sword_stab.h b/include/d/a/obj/d_a_obj_sword_stab.h index a218bd6e..535d6d58 100644 --- a/include/d/a/obj/d_a_obj_sword_stab.h +++ b/include/d/a/obj/d_a_obj_sword_stab.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SWORD_STAB_H #define D_A_OBJ_SWORD_STAB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwordStab_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_swrd_prj.h b/include/d/a/obj/d_a_obj_swrd_prj.h index ffbf8d04..afb48f5f 100644 --- a/include/d/a/obj/d_a_obj_swrd_prj.h +++ b/include/d/a/obj/d_a_obj_swrd_prj.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SWRD_PRJ_H #define D_A_OBJ_SWRD_PRJ_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSwrdPrj : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_syako_shutter.h b/include/d/a/obj/d_a_obj_syako_shutter.h index 8da96d5a..c43ba1cf 100644 --- a/include/d/a/obj/d_a_obj_syako_shutter.h +++ b/include/d/a/obj/d_a_obj_syako_shutter.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_SYAKO_SHUTTER_H #define D_A_OBJ_SYAKO_SHUTTER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOSyakoShutter_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tableware.h b/include/d/a/obj/d_a_obj_tableware.h index aac29d8e..3cabbf9d 100644 --- a/include/d/a/obj/d_a_obj_tableware.h +++ b/include/d/a/obj/d_a_obj_tableware.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TABLEWARE_H #define D_A_OBJ_TABLEWARE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTableWare_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tackle.h b/include/d/a/obj/d_a_obj_tackle.h index 834b3b61..b2b28db2 100644 --- a/include/d/a/obj/d_a_obj_tackle.h +++ b/include/d/a/obj/d_a_obj_tackle.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TACKLE_H #define D_A_OBJ_TACKLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTackle_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tarzan_pole.h b/include/d/a/obj/d_a_obj_tarzan_pole.h index 59766180..419133c6 100644 --- a/include/d/a/obj/d_a_obj_tarzan_pole.h +++ b/include/d/a/obj/d_a_obj_tarzan_pole.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_TARZAN_POLE_H #define D_A_OBJ_TARZAN_POLE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOTarzanPole_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_teni_rail.h b/include/d/a/obj/d_a_obj_teni_rail.h index 2d6167eb..24997455 100644 --- a/include/d/a/obj/d_a_obj_teni_rail.h +++ b/include/d/a/obj/d_a_obj_teni_rail.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_TENI_RAIL_H #define D_A_OBJ_TENI_RAIL_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOTeniRail : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_teni_rail_post.h b/include/d/a/obj/d_a_obj_teni_rail_post.h index 2e6c4a12..d060a3db 100644 --- a/include/d/a/obj/d_a_obj_teni_rail_post.h +++ b/include/d/a/obj/d_a_obj_teni_rail_post.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_TENI_RAIL_POST_H #define D_A_OBJ_TENI_RAIL_POST_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOTeniRailPost : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tenijima.h b/include/d/a/obj/d_a_obj_tenijima.h index 96862f77..95ff647f 100644 --- a/include/d/a/obj/d_a_obj_tenijima.h +++ b/include/d/a/obj/d_a_obj_tenijima.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_TENIJIMA_H #define D_A_OBJ_TENIJIMA_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOtenijima_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_terry_bicycle.h b/include/d/a/obj/d_a_obj_terry_bicycle.h index 06a9b18a..8d52682e 100644 --- a/include/d/a/obj/d_a_obj_terry_bicycle.h +++ b/include/d/a/obj/d_a_obj_terry_bicycle.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TERRY_BICYCLE_H #define D_A_OBJ_TERRY_BICYCLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTerryBicycle_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_terry_gimmick.h b/include/d/a/obj/d_a_obj_terry_gimmick.h index 1365e7ee..f84794a1 100644 --- a/include/d/a/obj/d_a_obj_terry_gimmick.h +++ b/include/d/a/obj/d_a_obj_terry_gimmick.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TERRY_GIMMICK_H #define D_A_OBJ_TERRY_GIMMICK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTerryGimmick_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_terry_hole.h b/include/d/a/obj/d_a_obj_terry_hole.h index a556621e..46e7cace 100644 --- a/include/d/a/obj/d_a_obj_terry_hole.h +++ b/include/d/a/obj/d_a_obj_terry_hole.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TERRY_HOLE_H #define D_A_OBJ_TERRY_HOLE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTerryHole_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_terry_island.h b/include/d/a/obj/d_a_obj_terry_island.h index 2212dbf1..e68dc17f 100644 --- a/include/d/a/obj/d_a_obj_terry_island.h +++ b/include/d/a/obj/d_a_obj_terry_island.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TERRY_ISLAND_H #define D_A_OBJ_TERRY_ISLAND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOterryIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_terry_shop.h b/include/d/a/obj/d_a_obj_terry_shop.h index 0f987584..955d3134 100644 --- a/include/d/a/obj/d_a_obj_terry_shop.h +++ b/include/d/a/obj/d_a_obj_terry_shop.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TERRY_SHOP_H #define D_A_OBJ_TERRY_SHOP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOterryShop_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_terry_switch.h b/include/d/a/obj/d_a_obj_terry_switch.h index a3959022..f8d1ad85 100644 --- a/include/d/a/obj/d_a_obj_terry_switch.h +++ b/include/d/a/obj/d_a_obj_terry_switch.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TERRY_SWITCH_H #define D_A_OBJ_TERRY_SWITCH_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTerrySwitch_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_base.h b/include/d/a/obj/d_a_obj_time_base.h index e6195556..117f980d 100644 --- a/include/d/a/obj/d_a_obj_time_base.h +++ b/include/d/a/obj/d_a_obj_time_base.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_BASE_H #define D_A_OBJ_TIME_BASE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeBase_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_block.h b/include/d/a/obj/d_a_obj_time_block.h index 2e48e0ed..5b456d09 100644 --- a/include/d/a/obj/d_a_obj_time_block.h +++ b/include/d/a/obj/d_a_obj_time_block.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_BLOCK_H #define D_A_OBJ_TIME_BLOCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeBlock_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_boat.h b/include/d/a/obj/d_a_obj_time_boat.h index 8545eb26..f282b400 100644 --- a/include/d/a/obj/d_a_obj_time_boat.h +++ b/include/d/a/obj/d_a_obj_time_boat.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_BOAT_H #define D_A_OBJ_TIME_BOAT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeBoat_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_boat_bullet.h b/include/d/a/obj/d_a_obj_time_boat_bullet.h index e229813a..c6b7bcee 100644 --- a/include/d/a/obj/d_a_obj_time_boat_bullet.h +++ b/include/d/a/obj/d_a_obj_time_boat_bullet.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_BOAT_BULLET_H #define D_A_OBJ_TIME_BOAT_BULLET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeBoatBullet_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_door.h b/include/d/a/obj/d_a_obj_time_door.h index 2b8f33a9..bc930299 100644 --- a/include/d/a/obj/d_a_obj_time_door.h +++ b/include/d/a/obj/d_a_obj_time_door.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_DOOR_H #define D_A_OBJ_TIME_DOOR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeDoor_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_door_before.h b/include/d/a/obj/d_a_obj_time_door_before.h index 99f88fd0..596896d5 100644 --- a/include/d/a/obj/d_a_obj_time_door_before.h +++ b/include/d/a/obj/d_a_obj_time_door_before.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_DOOR_BEFORE_H #define D_A_OBJ_TIME_DOOR_BEFORE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeDoorBefore_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_stage_bg.h b/include/d/a/obj/d_a_obj_time_stage_bg.h index 8041c6d8..c86eb387 100644 --- a/include/d/a/obj/d_a_obj_time_stage_bg.h +++ b/include/d/a/obj/d_a_obj_time_stage_bg.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_STAGE_BG_H #define D_A_OBJ_TIME_STAGE_BG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeStageBg_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_time_stone.h b/include/d/a/obj/d_a_obj_time_stone.h index ebb67230..567cf60b 100644 --- a/include/d/a/obj/d_a_obj_time_stone.h +++ b/include/d/a/obj/d_a_obj_time_stone.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TIME_STONE_H #define D_A_OBJ_TIME_STONE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTimeStone_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_toD3_stone_figure.h b/include/d/a/obj/d_a_obj_toD3_stone_figure.h index 75d3a126..bdc94976 100644 --- a/include/d/a/obj/d_a_obj_toD3_stone_figure.h +++ b/include/d/a/obj/d_a_obj_toD3_stone_figure.h @@ -1,13 +1,13 @@ #ifndef D_A_O_TTOD3_STONE_FIGURE_H #define D_A_O_TTOD3_STONE_FIGURE_H -#include -#include -#include -#include -#include -#include -#include +#include "c/c_math.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/cc/d_cc_shape_colliders.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtoD3StoneFigure_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_toge_trap.h b/include/d/a/obj/d_a_obj_toge_trap.h index 5366a8d4..635f9aff 100644 --- a/include/d/a/obj/d_a_obj_toge_trap.h +++ b/include/d/a/obj/d_a_obj_toge_trap.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TOGE_TRAP_H #define D_A_OBJ_TOGE_TRAP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtogeTrap_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tornado.h b/include/d/a/obj/d_a_obj_tornado.h index 96a35a33..54a7c025 100644 --- a/include/d/a/obj/d_a_obj_tornado.h +++ b/include/d/a/obj/d_a_obj_tornado.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TORNADO_H #define D_A_OBJ_TORNADO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTornado_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tower_D101.h b/include/d/a/obj/d_a_obj_tower_D101.h index 0c79e7e1..0e8bdbc1 100644 --- a/include/d/a/obj/d_a_obj_tower_D101.h +++ b/include/d/a/obj/d_a_obj_tower_D101.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TOWER_D101_H #define D_A_OBJ_TOWER_D101_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTowerD101_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tower_bomb.h b/include/d/a/obj/d_a_obj_tower_bomb.h index ac3b3fd1..aa312740 100644 --- a/include/d/a/obj/d_a_obj_tower_bomb.h +++ b/include/d/a/obj/d_a_obj_tower_bomb.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TOWER_BOMB_H #define D_A_OBJ_TOWER_BOMB_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTowerBomb_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tower_gearD101.h b/include/d/a/obj/d_a_obj_tower_gearD101.h index 1c248889..0a318350 100644 --- a/include/d/a/obj/d_a_obj_tower_gearD101.h +++ b/include/d/a/obj/d_a_obj_tower_gearD101.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TOWER_GEARD101_H #define D_A_OBJ_TOWER_GEARD101_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTowerGearD101_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tower_hand_D101.h b/include/d/a/obj/d_a_obj_tower_hand_D101.h index b0f3bab7..99b3104d 100644 --- a/include/d/a/obj/d_a_obj_tower_hand_D101.h +++ b/include/d/a/obj/d_a_obj_tower_hand_D101.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TOWER_HAND_D101_H #define D_A_OBJ_TOWER_HAND_D101_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTowerHandD101_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tr_shutter_cs.h b/include/d/a/obj/d_a_obj_tr_shutter_cs.h index 0e000af9..f8b074fe 100644 --- a/include/d/a/obj/d_a_obj_tr_shutter_cs.h +++ b/include/d/a/obj/d_a_obj_tr_shutter_cs.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TR_SHUTTER_CS_H #define D_A_OBJ_TR_SHUTTER_CS_H -#include -#include -#include +#include "d/a/obj/d_a_obj_door_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTrlyShtrChgScn_c : public dAcObjDoor_c { public: diff --git a/include/d/a/obj/d_a_obj_trap_bird_wood.h b/include/d/a/obj/d_a_obj_trap_bird_wood.h index c3ba93dd..7306798f 100644 --- a/include/d/a/obj/d_a_obj_trap_bird_wood.h +++ b/include/d/a/obj/d_a_obj_trap_bird_wood.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TRAP_BIRD_WOOD_H #define D_A_OBJ_TRAP_BIRD_WOOD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTrapBirdWood_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_trap_rock_1.h b/include/d/a/obj/d_a_obj_trap_rock_1.h index caeaab9e..70afce36 100644 --- a/include/d/a/obj/d_a_obj_trap_rock_1.h +++ b/include/d/a/obj/d_a_obj_trap_rock_1.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TRAP_ROCK_1_H #define D_A_OBJ_TRAP_ROCK_1_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtrapRock1_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_treasure_island.h b/include/d/a/obj/d_a_obj_treasure_island.h index 1866ec42..1c790aca 100644 --- a/include/d/a/obj/d_a_obj_treasure_island.h +++ b/include/d/a/obj/d_a_obj_treasure_island.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_TREASURE_ISLAND_H #define D_A_OBJ_TREASURE_ISLAND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOtreasureIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_treasure_island_b.h b/include/d/a/obj/d_a_obj_treasure_island_b.h index 25e4f4d6..27e6d291 100644 --- a/include/d/a/obj/d_a_obj_treasure_island_b.h +++ b/include/d/a/obj/d_a_obj_treasure_island_b.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TREASURE_ISLAND_B_H #define D_A_OBJ_TREASURE_ISLAND_B_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtreasureIslandB_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_triforce.h b/include/d/a/obj/d_a_obj_triforce.h index c582ee9d..aaa6f654 100644 --- a/include/d/a/obj/d_a_obj_triforce.h +++ b/include/d/a/obj/d_a_obj_triforce.h @@ -1,14 +1,14 @@ #ifndef D_A_O_TRIFORCE_H #define D_A_O_TRIFORCE_H -#include -#include -#include -#include -#include -#include -#include -#include +#include "c/c_math.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/cc/d_cc_shape_colliders.h" +#include "m/m3d/m_anmtexsrt.h" +#include "m/m3d/m_smdl.h" +#include "m/m_angle.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "toBeSorted/effects_struct.h" class dAcOtriforce_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_trolley.h b/include/d/a/obj/d_a_obj_trolley.h index f2bbac12..1fa8b916 100644 --- a/include/d/a/obj/d_a_obj_trolley.h +++ b/include/d/a/obj/d_a_obj_trolley.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TROLLEY_H #define D_A_OBJ_TROLLEY_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTrolley_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_trolley_shutter.h b/include/d/a/obj/d_a_obj_trolley_shutter.h index fcf637bc..86ea3dad 100644 --- a/include/d/a/obj/d_a_obj_trolley_shutter.h +++ b/include/d/a/obj/d_a_obj_trolley_shutter.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TROLLEY_SHUTTER_H #define D_A_OBJ_TROLLEY_SHUTTER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_door_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTrolleyShutter_c : public dAcObjDoor_c { public: diff --git a/include/d/a/obj/d_a_obj_truck.h b/include/d/a/obj/d_a_obj_truck.h index da79d00a..46628cde 100644 --- a/include/d/a/obj/d_a_obj_truck.h +++ b/include/d/a/obj/d_a_obj_truck.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TRUCK_H #define D_A_OBJ_TRUCK_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtruck_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_truck_rail_col.h b/include/d/a/obj/d_a_obj_truck_rail_col.h index 4862bda5..c707cd95 100644 --- a/include/d/a/obj/d_a_obj_truck_rail_col.h +++ b/include/d/a/obj/d_a_obj_truck_rail_col.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TRUCK_RAIL_COL_H #define D_A_OBJ_TRUCK_RAIL_COL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTruckRailCol_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_truck_stopper.h b/include/d/a/obj/d_a_obj_truck_stopper.h index bbd33d5a..6687f778 100644 --- a/include/d/a/obj/d_a_obj_truck_stopper.h +++ b/include/d/a/obj/d_a_obj_truck_stopper.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TRUCK_STOPPER_H #define D_A_OBJ_TRUCK_STOPPER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtruckStopper_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tubo.h b/include/d/a/obj/d_a_obj_tubo.h index a1e6d948..c7e56ba2 100644 --- a/include/d/a/obj/d_a_obj_tubo.h +++ b/include/d/a/obj/d_a_obj_tubo.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TUBO_H #define D_A_OBJ_TUBO_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOtubo_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tubo_big.h b/include/d/a/obj/d_a_obj_tubo_big.h index 6c7e4d15..f97a8e74 100644 --- a/include/d/a/obj/d_a_obj_tubo_big.h +++ b/include/d/a/obj/d_a_obj_tubo_big.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TUBO_BIG_H #define D_A_OBJ_TUBO_BIG_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTuboBig_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_tumble_weed.h b/include/d/a/obj/d_a_obj_tumble_weed.h index 9abd82d7..ccbb2681 100644 --- a/include/d/a/obj/d_a_obj_tumble_weed.h +++ b/include/d/a/obj/d_a_obj_tumble_weed.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_TUMBLE_WEED_H #define D_A_OBJ_TUMBLE_WEED_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOTumbleWeed_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_under_cloud.h b/include/d/a/obj/d_a_obj_under_cloud.h index 84c3eddd..a1ef2f1e 100644 --- a/include/d/a/obj/d_a_obj_under_cloud.h +++ b/include/d/a/obj/d_a_obj_under_cloud.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_UNDER_CLOUD_H #define D_A_OBJ_UNDER_CLOUD_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOunderCloud_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_underground.h b/include/d/a/obj/d_a_obj_underground.h index c7f917ef..9b77beb5 100644 --- a/include/d/a/obj/d_a_obj_underground.h +++ b/include/d/a/obj/d_a_obj_underground.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_UNDERGROUND_H #define D_A_OBJ_UNDERGROUND_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOUnderground_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_underground_switch.h b/include/d/a/obj/d_a_obj_underground_switch.h index 59828507..b751bf17 100644 --- a/include/d/a/obj/d_a_obj_underground_switch.h +++ b/include/d/a/obj/d_a_obj_underground_switch.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_UNDERGROUND_SWITCH_H #define D_A_OBJ_UNDERGROUND_SWITCH_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOUgSwitch_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_updown_lava.h b/include/d/a/obj/d_a_obj_updown_lava.h index cfa88f1e..176ce19b 100644 --- a/include/d/a/obj/d_a_obj_updown_lava.h +++ b/include/d/a/obj/d_a_obj_updown_lava.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_UPDOWN_LAVA_H #define D_A_OBJ_UPDOWN_LAVA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOupdownLava_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_uta_demo_pedest.h b/include/d/a/obj/d_a_obj_uta_demo_pedest.h index 0e39466f..ddff7a79 100644 --- a/include/d/a/obj/d_a_obj_uta_demo_pedest.h +++ b/include/d/a/obj/d_a_obj_uta_demo_pedest.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_UTA_DEMO_PEDEST_H #define D_A_OBJ_UTA_DEMO_PEDEST_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOutaDemoPedest_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_utajima.h b/include/d/a/obj/d_a_obj_utajima.h index ef06d287..da893dfd 100644 --- a/include/d/a/obj/d_a_obj_utajima.h +++ b/include/d/a/obj/d_a_obj_utajima.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_UTAJIMA_H #define D_A_OBJ_UTAJIMA_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOutajima_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_utajima_island.h b/include/d/a/obj/d_a_obj_utajima_island.h index 43ca4a8c..0341c753 100644 --- a/include/d/a/obj/d_a_obj_utajima_island.h +++ b/include/d/a/obj/d_a_obj_utajima_island.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_UTAJIMA_ISLAND_H #define D_A_OBJ_UTAJIMA_ISLAND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOutajimaIsland_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_utajima_lv2.h b/include/d/a/obj/d_a_obj_utajima_lv2.h index ca94903a..b7f2c044 100644 --- a/include/d/a/obj/d_a_obj_utajima_lv2.h +++ b/include/d/a/obj/d_a_obj_utajima_lv2.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_UTAJIMA_LV2_H #define D_A_OBJ_UTAJIMA_LV2_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOutajimaLv2_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_utajima_main_mecha.h b/include/d/a/obj/d_a_obj_utajima_main_mecha.h index 4c8f404c..6cdd3057 100644 --- a/include/d/a/obj/d_a_obj_utajima_main_mecha.h +++ b/include/d/a/obj/d_a_obj_utajima_main_mecha.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_UTAJIMA_MAIN_MECHA_H #define D_A_OBJ_UTAJIMA_MAIN_MECHA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOutajimaMainMecha_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_utajima_pedestal.h b/include/d/a/obj/d_a_obj_utajima_pedestal.h index 9f7e4d46..1f904762 100644 --- a/include/d/a/obj/d_a_obj_utajima_pedestal.h +++ b/include/d/a/obj/d_a_obj_utajima_pedestal.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_UTAJIMA_PEDESTAL_H #define D_A_OBJ_UTAJIMA_PEDESTAL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOutajimaPedestal_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_utajima_stopper.h b/include/d/a/obj/d_a_obj_utajima_stopper.h index f27792b1..ad5c81af 100644 --- a/include/d/a/obj/d_a_obj_utajima_stopper.h +++ b/include/d/a/obj/d_a_obj_utajima_stopper.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_UTAJIMA_STOPPER_H #define D_A_OBJ_UTAJIMA_STOPPER_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOutajimaStopper_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_vacu_dust.h b/include/d/a/obj/d_a_obj_vacu_dust.h index 669796ec..9b2006c9 100644 --- a/include/d/a/obj/d_a_obj_vacu_dust.h +++ b/include/d/a/obj/d_a_obj_vacu_dust.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_VACU_DUST_H #define D_A_OBJ_VACU_DUST_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOVacuDust : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_vacu_dust_parts.h b/include/d/a/obj/d_a_obj_vacu_dust_parts.h index 16f163ee..cc3eeb8b 100644 --- a/include/d/a/obj/d_a_obj_vacu_dust_parts.h +++ b/include/d/a/obj/d_a_obj_vacu_dust_parts.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_VACU_DUST_PARTS_H #define D_A_OBJ_VACU_DUST_PARTS_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOVacuDustParts_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_vd_bullet.h b/include/d/a/obj/d_a_obj_vd_bullet.h index 2ec909ed..b49a7e6d 100644 --- a/include/d/a/obj/d_a_obj_vd_bullet.h +++ b/include/d/a/obj/d_a_obj_vd_bullet.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_VD_BULLET_H #define D_A_OBJ_VD_BULLET_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcObjVdb_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_vent_fan.h b/include/d/a/obj/d_a_obj_vent_fan.h index 8ac60569..2e83c040 100644 --- a/include/d/a/obj/d_a_obj_vent_fan.h +++ b/include/d/a/obj/d_a_obj_vent_fan.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_VENT_FAN_H #define D_A_OBJ_VENT_FAN_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOventFan_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_vortex.h b/include/d/a/obj/d_a_obj_vortex.h index 6ba8a6a9..d635d020 100644 --- a/include/d/a/obj/d_a_obj_vortex.h +++ b/include/d/a/obj/d_a_obj_vortex.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_VORTEX_H #define D_A_OBJ_VORTEX_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOVortex_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_warp.h b/include/d/a/obj/d_a_obj_warp.h index 07fd77aa..1c64e61c 100644 --- a/include/d/a/obj/d_a_obj_warp.h +++ b/include/d/a/obj/d_a_obj_warp.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WARP_H #define D_A_OBJ_WARP_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOWarp_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_warp_hole.h b/include/d/a/obj/d_a_obj_warp_hole.h index 371b7d79..1df439af 100644 --- a/include/d/a/obj/d_a_obj_warp_hole.h +++ b/include/d/a/obj/d_a_obj_warp_hole.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_WARP_HOLE_H #define D_A_OBJ_WARP_HOLE_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOwarpHole_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_F100.h b/include/d/a/obj/d_a_obj_water_F100.h index ce2b33cd..a2244aa6 100644 --- a/include/d/a/obj/d_a_obj_water_F100.h +++ b/include/d/a/obj/d_a_obj_water_F100.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_WATER_F100_H #define D_A_OBJ_WATER_F100_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOwaterF100_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_igaiga.h b/include/d/a/obj/d_a_obj_water_igaiga.h index 57203837..0839b6d1 100644 --- a/include/d/a/obj/d_a_obj_water_igaiga.h +++ b/include/d/a/obj/d_a_obj_water_igaiga.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATER_IGAIGA_H #define D_A_OBJ_WATER_IGAIGA_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwaterIgaiga_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_jar.h b/include/d/a/obj/d_a_obj_water_jar.h index 13fe69c2..82ee89a3 100644 --- a/include/d/a/obj/d_a_obj_water_jar.h +++ b/include/d/a/obj/d_a_obj_water_jar.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATER_JAR_H #define D_A_OBJ_WATER_JAR_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOWaterJar_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_nut.h b/include/d/a/obj/d_a_obj_water_nut.h index 07f63cb1..9e85ca82 100644 --- a/include/d/a/obj/d_a_obj_water_nut.h +++ b/include/d/a/obj/d_a_obj_water_nut.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATER_NUT_H #define D_A_OBJ_WATER_NUT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOWaterNut_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_nut_leaf.h b/include/d/a/obj/d_a_obj_water_nut_leaf.h index 3dcabd53..319fe01b 100644 --- a/include/d/a/obj/d_a_obj_water_nut_leaf.h +++ b/include/d/a/obj/d_a_obj_water_nut_leaf.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATER_NUT_LEAF_H #define D_A_OBJ_WATER_NUT_LEAF_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOWaterNutLeaf_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_shield.h b/include/d/a/obj/d_a_obj_water_shield.h index cd21b93f..5ac54c3b 100644 --- a/include/d/a/obj/d_a_obj_water_shield.h +++ b/include/d/a/obj/d_a_obj_water_shield.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_WATER_SHIELD_H #define D_A_OBJ_WATER_SHIELD_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcOwaterShield_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_surface.h b/include/d/a/obj/d_a_obj_water_surface.h index ab22fc32..ff98f226 100644 --- a/include/d/a/obj/d_a_obj_water_surface.h +++ b/include/d/a/obj/d_a_obj_water_surface.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATER_SURFACE_H #define D_A_OBJ_WATER_SURFACE_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwaterSurface_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_water_switch.h b/include/d/a/obj/d_a_obj_water_switch.h index a7b1660d..61c12720 100644 --- a/include/d/a/obj/d_a_obj_water_switch.h +++ b/include/d/a/obj/d_a_obj_water_switch.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATER_SWITCH_H #define D_A_OBJ_WATER_SWITCH_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwaterSwitch_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_waterfall_D100.h b/include/d/a/obj/d_a_obj_waterfall_D100.h index 3ffc4fff..e519da1c 100644 --- a/include/d/a/obj/d_a_obj_waterfall_D100.h +++ b/include/d/a/obj/d_a_obj_waterfall_D100.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATERFALL_D100_H #define D_A_OBJ_WATERFALL_D100_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwaterfallD100_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_waterfall_D101.h b/include/d/a/obj/d_a_obj_waterfall_D101.h index 990099a7..ee181775 100644 --- a/include/d/a/obj/d_a_obj_waterfall_D101.h +++ b/include/d/a/obj/d_a_obj_waterfall_D101.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATERFALL_D101_H #define D_A_OBJ_WATERFALL_D101_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOWaterFallD101_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_waterfall_F102.h b/include/d/a/obj/d_a_obj_waterfall_F102.h index 9e1d5c22..907e5ecc 100644 --- a/include/d/a/obj/d_a_obj_waterfall_F102.h +++ b/include/d/a/obj/d_a_obj_waterfall_F102.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WATERFALL_F102_H #define D_A_OBJ_WATERFALL_F102_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwaterfallF102_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_wind.h b/include/d/a/obj/d_a_obj_wind.h index 8d5763d2..9ad07358 100644 --- a/include/d/a/obj/d_a_obj_wind.h +++ b/include/d/a/obj/d_a_obj_wind.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WIND_H #define D_A_OBJ_WIND_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwind_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_wind02.h b/include/d/a/obj/d_a_obj_wind02.h index 630ae632..96a3b681 100644 --- a/include/d/a/obj/d_a_obj_wind02.h +++ b/include/d/a/obj/d_a_obj_wind02.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WIND02_H #define D_A_OBJ_WIND02_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwind02_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_wind03.h b/include/d/a/obj/d_a_obj_wind03.h index 3b01d308..4ce91f21 100644 --- a/include/d/a/obj/d_a_obj_wind03.h +++ b/include/d/a/obj/d_a_obj_wind03.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WIND03_H #define D_A_OBJ_WIND03_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwind03_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_wind04.h b/include/d/a/obj/d_a_obj_wind04.h index 7c642e76..df8e31cf 100644 --- a/include/d/a/obj/d_a_obj_wind04.h +++ b/include/d/a/obj/d_a_obj_wind04.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WIND04_H #define D_A_OBJ_WIND04_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwind04_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_windmill.h b/include/d/a/obj/d_a_obj_windmill.h index c8c3d367..d9bc18d6 100644 --- a/include/d/a/obj/d_a_obj_windmill.h +++ b/include/d/a/obj/d_a_obj_windmill.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WINDMILL_H #define D_A_OBJ_WINDMILL_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwindmill_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_windmill_desert.h b/include/d/a/obj/d_a_obj_windmill_desert.h index fcdb0cdf..d7c344b2 100644 --- a/include/d/a/obj/d_a_obj_windmill_desert.h +++ b/include/d/a/obj/d_a_obj_windmill_desert.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WINDMILL_DESERT_H #define D_A_OBJ_WINDMILL_DESERT_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwindmillDesert_c : public dAcObjBase_c { public: diff --git a/include/d/a/obj/d_a_obj_wood_board.h b/include/d/a/obj/d_a_obj_wood_board.h index de3b8eda..1f6e1816 100644 --- a/include/d/a/obj/d_a_obj_wood_board.h +++ b/include/d/a/obj/d_a_obj_wood_board.h @@ -1,9 +1,9 @@ #ifndef D_A_OBJ_WOOD_BOARD_H #define D_A_OBJ_WOOD_BOARD_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dAcOwoodBoard_c : public dAcObjBase_c { public: diff --git a/include/d/col/bg/d_bg_pc.h b/include/d/col/bg/d_bg_pc.h index d5d9306b..55e2a5cd 100644 --- a/include/d/col/bg/d_bg_pc.h +++ b/include/d/col/bg/d_bg_pc.h @@ -1,7 +1,7 @@ #ifndef D_BG_PC_H #define D_BG_PC_H -#include +#include "common.h" struct sBgPc { // Size: 0x14 /* 0x00 */ u32 code0; diff --git a/include/d/col/bg/d_bg_s.h b/include/d/col/bg/d_bg_s.h index 780e3832..939c5ea1 100644 --- a/include/d/col/bg/d_bg_s.h +++ b/include/d/col/bg/d_bg_s.h @@ -143,7 +143,7 @@ class dBgS : public cBgS { static dBgS *spInstance; static const void *spSolidMatTex[31]; static const void *spScrollMapTex[5]; - typedef TList MapLineList; + typedef TList MapLineList; public: /* 0x2EF8 */ EGG::CpuTexture *mMapTexture; diff --git a/include/d/col/bg/d_bg_w.h b/include/d/col/bg/d_bg_w.h index 5317b182..287e8918 100644 --- a/include/d/col/bg/d_bg_w.h +++ b/include/d/col/bg/d_bg_w.h @@ -1,12 +1,13 @@ #ifndef D_BG_W_H #define D_BG_W_H -#include -#include -#include -#include -#include -#include +#include "common.h" +#include "d/col/bg/d_bg_plc.h" +#include "d/col/bg/d_bg_w_base.h" +#include "d/col/c/c_m3d_g_aab.h" +#include "m/m_math.h" // IWYU pragma: export +#include "rvl/MTX.h" // IWYU pragma: export + class cBgS_GrpPassChk; class cBgS_PolyPassChk; diff --git a/include/d/col/c/c_bg_s_chk.h b/include/d/col/c/c_bg_s_chk.h index c7acf88f..a03a697e 100644 --- a/include/d/col/c/c_bg_s_chk.h +++ b/include/d/col/c/c_bg_s_chk.h @@ -4,7 +4,7 @@ #include "d/col/bg/d_bg_w_base.h" #include "d/col/c/c_partition.h" #include "f/f_base.h" -#include "rvl/MTX.h" +#include "rvl/MTX.h" // IWYU pragma: export struct cBgD_Vtx_t : public nw4r::math::VEC3 {}; diff --git a/include/d/col/c/c_m3d.h b/include/d/col/c/c_m3d.h index 65a1cbf0..c148eef3 100644 --- a/include/d/col/c/c_m3d.h +++ b/include/d/col/c/c_m3d.h @@ -1,11 +1,10 @@ #ifndef C_M3D_H #define C_M3D_H +#include "common.h" +#include "math.h" #include "nw4r/math.h" -#include -#include - class cM3dGAab; class cM3dGCps; class cM3dGCyl; @@ -17,8 +16,6 @@ class cM3dGUnk; class mAng3_c; struct cM3d_Range; -struct nw4r::math::VEC3; - extern const f32 G_CM3D_F_ABS_MIN; bool cM3d_Len2dSqPntAndSegLine(f32, f32, f32, f32, f32, f32, f32 *, f32 *, f32 *); diff --git a/include/d/col/c/c_m3d_g_aab.h b/include/d/col/c/c_m3d_g_aab.h index b72425b9..2afb932f 100644 --- a/include/d/col/c/c_m3d_g_aab.h +++ b/include/d/col/c/c_m3d_g_aab.h @@ -1,11 +1,11 @@ #ifndef C_M3D_G_AAB_H #define C_M3D_G_AAB_H +#include "common.h" #include "d/col/c/c_m3d.h" #include "d/col/c/c_m3d_g_lin.h" #include "d/col/c/c_m3d_g_sph.h" -#include // Axis aligned bounding box class cM3dGAab { diff --git a/include/d/col/c/c_m3d_g_cyl.h b/include/d/col/c/c_m3d_g_cyl.h index c0c0e067..c2941280 100644 --- a/include/d/col/c/c_m3d_g_cyl.h +++ b/include/d/col/c/c_m3d_g_cyl.h @@ -1,8 +1,8 @@ #ifndef C_M3D_G_CYL_H #define C_M3D_G_CYL_H -#include -#include +#include "d/col/c/c_m3d_g_unk.h" +#include "m/m_vec.h" class cM3dGCyl { public: diff --git a/include/d/col/c/c_m3d_g_lin.h b/include/d/col/c/c_m3d_g_lin.h index a0f72aef..02cea601 100644 --- a/include/d/col/c/c_m3d_g_lin.h +++ b/include/d/col/c/c_m3d_g_lin.h @@ -1,8 +1,8 @@ #ifndef C_M3D_G_LIN_H #define C_M3D_G_LIN_H -#include -#include +#include "common.h" +#include "m/m_vec.h" class cM3dGLin { public: diff --git a/include/d/col/c/c_m3d_g_unk.h b/include/d/col/c/c_m3d_g_unk.h index 6d36035d..ea0de359 100644 --- a/include/d/col/c/c_m3d_g_unk.h +++ b/include/d/col/c/c_m3d_g_unk.h @@ -1,14 +1,14 @@ #ifndef C_M3D_G_UNK_H #define C_M3D_G_UNK_H -#include "d/col/c/c_m3d_g_cps.h" -#include "d/col/c/c_m3d_g_cyl.h" -#include "d/col/c/c_m3d_g_pla.h" -#include "d/col/c/c_m3d_g_sph.h" +#include "common.h" #include "m/m_mtx.h" #include "m/m_vec.h" -#include + +struct cM3dGCps; +struct cM3dGCyl; +struct cM3dGSph; class cM3dGUnk { public: diff --git a/include/d/col/cc/d_cc_d.h b/include/d/col/cc/d_cc_d.h index 0df7adde..aa760b75 100644 --- a/include/d/col/cc/d_cc_d.h +++ b/include/d/col/cc/d_cc_d.h @@ -1,16 +1,14 @@ #ifndef D_CC_D_H #define D_CC_D_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "d/a/d_a_base.h" +#include "d/col/c/c_m3d_g_aab.h" +#include "d/col/c/c_m3d_g_cps.h" +#include "d/col/c/c_m3d_g_cyl.h" +#include "d/col/c/c_m3d_g_sph.h" +#include "d/col/c/c_m3d_g_unk.h" +#include "f/f_base_id.h" +#include "m/m_vec.h" // Largely modeled off // https://github.com/zeldaret/tp/blob/main/include/SSystem/SComponent/c_cc_d.h diff --git a/include/d/col/cc/d_cc_mgr.h b/include/d/col/cc/d_cc_mgr.h index 4ede33d4..97fd9cfb 100644 --- a/include/d/col/cc/d_cc_mgr.h +++ b/include/d/col/cc/d_cc_mgr.h @@ -1,7 +1,7 @@ #ifndef TOSORT_D_CC_MGR_H #define TOSORT_D_CC_MGR_H -#include +#include "d/col/cc/d_cc_d.h" class ColliderManager { public: diff --git a/include/d/col/cc/d_cc_shape_colliders.h b/include/d/col/cc/d_cc_shape_colliders.h index b6806000..44b085b8 100644 --- a/include/d/col/cc/d_cc_shape_colliders.h +++ b/include/d/col/cc/d_cc_shape_colliders.h @@ -1,8 +1,8 @@ #ifndef D_CC_SHAPE_COLLIDERS_H #define D_CC_SHAPE_COLLIDERS_H -#include -#include +#include "d/col/cc/d_cc_d.h" +#include "m/m_vec.h" struct dCcD_SrcUnk { /* 0x00 */ dCcD_SrcGObjInf mObjInf; diff --git a/include/d/d_SoftwareKeyboard.h b/include/d/d_SoftwareKeyboard.h index 4bd68e01..b1511a84 100644 --- a/include/d/d_SoftwareKeyboard.h +++ b/include/d/d_SoftwareKeyboard.h @@ -1,7 +1,7 @@ #ifndef D_SOFTWAREKEYBOARD_H #define D_SOFTWAREKEYBOARD_H -#include +#include "d/d_base.h" class dSKB_c : public dBase_c { public: diff --git a/include/d/d_dvd.h b/include/d/d_dvd.h index a7addacb..d9f75cb9 100644 --- a/include/d/d_dvd.h +++ b/include/d/d_dvd.h @@ -1,14 +1,14 @@ #ifndef D_DVD_H #define D_DVD_H -#include -#include -#include +#include "common.h" +#include "egg/core/eggHeap.h" +#include "m/m_dvd.h" namespace dDvd { // difference to NSMBW: additional heap arg -void create(s32 priority, EGG::Heap*, EGG::Heap*, EGG::Heap*); +void create(s32 priority, EGG::Heap *, EGG::Heap *, EGG::Heap *); class loader_c { public: @@ -21,10 +21,10 @@ class loader_c { private: u32 mSize; mDvd_toMainRam_normal_c *mpCommand; - EGG::Heap* mpHeap; - void* mpBuffer; + EGG::Heap *mpHeap; + void *mpBuffer; }; -} // dDvd +} // namespace dDvd #endif diff --git a/include/d/d_dvd_unk.h b/include/d/d_dvd_unk.h index 080a6eb6..96ec60c3 100644 --- a/include/d/d_dvd_unk.h +++ b/include/d/d_dvd_unk.h @@ -1,8 +1,8 @@ #ifndef D_DVD_UNK_H #define D_DVD_UNK_H -#include -#include +#include "common.h" +#include "egg/core/eggHeap.h" namespace dDvdUnk { @@ -21,6 +21,6 @@ class unkstruct_c { char field_0x4; }; -} // dDvdUnk +} // namespace dDvdUnk #endif diff --git a/include/d/d_dylink.h b/include/d/d_dylink.h index 3aef764e..1b456e4c 100644 --- a/include/d/d_dylink.h +++ b/include/d/d_dylink.h @@ -1,7 +1,7 @@ #ifndef D_DYLINK_H #define D_DYLINK_H -#include +#include "common.h" class dDynamicModuleControl { public: diff --git a/include/d/d_fader.h b/include/d/d_fader.h index 244f0ef2..aa032b93 100644 --- a/include/d/d_fader.h +++ b/include/d/d_fader.h @@ -1,10 +1,10 @@ #ifndef D_FADER_H #define D_FADER_H -#include -#include -#include -#include +#include "d/lyt/d_lyt_fader.h" +#include "d/lyt/d_screen_fader.h" +#include "m/m_color_fader.h" +#include "m/m_fader.h" class dFader_c : mFader_c { public: diff --git a/include/d/d_font_manager.h b/include/d/d_font_manager.h index a6789f28..bbdd2b93 100644 --- a/include/d/d_font_manager.h +++ b/include/d/d_font_manager.h @@ -1,9 +1,8 @@ #ifndef D_FONT_MANAGER_H #define D_FONT_MANAGER_H -#include -#include - +#include "d/d_dvd.h" +#include "nw4r/ut/ut_ResFont.h" class dFontMng_c { public: diff --git a/include/d/d_heap_alloc.h b/include/d/d_heap_alloc.h index ae7e98e2..1703c6b0 100644 --- a/include/d/d_heap_alloc.h +++ b/include/d/d_heap_alloc.h @@ -1,7 +1,7 @@ #ifndef D_HEAP_ALLOC #define D_HEAP_ALLOC -#include +#include "egg/core/eggHeap.h" class dHeapAllocatorBase { public: @@ -42,8 +42,8 @@ class dHeapAllocatorBase { } virtual ~dHeapAllocatorBase() {} - virtual void onAlloc(EGG::HeapAllocArg *arg) {}; - virtual void onFree(EGG::HeapFreeArg *arg) {}; + virtual void onAlloc(EGG::HeapAllocArg *arg){}; + virtual void onFree(EGG::HeapFreeArg *arg){}; /* 0x04 */ bool mCallbacksInitialized; /* 0x08 */ EGG::HeapAllocCallback mPreviousAllocCallback; diff --git a/include/d/d_lyt_file_select.h b/include/d/d_lyt_file_select.h index 3336b115..2ee0b9d1 100644 --- a/include/d/d_lyt_file_select.h +++ b/include/d/d_lyt_file_select.h @@ -1,7 +1,7 @@ #ifndef D_LYT_FILE_SELECT_H #define D_LYT_FILE_SELECT_H -#include +#include "d/d_base.h" class dLytFileSelectMgr_c : public dBase_c { public: diff --git a/include/d/d_lyt_seeker_stone.h b/include/d/d_lyt_seeker_stone.h index 802894e9..1c2cdc19 100644 --- a/include/d/d_lyt_seeker_stone.h +++ b/include/d/d_lyt_seeker_stone.h @@ -1,9 +1,9 @@ #ifndef D_LYT_SEEKER_STONE_H #define D_LYT_SEEKER_STONE_H -#include -#include -#include +#include "d/d_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytSeekerStone_c : public dBase_c { public: diff --git a/include/d/d_lyt_title_BG.h b/include/d/d_lyt_title_BG.h index 6ca39895..339fbfe2 100644 --- a/include/d/d_lyt_title_BG.h +++ b/include/d/d_lyt_title_BG.h @@ -1,7 +1,7 @@ #ifndef D_LYT_TITLE_BG_H #define D_LYT_TITLE_BG_H -#include +#include "d/d_base.h" class dLytTitleBg_c : public dBase_c { public: diff --git a/include/d/d_player.h b/include/d/d_player.h index 0c03362b..bd6118d5 100644 --- a/include/d/d_player.h +++ b/include/d/d_player.h @@ -1,6 +1,6 @@ #ifndef D_PLAYER_H #define D_PLAYER_H -#include +#include "common.h" #endif diff --git a/include/d/d_profile.h b/include/d/d_profile.h index 69b4e2de..35e06148 100644 --- a/include/d/d_profile.h +++ b/include/d/d_profile.h @@ -1,7 +1,7 @@ #ifndef D_PROFILE_H #define D_PROFILE_H -#include +#include "f/f_profile.h" // TODO: Fix the fProfile::[profile_class_type] as it is progressed diff --git a/include/d/d_rawarchive.h b/include/d/d_rawarchive.h index 7f3f09da..7c127147 100644 --- a/include/d/d_rawarchive.h +++ b/include/d/d_rawarchive.h @@ -1,13 +1,13 @@ #ifndef D_RAWARCHIVE_H #define D_RAWARCHIVE_H -#include -#include -#include +#include "common.h" +#include "m/m_dvd.h" +#include "sized_string.h" class ArcCallbackHandlerBase { public: - ArcCallbackHandlerBase(): mPrefix(' ') {} + ArcCallbackHandlerBase() : mPrefix(' ') {} /* vtable at 8050df50 */ /** 800651c0 */ virtual void CreateArcEntry(void *data, const char *path); diff --git a/include/d/d_s_boot.h b/include/d/d_s_boot.h index ffeaacb5..7977ad22 100644 --- a/include/d/d_s_boot.h +++ b/include/d/d_s_boot.h @@ -1,9 +1,9 @@ #ifndef D_S_BOOT_H #define D_S_BOOT_H -#include -#include -#include +#include "d/d_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dScBoot_c : public dBase_c { public: diff --git a/include/d/d_title_manager.h b/include/d/d_title_manager.h index ea287c71..4d157e95 100644 --- a/include/d/d_title_manager.h +++ b/include/d/d_title_manager.h @@ -1,9 +1,9 @@ #ifndef D_TITLE_MANAGER_H #define D_TITLE_MANAGER_H -#include -#include -#include +#include "d/d_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTitleMgr_c : public dBase_c { public: diff --git a/include/d/lyt/d2d.h b/include/d/lyt/d2d.h index 72c6a7f2..0c099bb6 100644 --- a/include/d/lyt/d2d.h +++ b/include/d/lyt/d2d.h @@ -1,11 +1,12 @@ #ifndef D2D_H #define D2D_H -#include -#include -#include -#include -#include +#include "d/lyt/meter/d_lyt_meter_base.h" +#include "libms/msgfile.h" +#include "m/m2d.h" +#include "nw4r/lyt/lyt_pane.h" +#include "nw4r/lyt/lyt_picture.h" + class dTextBox_c; class dWindow_c; @@ -29,8 +30,8 @@ class Layout_c : public nw4r::lyt::Layout { public: virtual ~Layout_c() {} virtual bool Build(const void *lytResBuf, nw4r::lyt::ResourceAccessor *pResAcsr) override; - virtual nw4r::lyt::AnimTransform *CreateAnimTransform(const void *animResBuf, - nw4r::lyt::ResourceAccessor *pResAcsr) override; + virtual nw4r::lyt::AnimTransform * + CreateAnimTransform(const void *animResBuf, nw4r::lyt::ResourceAccessor *pResAcsr) override; // Bring the overloaded, otherwise shadowed functions in scope using nw4r::lyt::Layout::CreateAnimTransform; @@ -103,8 +104,9 @@ class LytBase_c : public Multi_c { bool fn_800ABCE0(const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg); bool fn_800AC040(dTextBox_c *textbox1, dTextBox_c *textbox2, int arg, void *unk); - bool fn_800AC1AC(const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg, - void *unk); + bool fn_800AC1AC( + const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg, void *unk + ); MsbtInfo *getMsbtInfo() const; bool fn_800AB930(dTextBox_c *box); @@ -112,7 +114,7 @@ class LytBase_c : public Multi_c { }; struct AnmGroupBase_c { - AnmGroupBase_c(m2d::FrameCtrl_c *frameCtrl): field_0x04(nullptr), mFlags(0), mpFrameCtrl(frameCtrl) {} + AnmGroupBase_c(m2d::FrameCtrl_c *frameCtrl) : field_0x04(nullptr), mFlags(0), mpFrameCtrl(frameCtrl) {} virtual ~AnmGroupBase_c() {} bool init(const char *fileName, m2d::ResAccIf_c *acc, d2d::Layout_c *layout, const char *animName); @@ -172,7 +174,6 @@ struct AnmGroupBase_c { } private: - /* 0x04 */ void *field_0x04; /* 0x08 */ m2d::FrameCtrl_c *mpFrameCtrl; /* 0x0C */ u8 mFlags; @@ -182,13 +183,13 @@ struct AnmGroupBase_c { }; struct AnmGroup_c : public AnmGroupBase_c { - AnmGroup_c(): AnmGroupBase_c(&mFrameCtrl) {} + AnmGroup_c() : AnmGroupBase_c(&mFrameCtrl) {} virtual ~AnmGroup_c() {} /* 0x28 */ m2d::FrameCtrl_c mFrameCtrl; }; // Probably pause menu specific -struct dLytStructB: public dLytMeterBase { +struct dLytStructB : public dLytMeterBase { dLytStructB(); ~dLytStructB(); diff --git a/include/d/lyt/d_lyt_area_caption.h b/include/d/lyt/d_lyt_area_caption.h index f9e22a8e..2ad0d280 100644 --- a/include/d/lyt/d_lyt_area_caption.h +++ b/include/d/lyt/d_lyt_area_caption.h @@ -1,10 +1,10 @@ #ifndef D_LYT_AREA_CAPTION_H #define D_LYT_AREA_CAPTION_H -#include -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_sub.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytAreaCaptionParts_c { public: diff --git a/include/d/lyt/d_lyt_battery.h b/include/d/lyt/d_lyt_battery.h index 7f198d00..92a68814 100644 --- a/include/d/lyt/d_lyt_battery.h +++ b/include/d/lyt/d_lyt_battery.h @@ -1,11 +1,11 @@ #ifndef D_LYT_BATTERY_H #define D_LYT_BATTERY_H -#include -#include -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_sub.h" +#include "d/lyt/meter/d_lyt_meter_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytBattery_c { public: diff --git a/include/d/lyt/d_lyt_common_arrow.h b/include/d/lyt/d_lyt_common_arrow.h index e8c7b31b..06ff8c07 100644 --- a/include/d/lyt/d_lyt_common_arrow.h +++ b/include/d/lyt/d_lyt_common_arrow.h @@ -1,10 +1,10 @@ #ifndef D_LYT_COMMON_ARROW_H #define D_LYT_COMMON_ARROW_H -#include -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/d_structd.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytCommonArrow_c { public: diff --git a/include/d/lyt/d_lyt_do_button.h b/include/d/lyt/d_lyt_do_button.h index 42f9bf7d..fda57472 100644 --- a/include/d/lyt/d_lyt_do_button.h +++ b/include/d/lyt/d_lyt_do_button.h @@ -1,10 +1,10 @@ #ifndef D_LYT_DO_BUTTON_H #define D_LYT_DO_BUTTON_H -#include -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_sub.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytDobutton_c { public: diff --git a/include/d/lyt/d_lyt_fader.h b/include/d/lyt/d_lyt_fader.h index 7c44185e..46750c1e 100644 --- a/include/d/lyt/d_lyt_fader.h +++ b/include/d/lyt/d_lyt_fader.h @@ -1,8 +1,8 @@ #ifndef D_LYT_FADER_H #define D_LYT_FADER_H -#include -#include +#include "d/lyt/d2d.h" +#include "m/m_fader_base.h" class dLytFader_c : public mFaderBase_c { public: diff --git a/include/d/lyt/d_lyt_pause_disp_00.h b/include/d/lyt/d_lyt_pause_disp_00.h index 6d581120..af503489 100644 --- a/include/d/lyt/d_lyt_pause_disp_00.h +++ b/include/d/lyt/d_lyt_pause_disp_00.h @@ -1,10 +1,10 @@ #ifndef LYT_PAUSE_DISP_00_H #define LYT_PAUSE_DISP_00_H -#include -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/d_structd.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytPauseDisp00_c { public: diff --git a/include/d/lyt/d_lyt_sub.h b/include/d/lyt/d_lyt_sub.h index cf19b493..a587b495 100644 --- a/include/d/lyt/d_lyt_sub.h +++ b/include/d/lyt/d_lyt_sub.h @@ -1,7 +1,7 @@ #ifndef D_LYT_SUB_H #define D_LYT_SUB_H -#include +#include "d/lyt/d2d.h" class dLytSub : public d2d::LytBase_c { public: @@ -14,10 +14,10 @@ class dLytSub : public d2d::LytBase_c { const char *getName() const { return mpName; } + private: /// This name is stored by `build` and usually accessed by dLytMeters' getName functions const char *mpName; }; - #endif diff --git a/include/d/lyt/d_screen_fader.h b/include/d/lyt/d_screen_fader.h index 26e3c388..99552b4c 100644 --- a/include/d/lyt/d_screen_fader.h +++ b/include/d/lyt/d_screen_fader.h @@ -1,7 +1,7 @@ #ifndef D_SCREEN_FADER_H #define D_SCREEN_FADER_H -#include +#include "m/m_fader_base.h" // A fader that closes and opens vertically like a camera shutter with two blades class dScreenFader_c : public mFaderBase_c { diff --git a/include/d/lyt/d_structd.h b/include/d/lyt/d_structd.h index 8499424b..3bce56e3 100644 --- a/include/d/lyt/d_structd.h +++ b/include/d/lyt/d_structd.h @@ -1,9 +1,9 @@ #ifndef D_LYT_STRUCTD_H #define D_LYT_STRUCTD_H -#include -#include -#include +#include "egg/core/eggHeap.h" +#include "nw4r/ut/ut_LinkList.h" +#include "toBeSorted/tlist.h" namespace d2d { diff --git a/include/d/lyt/d_textbox.h b/include/d/lyt/d_textbox.h index 423419ae..768cd1ed 100644 --- a/include/d/lyt/d_textbox.h +++ b/include/d/lyt/d_textbox.h @@ -1,9 +1,8 @@ #ifndef D_LYT_TEXTBOX_H #define D_LYT_TEXTBOX_H -#include -#include - +#include "d/lyt/d2d.h" +#include "nw4r/lyt/lyt_textBox.h" extern "C" void *lbl_805753B0; @@ -28,7 +27,6 @@ class dTextBox_c : public nw4r::lyt::TextBox { nw4r::lyt::TextBox::SetScale(value); } - static inline f32 GetTranslateX1() { if (lbl_805753B0 != nullptr) { return GetTranslateX1_(); @@ -46,7 +44,6 @@ class dTextBox_c : public nw4r::lyt::TextBox { // @bug: This does not implement UT's RTTI, so casts to dTextBox_c will // succeed even if all you have is a lyt::TextBox private: - void MySetScale(const nw4r::math::VEC2 &value); d2d::LytBase_c *mpLytBase; diff --git a/include/d/lyt/d_window.h b/include/d/lyt/d_window.h index ab7fed76..016e9faf 100644 --- a/include/d/lyt/d_window.h +++ b/include/d/lyt/d_window.h @@ -1,7 +1,7 @@ #ifndef D_LYT_WINDOW_H #define D_LYT_WINDOW_H -#include +#include "nw4r/lyt/lyt_window.h" class dTextBox_c; diff --git a/include/d/lyt/meter/d_lyt_meter.h b/include/d/lyt/meter/d_lyt_meter.h index 09e24e64..4c817ef5 100644 --- a/include/d/lyt/meter/d_lyt_meter.h +++ b/include/d/lyt/meter/d_lyt_meter.h @@ -1,9 +1,9 @@ #ifndef D_LYT_METER_H #define D_LYT_METER_H -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/meter/d_lyt_meter.h" +#include "d/lyt/meter/d_lyt_meter_remocon_bg.h" class dLytMeter_c { public: @@ -16,8 +16,6 @@ class dLytMeter_c { // Meters... dLytMeterRemoconBg_c mRemoCon; LytMeterGroup mMeters; - }; - #endif diff --git a/include/d/lyt/meter/d_lyt_meter_base.h b/include/d/lyt/meter/d_lyt_meter_base.h index 4591a179..c479b42f 100644 --- a/include/d/lyt/meter/d_lyt_meter_base.h +++ b/include/d/lyt/meter/d_lyt_meter_base.h @@ -1,7 +1,7 @@ #ifndef D_LYT_METER_BASE_H #define D_LYT_METER_BASE_H -#include +#include "nw4r/lyt/lyt_pane.h" namespace d2d { class ResAccIf_c; diff --git a/include/d/lyt/meter/d_lyt_meter_remocon_bg.h b/include/d/lyt/meter/d_lyt_meter_remocon_bg.h index bc11cb2e..5b1a97aa 100644 --- a/include/d/lyt/meter/d_lyt_meter_remocon_bg.h +++ b/include/d/lyt/meter/d_lyt_meter_remocon_bg.h @@ -1,11 +1,11 @@ #ifndef D_LYT_METER_REMOCON_BH_H #define D_LYT_METER_REMOCON_BH_H -#include -#include -#include -#include -#include +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_sub.h" +#include "d/lyt/meter/d_lyt_meter_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dLytMeterRemoconBg_c : public dLytMeterBase { public: @@ -18,6 +18,7 @@ class dLytMeterRemoconBg_c : public dLytMeterBase { virtual const char *getName() const override; virtual ~dLytMeterRemoconBg_c(); + private: STATE_FUNC_DECLARE(dLytMeterRemoconBg_c, Wait); STATE_FUNC_DECLARE(dLytMeterRemoconBg_c, On); diff --git a/include/d/t/d_t_D3_scene_change.h b/include/d/t/d_t_D3_scene_change.h index 9fb1734e..4f95d56d 100644 --- a/include/d/t/d_t_D3_scene_change.h +++ b/include/d/t/d_t_D3_scene_change.h @@ -1,7 +1,7 @@ #ifndef D_T_D3_SCENE_CHANGE_H #define D_T_D3_SCENE_CHANGE_H -#include +#include "d/a/d_a_base.h" class dTgD3SceneChange_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_action.h b/include/d/t/d_t_action.h index 95f6bd9b..9bd97f8d 100644 --- a/include/d/t/d_t_action.h +++ b/include/d/t/d_t_action.h @@ -1,7 +1,7 @@ #ifndef D_T_ACTION_H #define D_T_ACTION_H -#include +#include "d/a/d_a_base.h" class dTgAction_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_at0.h b/include/d/t/d_t_at0.h index 9976cf58..fe7b2e14 100644 --- a/include/d/t/d_t_at0.h +++ b/include/d/t/d_t_at0.h @@ -1,7 +1,7 @@ #ifndef D_T_AT0_H #define D_T_AT0_H -#include +#include "d/a/d_a_base.h" class dTgAt0_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_auto_message.h b/include/d/t/d_t_auto_message.h index 670571cc..d17f8dcd 100644 --- a/include/d/t/d_t_auto_message.h +++ b/include/d/t/d_t_auto_message.h @@ -1,7 +1,7 @@ #ifndef D_T_AUTO_MESSAGE_H #define D_T_AUTO_MESSAGE_H -#include +#include "d/a/d_a_base.h" class dTgAutoMessage_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_barrel.h b/include/d/t/d_t_barrel.h index 9770f11b..a1255eb4 100644 --- a/include/d/t/d_t_barrel.h +++ b/include/d/t/d_t_barrel.h @@ -1,9 +1,9 @@ #ifndef D_T_BARREL_H #define D_T_BARREL_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgBarrel_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_barrel_pos.h b/include/d/t/d_t_barrel_pos.h index 85cf0ca0..2c0ac8f0 100644 --- a/include/d/t/d_t_barrel_pos.h +++ b/include/d/t/d_t_barrel_pos.h @@ -1,7 +1,7 @@ #ifndef D_T_BARREL_POS_H #define D_T_BARREL_POS_H -#include +#include "d/a/d_a_base.h" class dTgBarrelPos_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_bb_quake.h b/include/d/t/d_t_bb_quake.h index e1bc34b0..eb62d866 100644 --- a/include/d/t/d_t_bb_quake.h +++ b/include/d/t/d_t_bb_quake.h @@ -1,9 +1,9 @@ #ifndef D_T_BB_QUAKE_H #define D_T_BB_QUAKE_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgBBQuake_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_bcal_tag.h b/include/d/t/d_t_bcal_tag.h index 5f693dcd..405b61fe 100644 --- a/include/d/t/d_t_bcal_tag.h +++ b/include/d/t/d_t_bcal_tag.h @@ -1,9 +1,9 @@ #ifndef D_T_BCAL_TAG_H #define D_T_BCAL_TAG_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgBcArL_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_bcz.h b/include/d/t/d_t_bcz.h index b3ba4ada..af50ea9c 100644 --- a/include/d/t/d_t_bcz.h +++ b/include/d/t/d_t_bcz.h @@ -1,9 +1,9 @@ #ifndef D_T_BCZ_H #define D_T_BCZ_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgBcZ_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_beetle.h b/include/d/t/d_t_beetle.h index 70ecca19..44c3ccba 100644 --- a/include/d/t/d_t_beetle.h +++ b/include/d/t/d_t_beetle.h @@ -1,7 +1,7 @@ #ifndef D_T_BEETLE_H #define D_T_BEETLE_H -#include +#include "d/a/d_a_base.h" class dTgBeetle_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_belt_obstacle.h b/include/d/t/d_t_belt_obstacle.h index 33edde68..a0a00b83 100644 --- a/include/d/t/d_t_belt_obstacle.h +++ b/include/d/t/d_t_belt_obstacle.h @@ -1,7 +1,7 @@ #ifndef D_T_BELT_OBSTACLE_H #define D_T_BELT_OBSTACLE_H -#include +#include "d/a/d_a_base.h" class dTgBeltObstacle_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_clef_game.h b/include/d/t/d_t_clef_game.h index c1a7da64..c6513670 100644 --- a/include/d/t/d_t_clef_game.h +++ b/include/d/t/d_t_clef_game.h @@ -1,7 +1,7 @@ #ifndef D_T_CLEF_GAME_H #define D_T_CLEF_GAME_H -#include +#include "d/a/d_a_base.h" class dTgClefGame_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_clef_manager.h b/include/d/t/d_t_clef_manager.h index 16570f75..e93efaa9 100644 --- a/include/d/t/d_t_clef_manager.h +++ b/include/d/t/d_t_clef_manager.h @@ -1,7 +1,7 @@ #ifndef D_T_CLEF_MANAGER_H #define D_T_CLEF_MANAGER_H -#include +#include "d/a/d_a_base.h" class dTgClefManager_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_col_bomb_shield.h b/include/d/t/d_t_col_bomb_shield.h index cbc34a0c..6df9f907 100644 --- a/include/d/t/d_t_col_bomb_shield.h +++ b/include/d/t/d_t_col_bomb_shield.h @@ -1,9 +1,9 @@ #ifndef D_T_COL_BOMB_SHIELD_H #define D_T_COL_BOMB_SHIELD_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgColBombShield : public dAcBase_c { public: diff --git a/include/d/t/d_t_defeat_boss.h b/include/d/t/d_t_defeat_boss.h index 68cd1f0a..f5415680 100644 --- a/include/d/t/d_t_defeat_boss.h +++ b/include/d/t/d_t_defeat_boss.h @@ -1,7 +1,7 @@ #ifndef D_T_DEFEAT_BOSS_H #define D_T_DEFEAT_BOSS_H -#include +#include "d/a/d_a_base.h" class dTgDefeatBoss_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_dowsing.h b/include/d/t/d_t_dowsing.h index f7d4c5aa..d85e5289 100644 --- a/include/d/t/d_t_dowsing.h +++ b/include/d/t/d_t_dowsing.h @@ -1,8 +1,8 @@ #ifndef D_T_DOWSING_H #define D_T_DOWSING_H -#include -#include +#include "d/t/d_tg.h" +#include "toBeSorted/dowsing_target.h" class dTgDowsing_c : public dTg_c { public: diff --git a/include/d/t/d_t_drum.h b/include/d/t/d_t_drum.h index 507e2134..6743ab92 100644 --- a/include/d/t/d_t_drum.h +++ b/include/d/t/d_t_drum.h @@ -1,7 +1,7 @@ #ifndef D_T_DRUM_H #define D_T_DRUM_H -#include +#include "d/a/d_a_base.h" class dTgDrum_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_dungeon_start.h b/include/d/t/d_t_dungeon_start.h index 2a094395..3546726d 100644 --- a/include/d/t/d_t_dungeon_start.h +++ b/include/d/t/d_t_dungeon_start.h @@ -1,7 +1,7 @@ #ifndef D_T_DUNGEON_START_H #define D_T_DUNGEON_START_H -#include +#include "d/a/obj/d_a_obj_base.h" class dAcDungeonStartTag_c : public dAcObjBase_c { public: diff --git a/include/d/t/d_t_effect_gen.h b/include/d/t/d_t_effect_gen.h index fd5e2d70..3d946b7b 100644 --- a/include/d/t/d_t_effect_gen.h +++ b/include/d/t/d_t_effect_gen.h @@ -1,7 +1,7 @@ #ifndef D_T_EFFECT_GEN_H #define D_T_EFFECT_GEN_H -#include +#include "d/a/d_a_base.h" class dTgEffectGen_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_fairytag.h b/include/d/t/d_t_fairytag.h index b0c963a5..f7793569 100644 --- a/include/d/t/d_t_fairytag.h +++ b/include/d/t/d_t_fairytag.h @@ -1,8 +1,8 @@ #ifndef D_T_OBJ_FAIRY_H #define D_T_OBJ_FAIRY_H -#include -#include +#include "d/a/obj/d_a_obj_fairy.h" +#include "d/t/d_tg.h" class dTgFairy_c : public dTg_c { public: diff --git a/include/d/t/d_t_fence_synchronizer.h b/include/d/t/d_t_fence_synchronizer.h index 1bbd082e..dfc279d1 100644 --- a/include/d/t/d_t_fence_synchronizer.h +++ b/include/d/t/d_t_fence_synchronizer.h @@ -1,7 +1,7 @@ #ifndef D_T_FENCE_SYNCHRONIZER_H #define D_T_FENCE_SYNCHRONIZER_H -#include +#include "d/a/d_a_base.h" class dTgFenceSynchronizer_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_gate_to_ground.h b/include/d/t/d_t_gate_to_ground.h index 1981e72e..5420b738 100644 --- a/include/d/t/d_t_gate_to_ground.h +++ b/include/d/t/d_t_gate_to_ground.h @@ -1,7 +1,7 @@ #ifndef D_T_GATE_TO_GROUND_H #define D_T_GATE_TO_GROUND_H -#include +#include "d/a/d_a_base.h" class dTgGateToGround_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_gekotag.h b/include/d/t/d_t_gekotag.h index 3b3551d5..2cb4c1cf 100644 --- a/include/d/t/d_t_gekotag.h +++ b/include/d/t/d_t_gekotag.h @@ -1,9 +1,9 @@ #ifndef D_T_GEKOTAG_H #define D_T_GEKOTAG_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgGekoTag : public dAcBase_c { public: diff --git a/include/d/t/d_t_genki_dws_tgt.h b/include/d/t/d_t_genki_dws_tgt.h index 810c5c52..e1f3a36b 100644 --- a/include/d/t/d_t_genki_dws_tgt.h +++ b/include/d/t/d_t_genki_dws_tgt.h @@ -1,8 +1,8 @@ #ifndef D_T_GENKI_DWS_TGT_H #define D_T_GENKI_DWS_TGT_H -#include -#include +#include "d/t/d_tg.h" +#include "toBeSorted/dowsing_target.h" class dTgGenkiDwsTgt_c : public dTg_c { public: @@ -13,7 +13,6 @@ class dTgGenkiDwsTgt_c : public dTg_c { virtual int doDelete() override; virtual int actorExecute() override; - private: u16 getSceneFlagFromParams(); diff --git a/include/d/t/d_t_group_summon.h b/include/d/t/d_t_group_summon.h index a845a226..f1f25e65 100644 --- a/include/d/t/d_t_group_summon.h +++ b/include/d/t/d_t_group_summon.h @@ -1,9 +1,9 @@ #ifndef D_T_GROUP_SUMMON_H #define D_T_GROUP_SUMMON_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgGroupSummon_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_group_test.h b/include/d/t/d_t_group_test.h index 69cd5c58..ad49ed89 100644 --- a/include/d/t/d_t_group_test.h +++ b/include/d/t/d_t_group_test.h @@ -1,9 +1,9 @@ #ifndef D_T_GROUP_TEST_H #define D_T_GROUP_TEST_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgGroupTest_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_harp.h b/include/d/t/d_t_harp.h index d3cffa65..16a0a5bc 100644 --- a/include/d/t/d_t_harp.h +++ b/include/d/t/d_t_harp.h @@ -1,9 +1,9 @@ #ifndef D_T_HARP_H #define D_T_HARP_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgHarp_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_heat_resist.h b/include/d/t/d_t_heat_resist.h index ce7c380d..4cd6a0c1 100644 --- a/include/d/t/d_t_heat_resist.h +++ b/include/d/t/d_t_heat_resist.h @@ -1,7 +1,7 @@ #ifndef D_T_HEAT_RESIST_H #define D_T_HEAT_RESIST_H -#include +#include "d/a/d_a_base.h" class dTgHeatResist_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_holy_water.h b/include/d/t/d_t_holy_water.h index ab4f314d..d31fcada 100644 --- a/include/d/t/d_t_holy_water.h +++ b/include/d/t/d_t_holy_water.h @@ -1,8 +1,8 @@ #ifndef D_T_HOLY_WATER_H #define D_T_HOLY_WATER_H -#include -#include +#include "d/t/d_tg.h" +#include "toBeSorted/dowsing_target.h" class dTgHolyWater_c : public dTg_c { public: diff --git a/include/d/t/d_t_insect.h b/include/d/t/d_t_insect.h index 72c24d89..25287d12 100644 --- a/include/d/t/d_t_insect.h +++ b/include/d/t/d_t_insect.h @@ -1,9 +1,9 @@ #ifndef D_T_INSECT_H #define D_T_INSECT_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgInsect_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_ks.h b/include/d/t/d_t_ks.h index fb225b27..23e51bda 100644 --- a/include/d/t/d_t_ks.h +++ b/include/d/t/d_t_ks.h @@ -1,9 +1,9 @@ #ifndef D_T_KS_H #define D_T_KS_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgKiesuTag_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_kytag.h b/include/d/t/d_t_kytag.h index ee5d0853..3fcdf765 100644 --- a/include/d/t/d_t_kytag.h +++ b/include/d/t/d_t_kytag.h @@ -1,9 +1,9 @@ #ifndef D_T_KYTAG_H #define D_T_KYTAG_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dKytagTag_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_lb_thunder.h b/include/d/t/d_t_lb_thunder.h index 2ab6094f..1a9cf564 100644 --- a/include/d/t/d_t_lb_thunder.h +++ b/include/d/t/d_t_lb_thunder.h @@ -1,7 +1,7 @@ #ifndef D_T_LB_THUNDER_H #define D_T_LB_THUNDER_H -#include +#include "d/a/d_a_base.h" class dTgLbThunder_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_light_shaft_eff.h b/include/d/t/d_t_light_shaft_eff.h index 26cc1771..eda6ebde 100644 --- a/include/d/t/d_t_light_shaft_eff.h +++ b/include/d/t/d_t_light_shaft_eff.h @@ -1,7 +1,7 @@ #ifndef D_T_LIGHT_SHAFT_EFF_H #define D_T_LIGHT_SHAFT_EFF_H -#include +#include "d/t/d_tg.h" class dTgLightShaftEff_c : public dTg_c { public: diff --git a/include/d/t/d_t_map_inst.h b/include/d/t/d_t_map_inst.h index 23c1dd78..c33ac9fd 100644 --- a/include/d/t/d_t_map_inst.h +++ b/include/d/t/d_t_map_inst.h @@ -1,7 +1,7 @@ #ifndef D_T_MAP_INST_H #define D_T_MAP_INST_H -#include +#include "d/t/d_tg.h" class dTgMapInst_c : public dTg_c { public: diff --git a/include/d/t/d_t_map_mark.h b/include/d/t/d_t_map_mark.h index 9cebe743..217bfcf5 100644 --- a/include/d/t/d_t_map_mark.h +++ b/include/d/t/d_t_map_mark.h @@ -1,7 +1,7 @@ #ifndef D_T_MAP_MARK_H #define D_T_MAP_MARK_H -#include +#include "d/a/d_a_base.h" class dTgMapMark_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_megami_diving.h b/include/d/t/d_t_megami_diving.h index bbeb8ee4..4f0005ed 100644 --- a/include/d/t/d_t_megami_diving.h +++ b/include/d/t/d_t_megami_diving.h @@ -1,7 +1,7 @@ #ifndef D_T_MEGAMI_DIVING_H #define D_T_MEGAMI_DIVING_H -#include +#include "d/a/d_a_base.h" class dTgMegamiDiving_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_miechan.h b/include/d/t/d_t_miechan.h index d43ed94c..7f4b24db 100644 --- a/include/d/t/d_t_miechan.h +++ b/include/d/t/d_t_miechan.h @@ -1,9 +1,9 @@ #ifndef D_T_MIECHAN_H #define D_T_MIECHAN_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgMiechan_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_minigame_insect_capture.h b/include/d/t/d_t_minigame_insect_capture.h index 257cc6a6..a9b17361 100644 --- a/include/d/t/d_t_minigame_insect_capture.h +++ b/include/d/t/d_t_minigame_insect_capture.h @@ -1,7 +1,7 @@ #ifndef D_T_MINIGAME_INSECT_CAPTURE_H #define D_T_MINIGAME_INSECT_CAPTURE_H -#include +#include "d/a/d_a_base.h" class dTgMinigameInsectCapture_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_mist.h b/include/d/t/d_t_mist.h index 3c9a33c3..faee54ad 100644 --- a/include/d/t/d_t_mist.h +++ b/include/d/t/d_t_mist.h @@ -1,9 +1,9 @@ #ifndef D_T_MIST_H #define D_T_MIST_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dMistTag_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_mole_mgr.h b/include/d/t/d_t_mole_mgr.h index 77c74a21..b984471b 100644 --- a/include/d/t/d_t_mole_mgr.h +++ b/include/d/t/d_t_mole_mgr.h @@ -1,7 +1,7 @@ #ifndef D_T_MOLE_MGR_H #define D_T_MOLE_MGR_H -#include +#include "d/a/d_a_base.h" class dTgMoleMgr_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_mole_prohibit.h b/include/d/t/d_t_mole_prohibit.h index 3bc8c976..b8391ffd 100644 --- a/include/d/t/d_t_mole_prohibit.h +++ b/include/d/t/d_t_mole_prohibit.h @@ -1,9 +1,9 @@ #ifndef D_T_MOLE_PROHIBIT_H #define D_T_MOLE_PROHIBIT_H -#include -#include -#include +#include "d/t/d_tg.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgMoleProhibit_c : public dTg_c { public: diff --git a/include/d/t/d_t_musasabi.h b/include/d/t/d_t_musasabi.h index a0e3f501..4086bcdb 100644 --- a/include/d/t/d_t_musasabi.h +++ b/include/d/t/d_t_musasabi.h @@ -1,7 +1,7 @@ #ifndef D_T_MUSASABI_H #define D_T_MUSASABI_H -#include +#include "d/a/d_a_base.h" class dTgMusasabi_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_musou.h b/include/d/t/d_t_musou.h index a9c55cee..aab7d821 100644 --- a/include/d/t/d_t_musou.h +++ b/include/d/t/d_t_musou.h @@ -1,7 +1,7 @@ #ifndef D_T_MUSOU_H #define D_T_MUSOU_H -#include +#include "d/a/d_a_base.h" class dTgMusou_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_noeffect_area.h b/include/d/t/d_t_noeffect_area.h index 4fa1f8f2..edf37099 100644 --- a/include/d/t/d_t_noeffect_area.h +++ b/include/d/t/d_t_noeffect_area.h @@ -1,9 +1,9 @@ #ifndef D_T_NOEFFECT_AREA_H #define D_T_NOEFFECT_AREA_H -#include -#include -#include +#include "d/t/d_tg.h" +#include "f/f_list_mg.h" +#include "m/m_mtx.h" class dTgNoEffectArea_c : public dTg_c { public: diff --git a/include/d/t/d_t_player_restart.h b/include/d/t/d_t_player_restart.h index bea035d1..0d539ff8 100644 --- a/include/d/t/d_t_player_restart.h +++ b/include/d/t/d_t_player_restart.h @@ -1,7 +1,7 @@ #ifndef D_T_PLAYER_RESTART_H #define D_T_PLAYER_RESTART_H -#include +#include "d/a/d_a_base.h" class dTgPlayerRestart_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_plight.h b/include/d/t/d_t_plight.h index 41da7e15..c41977ee 100644 --- a/include/d/t/d_t_plight.h +++ b/include/d/t/d_t_plight.h @@ -1,7 +1,7 @@ #ifndef D_T_PLIGHT_H #define D_T_PLIGHT_H -#include +#include "d/a/d_a_base.h" class dTgPlight_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_pltchg.h b/include/d/t/d_t_pltchg.h index e2be2872..8746c34f 100644 --- a/include/d/t/d_t_pltchg.h +++ b/include/d/t/d_t_pltchg.h @@ -1,7 +1,7 @@ #ifndef D_T_PLTCHG_H #define D_T_PLTCHG_H -#include +#include "d/a/d_a_base.h" class dTgPltchg_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_pumpkin_clay.h b/include/d/t/d_t_pumpkin_clay.h index 59822bde..939f4e88 100644 --- a/include/d/t/d_t_pumpkin_clay.h +++ b/include/d/t/d_t_pumpkin_clay.h @@ -1,9 +1,9 @@ #ifndef D_T_PUMPKIN_CLAY_H #define D_T_PUMPKIN_CLAY_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgPumpkinClay_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_reaction.h b/include/d/t/d_t_reaction.h index 43fbca63..5c2d344e 100644 --- a/include/d/t/d_t_reaction.h +++ b/include/d/t/d_t_reaction.h @@ -1,11 +1,11 @@ #ifndef D_T_REACTION_H #define D_T_REACTION_H -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/cc/d_cc_shape_colliders.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" +#include "toBeSorted/dowsing_target.h" class dTgReaction_c : public dAcObjBase_c { public: diff --git a/include/d/t/d_t_restart_time_stone.h b/include/d/t/d_t_restart_time_stone.h index 2f050775..1dbb5a2b 100644 --- a/include/d/t/d_t_restart_time_stone.h +++ b/include/d/t/d_t_restart_time_stone.h @@ -1,7 +1,7 @@ #ifndef D_T_RESTART_TIME_STONE_H #define D_T_RESTART_TIME_STONE_H -#include +#include "d/a/d_a_base.h" class dTgRestartTimeStone_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_ride_rock_set.h b/include/d/t/d_t_ride_rock_set.h index 7d513e43..ade6bbdd 100644 --- a/include/d/t/d_t_ride_rock_set.h +++ b/include/d/t/d_t_ride_rock_set.h @@ -1,7 +1,7 @@ #ifndef D_T_RIDE_ROCK_SET_H #define D_T_RIDE_ROCK_SET_H -#include +#include "d/a/d_a_base.h" class dTgRideRockSet_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_ro_at_target_manager.h b/include/d/t/d_t_ro_at_target_manager.h index a6d74973..ac617a33 100644 --- a/include/d/t/d_t_ro_at_target_manager.h +++ b/include/d/t/d_t_ro_at_target_manager.h @@ -1,7 +1,7 @@ #ifndef D_T_RO_AT_TARGET_MANAGER_H #define D_T_RO_AT_TARGET_MANAGER_H -#include +#include "d/a/d_a_base.h" class dTgRoAtTargetManager_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_rock_boat.h b/include/d/t/d_t_rock_boat.h index 99a730b2..8e251387 100644 --- a/include/d/t/d_t_rock_boat.h +++ b/include/d/t/d_t_rock_boat.h @@ -1,10 +1,10 @@ #ifndef D_T_ROCK_BOAT #define D_T_ROCK_BOAT -#include -#include -#include -#include +#include "d/t/d_tg.h" +#include "f/f_list_nd.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgRockBoat_c : public dTg_c { public: diff --git a/include/d/t/d_t_roll_attack_log.h b/include/d/t/d_t_roll_attack_log.h index 0451306b..e87992d8 100644 --- a/include/d/t/d_t_roll_attack_log.h +++ b/include/d/t/d_t_roll_attack_log.h @@ -1,9 +1,9 @@ #ifndef D_T_ROLL_ATTACK_LOG_H #define D_T_ROLL_ATTACK_LOG_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgRollAttackLog_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_scene_change.h b/include/d/t/d_t_scene_change.h index c34b6bc3..dfaca1b2 100644 --- a/include/d/t/d_t_scene_change.h +++ b/include/d/t/d_t_scene_change.h @@ -1,7 +1,7 @@ #ifndef D_T_SCENE_CHANGE_H #define D_T_SCENE_CHANGE_H -#include +#include "d/a/d_a_base.h" class dTgSceneChange_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_ship_flood.h b/include/d/t/d_t_ship_flood.h index 0d3a9743..914369d1 100644 --- a/include/d/t/d_t_ship_flood.h +++ b/include/d/t/d_t_ship_flood.h @@ -1,9 +1,9 @@ #ifndef D_T_SHIP_FLOOD_H #define D_T_SHIP_FLOOD_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgShipFlood_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_ship_slope.h b/include/d/t/d_t_ship_slope.h index c8658205..1cb215b6 100644 --- a/include/d/t/d_t_ship_slope.h +++ b/include/d/t/d_t_ship_slope.h @@ -1,9 +1,9 @@ #ifndef D_T_SHIP_SLOPE_H #define D_T_SHIP_SLOPE_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgShipSlope_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_ship_window.h b/include/d/t/d_t_ship_window.h index 0e5d85a8..325505e6 100644 --- a/include/d/t/d_t_ship_window.h +++ b/include/d/t/d_t_ship_window.h @@ -1,10 +1,10 @@ #ifndef D_T_SHIP_WINDOW_H #define D_T_SHIP_WINDOW_H -#include -#include -#include -#include +#include "d/t/d_tg.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" +#include "toBeSorted/actor_event.h" class dTgShipWindow_c : public dTg_c { public: diff --git a/include/d/t/d_t_shutter_fence_forbiddance.h b/include/d/t/d_t_shutter_fence_forbiddance.h index 1fc4f9a7..fed5dab1 100644 --- a/include/d/t/d_t_shutter_fence_forbiddance.h +++ b/include/d/t/d_t_shutter_fence_forbiddance.h @@ -1,7 +1,7 @@ #ifndef D_T_SHUTTER_FENCE_FORBIDDANCE_H #define D_T_SHUTTER_FENCE_FORBIDDANCE_H -#include +#include "d/a/d_a_base.h" class dTgShutterFenceForbiddance_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_shutter_fence_permission.h b/include/d/t/d_t_shutter_fence_permission.h index ebe5bc02..56316505 100644 --- a/include/d/t/d_t_shutter_fence_permission.h +++ b/include/d/t/d_t_shutter_fence_permission.h @@ -1,7 +1,7 @@ #ifndef D_T_SHUTTER_FENCE_PERMISSION_H #define D_T_SHUTTER_FENCE_PERMISSION_H -#include +#include "d/a/d_a_base.h" class dTgShutterFencePermission_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_siren_time_attack.h b/include/d/t/d_t_siren_time_attack.h index de87b943..d398ba07 100644 --- a/include/d/t/d_t_siren_time_attack.h +++ b/include/d/t/d_t_siren_time_attack.h @@ -1,9 +1,9 @@ #ifndef D_T_SIREN_TIME_ATTACK_H #define D_T_SIREN_TIME_ATTACK_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgSirenTimeAttack_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_skyEnemy.h b/include/d/t/d_t_skyEnemy.h index e86cc9e9..f3361b97 100644 --- a/include/d/t/d_t_skyEnemy.h +++ b/include/d/t/d_t_skyEnemy.h @@ -1,9 +1,9 @@ #ifndef D_T_SKYENEMY_H #define D_T_SKYENEMY_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgSkyEnemyTag : public dAcBase_c { public: diff --git a/include/d/t/d_t_sound.h b/include/d/t/d_t_sound.h index 3cacf034..8de31c07 100644 --- a/include/d/t/d_t_sound.h +++ b/include/d/t/d_t_sound.h @@ -1,7 +1,7 @@ #ifndef D_T_SOUND_H #define D_T_SOUND_H -#include +#include "d/a/d_a_base.h" class dTgSound_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_sound_area.h b/include/d/t/d_t_sound_area.h index 0df0b6d8..377adee4 100644 --- a/include/d/t/d_t_sound_area.h +++ b/include/d/t/d_t_sound_area.h @@ -1,11 +1,10 @@ #ifndef D_T_SOUND_AREA_H #define D_T_SOUND_AREA_H -#include -#include -#include -#include - +#include "d/t/d_tg.h" +#include "m/m_mtx.h" +#include "m/m_vec.h" +#include "toBeSorted/actor_on_rail.h" class dTgSndAr_c : public dTg_c { public: diff --git a/include/d/t/d_t_sound_area_mgr.h b/include/d/t/d_t_sound_area_mgr.h index 05cfb17f..407bb180 100644 --- a/include/d/t/d_t_sound_area_mgr.h +++ b/include/d/t/d_t_sound_area_mgr.h @@ -1,7 +1,7 @@ #ifndef D_T_SOUND_AREA_MGR_H #define D_T_SOUND_AREA_MGR_H -#include +#include "d/t/d_tg.h" class dTgSndMg_c : public dTg_c { public: @@ -16,7 +16,6 @@ class dTgSndMg_c : public dTg_c { virtual int doDelete() override; virtual int create() override; - static dTgSndMg_c *sInstance; void setBgmFlag(int flag) { diff --git a/include/d/t/d_t_sparks.h b/include/d/t/d_t_sparks.h index 5a68b1e5..55fd6d8f 100644 --- a/include/d/t/d_t_sparks.h +++ b/include/d/t/d_t_sparks.h @@ -1,9 +1,9 @@ #ifndef D_T_SPARKS_H #define D_T_SPARKS_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgSparksTag : public dAcBase_c { public: diff --git a/include/d/t/d_t_sparks2.h b/include/d/t/d_t_sparks2.h index 24266a13..21e1defc 100644 --- a/include/d/t/d_t_sparks2.h +++ b/include/d/t/d_t_sparks2.h @@ -1,9 +1,9 @@ #ifndef D_T_SPARKS2_H #define D_T_SPARKS2_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dSparks2Tag_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_spore.h b/include/d/t/d_t_spore.h index 6e166b75..492aa9f0 100644 --- a/include/d/t/d_t_spore.h +++ b/include/d/t/d_t_spore.h @@ -1,9 +1,9 @@ #ifndef D_T_SPORE_H #define D_T_SPORE_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dSporeTag_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_stream.h b/include/d/t/d_t_stream.h index e96b13fb..76d077e6 100644 --- a/include/d/t/d_t_stream.h +++ b/include/d/t/d_t_stream.h @@ -1,7 +1,7 @@ #ifndef D_T_STREAM_H #define D_T_STREAM_H -#include +#include "d/a/d_a_base.h" class dTgStream_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_sw_area.h b/include/d/t/d_t_sw_area.h index a0edcc61..d1c777af 100644 --- a/include/d/t/d_t_sw_area.h +++ b/include/d/t/d_t_sw_area.h @@ -1,7 +1,7 @@ #ifndef D_T_SW_AREA_H #define D_T_SW_AREA_H -#include +#include "d/a/d_a_base.h" class dTgSwArea_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_switch.h b/include/d/t/d_t_switch.h index ff17538a..4a48fd18 100644 --- a/include/d/t/d_t_switch.h +++ b/include/d/t/d_t_switch.h @@ -1,10 +1,10 @@ #ifndef D_T_SWITCH_H #define D_T_SWITCH_H -#include -#include -#include -#include +#include "d/t/d_tg.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" +#include "toBeSorted/actor_event.h" class dTgSw_c : public dTg_c { public: diff --git a/include/d/t/d_t_sword_battle_game.h b/include/d/t/d_t_sword_battle_game.h index e4a90ccf..cfe7ff90 100644 --- a/include/d/t/d_t_sword_battle_game.h +++ b/include/d/t/d_t_sword_battle_game.h @@ -1,9 +1,9 @@ #ifndef D_T_SWORD_BATTLE_GAME_H #define D_T_SWORD_BATTLE_GAME_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgSwordBattleGame_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_tackle.h b/include/d/t/d_t_tackle.h index 87afbfe8..6223be6a 100644 --- a/include/d/t/d_t_tackle.h +++ b/include/d/t/d_t_tackle.h @@ -1,7 +1,7 @@ #ifndef D_T_TACKLE_H #define D_T_TACKLE_H -#include +#include "d/t/d_tg.h" class dTgTackle_c : public dTg_c { public: diff --git a/include/d/t/d_t_telop.h b/include/d/t/d_t_telop.h index 657066ac..b0852527 100644 --- a/include/d/t/d_t_telop.h +++ b/include/d/t/d_t_telop.h @@ -1,7 +1,7 @@ #ifndef D_T_TELOP_H #define D_T_TELOP_H -#include +#include "d/a/d_a_base.h" class dTgTelop_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_time_area_check.h b/include/d/t/d_t_time_area_check.h index ccb1de73..ba85e7c1 100644 --- a/include/d/t/d_t_time_area_check.h +++ b/include/d/t/d_t_time_area_check.h @@ -1,7 +1,7 @@ #ifndef D_T_TIME_AREA_CHECK_H #define D_T_TIME_AREA_CHECK_H -#include +#include "d/t/d_tg.h" class dTgTimeAreaCheck_c : public dTg_c { public: diff --git a/include/d/t/d_t_time_door_beam.h b/include/d/t/d_t_time_door_beam.h index bf90220f..380f82f4 100644 --- a/include/d/t/d_t_time_door_beam.h +++ b/include/d/t/d_t_time_door_beam.h @@ -1,7 +1,7 @@ #ifndef D_T_TIME_DOOR_BEAM_H #define D_T_TIME_DOOR_BEAM_H -#include +#include "d/a/d_a_base.h" class dTgTimeDoorBeam_c : public dAcBase_c { public: diff --git a/include/d/t/d_t_timer.h b/include/d/t/d_t_timer.h index 997a458f..f15dffab 100644 --- a/include/d/t/d_t_timer.h +++ b/include/d/t/d_t_timer.h @@ -1,8 +1,8 @@ #ifndef D_T_TIMER_H #define D_T_TIMER_H -#include -#include +#include "d/a/d_a_base.h" +#include "d/t/d_tg.h" class dTgTimer_c : public dTg_c { public: diff --git a/include/d/t/d_t_touch.h b/include/d/t/d_t_touch.h index 71b5913a..c9904072 100644 --- a/include/d/t/d_t_touch.h +++ b/include/d/t/d_t_touch.h @@ -1,10 +1,10 @@ #ifndef D_T_TOUCH_H #define D_T_TOUCH_H -#include -#include -#include -#include +#include "d/t/d_tg.h" +#include "m/m_mtx.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgTouchTag : public dTg_c { public: diff --git a/include/d/t/d_t_tumble_weed.h b/include/d/t/d_t_tumble_weed.h index d905266c..ae343f17 100644 --- a/include/d/t/d_t_tumble_weed.h +++ b/include/d/t/d_t_tumble_weed.h @@ -1,10 +1,10 @@ #ifndef D_T_TUMBLE_WEED_H #define D_T_TUMBLE_WEED_H -#include -#include -#include -#include +#include "d/t/d_tg.h" +#include "f/f_list_nd.h" +#include "s/s_State.hpp" +#include "s/s_StateMgr.hpp" class dTgTumbleWeed_c : public dTg_c { public: diff --git a/include/d/t/d_tg.h b/include/d/t/d_tg.h index 6f8f519e..4aa87822 100644 --- a/include/d/t/d_tg.h +++ b/include/d/t/d_tg.h @@ -1,7 +1,7 @@ #ifndef D_TG_H #define D_TG_H -#include +#include "d/a/d_a_base.h" class dTg_c : public dAcBase_c { public: diff --git a/include/decomp.h b/include/decomp.h deleted file mode 100644 index 577ffdbd..00000000 --- a/include/decomp.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Codewarrior tricks for matching decomp - * (Macros generate prototypes to satisfy -requireprotos) - */ - -#ifndef DECOMP_H -#define DECOMP_H - -#define __CONCAT(x, y) x##y -#define CONCAT(x, y) __CONCAT(x, y) - -// Compile without matching hacks. -#ifdef NON_MATCHING -#define DECOMP_FORCEACTIVE(module, ...) -#define DECOMP_FORCELITERAL(module, x) -#define DECOMP_FORCEDTOR(module, cls) -#define DECOMP_INLINE -#define DECOMP_DONT_INLINE -// Compile with matching hacks. -// (This version of CW does not support pragmas inside macros.) -#else -// Force reference specific data -#define DECOMP_FORCEACTIVE(module, ...) \ - void fake_function(...); \ - void CONCAT(FORCEACTIVE##module, __LINE__)(void); \ - void CONCAT(FORCEACTIVE##module, __LINE__)(void) { \ - fake_function(__VA_ARGS__); \ - } - -// Force literal ordering, such as floats in sdata2 -#define DECOMP_FORCELITERAL(module, ...) \ - void CONCAT(FORCELITERAL##module, __LINE__)(void); \ - void CONCAT(FORCELITERAL##module, __LINE__)(void) { \ - (__VA_ARGS__); \ - } - -// Force reference destructor -#define DECOMP_FORCEDTOR(module, cls) \ - void CONCAT(FORCEDTOR##module##cls, __LINE__)(void) { \ - cls dummy; \ - dummy.~cls(); \ - } -#define DECOMP_INLINE inline -#define DECOMP_DONT_INLINE __attribute__((never_inline)) -#endif - -#endif diff --git a/include/egg/audio/eggAudioArcPlayerMgr.h b/include/egg/audio/eggAudioArcPlayerMgr.h index a68ea608..49673250 100644 --- a/include/egg/audio/eggAudioArcPlayerMgr.h +++ b/include/egg/audio/eggAudioArcPlayerMgr.h @@ -1,12 +1,12 @@ #ifndef EGG_AUDIO_ARC_PLAYER_MANAGER_H #define EGG_AUDIO_ARC_PLAYER_MANAGER_H -#include -#include -#include -#include -#include -#include +#include "common.h" +#include "nw4r/snd/snd_DvdSoundArchive.h" +#include "nw4r/snd/snd_MemorySoundArchive.h" +#include "nw4r/snd/snd_NandSoundArchive.h" +#include "nw4r/snd/snd_SoundArchivePlayer.h" +#include "nw4r/snd/snd_SoundHeap.h" namespace EGG { diff --git a/include/egg/audio/eggAudioHeapMgr.h b/include/egg/audio/eggAudioHeapMgr.h index 577bdc5c..fa8ef361 100644 --- a/include/egg/audio/eggAudioHeapMgr.h +++ b/include/egg/audio/eggAudioHeapMgr.h @@ -1,8 +1,8 @@ #ifndef EGG_AUDIO_HEAP_MANAGER_H #define EGG_AUDIO_HEAP_MANAGER_H -#include -#include +#include "egg/core/eggAllocator.h" +#include "nw4r/snd/snd_SoundHeap.h" namespace EGG { diff --git a/include/egg/audio/eggAudioRmtSpeakerMgr.h b/include/egg/audio/eggAudioRmtSpeakerMgr.h index f33d0a8d..80c8df82 100644 --- a/include/egg/audio/eggAudioRmtSpeakerMgr.h +++ b/include/egg/audio/eggAudioRmtSpeakerMgr.h @@ -1,8 +1,9 @@ #ifndef EGG_AUDIO_REMOTE_SPEAKER_MANAGER_H #define EGG_AUDIO_REMOTE_SPEAKER_MANAGER_H -#include -#include +#include "common.h" +#include "rvl/WPAD.h" // IWYU pragma: export + namespace EGG { diff --git a/include/egg/audio/eggAudioSystem.h b/include/egg/audio/eggAudioSystem.h index b0e2f4a2..69791333 100644 --- a/include/egg/audio/eggAudioSystem.h +++ b/include/egg/audio/eggAudioSystem.h @@ -1,7 +1,7 @@ #ifndef EGG_AUDIO_SYSTEM_H #define EGG_AUDIO_SYSTEM_H -#include +#include "common.h" namespace EGG { diff --git a/include/egg/audio/eggAudioUtility.h b/include/egg/audio/eggAudioUtility.h index 6152d219..6a56ea66 100644 --- a/include/egg/audio/eggAudioUtility.h +++ b/include/egg/audio/eggAudioUtility.h @@ -1,9 +1,9 @@ #ifndef EGG_AUDIO_ARC_UTILITY_H #define EGG_AUDIO_ARC_UTILITY_H -#include -#include -#include +#include "common.h" +#include "egg/audio/eggAudioMgr.h" +#include "nw4r/ut/ut_list.h" namespace EGG { diff --git a/include/egg/core/eggAllocator.h b/include/egg/core/eggAllocator.h index 4526e8ca..4d9978c6 100644 --- a/include/egg/core/eggAllocator.h +++ b/include/egg/core/eggAllocator.h @@ -1,8 +1,9 @@ #ifndef EGG_ALLOCATOR_H #define EGG_ALLOCATOR_H -#include "rvl/MEM.h" -#include +#include "common.h" +#include "rvl/MEM.h" // IWYU pragma: export + void MEMInitAllocatorFor_Heap(MEMAllocator *alloc, s32 align, void *heap); diff --git a/include/egg/core/eggArchive.h b/include/egg/core/eggArchive.h index d37c3d24..69e8ec01 100644 --- a/include/egg/core/eggArchive.h +++ b/include/egg/core/eggArchive.h @@ -1,11 +1,11 @@ #ifndef EGG_ARCHIVE_H #define EGG_ARCHIVE_H +#include "common.h" #include "egg/core/eggDisposer.h" -#include "rvl/ARC.h" -#include "rvl/NAND.h" +#include "rvl/ARC.h" // IWYU pragma: export +#include "rvl/NAND.h" // IWYU pragma: export -#include typedef void (*FileCallbackFunc)(void *, void *, const ARCDirEntry *, const char *); diff --git a/include/egg/core/eggAssertHeap.h b/include/egg/core/eggAssertHeap.h index 0cacafc6..bc1c729a 100644 --- a/include/egg/core/eggAssertHeap.h +++ b/include/egg/core/eggAssertHeap.h @@ -1,9 +1,9 @@ #ifndef EGG_ASSERT_HEAP_H #define EGG_ASSERT_HEAP_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/core/eggAsyncDisplay.h b/include/egg/core/eggAsyncDisplay.h index 20991a20..6f33d793 100644 --- a/include/egg/core/eggAsyncDisplay.h +++ b/include/egg/core/eggAsyncDisplay.h @@ -1,9 +1,9 @@ #ifndef EGG_ASYNC_DISPLAY_H #define EGG_ASYNC_DISPLAY_H +#include "common.h" #include "egg/core/eggDisplay.h" -#include namespace EGG { diff --git a/include/egg/core/eggColorFader.h b/include/egg/core/eggColorFader.h index ed6df394..2b8f609c 100644 --- a/include/egg/core/eggColorFader.h +++ b/include/egg/core/eggColorFader.h @@ -1,11 +1,11 @@ #ifndef EGG_COLOR_FADER_H #define EGG_COLOR_FADER_H +#include "common.h" #include "egg/core/eggFader.h" #include "egg/prim/eggBitFlag.h" #include "nw4r/ut.h" -#include namespace EGG { diff --git a/include/egg/core/eggController.h b/include/egg/core/eggController.h index 16911869..e7d21300 100644 --- a/include/egg/core/eggController.h +++ b/include/egg/core/eggController.h @@ -1,16 +1,15 @@ #ifndef EGG_CONTROLLER_H #define EGG_CONTROLLER_H -#include "egg/math/eggMath.h" +#include "common.h" #include "egg/math/eggMatrix.h" #include "egg/math/eggVector.h" #include "egg/prim/eggBitFlag.h" #include "egg/prim/eggBuffer.h" -#include "rvl/KPAD.h" -#include "rvl/PAD.h" -#include "rvl/WPAD.h" +#include "rvl/KPAD.h" // IWYU pragma: exports +#include "rvl/PAD.h" // IWYU pragma: exports +#include "rvl/WPAD.h" // IWYU pragma: exports -#include namespace EGG { diff --git a/include/egg/core/eggDisplay.h b/include/egg/core/eggDisplay.h index 52cf56ce..08c02c1e 100644 --- a/include/egg/core/eggDisplay.h +++ b/include/egg/core/eggDisplay.h @@ -1,13 +1,13 @@ #ifndef EGG_DISPLAY_H #define EGG_DISPLAY_H +#include "common.h" #include "egg/core/eggSystem.h" // for BaseSystem config #include "egg/core/eggVideo.h" #include "egg/prim/eggBitFlag.h" -#include "nw4r/ut.h" -#include "rvl/VI.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/VI.h" // IWYU pragma: export -#include namespace EGG { diff --git a/include/egg/core/eggDisposer.h b/include/egg/core/eggDisposer.h index c92d8163..69090301 100644 --- a/include/egg/core/eggDisposer.h +++ b/include/egg/core/eggDisposer.h @@ -3,10 +3,9 @@ // This file was adapted from https://github.com/riidefi/mkw/blob/master/source/egg/core/eggDisposer.hpp +#include "common.h" #include "nw4r/ut.h" -#include - namespace EGG { class Heap; diff --git a/include/egg/core/eggDvdFile.h b/include/egg/core/eggDvdFile.h index 4833da31..ac36ae4e 100644 --- a/include/egg/core/eggDvdFile.h +++ b/include/egg/core/eggDvdFile.h @@ -1,12 +1,12 @@ #ifndef EGG_DVD_FILE_H #define EGG_DVD_FILE_H +#include "common.h" #include "egg/core/eggFile.h" -#include "nw4r/ut.h" -#include "rvl/DVD.h" -#include "rvl/OS.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/DVD.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export -#include namespace EGG { diff --git a/include/egg/core/eggDvdRipper.h b/include/egg/core/eggDvdRipper.h index dce0aad4..82fd09b2 100644 --- a/include/egg/core/eggDvdRipper.h +++ b/include/egg/core/eggDvdRipper.h @@ -1,11 +1,11 @@ #ifndef EGG_DVD_RIPPER_H #define EGG_DVD_RIPPER_H +#include "common.h" #include "egg/core/eggDvdFile.h" #include "egg/core/eggHeap.h" #include "egg/core/eggStreamDecomp.h" -#include namespace EGG { diff --git a/include/egg/core/eggExpHeap.h b/include/egg/core/eggExpHeap.h index 6d48da17..e1c7eb8d 100644 --- a/include/egg/core/eggExpHeap.h +++ b/include/egg/core/eggExpHeap.h @@ -1,9 +1,9 @@ #ifndef EGG_EXP_HEAP_H #define EGG_EXP_HEAP_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/core/eggFader.h b/include/egg/core/eggFader.h index 950b5dbb..a4fb13ef 100644 --- a/include/egg/core/eggFader.h +++ b/include/egg/core/eggFader.h @@ -1,7 +1,7 @@ #ifndef EGG_FADER_H #define EGG_FADER_H -#include +#include "common.h" namespace EGG { diff --git a/include/egg/core/eggFile.h b/include/egg/core/eggFile.h index dbf7ccbb..7ab9ade2 100644 --- a/include/egg/core/eggFile.h +++ b/include/egg/core/eggFile.h @@ -1,7 +1,7 @@ #ifndef EGG_FILE_H #define EGG_FILE_H -#include +#include "common.h" namespace EGG { diff --git a/include/egg/core/eggFrmHeap.h b/include/egg/core/eggFrmHeap.h index 863e6350..f47efea5 100644 --- a/include/egg/core/eggFrmHeap.h +++ b/include/egg/core/eggFrmHeap.h @@ -1,9 +1,9 @@ #ifndef EGG_FRM_HEAP_H #define EGG_FRM_HEAP_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/core/eggGraphicsFifo.h b/include/egg/core/eggGraphicsFifo.h index d66f225f..fdcefc09 100644 --- a/include/egg/core/eggGraphicsFifo.h +++ b/include/egg/core/eggGraphicsFifo.h @@ -1,9 +1,9 @@ #ifndef EGG_GRAPHICS_FIFO_H #define EGG_GRAPHICS_FIFO_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/core/eggHeap.h b/include/egg/core/eggHeap.h index 78e39029..87f3b1d8 100644 --- a/include/egg/core/eggHeap.h +++ b/include/egg/core/eggHeap.h @@ -3,6 +3,7 @@ // This file is ported from https://github.com/riidefi/mkw/blob/master/source/egg/core/eggHeap.hpp +#include "common.h" #include "egg/core/eggDisposer.h" #include "egg/core/eggThread.h" #include "egg/prim/eggBitFlag.h" @@ -10,7 +11,6 @@ #include "rvl/MEM.h" #include "rvl/OS.h" -#include namespace EGG { diff --git a/include/egg/core/eggStreamDecomp.h b/include/egg/core/eggStreamDecomp.h index ffda8f69..29632d3e 100644 --- a/include/egg/core/eggStreamDecomp.h +++ b/include/egg/core/eggStreamDecomp.h @@ -1,9 +1,9 @@ #ifndef EGG_STREAM_DECOMP_H #define EGG_STREAM_DECOMP_H +#include "common.h" #include "rvl/CX/cx.h" -#include // NOTE: I put StreamDecomp stuff here. im unsure of the correct place diff --git a/include/egg/core/eggSystem.h b/include/egg/core/eggSystem.h index d9e5cafa..919c84da 100644 --- a/include/egg/core/eggSystem.h +++ b/include/egg/core/eggSystem.h @@ -1,9 +1,9 @@ #ifndef EGG_SYSTEM_H #define EGG_SYSTEM_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/core/eggThread.h b/include/egg/core/eggThread.h index 735dc4ef..9b6c4564 100644 --- a/include/egg/core/eggThread.h +++ b/include/egg/core/eggThread.h @@ -1,11 +1,11 @@ #ifndef EGG_THREAD_H #define EGG_THREAD_H +#include "common.h" #include "egg/core/eggHeap.h" -#include "nw4r/ut.h" -#include "rvl/OS.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export -#include namespace EGG { diff --git a/include/egg/core/eggUnk.h b/include/egg/core/eggUnk.h index 76d7c3e5..54ddf26d 100644 --- a/include/egg/core/eggUnk.h +++ b/include/egg/core/eggUnk.h @@ -1,9 +1,8 @@ #ifndef EGG_UNK_H #define EGG_UNK_H -#include "rvl/OS.h" - -#include +#include "common.h" +#include "rvl/OS.h" // IWYU pragma: export // This is seen in Animal Crossing: City Folk also. Idk where it belongs diff --git a/include/egg/core/eggVideo.h b/include/egg/core/eggVideo.h index 37633ee9..c9cf571a 100644 --- a/include/egg/core/eggVideo.h +++ b/include/egg/core/eggVideo.h @@ -1,11 +1,11 @@ #ifndef EGG_VIDEO_H #define EGG_VIDEO_H +#include "common.h" #include "egg/prim/eggBitFlag.h" -#include "rvl/GX.h" -#include "rvl/VI.h" +#include "rvl/GX.h" // IWYU pragma: export +#include "rvl/VI.h" // IWYU pragma: export -#include extern "C" GXRenderModeObj lbl_8055FC64; @@ -30,7 +30,7 @@ class Video { static u32 getTickPerVRetrace(); static const GXRenderModeObj *getStandardRenderModeObj(const RenderModeObjSet *); - GXRenderModeObj* getCurrentOrFallbackRenderModeObj() const { + GXRenderModeObj *getCurrentOrFallbackRenderModeObj() const { if (pRenderMode == nullptr) { return &lbl_8055FC64; } diff --git a/include/egg/core/eggXfb.h b/include/egg/core/eggXfb.h index ee6eafea..3d0d2503 100644 --- a/include/egg/core/eggXfb.h +++ b/include/egg/core/eggXfb.h @@ -1,9 +1,9 @@ #ifndef EGG_XFB_H #define EGG_XFB_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/core/eggXfbManager.h b/include/egg/core/eggXfbManager.h index df749598..76ba56dc 100644 --- a/include/egg/core/eggXfbManager.h +++ b/include/egg/core/eggXfbManager.h @@ -1,9 +1,9 @@ #ifndef EGG_XFB_MANAGER_H #define EGG_XFB_MANAGER_H +#include "common.h" #include "egg/core/eggXfb.h" -#include namespace EGG { diff --git a/include/egg/egg_types.h b/include/egg/egg_types.h index 6295ffcb..c1ff24f8 100644 --- a/include/egg/egg_types.h +++ b/include/egg/egg_types.h @@ -1,7 +1,7 @@ #ifndef EGG_TYPES_H #define EGG_TYPES_H -#include +#include "common.h" // Types pulled from ogws // May need to remove/add later diff --git a/include/egg/gfx/eggDrawGX.h b/include/egg/gfx/eggDrawGX.h index c2a89585..1fc4f6b8 100644 --- a/include/egg/gfx/eggDrawGX.h +++ b/include/egg/gfx/eggDrawGX.h @@ -1,11 +1,12 @@ #ifndef EGG_DRAWGX_H #define EGG_DRAWGX_H -#include -#include -#include -#include -#include +#include "common.h" +#include "egg/core/eggHeap.h" +#include "egg/gfx/eggTexture.h" +#include "egg/math/eggMatrix.h" +#include "rvl/GX.h" // IWYU pragma: export + namespace EGG { diff --git a/include/egg/gfx/eggFog.h b/include/egg/gfx/eggFog.h index d9318066..43f9a8d5 100644 --- a/include/egg/gfx/eggFog.h +++ b/include/egg/gfx/eggFog.h @@ -1,8 +1,8 @@ #ifndef EGG_FOG_H #define EGG_FOG_H -#include -#include +#include "egg/prim/eggBinary.h" +#include "nw4r/types_nw4r.h" namespace EGG { diff --git a/include/egg/gfx/eggFrustum.h b/include/egg/gfx/eggFrustum.h index fce9a28d..568b6d73 100644 --- a/include/egg/gfx/eggFrustum.h +++ b/include/egg/gfx/eggFrustum.h @@ -1,8 +1,8 @@ #ifndef EGG_FRUSTUM_H #define EGG_FRUSTUM_H -#include -#include +#include "common.h" +#include "nw4r/g3d/g3d_camera.h" namespace EGG { diff --git a/include/egg/gfx/eggGfxEngine.h b/include/egg/gfx/eggGfxEngine.h index 8844587a..56e8d67b 100644 --- a/include/egg/gfx/eggGfxEngine.h +++ b/include/egg/gfx/eggGfxEngine.h @@ -1,8 +1,8 @@ #ifndef EGG_GFXENGINE_H #define EGG_GFXENGINE_H -#include -#include +#include "common.h" +#include "rvl/GX.h" namespace EGG { diff --git a/include/egg/gfx/eggLight.h b/include/egg/gfx/eggLight.h index cb4741ae..16033dc3 100644 --- a/include/egg/gfx/eggLight.h +++ b/include/egg/gfx/eggLight.h @@ -1,9 +1,9 @@ #ifndef EGG_LIGHT_H #define EGG_LIGHT_H -#include -#include -#include +#include "egg/core/eggHeap.h" +#include "egg/prim/eggBinary.h" +#include "nw4r/types_nw4r.h" namespace EGG { diff --git a/include/egg/gfx/eggScreen.h b/include/egg/gfx/eggScreen.h index 0e18bd29..12a5fa1a 100644 --- a/include/egg/gfx/eggScreen.h +++ b/include/egg/gfx/eggScreen.h @@ -1,8 +1,8 @@ #ifndef EGG_SCREEN_H #define EGG_SCREEN_H -#include -#include +#include "common.h" +#include "egg/gfx/eggFrustum.h" namespace EGG { diff --git a/include/egg/gfx/eggStateGX.h b/include/egg/gfx/eggStateGX.h index 5d2badb6..7351416c 100644 --- a/include/egg/gfx/eggStateGX.h +++ b/include/egg/gfx/eggStateGX.h @@ -1,8 +1,8 @@ #ifndef EGG_STATE_GX_H #define EGG_STATE_GX_H -#include -#include +#include "common.h" +#include "rvl/GX.h" // IWYU pragma: export namespace EGG { diff --git a/include/egg/math/eggMath.h b/include/egg/math/eggMath.h index ebb8ec9b..32023ac6 100644 --- a/include/egg/math/eggMath.h +++ b/include/egg/math/eggMath.h @@ -1,8 +1,7 @@ #ifndef EGG_MATH_H #define EGG_MATH_H -#include -#include +#include "common.h" namespace EGG { diff --git a/include/egg/math/eggMatrix.h b/include/egg/math/eggMatrix.h index f527f74f..c2eb2958 100644 --- a/include/egg/math/eggMatrix.h +++ b/include/egg/math/eggMatrix.h @@ -1,10 +1,10 @@ #ifndef EGG_MATRIX_H #define EGG_MATRIX_H +#include "common.h" #include "egg/math/eggQuat.h" #include "egg/math/eggVector.h" -#include namespace EGG { diff --git a/include/egg/math/eggQuat.h b/include/egg/math/eggQuat.h index 8d0368ea..c7642e79 100644 --- a/include/egg/math/eggQuat.h +++ b/include/egg/math/eggQuat.h @@ -1,9 +1,9 @@ #ifndef EGG_QUAT_H #define EGG_QUAT_H +#include "common.h" #include "egg/math/eggVector.h" -#include namespace EGG { diff --git a/include/egg/math/eggVector.h b/include/egg/math/eggVector.h index 78620eb2..c54e6f0d 100644 --- a/include/egg/math/eggVector.h +++ b/include/egg/math/eggVector.h @@ -1,11 +1,10 @@ #ifndef EGG_VECTOR_H #define EGG_VECTOR_H -#include "MSL_C/float.h" +#include "common.h" #include "egg/math/eggMath.h" +#include "nw4r/math.h" -#include -#include namespace EGG { diff --git a/include/egg/prim/eggAssert.h b/include/egg/prim/eggAssert.h index 2d04cfe0..590919df 100644 --- a/include/egg/prim/eggAssert.h +++ b/include/egg/prim/eggAssert.h @@ -1,8 +1,8 @@ #ifndef EGG_ASSERT_H #define EGG_ASSERT_H -#include -#include +#include "__va_arg.h" +#include "common.h" namespace EGG { // All this is guess diff --git a/include/egg/prim/eggBinary.h b/include/egg/prim/eggBinary.h index 129706f2..067bf8c1 100644 --- a/include/egg/prim/eggBinary.h +++ b/include/egg/prim/eggBinary.h @@ -1,7 +1,7 @@ #ifndef EGG_BINARY_H #define EGG_BINARY_H -#include +#include "common.h" template class IBinary { diff --git a/include/egg/prim/eggBitFlag.h b/include/egg/prim/eggBitFlag.h index c75d1bfa..3ea42bee 100644 --- a/include/egg/prim/eggBitFlag.h +++ b/include/egg/prim/eggBitFlag.h @@ -3,7 +3,7 @@ // Pulled from ogws -#include +#include "common.h" namespace EGG { diff --git a/include/egg/prim/eggBuffer.h b/include/egg/prim/eggBuffer.h index 7f0f622b..b9bfa01b 100644 --- a/include/egg/prim/eggBuffer.h +++ b/include/egg/prim/eggBuffer.h @@ -1,9 +1,9 @@ #ifndef EGG_BUFFER_H #define EGG_BUFFER_H +#include "common.h" #include "egg/core/eggHeap.h" -#include namespace EGG { diff --git a/include/egg/util/eggException.h b/include/egg/util/eggException.h index 3252f35c..228d52ba 100644 --- a/include/egg/util/eggException.h +++ b/include/egg/util/eggException.h @@ -1,8 +1,8 @@ #ifndef EGG_EXCEPTION_H #define EGG_EXCEPTION_H -#include -#include +#include "common.h" +#include "nw4r/db/db_console.h" namespace EGG { diff --git a/include/f/f_base.h b/include/f/f_base.h index cd6bc24a..cc6d8005 100644 --- a/include/f/f_base.h +++ b/include/f/f_base.h @@ -5,6 +5,7 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_base.hpp and the Skyward Sword // Ghidra database. Comments and docs can be seen above. stripped in this file for easier looking +#include "common.h" #include "egg/core/eggExpHeap.h" #include "egg/core/eggFrmHeap.h" #include "f/f_base_id.h" @@ -13,8 +14,6 @@ #include "f/f_manager.h" #include "f/f_profile.h" -#include - // Ghidra: fBase // size: 0x64 diff --git a/include/f/f_helper_unk.h b/include/f/f_helper_unk.h index 6d755313..4c8919ff 100644 --- a/include/f/f_helper_unk.h +++ b/include/f/f_helper_unk.h @@ -4,7 +4,7 @@ // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_helper_unk.hpp -#include +#include "common.h" /// @brief [A helper class for fBase_c with unknown purpose]. /// @note Unofficial name. diff --git a/include/f/f_list_mg.h b/include/f/f_list_mg.h index c6601f21..d1c754fb 100644 --- a/include/f/f_list_mg.h +++ b/include/f/f_list_mg.h @@ -5,10 +5,11 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg.hpp #include "c/c_list.h" +#include "common.h" #include "f/f_base_id.h" #include "f/f_list_nd.h" #include "f/f_profile.h" -#include + class fBase_c; diff --git a/include/f/f_list_mg_ptmf.h b/include/f/f_list_mg_ptmf.h index 30b3f491..a0f3a24b 100644 --- a/include/f/f_list_mg_ptmf.h +++ b/include/f/f_list_mg_ptmf.h @@ -4,11 +4,11 @@ // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_mg_ptmf.hpp -#include - +#include "common.h" #include "f/f_list_mg.h" #include "f/f_list_nd_prio.h" + class fBase_c; /// @brief A list of fLiNdPrio_c nodes with a reference to a process function. diff --git a/include/f/f_list_nd.h b/include/f/f_list_nd.h index 4ef42769..fabac72c 100644 --- a/include/f/f_list_nd.h +++ b/include/f/f_list_nd.h @@ -5,7 +5,7 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd.hpp #include "c/c_list.h" -#include +#include "common.h" class fBase_c; diff --git a/include/f/f_list_nd_prio.h b/include/f/f_list_nd_prio.h index 16785e39..a2905c68 100644 --- a/include/f/f_list_nd_prio.h +++ b/include/f/f_list_nd_prio.h @@ -4,9 +4,10 @@ // This file was ported from // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_list_nd_prio.hpp +#include "common.h" #include "f/f_list_nd.h" #include "f/f_profile.h" -#include + /// @brief A list node with priority fields for an order in a list. /// @note Unofficial name. diff --git a/include/f/f_profile.h b/include/f/f_profile.h index 43ee7750..b887d216 100644 --- a/include/f/f_profile.h +++ b/include/f/f_profile.h @@ -3,32 +3,34 @@ // Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_profile.hpp +#include "common.h" #include "f/f_profile_name.h" -#include + /// @brief Creates a profile of a base with given values for execute and draw order. -#define SPECIAL_BASE_PROFILE(profName, className, executeOrder, drawOrder, baseProperties) \ - void *className##_classInit() { \ - return new className(); \ - } \ +#define SPECIAL_BASE_PROFILE(profName, className, executeOrder, drawOrder, baseProperties) \ + void *className##_classInit() { \ + return new className(); \ + } \ fProfile::fBaseProfile_c g_profile_##profName = {&className##_classInit, executeOrder, drawOrder, baseProperties} /// @brief Creates a profile of an actor with given values for execute and draw order and the actor properties. @see /// SPECIAL_BASE_PROFILE -#define SPECIAL_ACTOR_PROFILE(profName, className, executeOrder, drawOrder, baseProperties, properties) \ - void *className##_classInit() { \ - return new className(); \ - } \ - fProfile::fActorProfile_c g_profile_##profName = {&className##_classInit, executeOrder, drawOrder, baseProperties, \ - properties} +#define SPECIAL_ACTOR_PROFILE(profName, className, executeOrder, drawOrder, baseProperties, properties) \ + void *className##_classInit() { \ + return new className(); \ + } \ + fProfile::fActorProfile_c g_profile_##profName = { \ + &className##_classInit, executeOrder, drawOrder, baseProperties, properties \ + } /// @brief Creates a profile for a base, with the profile number as the priority for both the draw and execute order. /// @see SPECIAL_BASE_PROFILE -#define DEFAULT_BASE_PROFILE(profName, className) \ +#define DEFAULT_BASE_PROFILE(profName, className) \ SPECIAL_BASE_PROFILE(profName, className, fProfile::profName, fProfile::profName); /// @brief Creates a profile of an actor with default values. @see DEFAULT_BASE_PROFILE -#define DEFAULT_ACTOR_PROFILE(profName, className, baseProperties, properties) \ +#define DEFAULT_ACTOR_PROFILE(profName, className, baseProperties, properties) \ SPECIAL_ACTOR_PROFILE(profName, className, fProfile::profName, fProfile::profName, baseProperties, properties); /* diff --git a/include/f/f_tree_mg.h b/include/f/f_tree_mg.h index d53e4a64..3988aedc 100644 --- a/include/f/f_tree_mg.h +++ b/include/f/f_tree_mg.h @@ -5,8 +5,9 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg.hpp #include "c/c_tree.h" +#include "common.h" #include "f/f_profile.h" -#include + class fTrNdBa_c; diff --git a/include/f/f_tree_mg_ptmf.h b/include/f/f_tree_mg_ptmf.h index 07ea3221..bdbecda0 100644 --- a/include/f/f_tree_mg_ptmf.h +++ b/include/f/f_tree_mg_ptmf.h @@ -5,8 +5,9 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_mg_ptmf.hpp #include "c/c_tree.h" +#include "common.h" #include "f/f_tree_mg.h" -#include + class fBase_c; diff --git a/include/f/f_tree_nd.h b/include/f/f_tree_nd.h index 7f0bbec7..d6b2a612 100644 --- a/include/f/f_tree_nd.h +++ b/include/f/f_tree_nd.h @@ -5,8 +5,9 @@ // https://github.com/NSMBW-Community/NSMBW-Decomp/blob/master/include/dol/framework/f_tree_nd.hpp #include "c/c_tree.h" +#include "common.h" #include "f/f_profile.h" -#include + class fBase_c; diff --git a/include/libc.h b/include/libc.h index a02dbfbd..e5eb89f8 100644 --- a/include/libc.h +++ b/include/libc.h @@ -1,7 +1,7 @@ #ifndef DECOMP_LIB_C #define DECOMP_LIB_C -#include +#include "common.h" extern "C" { diff --git a/include/libms/commonlib.h b/include/libms/commonlib.h index 5f973aac..b99702b6 100644 --- a/include/libms/commonlib.h +++ b/include/libms/commonlib.h @@ -1,4 +1,4 @@ -#include +#include "common.h" #ifdef __cplusplus extern "C" { diff --git a/include/libms/flowfile.h b/include/libms/flowfile.h index d8310298..a017cf1d 100644 --- a/include/libms/flowfile.h +++ b/include/libms/flowfile.h @@ -1,4 +1,4 @@ -#include +#include "common.h" #ifdef __cplusplus extern "C" { diff --git a/include/libms/libms.h b/include/libms/libms.h index 154d4d86..a83faed3 100644 --- a/include/libms/libms.h +++ b/include/libms/libms.h @@ -1,4 +1,4 @@ -#include +#include "common.h" #ifdef __cplusplus extern "C" { diff --git a/include/libms/msgfile.h b/include/libms/msgfile.h index 4117bb00..c866e0f7 100644 --- a/include/libms/msgfile.h +++ b/include/libms/msgfile.h @@ -1,4 +1,4 @@ -#include +#include "common.h" #ifdef __cplusplus extern "C" { diff --git a/include/m/m2d.h b/include/m/m2d.h index 98af84a1..9c272e7c 100644 --- a/include/m/m2d.h +++ b/include/m/m2d.h @@ -1,15 +1,12 @@ #ifndef M_M2D_H #define M_M2D_H -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "m/m_allocator.h" +#include "m/m_vec.h" +#include "nw4r/lyt/lyt_arcResourceAccessor.h" +#include "nw4r/lyt/lyt_drawInfo.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/ut.h" // IWYU pragma: export namespace m2d { @@ -19,8 +16,8 @@ extern mAllocator_c *l_allocator; class Layout_c : public nw4r::lyt::Layout { public: virtual ~Layout_c() {} - virtual nw4r::lyt::AnimTransform *CreateAnimTransform(const void *animResBuf, - nw4r::lyt::ResourceAccessor *pResAcsr) override; + virtual nw4r::lyt::AnimTransform * + CreateAnimTransform(const void *animResBuf, nw4r::lyt::ResourceAccessor *pResAcsr) override; }; class ResAccIfBase_c { @@ -176,6 +173,6 @@ class Simple_c : public Base_c { u32 field_0x94; }; -} +} // namespace m2d #endif diff --git a/include/m/m3d/m3d.h b/include/m/m3d/m3d.h index d8ba87fc..f994db04 100644 --- a/include/m/m3d/m3d.h +++ b/include/m/m3d/m3d.h @@ -1,11 +1,11 @@ #ifndef M3D_H #define M3D_H -#include -#include -#include -#include -#include +#include "egg/core/eggHeap.h" +#include "egg/gfx/eggFog.h" +#include "egg/gfx/eggLight.h" +#include "m/m_allocator.h" +#include "nw4r/g3d/g3d_scnroot.h" namespace m3d { @@ -22,8 +22,10 @@ extern size_t l_alignment; } // namespace internal bool create(EGG::Heap *pHeap, u32 maxNumChildren, u32 maxNumScnObj, u32 numLightObj, u32 numLightSet); -bool create(EGG::Heap *pHeap, GXPixelFmt pxlFmt, GXColor clearColor, u32 maxNumChildren, u32 maxNumScnObj, - u32 numLightObj, u32 numLightSet, u32 numLightMgr, u32 numFogMgr); +bool create( + EGG::Heap *pHeap, GXPixelFmt pxlFmt, GXColor clearColor, u32 maxNumChildren, u32 maxNumScnObj, u32 numLightObj, + u32 numLightSet, u32 numLightMgr, u32 numFogMgr +); bool createLightMgr(EGG::Heap *, u16, u16, u8, bool, int); bool createFogMgr(EGG::Heap *, int, int); diff --git a/include/m/m3d/m_anmchr.h b/include/m/m3d/m_anmchr.h index 082cf504..0c7e7361 100644 --- a/include/m/m3d/m_anmchr.h +++ b/include/m/m3d/m_anmchr.h @@ -1,9 +1,9 @@ #ifndef M3D_M_ANMCHR_H #define M3D_M_ANMCHR_H -#include -#include -#include +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_fanm.h" +#include "nw4r/g3d/g3d_resanmchr.h" namespace m3d { diff --git a/include/m/m3d/m_anmchrblend.h b/include/m/m3d/m_anmchrblend.h index e8d038d3..42e20bf2 100644 --- a/include/m/m3d/m_anmchrblend.h +++ b/include/m/m3d/m_anmchrblend.h @@ -1,10 +1,10 @@ #ifndef M3D_M_ANMCHRBLEND_H #define M3D_M_ANMCHRBLEND_H -#include -#include -#include -#include +#include "m/m3d/m_anmchr.h" +#include "m/m3d/m_banm.h" +#include "m/m3d/m_bmdl.h" +#include "nw4r/g3d/g3d_anmchr.h" namespace m3d { diff --git a/include/m/m3d/m_anmmatclr.h b/include/m/m3d/m_anmmatclr.h index 1a2db51c..819e3ba2 100644 --- a/include/m/m3d/m_anmmatclr.h +++ b/include/m/m3d/m_anmmatclr.h @@ -1,9 +1,9 @@ #ifndef M3D_M_ANMMATCLR_H #define M3D_M_ANMMATCLR_H -#include -#include -#include +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_fanm.h" +#include "nw4r/g3d/g3d_anmclr.h" namespace m3d { diff --git a/include/m/m3d/m_anmmdl.h b/include/m/m3d/m_anmmdl.h index 1673b421..71ac733f 100644 --- a/include/m/m3d/m_anmmdl.h +++ b/include/m/m3d/m_anmmdl.h @@ -1,9 +1,9 @@ #ifndef M3D_M_ANMMDL_H #define M3D_M_ANMMDL_H -#include -#include -#include +#include "m/m3d/m_anmchr.h" +#include "m/m3d/m_mdl.h" +#include "nw4r/g3d/g3d_resfile.h" namespace m3d { @@ -19,15 +19,23 @@ class mdlAnmChr { virtual void setAnm(const char *name, playMode_e mode); // 0x18 virtual void setRate(f32); // 0x20 - bool create(void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, - u32 bufferOption, int nView, u32 *pSize); + bool create( + void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, + int nView, u32 *pSize + ); // Unknown overload - bool create2(void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, - u32 bufferOption, int nView, u32 *pSize); - bool create(void *resFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, - int nView, u32 *pSize); - bool create(void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mdl_c::mdlCallback_c *callback, - mAllocator_c *alloc, u32 bufferOption, int nView, u32 *pSize); + bool create2( + void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, + int nView, u32 *pSize + ); + bool create( + void *resFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, int nView, + u32 *pSize + ); + bool create( + void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mdl_c::mdlCallback_c *callback, + mAllocator_c *alloc, u32 bufferOption, int nView, u32 *pSize + ); inline bool create(void *resFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption) { return create(resFile, mdlName, anmName, alloc, bufferOption, 1, nullptr); diff --git a/include/m/m3d/m_anmshp.h b/include/m/m3d/m_anmshp.h index 2e550802..e7c45ee0 100644 --- a/include/m/m3d/m_anmshp.h +++ b/include/m/m3d/m_anmshp.h @@ -1,10 +1,10 @@ #ifndef M_M3D_ANMSHP_H #define M_M3D_ANMSHP_H -#include -#include -#include -#include +#include "common.h" +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_fanm.h" +#include "nw4r/g3d/g3d_resanmshp.h" namespace m3d { diff --git a/include/m/m3d/m_anmtexpat.h b/include/m/m3d/m_anmtexpat.h index 1fc5b1d0..4955931f 100644 --- a/include/m/m3d/m_anmtexpat.h +++ b/include/m/m3d/m_anmtexpat.h @@ -1,9 +1,9 @@ #ifndef M3D_M_ANMTEXPAT_H #define M3D_M_ANMTEXPAT_H -#include -#include -#include +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_fanm.h" +#include "nw4r/g3d/g3d_anmtexpat.h" namespace m3d { diff --git a/include/m/m3d/m_anmtexsrt.h b/include/m/m3d/m_anmtexsrt.h index d736a7b1..080c1ef8 100644 --- a/include/m/m3d/m_anmtexsrt.h +++ b/include/m/m3d/m_anmtexsrt.h @@ -1,9 +1,9 @@ #ifndef M3D_M_ANMTEXSRT_H #define M3D_M_ANMTEXSRT_H -#include -#include -#include +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_fanm.h" +#include "nw4r/g3d/g3d_anmtexsrt.h" namespace m3d { diff --git a/include/m/m3d/m_anmvis.h b/include/m/m3d/m_anmvis.h index 053c330d..291e620f 100644 --- a/include/m/m3d/m_anmvis.h +++ b/include/m/m3d/m_anmvis.h @@ -1,8 +1,8 @@ #ifndef M3D_M_ANMVIS_H #define M3D_M_ANMVIS_H -#include -#include +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_fanm.h" namespace m3d { diff --git a/include/m/m3d/m_banm.h b/include/m/m3d/m_banm.h index 35b1b896..beca1b3f 100644 --- a/include/m/m3d/m_banm.h +++ b/include/m/m3d/m_banm.h @@ -1,9 +1,9 @@ #ifndef M3D_M_BANM_H #define M3D_M_BANM_H -#include -#include -#include +#include "egg/core/eggFrmHeap.h" +#include "m/m_allocator.h" +#include "nw4r/g3d/g3d_anmobj.h" namespace m3d { diff --git a/include/m/m3d/m_bline.h b/include/m/m3d/m_bline.h index d47f269c..cf06c77c 100644 --- a/include/m/m3d/m_bline.h +++ b/include/m/m3d/m_bline.h @@ -1,13 +1,15 @@ #ifndef M3D_BLINE_H #define M3D_BLINE_H -#include -#include -#include -#include +#include "egg/gfx/eggTexture.h" +#include "m/m3d/m_proc.h" +#include "m/m_math.h" +#include "nw4r/ut/ut_Color.h" namespace m3d { +#pragma push +#pragma warning off(10402) // The Actual line class bline_c { public: @@ -58,6 +60,7 @@ class bline_c { /* 0x2E */ u8 mFlags; /* 0x2F u8 _pad; */ }; +#pragma pop class blineMat_c : public proc_c { public: @@ -67,8 +70,10 @@ class blineMat_c : public proc_c { virtual void drawXlu() override; virtual void setupGX(bool bTransparent); - bool create(mAllocator_c *pAllocator, int numLines, u16 numLinePts, f32 width, f32 repeat, nw4r::ut::Color &color, - EGG::ResTIMG *pTex, bool); + bool create( + mAllocator_c *pAllocator, int numLines, u16 numLinePts, f32 width, f32 repeat, nw4r::ut::Color &color, + EGG::ResTIMG *pTex, bool + ); void update(); bline_c *getLine(u16 idx); diff --git a/include/m/m3d/m_bmdl.h b/include/m/m3d/m_bmdl.h index aa692b29..eda8bfe7 100644 --- a/include/m/m3d/m_bmdl.h +++ b/include/m/m3d/m_bmdl.h @@ -1,10 +1,10 @@ #ifndef M3D_M_BMDL_H #define M3D_M_BMDL_H -#include -#include -#include -#include +#include "m/m3d/m_banm.h" +#include "m/m3d/m_scnleaf.h" +#include "m/m_math.h" +#include "nw4r/g3d/g3d_scnmdlsmpl.h" namespace m3d { diff --git a/include/m/m3d/m_calc_ratio.h b/include/m/m3d/m_calc_ratio.h index ee850bc9..d723ebba 100644 --- a/include/m/m3d/m_calc_ratio.h +++ b/include/m/m3d/m_calc_ratio.h @@ -1,8 +1,8 @@ #ifndef M3D_M_CALC_RATIO_H #define M3D_M_CALC_RATIO_H -#include -#include +#include "egg/core/eggFrmHeap.h" +#include "m/m_allocator.h" namespace m3d { diff --git a/include/m/m3d/m_fanm.h b/include/m/m3d/m_fanm.h index 1dc0d9f2..641f3cbf 100644 --- a/include/m/m3d/m_fanm.h +++ b/include/m/m3d/m_fanm.h @@ -1,7 +1,7 @@ #ifndef M3D_M_FANM_H #define M3D_M_FANM_H -#include +#include "m/m3d/m_banm.h" namespace m3d { diff --git a/include/m/m3d/m_mdl.h b/include/m/m3d/m_mdl.h index 817e607e..646966f3 100644 --- a/include/m/m3d/m_mdl.h +++ b/include/m/m3d/m_mdl.h @@ -1,12 +1,12 @@ #ifndef M3D_M_MDL_H #define M3D_M_MDL_H -#include -#include -#include -#include -#include -#include +#include "m/m3d/m_banm.h" +#include "m/m3d/m_calc_ratio.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/g3d_anmchr.h" +#include "nw4r/g3d/g3d_calcworld.h" +#include "nw4r/g3d/g3d_resmdl.h" namespace m3d { diff --git a/include/m/m3d/m_proc.h b/include/m/m3d/m_proc.h index 47fc4c84..0e2e4730 100644 --- a/include/m/m3d/m_proc.h +++ b/include/m/m3d/m_proc.h @@ -1,8 +1,8 @@ #ifndef M_M3D_PROC_H #define M_M3D_PROC_H -#include -#include +#include "common.h" +#include "m/m3d/m_scnleaf.h" namespace m3d { diff --git a/include/m/m3d/m_scnleaf.h b/include/m/m3d/m_scnleaf.h index fd224768..44090e7b 100644 --- a/include/m/m3d/m_scnleaf.h +++ b/include/m/m3d/m_scnleaf.h @@ -1,9 +1,9 @@ #ifndef M3D_M_SCNLEAF_H #define M3D_M_SCNLEAF_H -#include -#include -#include +#include "egg/core/eggDisposer.h" +#include "m/m_allocator.h" +#include "nw4r/g3d/g3d_scnobj.h" namespace m3d { diff --git a/include/m/m3d/m_shadow.h b/include/m/m3d/m_shadow.h index f06863c5..9985232a 100644 --- a/include/m/m3d/m_shadow.h +++ b/include/m/m3d/m_shadow.h @@ -1,15 +1,15 @@ #ifndef M3D_M_SHADOW_H #define M3D_M_SHADOW_H -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "egg/core/eggFrmHeap.h" +#include "egg/core/eggHeap.h" +#include "m/m3d/m_proc.h" +#include "m/m_color.h" +#include "m/m_frustum.h" +#include "m/m_heap.h" +#include "m/m_mtx.h" +#include "m/m_quat.h" +#include "m/m_vec.h" namespace m3d { @@ -116,10 +116,14 @@ class mShadow_c : public proc_c { virtual void remove() override; virtual void drawOpa() override; - bool drawMdl(mShadowCircle_c *circle, u32 priority, scnLeaf_c &mdl, const mQuat_c &quat, mVec3_c &pos, mColor color, - u32 param9, f32 dist); - bool drawTexObj(mShadowCircle_c *circle, u32 priority, const GXTexObj *texObj, const mMtx_c &mtx, - const mQuat_c &quat, mVec3_c &pos, mColor color, u32 param9, f32 dist); + bool drawMdl( + mShadowCircle_c *circle, u32 priority, scnLeaf_c &mdl, const mQuat_c &quat, mVec3_c &pos, mColor color, + u32 param9, f32 dist + ); + bool drawTexObj( + mShadowCircle_c *circle, u32 priority, const GXTexObj *texObj, const mMtx_c &mtx, const mQuat_c &quat, + mVec3_c &pos, mColor color, u32 param9, f32 dist + ); bool addMdlToCircle(mShadowCircle_c *circle, scnLeaf_c &mdl, const mQuat_c &quat); @@ -132,8 +136,8 @@ class mShadow_c : public proc_c { mpCurrentHeap = mpFrmHeaps[mCurrentHeapIdx]; } void swapHeaps(); - void create(int count, u8 unk1, int unk2, u16 texBufferSize, u32 drawOpaPriority, nw4r::g3d::ResMdl mdl, - u32 heapSize); + void + create(int count, u8 unk1, int unk2, u16 texBufferSize, u32 drawOpaPriority, nw4r::g3d::ResMdl mdl, u32 heapSize); void reset(); bool addCircle(mShadowCircle_c *circle, u32 priority, u32 unk); diff --git a/include/m/m3d/m_smdl.h b/include/m/m3d/m_smdl.h index e55f759a..f4854389 100644 --- a/include/m/m3d/m_smdl.h +++ b/include/m/m3d/m_smdl.h @@ -1,9 +1,9 @@ #ifndef M3D_M_SMDL_H #define M3D_M_SMDL_H -#include -#include -#include +#include "m/m3d/m_bmdl.h" +#include "m/m3d/m_scnleaf.h" +#include "nw4r/g3d/g3d_resmdl.h" class UnkClass2 {}; diff --git a/include/m/m_angle.h b/include/m/m_angle.h index 6da39005..f291223f 100644 --- a/include/m/m_angle.h +++ b/include/m/m_angle.h @@ -1,8 +1,8 @@ #ifndef M_ANGLE_H #define M_ANGLE_H -#include -#include +#include "common.h" +#include "nw4r/math/math_triangular.h" struct mAng { mAng() {} diff --git a/include/m/m_color.h b/include/m/m_color.h index 4e021ad6..45e1375e 100644 --- a/include/m/m_color.h +++ b/include/m/m_color.h @@ -1,8 +1,8 @@ #ifndef M_COLOR_H #define M_COLOR_H -#include -#include +#include "nw4r/ut/ut_Color.h" +#include "rvl/GX.h" struct mColor : public nw4r::ut::Color { mColor() : nw4r::ut::Color() {} diff --git a/include/m/m_color_fader.h b/include/m/m_color_fader.h index 6250e6f4..d588e6a6 100644 --- a/include/m/m_color_fader.h +++ b/include/m/m_color_fader.h @@ -1,10 +1,9 @@ #ifndef M_COLOR_FADER_H #define M_COLOR_FADER_H -#include -#include -#include - +#include "common.h" +#include "m/m_color.h" +#include "m/m_fader_base.h" class mColorFader_c : public mFaderBase_c { public: diff --git a/include/m/m_dvd.h b/include/m/m_dvd.h index 9035398f..e89f94f0 100644 --- a/include/m/m_dvd.h +++ b/include/m/m_dvd.h @@ -1,11 +1,11 @@ #ifndef M_DVD_H #define M_DVD_H -#include -#include -#include -#include -#include +#include "egg/core/eggArchive.h" +#include "egg/core/eggHeap.h" +#include "egg/core/eggStreamDecomp.h" +#include "egg/core/eggThread.h" +#include "m/m_heap.h" // Note: names are taken from NSMBW where available but a lot are made up @@ -19,7 +19,9 @@ class TUncompressInfo_Base_c { public: TUncompressInfo_Base_c(u8 type, const char *extension) : mType(type), mExtension(extension) {} virtual ~TUncompressInfo_Base_c() {} - virtual EGG::StreamDecomp *Construct() const { return nullptr; } + virtual EGG::StreamDecomp *Construct() const { + return nullptr; + } virtual void Destruct() const {} u8 mType; @@ -30,7 +32,9 @@ template class TUncompressInfo_c : public TUncompressInfo_Base_c { public: TUncompressInfo_c(u8 type, const char *extension) : TUncompressInfo_Base_c(type, extension) {} - virtual T *Construct() const { return new (somePtr) T(); } + virtual T *Construct() const { + return new (somePtr) T(); + } virtual void Destruct() const {} }; @@ -168,9 +172,13 @@ class MyThread_c : EGG::Thread { virtual void *run() override; - OSThread *getMyOsThread() { return mOSThread; } + OSThread *getMyOsThread() { + return mOSThread; + } - void setThreadHeap(EGG::Heap *heap) { setThreadCurrentHeap(heap); } + void setThreadHeap(EGG::Heap *heap) { + setThreadCurrentHeap(heap); + } static void *run(mDvd_param_c *dvd); }; diff --git a/include/m/m_fader.h b/include/m/m_fader.h index 83967dc4..132594a0 100644 --- a/include/m/m_fader.h +++ b/include/m/m_fader.h @@ -1,7 +1,7 @@ #ifndef M_FADER_H #define M_FADER_H -#include +#include "m/m_fader_base.h" class mFader_c { public: diff --git a/include/m/m_fader_base.h b/include/m/m_fader_base.h index 28fb8bcc..fcef4dfd 100644 --- a/include/m/m_fader_base.h +++ b/include/m/m_fader_base.h @@ -1,9 +1,8 @@ #ifndef M_FADER_BASE_H #define M_FADER_BASE_H -#include -#include - +#include "common.h" +#include "m/m_color.h" class mFaderBase_c { public: diff --git a/include/m/m_frustum.h b/include/m/m_frustum.h index f4ae5c4a..baaad91c 100644 --- a/include/m/m_frustum.h +++ b/include/m/m_frustum.h @@ -1,9 +1,9 @@ #ifndef M_FRUSTUM_H #define M_FRUSTUM_H -#include -#include -#include +#include "common.h" +#include "m/m_mtx.h" +#include "nw4r/math/math_geometry.h" // Bunch of untested assumptions in here class mFrustum_c { diff --git a/include/m/m_mtx.h b/include/m/m_mtx.h index f198f09d..4288a796 100644 --- a/include/m/m_mtx.h +++ b/include/m/m_mtx.h @@ -3,16 +3,12 @@ // NOTE:: Comments about functions pulled from NSMBW +#include "common.h" #include "egg/math/eggMatrix.h" #include "m/m_angle.h" #include "m/m_vec.h" #include "nw4r/nw4r_types.h" -#include - - -#pragma push -#pragma warning off(10402) class mMtx_c { typedef f32 (*MtxRef)[4]; typedef const f32 (*MtxRefConst)[4]; @@ -31,14 +27,23 @@ class mMtx_c { } } - inline operator MtxRef() { - return m; + operator MtxRef() { + return (MtxRef)(this); } - inline operator MtxRefConst() const { - return m; + operator MtxRefConst() const { + return (MtxRefConst)(this); } operator nw4r::math::MTX34 *() { - return &nw4rm; + return (nw4r::math::MTX34 *)(this); + } + operator EGG::Matrix34f *() { + return (EGG::Matrix34f *)(this); + } + operator nw4r::math::MTX34 &() { + return *(nw4r::math::MTX34 *)(this); + } + operator EGG::Matrix34f &() { + return *(EGG::Matrix34f *)(this); } void XrotS(const mAng &angle); ///< Generates a rotation matrix for the X axis with the given angle. @@ -74,9 +79,7 @@ class mMtx_c { public: union { - EGG::Matrix34f mat; f32 m[3][4]; - nw4r::math::MTX34 nw4rm; struct { f32 xx, xy, xz, xw; f32 yx, yy, yz, yw; @@ -88,6 +91,4 @@ class mMtx_c { static mMtx_c Identity; }; -#pragma pop - #endif diff --git a/include/m/m_pad.h b/include/m/m_pad.h index fd45ee3b..a6dae38e 100644 --- a/include/m/m_pad.h +++ b/include/m/m_pad.h @@ -1,6 +1,8 @@ #ifndef M_PAD_H #define M_PAD_H +#include "egg/core/eggController.h" + namespace mPad { extern EGG::CoreControllerMgr *g_padMg; diff --git a/include/m/m_quat.h b/include/m/m_quat.h index 861d3d6b..10f0e9cf 100644 --- a/include/m/m_quat.h +++ b/include/m/m_quat.h @@ -1,13 +1,13 @@ #ifndef M_QUAT_H #define M_QUAT_H -#include -#include +#include "egg/math/eggQuat.h" +#include "m/m_vec.h" class mQuat_c : public EGG::Quatf { public: mQuat_c() {} - mQuat_c(f32 x, f32 y, f32 z, f32 w): EGG::Quatf(w, x, y, z) {} + mQuat_c(f32 x, f32 y, f32 z, f32 w) : EGG::Quatf(w, x, y, z) {} void fn_802F2780(const mQuat_c &other); }; diff --git a/include/m/m_vec.h b/include/m/m_vec.h index 8ebd6335..4d6e2db1 100644 --- a/include/m/m_vec.h +++ b/include/m/m_vec.h @@ -1,11 +1,9 @@ #ifndef M_VEC_H #define M_VEC_H +#include "common.h" #include "egg/math/eggVector.h" #include "m/m_angle.h" -#include "rvl/MTX.h" - -#include class mVec3_c : public EGG::Vector3f { public: diff --git a/include/m/m_video.h b/include/m/m_video.h index 5a0e382b..d35dcfef 100644 --- a/include/m/m_video.h +++ b/include/m/m_video.h @@ -1,7 +1,7 @@ #ifndef M_VIDEO_H #define M_VIDEO_H -#include +#include "egg/core/eggVideo.h" namespace mVideo { diff --git a/include/m/types_m.h b/include/m/types_m.h index 5ad33e20..6da5f4e0 100644 --- a/include/m/types_m.h +++ b/include/m/types_m.h @@ -1,7 +1,7 @@ #ifndef M_TYPES_H #define M_TYPES_H -#include +#include "common.h" class mFaderBase_c; class mFader_c; diff --git a/include/nw4r/db/db_assert.h b/include/nw4r/db/db_assert.h index ecc21922..afb71813 100644 --- a/include/nw4r/db/db_assert.h +++ b/include/nw4r/db/db_assert.h @@ -1,7 +1,7 @@ #ifndef NW4R_DB_ASSERT_H #define NW4R_DB_ASSERT_H -#include +#include "nw4r/db/db_console.h" namespace nw4r { namespace db { diff --git a/include/nw4r/db/db_console.h b/include/nw4r/db/db_console.h index b2d724c6..ca9868c3 100644 --- a/include/nw4r/db/db_console.h +++ b/include/nw4r/db/db_console.h @@ -1,8 +1,8 @@ #ifndef NW4R_DB_CONSOLE_H #define NW4R_DB_CONSOLE_H -#include -#include +#include "common.h" +#include "nw4r/ut/ut_TextWriterBase.h" namespace nw4r { namespace db { diff --git a/include/nw4r/db/db_directPrint.h b/include/nw4r/db/db_directPrint.h index cd78ceac..666a5ed5 100644 --- a/include/nw4r/db/db_directPrint.h +++ b/include/nw4r/db/db_directPrint.h @@ -1,9 +1,9 @@ #ifndef NW4R_DB_DIRECT_PRINT_H #define NW4R_DB_DIRECT_PRINT_H -#include -#include -#include +#include "__va_arg.h" +#include "common.h" +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { @@ -37,8 +37,10 @@ struct YUVColorInfo { /* 80434520 */ void DirectPrint_ChangeXfb(void *framBuf, u16 width, u16 height); /* 80434560 */ void DirectPrint_StoreCache(); /* 80434580 */ void DirectPrint_Printf(int posh, int posv, const char *format, ...); -/* 80434650 */ void DirectPrint_printfsub(int posh, int posv, const char *format, - __va_list_struct *args); // ????? Not from a symbol, needs the arg? +/* 80434650 */ void DirectPrint_printfsub( + int posh, int posv, const char *format, + __va_list_struct *args +); // ????? Not from a symbol, needs the arg? /* */ void DirectPrint_Printf(int posh, int posv, bool turnOver, const char *format, ...); /* */ void DirectPrint_DrawString(int posh, int posv, const char *format, ...); /* 804346c0 */ void DirectPrint_DrawString(int posh, int posv, bool turnOver, const char *format, ...); @@ -46,8 +48,9 @@ struct YUVColorInfo { /* inlined */ void DirectPrint_SetColor(u8 r, u8 g, u8 b); /* */ GXColor DirectPrint_GetColor(); namespace detail { -/* inlined */ void DirectPrint_DrawStringToXfb(int posh, int posv, const char *format, __va_list_struct *args, - bool turnover, bool backErase); +/* inlined */ void DirectPrint_DrawStringToXfb( + int posh, int posv, const char *format, __va_list_struct *args, bool turnover, bool backErase +); /* local */ void WaitVIRetrace_(); diff --git a/include/nw4r/db/db_exception.h b/include/nw4r/db/db_exception.h index 9e14e803..9992e72e 100644 --- a/include/nw4r/db/db_exception.h +++ b/include/nw4r/db/db_exception.h @@ -1,9 +1,8 @@ #ifndef NW4R_DB_EXCEPTION_H #define NW4R_DB_EXCEPTION_H -#include -#include - +#include "nw4r/db/db_console.h" +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace db { diff --git a/include/nw4r/db/db_mapFile.h b/include/nw4r/db/db_mapFile.h index 1576109f..06257073 100644 --- a/include/nw4r/db/db_mapFile.h +++ b/include/nw4r/db/db_mapFile.h @@ -1,7 +1,7 @@ #ifndef NW4R_DB_MAPFILE_H #define NW4R_DB_MAPFILE_H -#include +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace db { diff --git a/include/nw4r/g3d/g3d_anmcamera.h b/include/nw4r/g3d/g3d_anmcamera.h index 7a33f1dd..cca7bd9b 100644 --- a/include/nw4r/g3d/g3d_anmcamera.h +++ b/include/nw4r/g3d/g3d_anmcamera.h @@ -1,8 +1,8 @@ #ifndef NW4R_G3D_ANMCAMERA_H #define NW4R_G3D_ANMCAMERA_H + #include "common.h" -#include "nw4r/math/math_types.h" -#include +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { diff --git a/include/nw4r/g3d/g3d_anmfog.h b/include/nw4r/g3d/g3d_anmfog.h index cb9f96da..3ba289f8 100644 --- a/include/nw4r/g3d/g3d_anmfog.h +++ b/include/nw4r/g3d/g3d_anmfog.h @@ -1,8 +1,8 @@ #ifndef NW4R_G3D_ANMFOG_H #define NW4R_G3D_ANMFOG_H #include "common.h" -#include -#include +#include "nw4r/ut/ut_Color.h" +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_camera.h b/include/nw4r/g3d/g3d_camera.h index 9ac3ebb2..da13cb0c 100644 --- a/include/nw4r/g3d/g3d_camera.h +++ b/include/nw4r/g3d/g3d_camera.h @@ -3,8 +3,7 @@ #include "common.h" #include "nw4r/g3d/g3d_rescommon.h" #include "nw4r/math/math_types.h" -#include - +#include "rvl/MTX.h" // IWYU pragma: export namespace nw4r { namespace g3d { @@ -61,15 +60,21 @@ struct Camera { CameraData &rCamData = mCamData.ref(); if (rCamData.mFlags & 0x40) { - C_MTXOrtho(rCamData.mProjMtx, rCamData.FLOAT_0xBC, rCamData.FLOAT_0xC0, rCamData.FLOAT_0xC4, - rCamData.FLOAT_0xC8, rCamData.FLOAT_0xB4, rCamData.FLOAT_0xB8); + C_MTXOrtho( + rCamData.mProjMtx, rCamData.FLOAT_0xBC, rCamData.FLOAT_0xC0, rCamData.FLOAT_0xC4, rCamData.FLOAT_0xC8, + rCamData.FLOAT_0xB4, rCamData.FLOAT_0xB8 + ); } else { if (rCamData.mFlags & 0x10) { - C_MTXFrustum(rCamData.mProjMtx, rCamData.FLOAT_0xBC, rCamData.FLOAT_0xC0, rCamData.FLOAT_0xC4, - rCamData.FLOAT_0xC8, rCamData.FLOAT_0xB4, rCamData.FLOAT_0xB8); + C_MTXFrustum( + rCamData.mProjMtx, rCamData.FLOAT_0xBC, rCamData.FLOAT_0xC0, rCamData.FLOAT_0xC4, + rCamData.FLOAT_0xC8, rCamData.FLOAT_0xB4, rCamData.FLOAT_0xB8 + ); } else { - C_MTXPerspective(rCamData.mProjMtx, rCamData.FLOAT_0xAC, rCamData.FLOAT_0xB0, rCamData.FLOAT_0xB4, - rCamData.FLOAT_0xB8); + C_MTXPerspective( + rCamData.mProjMtx, rCamData.FLOAT_0xAC, rCamData.FLOAT_0xB0, rCamData.FLOAT_0xB4, + rCamData.FLOAT_0xB8 + ); } } diff --git a/include/nw4r/g3d/g3d_fog.h b/include/nw4r/g3d/g3d_fog.h index c5e953aa..ebbea9a2 100644 --- a/include/nw4r/g3d/g3d_fog.h +++ b/include/nw4r/g3d/g3d_fog.h @@ -3,9 +3,7 @@ #include "common.h" #include "nw4r/g3d/g3d_rescommon.h" #include "nw4r/math/math_types.h" -#include "nw4r/ut/ut_Color.h" -#include - +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_gpu.h b/include/nw4r/g3d/g3d_gpu.h index 2db74bd5..e71584e2 100644 --- a/include/nw4r/g3d/g3d_gpu.h +++ b/include/nw4r/g3d/g3d_gpu.h @@ -3,8 +3,7 @@ #include "common.h" #include "nw4r/g3d/g3d_rescommon.h" #include "nw4r/math/math_types.h" -#include - +#include "rvl/GX.h" namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_init.h b/include/nw4r/g3d/g3d_init.h index 9f52d5f1..7e3874f1 100644 --- a/include/nw4r/g3d/g3d_init.h +++ b/include/nw4r/g3d/g3d_init.h @@ -1,7 +1,5 @@ #ifndef NW4R_G3D_INIT_H #define NW4R_G3D_INIT_H -#include "common.h" -#include namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_light.h b/include/nw4r/g3d/g3d_light.h index 051688f6..623a2e68 100644 --- a/include/nw4r/g3d/g3d_light.h +++ b/include/nw4r/g3d/g3d_light.h @@ -1,10 +1,9 @@ #ifndef NW4R_G3D_LIGHT_H #define NW4R_G3D_LIGHT_H #include "common.h" -#include "nw4r/g3d/g3d_rescommon.h" -#include "nw4r/math.h" -#include - +#include "nw4r/g3d/g3d_rescommon.h" // IWYU pragma: export +#include "nw4r/math.h" // IWYU pragma: export +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_obj.h b/include/nw4r/g3d/g3d_obj.h index 68b03706..f4782073 100644 --- a/include/nw4r/g3d/g3d_obj.h +++ b/include/nw4r/g3d/g3d_obj.h @@ -1,10 +1,10 @@ #ifndef NW4R_G3D_G3DOBJ_H #define NW4R_G3D_G3DOBJ_H #include "common.h" -#include +#include "rvl/MEM/mem_allocator.h" #define NW4R_G3D_TYPE_OBJ_DECL(VAL) static const nw4r::g3d::G3dObj::ResNameDataT TYPE_NAME -#define NW4R_G3D_TYPE_OBJ_DEF(VAL) \ +#define NW4R_G3D_TYPE_OBJ_DEF(VAL) \ const nw4r::g3d::G3dObj::ResNameDataT VAL::TYPE_NAME = {sizeof(#VAL), #VAL} namespace nw4r { diff --git a/include/nw4r/g3d/g3d_resdict.h b/include/nw4r/g3d/g3d_resdict.h index 9c29db73..c0ef62e8 100644 --- a/include/nw4r/g3d/g3d_resdict.h +++ b/include/nw4r/g3d/g3d_resdict.h @@ -2,7 +2,7 @@ #define NW4R_G3D_RESDICT_H #include "common.h" #include "nw4r/g3d/g3d_rescommon.h" -#include +#include "string.h" namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_resmat.h b/include/nw4r/g3d/g3d_resmat.h index b1bcba41..dab824c8 100644 --- a/include/nw4r/g3d/g3d_resmat.h +++ b/include/nw4r/g3d/g3d_resmat.h @@ -2,8 +2,8 @@ #define NW4R_G3D_RESMAT_H #include "common.h" #include "nw4r/g3d/g3d_rescommon.h" -#include "nw4r/math/math_types.h" -#include +#include "nw4r/math/math_types.h" // IWYU pragma: export +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { @@ -46,7 +46,7 @@ struct ResPixDL { struct ResMatPix : public ResCommon { ResMatPix(void *vptr) : ResCommon(vptr) {} void DCStore(bool sync); - void GXGetDstAlpha(u8*, u8*) const; + void GXGetDstAlpha(u8 *, u8 *) const; void GXSetDstAlpha(u8, u8); void CallDisplayList(bool bSync) const; ResMatPix CopyTo(void *p) const; diff --git a/include/nw4r/g3d/g3d_resshp.h b/include/nw4r/g3d/g3d_resshp.h index 2dc41239..d0bd199b 100644 --- a/include/nw4r/g3d/g3d_resshp.h +++ b/include/nw4r/g3d/g3d_resshp.h @@ -1,11 +1,10 @@ #ifndef NW4R_G3D_RESSHP_H #define NW4R_G3D_RESSHP_H +#include "common.h" #include "nw4r/g3d/g3d_rescommon.h" #include "nw4r/g3d/g3d_resmdl.h" #include "nw4r/g3d/g3d_resvtx.h" -#include -#include "common.h" - +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { @@ -71,7 +70,7 @@ struct ResShpPrePrim { struct ResShp { ResCommon mShp; - inline ResShp() : mShp((void*)nullptr) {} + inline ResShp() : mShp((void *)nullptr) {} inline ResShp(void *vptr) : mShp(vptr) {} bool IsValid() const { return mShp.IsValid(); diff --git a/include/nw4r/g3d/g3d_restev.h b/include/nw4r/g3d/g3d_restev.h index 9146c1fd..9c2f26b5 100644 --- a/include/nw4r/g3d/g3d_restev.h +++ b/include/nw4r/g3d/g3d_restev.h @@ -1,61 +1,56 @@ #ifndef NW4R_G3D_RESTEV_H #define NW4R_G3D_RESTEV_H -#include -#include +#include "GXTev.h" +#include "GXTexture.h" #include "nw4r/g3d/g3d_cpu.h" #include "nw4r/g3d/g3d_rescommon.h" -namespace nw4r -{ - namespace g3d - { - struct ResTevData - { - u32 SIZE_0x0; - u32 INT_0x4; - char UNK_0x8[0x4]; - u8 BYTE_0xC; - char UNK_0xD[0x13]; - - detail::BPCmd mSwapSelCmds[GX_MAX_TEVSWAP][4]; - - char UNK_0x70[0x10]; - - struct - { - detail::BPCmd BP_CMD_0x0; - detail::BPCmd BP_CMD_0x5; - detail::BPCmd BP_CMD_0xA; - detail::BPCmd BP_CMD_PAIR_0xF[2]; - char UNK_0x19[0x17]; - } mStageCmds[];//[GX_TEV_STAGE_COUNT]; - }; - - struct ResTev - { - ResCommon mTev; - - inline ResTev(void * vptr) : mTev(vptr) {} - - inline ResTevData & ref() const - { - return mTev.ref(); - } - - bool GXGetTevSwapModeTable(GXTevSwapSel, GXTevColorChan *, GXTevColorChan *, GXTevColorChan *, GXTevColorChan *) const; - void GXSetTevSwapModeTable(GXTevSwapSel, GXTevColorChan, GXTevColorChan, GXTevColorChan, GXTevColorChan); - - bool GXGetTevOrder(GXTevStageID, GXTexCoordID *, GXTexMapID *, GXChannelID *) const; - - void GXSetTevColorIn(GXTevStageID, GXTevColorArg, GXTevColorArg, GXTevColorArg, GXTevColorArg); - - void CallDisplayList(bool) const; - - void * CopyTo(void *); - - UNKTYPE DCStore(bool); - }; - } -} +namespace nw4r { +namespace g3d { +struct ResTevData { + u32 SIZE_0x0; + u32 INT_0x4; + char UNK_0x8[0x4]; + u8 BYTE_0xC; + char UNK_0xD[0x13]; + + detail::BPCmd mSwapSelCmds[GX_MAX_TEVSWAP][4]; + + char UNK_0x70[0x10]; + + struct { + detail::BPCmd BP_CMD_0x0; + detail::BPCmd BP_CMD_0x5; + detail::BPCmd BP_CMD_0xA; + detail::BPCmd BP_CMD_PAIR_0xF[2]; + char UNK_0x19[0x17]; + } mStageCmds[]; //[GX_TEV_STAGE_COUNT]; +}; + +struct ResTev { + ResCommon mTev; + + inline ResTev(void *vptr) : mTev(vptr) {} + + inline ResTevData &ref() const { + return mTev.ref(); + } + + bool + GXGetTevSwapModeTable(GXTevSwapSel, GXTevColorChan *, GXTevColorChan *, GXTevColorChan *, GXTevColorChan *) const; + void GXSetTevSwapModeTable(GXTevSwapSel, GXTevColorChan, GXTevColorChan, GXTevColorChan, GXTevColorChan); + + bool GXGetTevOrder(GXTevStageID, GXTexCoordID *, GXTexMapID *, GXChannelID *) const; + + void GXSetTevColorIn(GXTevStageID, GXTevColorArg, GXTevColorArg, GXTevColorArg, GXTevColorArg); + + void CallDisplayList(bool) const; + + void *CopyTo(void *); + + UNKTYPE DCStore(bool); +}; +} // namespace g3d +} // namespace nw4r #endif diff --git a/include/nw4r/g3d/g3d_restex.h b/include/nw4r/g3d/g3d_restex.h index 1f9b6596..99b19ac7 100644 --- a/include/nw4r/g3d/g3d_restex.h +++ b/include/nw4r/g3d/g3d_restex.h @@ -2,8 +2,7 @@ #define NW4R_G3D_RESTEX_H #include "common.h" #include "nw4r/g3d/g3d_rescommon.h" -#include - +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { @@ -35,7 +34,9 @@ struct ResPlttData { }; struct ResTex { - enum { REVISION = 1 }; + enum { + REVISION = 1 + }; ResCommon mTex; // at 0x0 @@ -55,7 +56,9 @@ struct ResTex { }; struct ResPltt { - enum { REVISION = 1 }; + enum { + REVISION = 1 + }; ResCommon mPltt; // at 0x0 diff --git a/include/nw4r/g3d/g3d_resvtx.h b/include/nw4r/g3d/g3d_resvtx.h index ab1e1d11..cd15a484 100644 --- a/include/nw4r/g3d/g3d_resvtx.h +++ b/include/nw4r/g3d/g3d_resvtx.h @@ -1,158 +1,136 @@ #ifndef NW4R_G3D_RESVTX_H #define NW4R_G3D_RESVTX_H -#include #include "nw4r/g3d/g3d_rescommon.h" +#include "rvl/GX.h" // IWYU pragma: export -namespace nw4r -{ - namespace g3d - { - struct ResVtxPosData - { - u32 SIZE_0x0; - char UNK_0x4[0x4]; - u32 mDataOffset; // at 0x8 - char UNK_0xC[0x11]; - u8 BYTE_0x1D; - }; - - struct ResVtxNrmData - { - u32 SIZE_0x0; - char UNK_0x4[0x4]; - u32 mDataOffset; // at 0x8 - char UNK_0xC[0x11]; - u8 BYTE_0x1D; - }; - - struct ResVtxClrData - { - u32 SIZE_0x0; - char UNK_0x4[0x4]; - u32 mDataOffset; // at 0x8 - char UNK_0xC[0x10]; - u8 BYTE_0x1C; - }; - - struct ResVtxTexCoordData - { - u32 SIZE_0x0; - char UNK_0x4[0x4]; - u32 mDataOffset; // at 0x8 - char UNK_0xC[0x11]; - u8 BYTE_0x1D; - }; - - struct ResVtxPos - { - ResCommon mPos; - - inline ResVtxPos(void * vptr) : mPos(vptr) {} - - inline ResVtxPosData & ref() const - { - return mPos.ref(); - } - - inline const void * GetData() const - { - return mPos.ofs_to_ptr(ref().mDataOffset); - } - - inline UNKTYPE Init() - { - DCStore(false); - } - - void SetArray(); - void GetArray(const void **, u8 *) const; - UNKTYPE CopyTo(void *) const; - - UNKTYPE DCStore(bool); - }; - - struct ResVtxNrm - { - ResCommon mNrm; - - inline ResVtxNrm(void * vptr) : mNrm(vptr) {} - - inline ResVtxNrmData & ref() const - { - return mNrm.ref(); - } - - inline const void * GetData() const - { - return mNrm.ofs_to_ptr(ref().mDataOffset); - } - - inline UNKTYPE Init() - { - DCStore(false); - } - - void SetArray(); - void GetArray(const void **, u8 *) const; - UNKTYPE CopyTo(void *) const; - - UNKTYPE DCStore(bool); - }; - - struct ResVtxClr - { - ResCommon mClr; - - inline ResVtxClr(void * vptr) : mClr(vptr) {} - - inline ResVtxClrData & ref() const - { - return mClr.ref(); - } - - inline const void * GetData() const - { - return mClr.ofs_to_ptr(ref().mDataOffset); - } - - inline UNKTYPE Init() - { - DCStore(false); - } - - void SetArray(GXAttr); - void GetArray(const void **, u8 *) const; - UNKTYPE CopyTo(void *) const; - - UNKTYPE DCStore(bool); - }; - - struct ResVtxTexCoord - { - ResCommon mTexCoord; - - inline ResVtxTexCoord(void * vptr) : mTexCoord(vptr) {} - - inline ResVtxTexCoordData & ref() const - { - return mTexCoord.ref(); - } - - inline const void * GetData() const - { - return mTexCoord.ofs_to_ptr(ref().mDataOffset); - } - - inline UNKTYPE Init() - { - DCStore(false); - } - - void GetArray(const void **, u8 *) const; - - UNKTYPE DCStore(bool); - }; - } -} +namespace nw4r { +namespace g3d { +struct ResVtxPosData { + u32 SIZE_0x0; + char UNK_0x4[0x4]; + u32 mDataOffset; // at 0x8 + char UNK_0xC[0x11]; + u8 BYTE_0x1D; +}; + +struct ResVtxNrmData { + u32 SIZE_0x0; + char UNK_0x4[0x4]; + u32 mDataOffset; // at 0x8 + char UNK_0xC[0x11]; + u8 BYTE_0x1D; +}; + +struct ResVtxClrData { + u32 SIZE_0x0; + char UNK_0x4[0x4]; + u32 mDataOffset; // at 0x8 + char UNK_0xC[0x10]; + u8 BYTE_0x1C; +}; + +struct ResVtxTexCoordData { + u32 SIZE_0x0; + char UNK_0x4[0x4]; + u32 mDataOffset; // at 0x8 + char UNK_0xC[0x11]; + u8 BYTE_0x1D; +}; + +struct ResVtxPos { + ResCommon mPos; + + inline ResVtxPos(void *vptr) : mPos(vptr) {} + + inline ResVtxPosData &ref() const { + return mPos.ref(); + } + + inline const void *GetData() const { + return mPos.ofs_to_ptr(ref().mDataOffset); + } + + inline UNKTYPE Init() { + DCStore(false); + } + + void SetArray(); + void GetArray(const void **, u8 *) const; + UNKTYPE CopyTo(void *) const; + + UNKTYPE DCStore(bool); +}; + +struct ResVtxNrm { + ResCommon mNrm; + + inline ResVtxNrm(void *vptr) : mNrm(vptr) {} + + inline ResVtxNrmData &ref() const { + return mNrm.ref(); + } + + inline const void *GetData() const { + return mNrm.ofs_to_ptr(ref().mDataOffset); + } + + inline UNKTYPE Init() { + DCStore(false); + } + + void SetArray(); + void GetArray(const void **, u8 *) const; + UNKTYPE CopyTo(void *) const; + + UNKTYPE DCStore(bool); +}; + +struct ResVtxClr { + ResCommon mClr; + + inline ResVtxClr(void *vptr) : mClr(vptr) {} + + inline ResVtxClrData &ref() const { + return mClr.ref(); + } + + inline const void *GetData() const { + return mClr.ofs_to_ptr(ref().mDataOffset); + } + + inline UNKTYPE Init() { + DCStore(false); + } + + void SetArray(GXAttr); + void GetArray(const void **, u8 *) const; + UNKTYPE CopyTo(void *) const; + + UNKTYPE DCStore(bool); +}; + +struct ResVtxTexCoord { + ResCommon mTexCoord; + + inline ResVtxTexCoord(void *vptr) : mTexCoord(vptr) {} + + inline ResVtxTexCoordData &ref() const { + return mTexCoord.ref(); + } + + inline const void *GetData() const { + return mTexCoord.ofs_to_ptr(ref().mDataOffset); + } + + inline UNKTYPE Init() { + DCStore(false); + } + + void GetArray(const void **, u8 *) const; + + UNKTYPE DCStore(bool); +}; +} // namespace g3d +} // namespace nw4r #endif diff --git a/include/nw4r/g3d/g3d_scnrfl.h b/include/nw4r/g3d/g3d_scnrfl.h index a5e30e44..67a898bf 100644 --- a/include/nw4r/g3d/g3d_scnrfl.h +++ b/include/nw4r/g3d/g3d_scnrfl.h @@ -1,9 +1,10 @@ #ifndef NW4R_G3D_SCNRFL_H #define NW4R_G3D_SCNRFL_H +#include "RFL/RFL_MiddleDatabase.h" +#include "RFL/RFL_Model.h" #include "common.h" #include "nw4r/g3d/g3d_scnobj.h" -#include -#include + namespace nw4r { namespace g3d { diff --git a/include/nw4r/g3d/g3d_state.h b/include/nw4r/g3d/g3d_state.h index d299b6ec..a257b84b 100644 --- a/include/nw4r/g3d/g3d_state.h +++ b/include/nw4r/g3d/g3d_state.h @@ -1,8 +1,8 @@ #ifndef NW4R_G3D_STATE_H #define NW4R_G3D_STATE_H #include "common.h" -#include "nw4r/math.h" -#include +#include "nw4r/math.h" // IWYU pragma: export +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace g3d { @@ -13,8 +13,10 @@ void SetViewPosNrmMtxArray(const math::MTX34 *, const math::MTX33 *, const math: void SetRenderModeObj(const GXRenderModeObj &); GXRenderModeObj &GetRenderModeObj(); -void LoadLightSet(int idx_lightset, u32 *mask_diff_color /* r1+0xC */, u32 *mask_diff_alpha, u32 *mask_spec_color, - u32 *mask_spec_alpha, AmbLightObj *amb); +void LoadLightSet( + int idx_lightset, u32 *mask_diff_color /* r1+0xC */, u32 *mask_diff_alpha, u32 *mask_spec_color, + u32 *mask_spec_alpha, AmbLightObj *amb +); void Invalidate(u32); } // namespace G3DState diff --git a/include/nw4r/lyt/lyt_animation.h b/include/nw4r/lyt/lyt_animation.h index 64e6195c..eb9cf2fc 100644 --- a/include/nw4r/lyt/lyt_animation.h +++ b/include/nw4r/lyt/lyt_animation.h @@ -1,12 +1,12 @@ #ifndef NW4R_LYT_ANIMATION_H #define NW4R_LYT_ANIMATION_H #include "common.h" -#include -#include -#include -#include -#include -#include +#include "nw4r/lyt/lyt_common.h" +#include "nw4r/lyt/lyt_material.h" +#include "nw4r/lyt/lyt_pane.h" +#include "nw4r/lyt/lyt_resourceAccessor.h" +#include "nw4r/lyt/lyt_types.h" +#include "nw4r/ut/ut_LinkList.h" namespace nw4r { namespace lyt { @@ -18,12 +18,14 @@ class AnimTransform { bool IsLoopData() const; virtual ~AnimTransform() = 0; // at 0x08 virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor) = 0; // at 0x0C - virtual void SetResource(const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor, // - u16 animNum) = 0; // at 0x10 - virtual void Bind(Pane *pPane, bool bRecursive, bool bDisable) = 0; // at 0x14 - virtual void Bind(Material *pMaterial, bool bDisable) = 0; // at 0x18 - virtual void Animate(u32 idx, Pane *pPane) = 0; // at 0x1C - virtual void Animate(u32 idx, Material *pMaterial) = 0; // at 0x20 + virtual void SetResource( + const res::AnimationBlock *pRes, ResourceAccessor *pResAccessor, // + u16 animNum + ) = 0; // at 0x10 + virtual void Bind(Pane *pPane, bool bRecursive, bool bDisable) = 0; // at 0x14 + virtual void Bind(Material *pMaterial, bool bDisable) = 0; // at 0x18 + virtual void Animate(u32 idx, Pane *pPane) = 0; // at 0x1C + virtual void Animate(u32 idx, Material *pMaterial) = 0; // at 0x20 f32 GetFrameMax() const { return mFrame; // TOOD diff --git a/include/nw4r/lyt/lyt_arcResourceAccessor.h b/include/nw4r/lyt/lyt_arcResourceAccessor.h index 7755e260..50bfbf27 100644 --- a/include/nw4r/lyt/lyt_arcResourceAccessor.h +++ b/include/nw4r/lyt/lyt_arcResourceAccessor.h @@ -5,8 +5,9 @@ #include "nw4r/lyt/lyt_resourceAccessor.h" #include "nw4r/ut/ut_Font.h" #include "nw4r/ut/ut_LinkList.h" -#include -#include +#include "rvl/ARC.h" // IWYU pragma: export +#include "string.h" + #define FONTNAMEBUF_MAX 128 #define ROOTPATH_MAX 128 diff --git a/include/nw4r/lyt/lyt_common.h b/include/nw4r/lyt/lyt_common.h index ffee8317..118e0beb 100644 --- a/include/nw4r/lyt/lyt_common.h +++ b/include/nw4r/lyt/lyt_common.h @@ -1,9 +1,10 @@ #ifndef NW4R_LYT_COMMON_H #define NW4R_LYT_COMMON_H #include "common.h" +#include "nw4r/lyt/lyt_resources.h" +#include "nw4r/lyt/lyt_types.h" #include "nw4r/math/math_types.h" -#include -#include + namespace nw4r { namespace lyt { @@ -80,8 +81,10 @@ void MultipleAlpha(ut::Color *, const ut::Color *, u8); // Inlined ut::Color MultipleAlpha(ut::Color, u8); void SetVertexFormat(bool, u8); void DrawQuad(const math::VEC2 &, const Size &, u8, const TexCoordData *, const ut::Color *); -void DrawQuad(const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords, - const ut::Color *vtxColors, u8 alpha); +void DrawQuad( + const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords, + const ut::Color *vtxColors, u8 alpha +); void DrawLine(const math::VEC2 &pos, const Size &size, ut::Color color); } // namespace detail diff --git a/include/nw4r/lyt/lyt_drawInfo.h b/include/nw4r/lyt/lyt_drawInfo.h index a3cc03b9..bbaf5560 100644 --- a/include/nw4r/lyt/lyt_drawInfo.h +++ b/include/nw4r/lyt/lyt_drawInfo.h @@ -1,9 +1,10 @@ #ifndef NW4R_LYT_DRAWINFO_H #define NW4R_LYT_DRAWINFO_H #include "common.h" +#include "nw4r/lyt/lyt_types.h" #include "nw4r/math/math_types.h" #include "nw4r/ut/ut_Rect.h" -#include + namespace nw4r { namespace lyt { struct DrawInfo { diff --git a/include/nw4r/lyt/lyt_layout.h b/include/nw4r/lyt/lyt_layout.h index ff999933..dd988c4b 100644 --- a/include/nw4r/lyt/lyt_layout.h +++ b/include/nw4r/lyt/lyt_layout.h @@ -2,12 +2,11 @@ #define NW4R_LYT_LAYOUT_H #include "common.h" -#include -#include -#include -#include -#include -#include +#include "new.h" +#include "nw4r/lyt/lyt_animation.h" +#include "nw4r/lyt/lyt_types.h" +#include "rvl/MEM/mem_allocator.h" + namespace nw4r { namespace lyt { @@ -95,7 +94,6 @@ class Layout { static MEMAllocator *mspAllocator; }; - template void Layout::DeleteArray(T *p, size_t n) { if (p) { diff --git a/include/nw4r/lyt/lyt_material.h b/include/nw4r/lyt/lyt_material.h index ec2c924e..6758b983 100644 --- a/include/nw4r/lyt/lyt_material.h +++ b/include/nw4r/lyt/lyt_material.h @@ -1,11 +1,11 @@ #ifndef NW4R_LYT_MATERIAL_H #define NW4R_LYT_MATERIAL_H #include "nw4r/lyt/lyt_animation.h" +#include "nw4r/lyt/lyt_resources.h" +#include "nw4r/lyt/lyt_texMap.h" +#include "nw4r/ut/ut_Color.h" #include "nw4r/ut/ut_LinkList.h" -#include -#include -#include -#include +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace lyt { @@ -17,8 +17,10 @@ class Material { void Init(); static void InitBitGXNums(detail::BitGXNums *ptr); - void ReserveGXMem(u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, u8 indStageNum, - u8 indSRTNum, bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode); + void ReserveGXMem( + u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, u8 indStageNum, u8 indSRTNum, + bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode + ); const TexMap *GetTexMapAry() const; TexMap *GetTexMapAry(); diff --git a/include/nw4r/lyt/lyt_pane.h b/include/nw4r/lyt/lyt_pane.h index 6c8cbab0..a711b1b0 100644 --- a/include/nw4r/lyt/lyt_pane.h +++ b/include/nw4r/lyt/lyt_pane.h @@ -2,14 +2,15 @@ #define NW4R_LYT_PANE_H #include "common.h" #include "nw4r/lyt/lyt_animation.h" +#include "nw4r/lyt/lyt_resources.h" +#include "nw4r/lyt/lyt_types.h" #include "nw4r/math/math_types.h" #include "nw4r/ut/ut_Color.h" #include "nw4r/ut/ut_LinkList.h" #include "nw4r/ut/ut_RuntimeTypeInfo.h" #include "nw4r/ut/ut_algorithm.h" -#include -#include -#include +#include "string.h" + namespace nw4r { namespace lyt { @@ -25,7 +26,11 @@ struct PaneBase { class Pane : detail::PaneBase { public: // For use with TestBit - enum PaneBits { VISIBLE, INFLUENCED_ALPHA, LOCATION_ADJUST }; + enum PaneBits { + VISIBLE, + INFLUENCED_ALPHA, + LOCATION_ADJUST + }; bool IsVisible() const { return detail::TestBit(mFlag, VISIBLE); diff --git a/include/nw4r/lyt/lyt_picture.h b/include/nw4r/lyt/lyt_picture.h index 2d223812..1952deac 100644 --- a/include/nw4r/lyt/lyt_picture.h +++ b/include/nw4r/lyt/lyt_picture.h @@ -1,9 +1,9 @@ #ifndef NW4R_LYT_PICTURE_H #define NW4R_LYT_PICTURE_H -#include -#include -#include +#include "nw4r/lyt/lyt_common.h" +#include "nw4r/lyt/lyt_pane.h" +#include "nw4r/lyt/lyt_resources.h" namespace nw4r { diff --git a/include/nw4r/lyt/lyt_resources.h b/include/nw4r/lyt/lyt_resources.h index c764d384..510b54b2 100644 --- a/include/nw4r/lyt/lyt_resources.h +++ b/include/nw4r/lyt/lyt_resources.h @@ -1,10 +1,10 @@ #ifndef NW4R_LYT_RESOURCES_H #define NW4R_LYT_RESOURCES_H -#include -#include -#include -#include +#include "common.h" +#include "nw4r/lyt/lyt_common.h" +#include "nw4r/lyt/lyt_types.h" +#include "nw4r/ut/ut_Color.h" #define PANE_NAME_SIZE 16 #define PANE_USERDATA_SIZE 8 diff --git a/include/nw4r/lyt/lyt_texMap.h b/include/nw4r/lyt/lyt_texMap.h index 17898f4a..2b15fafd 100644 --- a/include/nw4r/lyt/lyt_texMap.h +++ b/include/nw4r/lyt/lyt_texMap.h @@ -1,8 +1,8 @@ #ifndef NW4R_LYT_TEXMAP_H #define NW4R_LYT_TEXMAP_H #include "common.h" -#include -#include +#include "rvl/GX.h" // IWYU pragma: export +#include "rvl/TPL/TPL.h" namespace nw4r { namespace lyt { @@ -68,8 +68,8 @@ class TexMap { void SetNoWrap(TPLPalette *, u32); void SetNoWrap(const TPLDescriptor *); - void SetTexParam(void *pImage, u16 width, u16 height, GXTexFmt format, GXTexWrapMode wrapS, GXTexWrapMode wrapT, - bool); + void + SetTexParam(void *pImage, u16 width, u16 height, GXTexFmt format, GXTexWrapMode wrapS, GXTexWrapMode wrapT, bool); void *GetImage() const { return mpImage; diff --git a/include/nw4r/lyt/lyt_textBox.h b/include/nw4r/lyt/lyt_textBox.h index 5e907447..4dfd0549 100644 --- a/include/nw4r/lyt/lyt_textBox.h +++ b/include/nw4r/lyt/lyt_textBox.h @@ -1,7 +1,7 @@ #ifndef LYT_TEXT_BOX_H #define LYT_TEXT_BOX_H -#include +#include "nw4r/lyt/lyt_pane.h" namespace nw4r { @@ -54,7 +54,6 @@ class TextBox : public Pane { mFontSize = fontSize; } - f32 GetCharSpace() const { return mCharSpace; } @@ -63,7 +62,6 @@ class TextBox : public Pane { mCharSpace = charSpace; } - f32 GetLineSpace() const { return mLineSpace; } diff --git a/include/nw4r/lyt/lyt_types.h b/include/nw4r/lyt/lyt_types.h index 22c626d4..d810d2c9 100644 --- a/include/nw4r/lyt/lyt_types.h +++ b/include/nw4r/lyt/lyt_types.h @@ -1,8 +1,10 @@ #ifndef NW4R_LYT_TYPES_H #define NW4R_LYT_TYPES_H -#include -#include +#include "nw4r/math.h" // IWYU pragma: export +#include "nw4r/ut/ut_LinkList.h" +#include "nw4r/ut/ut_algorithm.h" +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace lyt { @@ -400,8 +402,9 @@ struct TevStage { // 17094 SetAlphaIn(GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_RASA); SetColorOp(GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, true, GX_TEVPREV, GX_TEV_KCSEL_K0); SetAlphaOp(GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, true, GX_TEVPREV, GX_TEV_KASEL_K0_R); - SetIndirect(GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_NONE, GX_ITM_OFF, GX_ITW_OFF, GX_ITW_OFF, false, false, - GX_ITBA_OFF); + SetIndirect( + GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_NONE, GX_ITM_OFF, GX_ITW_OFF, GX_ITW_OFF, false, false, GX_ITBA_OFF + ); } // GetTexCoordGen__Q34nw4r3lyt8TevStageCFv @@ -575,8 +578,9 @@ struct TevStage { // 17094 } // SetOrder__Q34nw4r3lyt8TevStageF13_GXTexCoordID11_GXTexMapID12_GXChannelID13_GXTevSwapSel13_GXTevSwapSel - void SetOrder(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXChannelID aColChan, GXTevSwapSel rasSel, - GXTevSwapSel texSel) { + void SetOrder( + GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXChannelID aColChan, GXTevSwapSel rasSel, GXTevSwapSel texSel + ) { texCoordGen = aTexCoordGen; colChan = aColChan; texMap = aTexMap; @@ -604,8 +608,10 @@ struct TevStage { // 17094 } // SetIndirect__Q34nw4r3lyt8TevStageF16_GXIndTexStageID15_GXIndTexFormat16_GXIndTexBiasSel14_GXIndTexMtxID13_GXIndTexWrap13_GXIndTexWrapbb17_GXIndTexAlphaSel - void SetIndirect(GXIndTexStageID stage, GXIndTexFormat format, GXIndTexBiasSel bias, GXIndTexMtxID mtxSel, - GXIndTexWrap wrapS, GXIndTexWrap wrapT, bool addPrev, bool utcLod, GXIndTexAlphaSel alphaSel) { + void SetIndirect( + GXIndTexStageID stage, GXIndTexFormat format, GXIndTexBiasSel bias, GXIndTexMtxID mtxSel, GXIndTexWrap wrapS, + GXIndTexWrap wrapT, bool addPrev, bool utcLod, GXIndTexAlphaSel alphaSel + ) { indStage = stage; inBiMt = (bias & 0x7) | ((mtxSel & 0xF) << 4); indWrap = (wrapS & 0x7) | ((wrapT & 0x7) << 3); diff --git a/include/nw4r/lyt/lyt_utils.h b/include/nw4r/lyt/lyt_utils.h index d5ffcb18..2bd21a1a 100644 --- a/include/nw4r/lyt/lyt_utils.h +++ b/include/nw4r/lyt/lyt_utils.h @@ -1,8 +1,8 @@ #ifndef NW4R_LYT_UTIL_H #define NW4R_LYT_UTIL_H -#include -#include +#include "nw4r/lyt/lyt_animation.h" +#include "nw4r/lyt/lyt_group.h" namespace nw4r { namespace lyt { diff --git a/include/nw4r/lyt/lyt_window.h b/include/nw4r/lyt/lyt_window.h index 89c6d9e4..490c3abb 100644 --- a/include/nw4r/lyt/lyt_window.h +++ b/include/nw4r/lyt/lyt_window.h @@ -1,11 +1,11 @@ #ifndef NW4R_LYT_WINDOW_H #define NW4R_LYT_WINDOW_H -#include -#include -#include -#include -#include +#include "common.h" +#include "nw4r/lyt/lyt_common.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/lyt/lyt_pane.h" +#include "nw4r/lyt/lyt_types.h" namespace nw4r { @@ -22,7 +22,12 @@ enum TextureFlip { TEXFLIP_ROTATE_270, }; -enum TextureCoord { TopL, TopR, BotL, BotR }; +enum TextureCoord { + TopL, + TopR, + BotL, + BotR +}; struct WindowFrameSize { f32 l; // at 0x00 @@ -56,27 +61,33 @@ class Window : public Pane { static WindowFrameSize GetFrameSize(u8 frameNum, const Frame *frames); - virtual ~Window(); // at 0x08 - NW4R_UT_RTTI_DECL(Window); // at 0x0C - virtual void DrawSelf(const DrawInfo &drawInfo); // at 0x18 - virtual void AnimateSelf(u32 option); // at 0x20 - virtual ut::Color GetVtxColor(u32 idx) const; // at 0x24 - virtual void SetVtxColor(u32 idx, ut::Color value); // at 0x28 - virtual u8 GetVtxColorElement(u32 idx) const; // at 0x34 - virtual void SetVtxColorElement(u32 idx, u8 value); // at 0x38 - virtual Material *FindMaterialByName(const char *findName, bool bRecursive); // at 0x40 - virtual void UnbindAnimationSelf(AnimTransform *pAnimTrans); // at 0x50 - virtual u8 GetMaterialNum() const; // at 0x64 - virtual Material *GetMaterial(u32 idx) const; // at 0x6C - virtual Material *GetContentMaterial() const; // at 0x74 - virtual Material *GetFrameMaterial(u32 frameIdx) const; // at 0x78 - virtual void DrawContent(const math::VEC2 &basePt, const WindowFrameSize &frameSize, u8 alpha); // at 0x7C - virtual void DrawFrame(const math::VEC2 &basePt, const Frame &frame, const WindowFrameSize &frameSize, // - u8 alpha); // at 0x80 - virtual void DrawFrame4(const math::VEC2 &basePt, const Frame *frame, const WindowFrameSize &frameSize, // - u8 alpha); // at 0x84 - virtual void DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const WindowFrameSize &frameSize, // - u8 alpha); // at 0x88 + virtual ~Window(); // at 0x08 + NW4R_UT_RTTI_DECL(Window); // at 0x0C + virtual void DrawSelf(const DrawInfo &drawInfo); // at 0x18 + virtual void AnimateSelf(u32 option); // at 0x20 + virtual ut::Color GetVtxColor(u32 idx) const; // at 0x24 + virtual void SetVtxColor(u32 idx, ut::Color value); // at 0x28 + virtual u8 GetVtxColorElement(u32 idx) const; // at 0x34 + virtual void SetVtxColorElement(u32 idx, u8 value); // at 0x38 + virtual Material *FindMaterialByName(const char *findName, bool bRecursive); // at 0x40 + virtual void UnbindAnimationSelf(AnimTransform *pAnimTrans); // at 0x50 + virtual u8 GetMaterialNum() const; // at 0x64 + virtual Material *GetMaterial(u32 idx) const; // at 0x6C + virtual Material *GetContentMaterial() const; // at 0x74 + virtual Material *GetFrameMaterial(u32 frameIdx) const; // at 0x78 + virtual void DrawContent(const math::VEC2 &basePt, const WindowFrameSize &frameSize, u8 alpha); // at 0x7C + virtual void DrawFrame( + const math::VEC2 &basePt, const Frame &frame, const WindowFrameSize &frameSize, // + u8 alpha + ); // at 0x80 + virtual void DrawFrame4( + const math::VEC2 &basePt, const Frame *frame, const WindowFrameSize &frameSize, // + u8 alpha + ); // at 0x84 + virtual void DrawFrame8( + const math::VEC2 &basePt, const Frame *frame, const WindowFrameSize &frameSize, // + u8 alpha + ); // at 0x88 private: res::InflationLRTB mContentInflation; // at 0x0D8 diff --git a/include/nw4r/math.h b/include/nw4r/math.h index ea99d35f..0ce30568 100644 --- a/include/nw4r/math.h +++ b/include/nw4r/math.h @@ -1,9 +1,9 @@ #ifndef NW4R_PUBLIC_MATH_H #define NW4R_PUBLIC_MATH_H -#include -#include -#include -#include +#include "nw4r/math/math_arithmetic.h" +#include "nw4r/math/math_geometry.h" +#include "nw4r/math/math_triangular.h" +#include "nw4r/math/math_types.h" #endif diff --git a/include/nw4r/math/math_arithmetic.h b/include/nw4r/math/math_arithmetic.h index 2e297271..e6ce14d3 100644 --- a/include/nw4r/math/math_arithmetic.h +++ b/include/nw4r/math/math_arithmetic.h @@ -1,8 +1,8 @@ #ifndef NW4R_MATH_ARITHMETIC_H #define NW4R_MATH_ARITHMETIC_H -#include -#include -#include +#include "math.h" +#include "nw4r/types_nw4r.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export #define NW4R_MATH_QNAN (-(0.0f / 0.0f)) #define NW4R_MATH_FLT_MAX 3.402823466e+38f diff --git a/include/nw4r/math/math_geometry.h b/include/nw4r/math/math_geometry.h index d693711e..a869e98f 100644 --- a/include/nw4r/math/math_geometry.h +++ b/include/nw4r/math/math_geometry.h @@ -1,7 +1,7 @@ #ifndef NW4R_MATH_GEOMETRY_H #define NW4R_MATH_GEOMETRY_H -#include -#include +#include "nw4r/math/math_types.h" +#include "nw4r/types_nw4r.h" namespace nw4r { namespace math { @@ -23,8 +23,10 @@ enum IntersectionResult { struct PLANE { PLANE() {} - f32 Test(const VEC3& point) const { return d + VEC3Dot(&n, &point); } - void Set(const VEC3* p0, const VEC3* p1, const VEC3* p2); + f32 Test(const VEC3 &point) const { + return d + VEC3Dot(&n, &point); + } + void Set(const VEC3 *p0, const VEC3 *p1, const VEC3 *p2); VEC3 n; // at 0x0 f32 d; // at 0xC @@ -33,8 +35,8 @@ struct PLANE { struct AABB { AABB() {} - void Set(const VEC3* points, unsigned int num); - void Set(const AABB* box, const MTX34* mtx); + void Set(const VEC3 *points, unsigned int num); + void Set(const AABB *box, const MTX34 *mtx); VEC3 min; // at 0x0 VEC3 max; // at 0xC @@ -68,10 +70,10 @@ class FRUSTUM { }; public: - void Set(f32 fovy, f32 aspect, f32 n, f32 f, const MTX34& cam); - void Set(f32 t, f32 b, f32 l, f32 r, f32 n, f32 f, const MTX34& cam); + void Set(f32 fovy, f32 aspect, f32 n, f32 f, const MTX34 &cam); + void Set(f32 t, f32 b, f32 l, f32 r, f32 n, f32 f, const MTX34 &cam); - IntersectionResult IntersectAABB_Ex(const AABB* box) const; + IntersectionResult IntersectAABB_Ex(const AABB *box) const; private: MTX34 mCamMtx; // at 0x0 @@ -85,7 +87,7 @@ class FRUSTUM { PLANE mPlanes[PLANE_MAX]; // at 0x90 }; -bool IntersectionAABB(const AABB* a, const AABB* b); +bool IntersectionAABB(const AABB *a, const AABB *b); } // namespace math } // namespace nw4r diff --git a/include/nw4r/math/math_triangular.h b/include/nw4r/math/math_triangular.h index c79b0915..0e3cea17 100644 --- a/include/nw4r/math/math_triangular.h +++ b/include/nw4r/math/math_triangular.h @@ -1,8 +1,8 @@ #ifndef NW4R_MATH_TRIANGULAR_H #define NW4R_MATH_TRIANGULAR_H -#include -#include -#include +#include "math.h" +#include "nw4r/math/math_arithmetic.h" +#include "nw4r/types_nw4r.h" #define NW4R_MATH_PI M_PI #define NW4R_MATH_LN_2 0.69314718056f diff --git a/include/nw4r/math/math_types.h b/include/nw4r/math/math_types.h index 08843736..7e2e8798 100644 --- a/include/nw4r/math/math_types.h +++ b/include/nw4r/math/math_types.h @@ -1,9 +1,9 @@ #ifndef NW4R_MATH_TYPES_H #define NW4R_MATH_TYPES_H -#include -#include -#include -#include +#include "nw4r/math/math_arithmetic.h" +#include "nw4r/math/math_triangular.h" +#include "nw4r/types_nw4r.h" +#include "rvl/MTX.h" // IWYU pragma: export namespace nw4r { namespace math { diff --git a/include/nw4r/snd.h b/include/nw4r/snd.h index 321e51ff..09fea867 100644 --- a/include/nw4r/snd.h +++ b/include/nw4r/snd.h @@ -1,78 +1,78 @@ #ifndef NW4R_PUBLIC_SND_H #define NW4R_PUBLIC_SND_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "nw4r/snd/snd_AxManager.h" +#include "nw4r/snd/snd_AxVoice.h" +#include "nw4r/snd/snd_AxVoiceManager.h" +#include "nw4r/snd/snd_AxfxImpl.h" +#include "nw4r/snd/snd_Bank.h" +#include "nw4r/snd/snd_BankFile.h" +#include "nw4r/snd/snd_BasicPlayer.h" +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_Channel.h" +#include "nw4r/snd/snd_ChannelManager.h" +#include "nw4r/snd/snd_Common.h" +#include "nw4r/snd/snd_DisposeCallback.h" +#include "nw4r/snd/snd_DisposeCallbackManager.h" +#include "nw4r/snd/snd_DvdSoundArchive.h" +#include "nw4r/snd/snd_EnvGenerator.h" +#include "nw4r/snd/snd_ExternalSoundPlayer.h" +#include "nw4r/snd/snd_FrameHeap.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/snd/snd_FxChorus.h" +#include "nw4r/snd/snd_FxDelay.h" +#include "nw4r/snd/snd_FxReverbHi.h" +#include "nw4r/snd/snd_FxReverbHiDpl2.h" +#include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/snd/snd_Lfo.h" +#include "nw4r/snd/snd_MemorySoundArchive.h" +#include "nw4r/snd/snd_MmlParser.h" +#include "nw4r/snd/snd_MmlSeqTrack.h" +#include "nw4r/snd/snd_MmlSeqTrackAllocator.h" +#include "nw4r/snd/snd_MoveValue.h" +#include "nw4r/snd/snd_NandSoundArchive.h" +#include "nw4r/snd/snd_NoteOnCallback.h" +#include "nw4r/snd/snd_PlayerHeap.h" +#include "nw4r/snd/snd_RemoteSpeaker.h" +#include "nw4r/snd/snd_RemoteSpeakerManager.h" +#include "nw4r/snd/snd_SeqFile.h" +#include "nw4r/snd/snd_SeqPlayer.h" +#include "nw4r/snd/snd_SeqSound.h" +#include "nw4r/snd/snd_SeqSoundHandle.h" +#include "nw4r/snd/snd_SeqTrack.h" +#include "nw4r/snd/snd_SeqTrackAllocator.h" +#include "nw4r/snd/snd_Sound3DActor.h" +#include "nw4r/snd/snd_Sound3DListener.h" +#include "nw4r/snd/snd_Sound3DManager.h" +#include "nw4r/snd/snd_SoundActor.h" +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundArchiveFile.h" +#include "nw4r/snd/snd_SoundArchiveLoader.h" +#include "nw4r/snd/snd_SoundArchivePlayer.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundHeap.h" +#include "nw4r/snd/snd_SoundInstanceManager.h" +#include "nw4r/snd/snd_SoundMemoryAllocatable.h" +#include "nw4r/snd/snd_SoundPlayer.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/snd/snd_SoundSystem.h" +#include "nw4r/snd/snd_SoundThread.h" +#include "nw4r/snd/snd_StrmChannel.h" +#include "nw4r/snd/snd_StrmFile.h" +#include "nw4r/snd/snd_StrmPlayer.h" +#include "nw4r/snd/snd_StrmSound.h" +#include "nw4r/snd/snd_StrmSoundHandle.h" +#include "nw4r/snd/snd_Task.h" +#include "nw4r/snd/snd_TaskManager.h" +#include "nw4r/snd/snd_TaskThread.h" +#include "nw4r/snd/snd_Util.h" +#include "nw4r/snd/snd_Voice.h" +#include "nw4r/snd/snd_VoiceManager.h" +#include "nw4r/snd/snd_WaveFile.h" +#include "nw4r/snd/snd_WaveSound.h" +#include "nw4r/snd/snd_WaveSoundHandle.h" +#include "nw4r/snd/snd_WsdFile.h" +#include "nw4r/snd/snd_WsdPlayer.h" +#include "nw4r/snd/snd_adpcm.h" #endif diff --git a/include/nw4r/snd/snd_AxManager.h b/include/nw4r/snd/snd_AxManager.h index 8ac7c0a3..016a9716 100644 --- a/include/nw4r/snd/snd_AxManager.h +++ b/include/nw4r/snd/snd_AxManager.h @@ -1,15 +1,12 @@ #ifndef NW4R_SND_AX_MANAGER_H #define NW4R_SND_AX_MANAGER_H -#include - -#include -#include -#include - -#include - -#include -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/snd/snd_MoveValue.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/AI.h" // IWYU pragma: export +#include "rvl/AX.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -25,7 +22,7 @@ class AxManager { NW4R_UT_LIST_TYPEDEF_DECL(CallbackListNode); public: - static AxManager& GetInstance(); + static AxManager &GetInstance(); void Init(); void Shutdown(); @@ -45,10 +42,10 @@ class AxManager { } f32 GetOutputVolume() const; - void* GetZeroBufferAddress(); + void *GetZeroBufferAddress(); - void RegisterCallback(CallbackListNode* pNode, AXOutCallback pCallback); - void UnregisterCallback(CallbackListNode* pNode); + void RegisterCallback(CallbackListNode *pNode, AXOutCallback pCallback); + void UnregisterCallback(CallbackListNode *pNode); void SetOutputMode(OutputMode mode); OutputMode GetOutputMode(); @@ -58,11 +55,11 @@ class AxManager { } void SetMasterVolume(f32 volume, int frame); - bool AppendEffect(AuxBus bus, FxBase* pFx); + bool AppendEffect(AuxBus bus, FxBase *pFx); void ClearEffect(AuxBus bus, int frame); void ShutdownEffect(AuxBus bus); - FxBaseList& GetEffectList(AuxBus bus) { + FxBaseList &GetEffectList(AuxBus bus) { return mFxList[bus]; } @@ -79,12 +76,12 @@ class AxManager { AxManager(); static void AxCallbackFunc(); - static void AuxCallbackFunc(void* pChans, void* pContext); + static void AuxCallbackFunc(void *pChans, void *pContext); static void AiDmaCallbackFunc(); private: OutputMode mOutputMode; // at 0x0 - void* mZeroBufferAddress; // at 0x4 + void *mZeroBufferAddress; // at 0x4 CallbackListNodeList mCallbackList; // at 0x8 AXOutCallback mNextAxRegisterCallback; // at 0x14 bool mInitialized; // at 0x18 @@ -99,7 +96,7 @@ class AxManager { MoveValue mAuxUserVolume[AUX_BUS_NUM]; // at 0x84 FxBaseList mFxList[AUX_BUS_NUM]; // at 0xB4 AXAuxCallback mAuxCallback[AUX_BUS_NUM]; // at 0xD8 - void* mAuxCallbackContext[AUX_BUS_NUM]; // at 0xE4 + void *mAuxCallbackContext[AUX_BUS_NUM]; // at 0xE4 u8 mAuxCallbackWaitCounter[AUX_BUS_NUM]; // at 0xF0 static u8 sZeroBuffer[ZERO_BUFFER_SIZE]; diff --git a/include/nw4r/snd/snd_AxVoice.h b/include/nw4r/snd/snd_AxVoice.h index 61d171a0..bd743f9d 100644 --- a/include/nw4r/snd/snd_AxVoice.h +++ b/include/nw4r/snd/snd_AxVoice.h @@ -1,12 +1,9 @@ #ifndef NW4R_SND_AX_VOICE_H #define NW4R_SND_AX_VOICE_H -#include - -#include - -#include - -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/AX.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -16,7 +13,7 @@ class AxVoiceParamBlock { public: AxVoiceParamBlock(); - operator AXVPB*() { + operator AXVPB *() { return mVpb; } @@ -41,8 +38,7 @@ class AxVoiceParamBlock { return 0; } - return (mVpb->pb.addr.currentAddressHi << 16) + - mVpb->pb.addr.currentAddressLo; + return (mVpb->pb.addr.currentAddressHi << 16) + mVpb->pb.addr.currentAddressLo; } u32 GetLoopAddress() const { @@ -50,8 +46,7 @@ class AxVoiceParamBlock { return 0; } - return (mVpb->pb.addr.loopAddressHi << 16) + - mVpb->pb.addr.loopAddressLo; + return (mVpb->pb.addr.loopAddressHi << 16) + mVpb->pb.addr.loopAddressLo; } u32 GetEndAddress() const { @@ -62,10 +57,10 @@ class AxVoiceParamBlock { return (mVpb->pb.addr.endAddressHi << 16) + mVpb->pb.addr.endAddressLo; } - void SetVoiceAddr(const AXPBADDR& rAddr) { + void SetVoiceAddr(const AXPBADDR &rAddr) { if (IsAvailable()) { // AXSetVoiceAddr doesn't actually modify the object - AXSetVoiceAddr(mVpb, const_cast(&rAddr)); + AXSetVoiceAddr(mVpb, const_cast(&rAddr)); } } @@ -90,25 +85,25 @@ class AxVoiceParamBlock { void Sync(); bool IsRmtIirEnable() const; - void Set(AXVPB* pVpb); + void Set(AXVPB *pVpb); void Clear(); void SetVoiceType(u16 type); void SetVoiceVe(u16 volume, u16 initVolume); - void SetVoiceMix(const AXPBMIX& rMix, bool syncNow); + void SetVoiceMix(const AXPBMIX &rMix, bool syncNow); void SetVoiceLoop(u16 loop); void SetVoiceLoopAddr(u32 addr); void SetVoiceEndAddr(u32 addr); - void SetVoiceAdpcm(const AXPBADPCM& rAdpcm); + void SetVoiceAdpcm(const AXPBADPCM &rAdpcm); void SetVoiceSrcType(u32 type); - void SetVoiceSrc(const AXPBSRC& rSrc); + void SetVoiceSrc(const AXPBSRC &rSrc); void SetVoiceSrcRatio(f32 ratio); - void SetVoiceAdpcmLoop(const AXPBADPCMLOOP& rLoop); - void SetVoiceLpf(const AXPBLPF& rLpf); + void SetVoiceAdpcmLoop(const AXPBADPCMLOOP &rLoop); + void SetVoiceLpf(const AXPBLPF &rLpf); void SetVoiceLpfCoefs(u16 a0, u16 b0); void SetVoiceRmtOn(u16 on); - void SetVoiceRmtMix(const AXPBRMTMIX& rMix); - void SetVoiceRmtIIR(const AXPBRMTIIR& rIir); + void SetVoiceRmtMix(const AXPBRMTMIX &rMix); + void SetVoiceRmtIIR(const AXPBRMTIIR &rIir); void SetVoiceRmtIIRCoefs(u16 type, ...); void UpdateDelta(); @@ -116,7 +111,7 @@ class AxVoiceParamBlock { static const u16 DEFAULT_VOLUME = AX_MAX_VOLUME; private: - AXVPB* mVpb; // at 0x0 + AXVPB *mVpb; // at 0x0 u32 mSync; // at 0x4 volatile AXPBVE mPrevVeSetting; // at 0x8 bool mFirstVeUpdateFlag; // at 0xC @@ -132,8 +127,7 @@ class AxVoice { CALLBACK_STATUS_DROP_DSP }; - typedef void (*AxVoiceCallback)(AxVoice* pDropVoice, - AxVoiceCallbackStatus status, void* pArg); + typedef void (*AxVoiceCallback)(AxVoice *pDropVoice, AxVoiceCallbackStatus status, void *pArg); enum Format { FORMAT_ADPCM = 0, @@ -202,7 +196,7 @@ class AxVoice { return mFormat; } - void SetBaseAddress(const void* pBase) { + void SetBaseAddress(const void *pBase) { mWaveData = pBase; } @@ -210,15 +204,15 @@ class AxVoice { return (ratio * mSampleRate) / AX_SAMPLE_RATE; } - void Setup(const void* pWave, Format fmt, int rate); + void Setup(const void *pWave, Format fmt, int rate); bool IsPlayFinished() const; - void SetLoopStart(const void* pBase, u32 samples); - void SetLoopEnd(const void* pBase, u32 samples); + void SetLoopStart(const void *pBase, u32 samples); + void SetLoopEnd(const void *pBase, u32 samples); void SetLoopFlag(bool loop); - void StopAtPoint(const void* pBase, u32 samples); + void StopAtPoint(const void *pBase, u32 samples); - bool IsDataAddressCoverd(const void* pBegin, const void* pEnd) const; + bool IsDataAddressCoverd(const void *pBegin, const void *pEnd) const; u32 GetCurrentPlayingSample() const; u32 GetCurrentPlayingDspAddress() const; u32 GetLoopEndDspAddress() const; @@ -227,40 +221,38 @@ class AxVoice { void SetVoiceType(VoiceType type); void EnableRemote(bool enable); void ResetDelta(); - void SetAddr(bool loop, const void* pWave, u32 offset, u32 loopStart, - u32 loopEnd); + void SetAddr(bool loop, const void *pWave, u32 offset, u32 loopStart, u32 loopEnd); void SetSrcType(SrcType type, f32 pitch); - void SetAdpcm(const AdpcmParam* pParam); - void SetAdpcmLoop(const AdpcmLoopParam* pParam); - bool SetMix(const MixParam& rParam); - void SetRmtMix(const RemoteMixParam& rParam); + void SetAdpcm(const AdpcmParam *pParam); + void SetAdpcmLoop(const AdpcmLoopParam *pParam); + bool SetMix(const MixParam &rParam); + void SetRmtMix(const RemoteMixParam &rParam); void SetSrc(f32 ratio, bool initial); void SetVe(f32 volume, f32 initVolume); void SetLpf(u16 freq); void SetRemoteFilter(u8 filter); - static u32 GetDspAddressBySample(const void* pBase, u32 samples, - Format fmt); - static u32 GetSampleByDspAddress(const void* pBase, u32 addr, Format fmt); + static u32 GetDspAddressBySample(const void *pBase, u32 samples, Format fmt); + static u32 GetSampleByDspAddress(const void *pBase, u32 addr, Format fmt); static u32 GetSampleByByte(u32 addr, Format fmt); - static void CalcOffsetAdpcmParam(u16* pPredScale, u16* pYN1, u16* pYN2, - u32 offset, const void* pData, - const AdpcmParam& rParam); + static void CalcOffsetAdpcmParam( + u16 *pPredScale, u16 *pYN1, u16 *pYN2, u32 offset, const void *pData, const AdpcmParam &rParam + ); private: - static void VoiceCallback(void* pArg); + static void VoiceCallback(void *pArg); private: AxVoiceParamBlock mVpb; // at 0x0 - const void* mWaveData; // at 0x10 + const void *mWaveData; // at 0x10 Format mFormat; // at 0x14 int mSampleRate; // at 0x18 bool mFirstMixUpdateFlag; // at 0x1C bool mReserveForFreeFlag; // at 0x1D MixParam mMixPrev; // at 0x1E AxVoiceCallback mCallback; // at 0x38 - void* mCallbackData; // at 0x3C + void *mCallbackData; // at 0x3C public: NW4R_UT_LIST_NODE_DECL(); // at 0x40 diff --git a/include/nw4r/snd/snd_AxVoiceManager.h b/include/nw4r/snd/snd_AxVoiceManager.h index 74d1e701..c9ab081b 100644 --- a/include/nw4r/snd/snd_AxVoiceManager.h +++ b/include/nw4r/snd/snd_AxVoiceManager.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_AX_VOICE_MANAGER_H #define NW4R_SND_AX_VOICE_MANAGER_H -#include +#include "nw4r/snd/snd_AxVoice.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -15,25 +15,24 @@ class AxVoiceManager { static const int WORK_SIZE_MAX = VOICE_MAX * sizeof(AxVoice); public: - static AxVoiceManager& GetInstance(); + static AxVoiceManager &GetInstance(); u32 GetRequiredMemSize(); - void Setup(void* pBuffer, u32 size); + void Setup(void *pBuffer, u32 size); void Shutdown(); - AxVoice* AcquireAxVoice(u32 priority, AxVoice::AxVoiceCallback pCallback, - void* pArg); - void FreeAxVoice(AxVoice* pVoice); + AxVoice *AcquireAxVoice(u32 priority, AxVoice::AxVoiceCallback pCallback, void *pArg); + void FreeAxVoice(AxVoice *pVoice); - void ReserveForFreeAxVoice(AxVoice* pVoice); + void ReserveForFreeAxVoice(AxVoice *pVoice); void FreeAllReservedAxVoice(); private: AxVoiceManager(); - AxVoice* Alloc(); - void Free(AxVoice* pVoice); - void ReserveForFree(AxVoice* pVoice); + AxVoice *Alloc(); + void Free(AxVoice *pVoice); + void ReserveForFree(AxVoice *pVoice); private: AxVoiceList mActiveVoiceList; // at 0x0 diff --git a/include/nw4r/snd/snd_AxfxImpl.h b/include/nw4r/snd/snd_AxfxImpl.h index 34734cb2..4721ddaf 100644 --- a/include/nw4r/snd/snd_AxfxImpl.h +++ b/include/nw4r/snd/snd_AxfxImpl.h @@ -1,9 +1,8 @@ #ifndef NW4R_SND_AXFX_IMPL_H #define NW4R_SND_AXFX_IMPL_H -#include - -#include -#include +#include "nw4r/types_nw4r.h" +#include "rvl/AXFX.h" // IWYU pragma: export +#include "rvl/MEM.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -11,14 +10,14 @@ namespace detail { struct AxfxImpl { bool mIsActive; // at 0x0 - MEMiHeapHead* mHeap; // at 0x4 + MEMiHeapHead *mHeap; // at 0x4 u32 mAllocCount; // at 0x8 static const u32 HEAP_SIZE_MIN = MEM_FRM_HEAP_MIN_SIZE + 32; AxfxImpl() : mIsActive(false), mHeap(NULL), mAllocCount(0) {} - bool CreateHeap(void* pBuffer, u32 size); + bool CreateHeap(void *pBuffer, u32 size); void DestroyHeap(); u32 GetHeapTotalSize() { @@ -29,13 +28,13 @@ struct AxfxImpl { return MEMGetHeapTotalSize(mHeap); } - void HookAlloc(AXFXAllocHook* pAllocHook, AXFXFreeHook* pFreeHook); + void HookAlloc(AXFXAllocHook *pAllocHook, AXFXFreeHook *pFreeHook); void RestoreAlloc(AXFXAllocHook allocHook, AXFXFreeHook freeHook); - static void* Alloc(u32 size); - static void Free(void* pBlock); + static void *Alloc(u32 size); + static void Free(void *pBlock); - static AxfxImpl* mCurrentFx; + static AxfxImpl *mCurrentFx; static u32 mAllocatedSize; }; diff --git a/include/nw4r/snd/snd_Bank.h b/include/nw4r/snd/snd_Bank.h index 78444132..4b84c4f0 100644 --- a/include/nw4r/snd/snd_Bank.h +++ b/include/nw4r/snd/snd_Bank.h @@ -1,9 +1,9 @@ #ifndef NW4R_SND_BANK_H #define NW4R_SND_BANK_H -#include +#include "nw4r/snd/snd_BankFile.h" +#include "nw4r/snd/snd_NoteOnCallback.h" +#include "nw4r/types_nw4r.h" -#include -#include namespace nw4r { namespace snd { @@ -14,18 +14,18 @@ class Channel; class Bank { public: - explicit Bank(const void* pBankBin); + explicit Bank(const void *pBankBin); ~Bank(); - Channel* NoteOn(const NoteOnInfo& rInfo) const; + Channel *NoteOn(const NoteOnInfo &rInfo) const; - void SetWaveDataAddress(const void* pData) { + void SetWaveDataAddress(const void *pData) { mWaveDataAddress = pData; } private: BankFileReader mBankReader; // at 0x0 - const void* mWaveDataAddress; // at 0xC + const void *mWaveDataAddress; // at 0xC }; } // namespace detail diff --git a/include/nw4r/snd/snd_BankFile.h b/include/nw4r/snd/snd_BankFile.h index 89ce5ccf..ccca3669 100644 --- a/include/nw4r/snd/snd_BankFile.h +++ b/include/nw4r/snd/snd_BankFile.h @@ -1,11 +1,10 @@ #ifndef NW4R_SND_BANK_FILE_H #define NW4R_SND_BANK_FILE_H -#include +#include "nw4r/snd/snd_Util.h" +#include "nw4r/snd/snd_WaveFile.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include - -#include namespace nw4r { namespace snd { @@ -72,8 +71,8 @@ struct InstInfo { f32 tune; // at 0xC }; -inline u8 ReadByte(const void* pAddr) { - return *static_cast(pAddr); +inline u8 ReadByte(const void *pAddr) { + return *static_cast(pAddr); } class BankFileReader { @@ -82,23 +81,20 @@ class BankFileReader { static const int VERSION = NW4R_VERSION(1, 1); public: - explicit BankFileReader(const void* pBankBin); + explicit BankFileReader(const void *pBankBin); - bool IsValidFileHeader(const void* pBankBin); + bool IsValidFileHeader(const void *pBankBin); - bool ReadInstInfo(InstInfo* pInfo, int prgNo, int key, int velocity) const; - bool ReadWaveParam(WaveData* pData, int waveIndex, - const void* pWaveAddr) const; + bool ReadInstInfo(InstInfo *pInfo, int prgNo, int key, int velocity) const; + bool ReadWaveParam(WaveData *pData, int waveIndex, const void *pWaveAddr) const; private: - const BankFile::DataRegion* - GetReferenceToSubRegion(const BankFile::DataRegion* pRef, - int splitKey) const; + const BankFile::DataRegion *GetReferenceToSubRegion(const BankFile::DataRegion *pRef, int splitKey) const; private: - const BankFile::Header* mHeader; // at 0x0 - const BankFile::DataBlock* mDataBlock; // at 0x4 - const BankFile::WaveBlock* mWaveBlock; // at 0x8 + const BankFile::Header *mHeader; // at 0x0 + const BankFile::DataBlock *mDataBlock; // at 0x4 + const BankFile::WaveBlock *mWaveBlock; // at 0x8 }; } // namespace detail diff --git a/include/nw4r/snd/snd_BasicPlayer.h b/include/nw4r/snd/snd_BasicPlayer.h index 9ec09aee..39ff10bd 100644 --- a/include/nw4r/snd/snd_BasicPlayer.h +++ b/include/nw4r/snd/snd_BasicPlayer.h @@ -1,12 +1,9 @@ #ifndef NW4R_SND_BASIC_PLAYER_H #define NW4R_SND_BASIC_PLAYER_H -#include - -#include - -#include - -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/WPAD.h" // IWYU pragma: export namespace nw4r { namespace snd { diff --git a/include/nw4r/snd/snd_BasicSound.h b/include/nw4r/snd/snd_BasicSound.h index b1f88f4c..5115f0a8 100644 --- a/include/nw4r/snd/snd_BasicSound.h +++ b/include/nw4r/snd/snd_BasicSound.h @@ -1,13 +1,10 @@ #ifndef NW4R_SND_BASIC_SOUND_H #define NW4R_SND_BASIC_SOUND_H -#include - -#include -#include - -#include - -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/snd/snd_MoveValue.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/WPAD.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -27,29 +24,29 @@ class BasicSound { PARAM_UPDATE_PRIORITY = (1 << 3), }; - virtual void detail_Update(SoundParam* pParam, u32 id, - BasicSound* pSound, const void* pArg, - u32 flags) = 0; // at 0xC + virtual void detail_Update( + SoundParam *pParam, u32 id, BasicSound *pSound, const void *pArg, + u32 flags + ) = 0; // at 0xC }; struct AmbientArgUpdateCallback { - virtual void detail_Update(void* pArg, - const BasicSound* pSound) = 0; // at 0xC + virtual void detail_Update(void *pArg, + const BasicSound *pSound) = 0; // at 0xC }; struct AmbientArgAllocaterCallback { - virtual void* detail_AllocAmbientArg(u32 size) = 0; // at 0xC + virtual void *detail_AllocAmbientArg(u32 size) = 0; // at 0xC - virtual void - detail_FreeAmbientArg(void* pArg, - const BasicSound* pSound) = 0; // at 0x10 + virtual void detail_FreeAmbientArg(void *pArg, + const BasicSound *pSound) = 0; // at 0x10 }; struct AmbientArgInfo { - AmbientParamUpdateCallback* paramUpdateCallback; // at 0x0 - AmbientArgUpdateCallback* argUpdateCallback; // at 0x4 - AmbientArgAllocaterCallback* argAllocaterCallback; // at 0x8 - void* arg; // at 0xC + AmbientParamUpdateCallback *paramUpdateCallback; // at 0x0 + AmbientArgUpdateCallback *argUpdateCallback; // at 0x4 + AmbientArgAllocaterCallback *argAllocaterCallback; // at 0x8 + void *arg; // at 0xC u32 argSize; // at 0x10 }; @@ -85,13 +82,13 @@ class BasicSound { virtual void DetachTempSpecialHandle() = 0; // at 0x60 virtual void InitParam(); // at 0x64 - virtual BasicPlayer& GetBasicPlayer() = 0; // at 0x68 - virtual const BasicPlayer& GetBasicPlayer() const = 0; // at 0x6C + virtual BasicPlayer &GetBasicPlayer() = 0; // at 0x68 + virtual const BasicPlayer &GetBasicPlayer() const = 0; // at 0x6C - PlayerHeap* GetPlayerHeap() { + PlayerHeap *GetPlayerHeap() { return mHeap; } - void SetPlayerHeap(PlayerHeap* pHeap) { + void SetPlayerHeap(PlayerHeap *pHeap) { mHeap = pHeap; } @@ -101,47 +98,47 @@ class BasicSound { bool IsAttachedTempGeneralHandle(); void DetachTempGeneralHandle(); - SoundPlayer* GetSoundPlayer() { + SoundPlayer *GetSoundPlayer() { return mSoundPlayer; } - void SetSoundPlayer(SoundPlayer* pPlayer) { + void SetSoundPlayer(SoundPlayer *pPlayer) { mSoundPlayer = pPlayer; } - ExternalSoundPlayer* GetExternalSoundPlayer() { + ExternalSoundPlayer *GetExternalSoundPlayer() { return mExtSoundPlayer; } - void SetExternalSoundPlayer(ExternalSoundPlayer* pExtPlayer) { + void SetExternalSoundPlayer(ExternalSoundPlayer *pExtPlayer) { mExtSoundPlayer = pExtPlayer; } - AmbientParamUpdateCallback* GetAmbientParamUpdateCallback() { + AmbientParamUpdateCallback *GetAmbientParamUpdateCallback() { return mAmbientParamUpdateCallback; } - AmbientArgUpdateCallback* GetAmbientArgUpdateCallback() { + AmbientArgUpdateCallback *GetAmbientArgUpdateCallback() { return mAmbientArgUpdateCallback; } void ClearAmbientArgUpdateCallback() { mAmbientArgUpdateCallback = NULL; } - AmbientArgAllocaterCallback* GetAmbientArgAllocaterCallback() { + AmbientArgAllocaterCallback *GetAmbientArgAllocaterCallback() { return mAmbientArgAllocaterCallback; } - void* GetAmbientArg() { + void *GetAmbientArg() { return mAmbientArg; } - SoundParam& GetAmbientParam() { + SoundParam &GetAmbientParam() { return mAmbientParam; } - void SetAmbientParamCallback(AmbientParamUpdateCallback* pParamUpdate, - AmbientArgUpdateCallback* pArgUpdate, - AmbientArgAllocaterCallback* pArgAlloc, - void* pArg); + void SetAmbientParamCallback( + AmbientParamUpdateCallback *pParamUpdate, AmbientArgUpdateCallback *pArgUpdate, + AmbientArgAllocaterCallback *pArgAlloc, void *pArg + ); void SetPriority(int priority) { mPriority = priority; @@ -178,16 +175,16 @@ class BasicSound { } private: - PlayerHeap* mHeap; // at 0x4 - SoundHandle* mGeneralHandle; // at 0x8 - SoundHandle* mTempGeneralHandle; // at 0xC - SoundPlayer* mSoundPlayer; // at 0x10 - ExternalSoundPlayer* mExtSoundPlayer; // at 0x14 - - AmbientParamUpdateCallback* mAmbientParamUpdateCallback; // at 0x18 - AmbientArgUpdateCallback* mAmbientArgUpdateCallback; // at 0x1C - AmbientArgAllocaterCallback* mAmbientArgAllocaterCallback; // at 0x20 - void* mAmbientArg; // at 0x24 + PlayerHeap *mHeap; // at 0x4 + SoundHandle *mGeneralHandle; // at 0x8 + SoundHandle *mTempGeneralHandle; // at 0xC + SoundPlayer *mSoundPlayer; // at 0x10 + ExternalSoundPlayer *mExtSoundPlayer; // at 0x14 + + AmbientParamUpdateCallback *mAmbientParamUpdateCallback; // at 0x18 + AmbientArgUpdateCallback *mAmbientArgUpdateCallback; // at 0x1C + AmbientArgAllocaterCallback *mAmbientArgAllocaterCallback; // at 0x20 + void *mAmbientArg; // at 0x24 SoundParam mAmbientParam; // at 0x28 MoveValue mFadeVolume; // at 0x44 diff --git a/include/nw4r/snd/snd_Channel.h b/include/nw4r/snd/snd_Channel.h index 8a89fa00..c26d8661 100644 --- a/include/nw4r/snd/snd_Channel.h +++ b/include/nw4r/snd/snd_Channel.h @@ -1,14 +1,13 @@ #ifndef NW4R_SND_CHANNEL_H #define NW4R_SND_CHANNEL_H -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/snd/snd_EnvGenerator.h" +#include "nw4r/snd/snd_Lfo.h" +#include "nw4r/snd/snd_MoveValue.h" +#include "nw4r/snd/snd_Voice.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include -#include -#include -#include - -#include namespace nw4r { namespace snd { @@ -23,11 +22,13 @@ class Channel { CALLBACK_STATUS_CANCEL }; - typedef void (*ChannelCallback)(Channel* pDropChannel, - ChannelCallbackStatus status, - u32 callbackArg); + typedef void (*ChannelCallback)(Channel *pDropChannel, ChannelCallbackStatus status, u32 callbackArg); - enum LfoTarget { LFO_TARGET_PITCH, LFO_TARGET_VOLUME, LFO_TARGET_PAN }; + enum LfoTarget { + LFO_TARGET_PITCH, + LFO_TARGET_VOLUME, + LFO_TARGET_PAN + }; public: Channel(); @@ -35,7 +36,7 @@ class Channel { void InitParam(ChannelCallback pCallback, u32 callbackArg); void Update(bool periodic); - void Start(const WaveData& rData, int length, u32 offset); + void Start(const WaveData &rData, int length, u32 offset); void Release(); void Stop(); @@ -55,7 +56,7 @@ class Channel { return mEnvelope.GetStatus() == EnvGenerator::STATUS_RELEASE; } - void SetLfoParam(const LfoParam& rParam) { + void SetLfoParam(const LfoParam &rParam) { mLfo.SetParam(rParam); } void SetLfoTarget(LfoTarget target) { @@ -167,16 +168,15 @@ class Channel { mPanCurve = curve; } - Channel* GetNextTrackChannel() const { + Channel *GetNextTrackChannel() const { return mNextLink; } - void SetNextTrackChannel(Channel* pChannel) { + void SetNextTrackChannel(Channel *pChannel) { mNextLink = pChannel; } - static Channel* AllocChannel(int channels, int voices, int priority, - ChannelCallback pCallback, u32 callbackArg); - static void FreeChannel(Channel* pChannel); + static Channel *AllocChannel(int channels, int voices, int priority, ChannelCallback pCallback, u32 callbackArg); + static void FreeChannel(Channel *pChannel); private: static const u8 SILENCE_VOLUME_MAX = 255; @@ -187,9 +187,7 @@ class Channel { static const int PRIORITY_RELEASE = 1; private: - static void VoiceCallbackFunc(Voice* pDropVoice, - Voice::VoiceCallbackStatus status, - void* pCallbackArg); + static void VoiceCallbackFunc(Voice *pDropVoice, Voice::VoiceCallbackStatus status, void *pCallbackArg); private: EnvGenerator mEnvelope; // at 0x0 @@ -240,8 +238,8 @@ class Channel { ChannelCallback mCallback; // at 0xD4 u32 mCallbackData; // at 0xD8 - Voice* mVoice; // at 0xDC - Channel* mNextLink; // at 0xE0 + Voice *mVoice; // at 0xDC + Channel *mNextLink; // at 0xE0 public: NW4R_UT_LIST_NODE_DECL(); // at 0xE4 diff --git a/include/nw4r/snd/snd_ChannelManager.h b/include/nw4r/snd/snd_ChannelManager.h index bc050d6e..d3234dd3 100644 --- a/include/nw4r/snd/snd_ChannelManager.h +++ b/include/nw4r/snd/snd_ChannelManager.h @@ -1,9 +1,9 @@ #ifndef NW4R_SND_CHANNEL_MANAGER_H #define NW4R_SND_CHANNEL_MANAGER_H -#include +#include "nw4r/snd/snd_Channel.h" +#include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/types_nw4r.h" -#include -#include namespace nw4r { namespace snd { @@ -18,26 +18,26 @@ class ChannelManager { static const int WORK_SIZE_MAX = VOICE_MAX * sizeof(Channel); public: - static ChannelManager& GetInstance(); + static ChannelManager &GetInstance(); u32 GetRequiredMemSize(); - void Setup(void* pWork, u32 workSize); + void Setup(void *pWork, u32 workSize); void Shutdown(); void UpdateAllChannel(); private: ChannelManager(); - Channel* Alloc(); - void Free(Channel* pChannel); + Channel *Alloc(); + void Free(Channel *pChannel); private: InstancePool mPool; // at 0x0 ChannelList mChannelList; // at 0x4 bool mInitialized; // at 0x10 u32 mChannelCount; // at 0x14 - void* mMem; // at 0x18 + void *mMem; // at 0x18 u32 mMemSize; // at 0x1C }; diff --git a/include/nw4r/snd/snd_Common.h b/include/nw4r/snd/snd_Common.h index 4b352a90..cf8cef1c 100644 --- a/include/nw4r/snd/snd_Common.h +++ b/include/nw4r/snd/snd_Common.h @@ -1,6 +1,6 @@ #ifndef NW4R_SND_COMMON_H #define NW4R_SND_COMMON_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -25,7 +25,12 @@ enum OutputLineFlag { OUTPUT_LINE_REMOTE_N = (1 << 1), }; -enum AuxBus { AUX_A, AUX_B, AUX_C, AUX_BUS_NUM }; +enum AuxBus { + AUX_A, + AUX_B, + AUX_C, + AUX_BUS_NUM +}; enum OutputMode { OUTPUT_MODE_STEREO, diff --git a/include/nw4r/snd/snd_DisposeCallback.h b/include/nw4r/snd/snd_DisposeCallback.h index 3d6c0360..6af66c05 100644 --- a/include/nw4r/snd/snd_DisposeCallback.h +++ b/include/nw4r/snd/snd_DisposeCallback.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_DISPOSE_CALLBACK_H #define NW4R_SND_DISPOSE_CALLBACK_H -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include namespace nw4r { namespace snd { @@ -15,10 +15,10 @@ class DisposeCallback { public: virtual ~DisposeCallback() {} // at 0x8 - virtual void InvalidateData(const void* pStart, - const void* pEnd) = 0; // at 0xC - virtual void InvalidateWaveData(const void* pStart, - const void* pEnd) = 0; // at 0x10 + virtual void InvalidateData(const void *pStart, + const void *pEnd) = 0; // at 0xC + virtual void InvalidateWaveData(const void *pStart, + const void *pEnd) = 0; // at 0x10 }; NW4R_UT_LIST_TYPEDEF_DECL(DisposeCallback); diff --git a/include/nw4r/snd/snd_DisposeCallbackManager.h b/include/nw4r/snd/snd_DisposeCallbackManager.h index 4940f3b5..d4e512fc 100644 --- a/include/nw4r/snd/snd_DisposeCallbackManager.h +++ b/include/nw4r/snd/snd_DisposeCallbackManager.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_DISPOSE_CALLBACK_MANAGER_H #define NW4R_SND_DISPOSE_CALLBACK_MANAGER_H -#include +#include "nw4r/snd/snd_DisposeCallback.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -10,13 +10,13 @@ namespace detail { class DisposeCallbackManager { public: - static DisposeCallbackManager& GetInstance(); + static DisposeCallbackManager &GetInstance(); - void RegisterDisposeCallback(DisposeCallback* pCallback); - void UnregisterDisposeCallback(DisposeCallback* pCallback); + void RegisterDisposeCallback(DisposeCallback *pCallback); + void UnregisterDisposeCallback(DisposeCallback *pCallback); - void Dispose(void* pData, u32 size, void* pArg); - void DisposeWave(void* pData, u32 size, void* pArg); + void Dispose(void *pData, u32 size, void *pArg); + void DisposeWave(void *pData, u32 size, void *pArg); private: DisposeCallbackManager(); diff --git a/include/nw4r/snd/snd_DvdSoundArchive.h b/include/nw4r/snd/snd_DvdSoundArchive.h index a8d18988..e0af0859 100644 --- a/include/nw4r/snd/snd_DvdSoundArchive.h +++ b/include/nw4r/snd/snd_DvdSoundArchive.h @@ -1,13 +1,10 @@ #ifndef NW4R_SND_DVD_SOUND_ARCHIVE_H #define NW4R_SND_DVD_SOUND_ARCHIVE_H -#include - -#include -#include - -#include - -#include +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundArchiveFile.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/DVD.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -20,30 +17,31 @@ class DvdSoundArchive : public SoundArchive { DvdSoundArchive(); virtual ~DvdSoundArchive(); // at 0x8 - virtual const void* detail_GetFileAddress(u32 /* id */) const { + virtual const void *detail_GetFileAddress(u32 /* id */) const { return NULL; } // at 0xC - virtual const void* detail_GetWaveDataFileAddress(u32 /* id */) const { + virtual const void *detail_GetWaveDataFileAddress(u32 /* id */) const { return NULL; } // at 0x10 virtual int detail_GetRequiredStreamBufferSize() const; // at 0x14 - virtual ut::FileStream* OpenStream(void* pBuffer, int size, u32 offset, + virtual ut::FileStream *OpenStream(void *pBuffer, int size, u32 offset, u32 length) const; // at 0x18 - virtual ut::FileStream* OpenExtStream(void* pBuffer, int size, - const char* pExtPath, u32 offset, - u32 length) const; // at 0x1C + virtual ut::FileStream *OpenExtStream( + void *pBuffer, int size, const char *pExtPath, u32 offset, + u32 length + ) const; // at 0x1C bool Open(s32 entrynum); - bool Open(const char* pPath); + bool Open(const char *pPath); void Close(); - bool LoadHeader(void* pBuffer, u32 size); - bool LoadLabelStringData(void* pBuffer, u32 size); + bool LoadHeader(void *pBuffer, u32 size); + bool LoadLabelStringData(void *pBuffer, u32 size); u32 GetHeaderSize() const { return mFileReader.GetInfoChunkSize(); diff --git a/include/nw4r/snd/snd_EnvGenerator.h b/include/nw4r/snd/snd_EnvGenerator.h index f98a8721..8ca233bb 100644 --- a/include/nw4r/snd/snd_EnvGenerator.h +++ b/include/nw4r/snd/snd_EnvGenerator.h @@ -1,6 +1,6 @@ #ifndef NW4R_SND_ENV_GENERATOR_H #define NW4R_SND_ENV_GENERATOR_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -8,7 +8,12 @@ namespace detail { class EnvGenerator { public: - enum Status { STATUS_ATTACK, STATUS_DECAY, STATUS_SUSTAIN, STATUS_RELEASE }; + enum Status { + STATUS_ATTACK, + STATUS_DECAY, + STATUS_SUSTAIN, + STATUS_RELEASE + }; public: EnvGenerator(); diff --git a/include/nw4r/snd/snd_ExternalSoundPlayer.h b/include/nw4r/snd/snd_ExternalSoundPlayer.h index 0316e37a..de2c8ca9 100644 --- a/include/nw4r/snd/snd_ExternalSoundPlayer.h +++ b/include/nw4r/snd/snd_ExternalSoundPlayer.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_EXTERNAL_SOUND_PLAYER_H #define NW4R_SND_EXTERNAL_SOUND_PLAYER_H -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -25,16 +25,15 @@ class ExternalSoundPlayer { f32 detail_GetVolume() const { return mVolume; } - BasicSound* GetLowestPrioritySound(); + BasicSound *GetLowestPrioritySound(); - void InsertSoundList(BasicSound* pSound); - void RemoveSoundList(BasicSound* pSound); + void InsertSoundList(BasicSound *pSound); + void RemoveSoundList(BasicSound *pSound); template TForEachFunc ForEachSound(TForEachFunc pFunction, bool reverse) { if (reverse) { - BasicSoundExtPlayList::RevIterator it = - mSoundList.GetBeginReverseIter(); + BasicSoundExtPlayList::RevIterator it = mSoundList.GetBeginReverseIter(); while (it != mSoundList.GetEndReverseIter()) { BasicSoundExtPlayList::RevIterator curr = it; @@ -48,11 +47,8 @@ class ExternalSoundPlayer { } } } else { - NW4R_UT_LIST_SAFE_FOREACH(mSoundList, - SoundHandle handle; - handle.detail_AttachSoundAsTempHandle(&*it); - pFunction(handle); - ); + NW4R_UT_LIST_SAFE_FOREACH(mSoundList, SoundHandle handle; handle.detail_AttachSoundAsTempHandle(&*it); + pFunction(handle);); } return pFunction; diff --git a/include/nw4r/snd/snd_FrameHeap.h b/include/nw4r/snd/snd_FrameHeap.h index ab4d3faf..3fe9d628 100644 --- a/include/nw4r/snd/snd_FrameHeap.h +++ b/include/nw4r/snd/snd_FrameHeap.h @@ -1,10 +1,8 @@ #ifndef NW4R_SND_FRAME_HEAP_H #define NW4R_SND_FRAME_HEAP_H -#include - -#include - -#include +#include "nw4r/types_nw4r.h" // IWYU pragma: export +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/MEM.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -12,16 +10,16 @@ namespace detail { class FrameHeap { public: - typedef void (*FreeCallback)(void* pBuffer, u32 size, void* pCallbackArg); + typedef void (*FreeCallback)(void *pBuffer, u32 size, void *pCallbackArg); public: FrameHeap(); ~FrameHeap(); - bool Create(void* pBase, u32 size); + bool Create(void *pBase, u32 size); void Destroy(); void Clear(); - void* Alloc(u32 size, FreeCallback pCallback, void* pCallbackArg); + void *Alloc(u32 size, FreeCallback pCallback, void *pCallbackArg); int SaveState(); void LoadState(int id); @@ -38,9 +36,9 @@ class FrameHeap { NW4R_UT_LIST_NODE_DECL(); // at 0x0 u32 mSize; // at 0x8 FreeCallback mCallback; // at 0xc - void* mCallbackArg; // at 0x10 + void *mCallbackArg; // at 0x10 - Block(u32 size, FreeCallback pCallback, void* pCallbackArg) + Block(u32 size, FreeCallback pCallback, void *pCallbackArg) : mSize(size), mCallback(pCallback), mCallbackArg(pCallbackArg) {} ~Block() { @@ -49,7 +47,7 @@ class FrameHeap { } } - void* GetBufferAddr() { + void *GetBufferAddr() { return ut::AddOffsetToPtr(this, BLOCK_BUFFER_SIZE); } }; @@ -61,14 +59,12 @@ class FrameHeap { BlockList mBlockList; // at 0x8 ~Section() { - for (BlockList::Iterator it = mBlockList.GetEndIter(); - it != mBlockList.GetBeginIter();) { - + for (BlockList::Iterator it = mBlockList.GetEndIter(); it != mBlockList.GetBeginIter();) { (--it)->~Block(); } } - void AppendBlock(Block* pBlock) { + void AppendBlock(Block *pBlock) { mBlockList.PushBack(pBlock); } }; @@ -83,7 +79,7 @@ class FrameHeap { void ClearSection(); private: - MEMiHeapHead* mHandle; // at 0x0 + MEMiHeapHead *mHandle; // at 0x0 SectionList mSectionList; // at 0x4 }; diff --git a/include/nw4r/snd/snd_FxBase.h b/include/nw4r/snd/snd_FxBase.h index 31b6e448..3ba41214 100644 --- a/include/nw4r/snd/snd_FxBase.h +++ b/include/nw4r/snd/snd_FxBase.h @@ -1,10 +1,8 @@ #ifndef NW4R_SND_FX_BASE_H #define NW4R_SND_FX_BASE_H -#include - -#include - -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -26,10 +24,10 @@ class FxBase : private ut::NonCopyable { virtual void Shutdown() {} // at 0x10 - virtual void UpdateBuffer(int /* channels */, void** /* ppBuffer */, - u32 /* size */, SampleFormat /* format */, - f32 /* sampleRate */, OutputMode /* mode */) { - } // at 0x14 + virtual void UpdateBuffer( + int /* channels */, void ** /* ppBuffer */, u32 /* size */, SampleFormat /* format */, f32 /* sampleRate */, + OutputMode /* mode */ + ) {} // at 0x14 public: NW4R_UT_LIST_NODE_DECL(); // at 0x4 diff --git a/include/nw4r/snd/snd_FxChorus.h b/include/nw4r/snd/snd_FxChorus.h index 3ef2144c..5eba387b 100644 --- a/include/nw4r/snd/snd_FxChorus.h +++ b/include/nw4r/snd/snd_FxChorus.h @@ -1,11 +1,9 @@ #ifndef NW4R_SND_FX_CHORUS_H #define NW4R_SND_FX_CHORUS_H -#include - -#include -#include - -#include +#include "nw4r/snd/snd_AxfxImpl.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/types_nw4r.h" +#include "rvl/AXFX.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -29,15 +27,16 @@ class FxChorus : public FxBase { virtual bool StartUp(); // at 0xC virtual void Shutdown(); // at 0x10 - virtual void UpdateBuffer(int channels, void** ppBuffer, u32 size, - SampleFormat format, f32 sampleRate, - OutputMode mode); // at 0x14 + virtual void UpdateBuffer( + int channels, void **ppBuffer, u32 size, SampleFormat format, f32 sampleRate, + OutputMode mode + ); // at 0x14 - virtual bool AssignWorkBuffer(void* pBuffer, u32 size); // at 0x18 + virtual bool AssignWorkBuffer(void *pBuffer, u32 size); // at 0x18 virtual void ReleaseWorkBuffer(); // at 0x1C u32 GetRequiredMemSize(); - bool SetParam(const ChorusParam& rParam); + bool SetParam(const ChorusParam &rParam); private: detail::AxfxImpl mImpl; // at 0xC diff --git a/include/nw4r/snd/snd_FxDelay.h b/include/nw4r/snd/snd_FxDelay.h index a91eecf0..54379a8c 100644 --- a/include/nw4r/snd/snd_FxDelay.h +++ b/include/nw4r/snd/snd_FxDelay.h @@ -1,11 +1,9 @@ #ifndef NW4R_SND_FX_DELAY_H #define NW4R_SND_FX_DELAY_H -#include - -#include -#include - -#include +#include "nw4r/snd/snd_AxfxImpl.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/types_nw4r.h" +#include "rvl/AXFX.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -29,15 +27,16 @@ class FxDelay : public FxBase { virtual bool StartUp(); // at 0xC virtual void Shutdown(); // at 0x10 - virtual void UpdateBuffer(int channels, void** ppBuffer, u32 size, - SampleFormat format, f32 sampleRate, - OutputMode mode); // at 0x14 + virtual void UpdateBuffer( + int channels, void **ppBuffer, u32 size, SampleFormat format, f32 sampleRate, + OutputMode mode + ); // at 0x14 - virtual bool AssignWorkBuffer(void* pBuffer, u32 size); // at 0x18 + virtual bool AssignWorkBuffer(void *pBuffer, u32 size); // at 0x18 virtual void ReleaseWorkBuffer(); // at 0x1C u32 GetRequiredMemSize(); - bool SetParam(const DelayParam& rParam); + bool SetParam(const DelayParam &rParam); private: detail::AxfxImpl mImpl; // at 0xC diff --git a/include/nw4r/snd/snd_FxReverbHi.h b/include/nw4r/snd/snd_FxReverbHi.h index 12d9be52..52767740 100644 --- a/include/nw4r/snd/snd_FxReverbHi.h +++ b/include/nw4r/snd/snd_FxReverbHi.h @@ -1,11 +1,9 @@ #ifndef NW4R_SND_FX_REVERB_HI_H #define NW4R_SND_FX_REVERB_HI_H -#include - -#include -#include - -#include +#include "nw4r/snd/snd_AxfxImpl.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/types_nw4r.h" +#include "rvl/AXFX.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -32,15 +30,16 @@ class FxReverbHi : public FxBase { virtual bool StartUp(); // at 0xC virtual void Shutdown(); // at 0x10 - virtual void UpdateBuffer(int channels, void** ppBuffer, u32 size, - SampleFormat format, f32 sampleRate, - OutputMode mode); // at 0x14 + virtual void UpdateBuffer( + int channels, void **ppBuffer, u32 size, SampleFormat format, f32 sampleRate, + OutputMode mode + ); // at 0x14 - virtual bool AssignWorkBuffer(void* pBuffer, u32 size); // at 0x18 + virtual bool AssignWorkBuffer(void *pBuffer, u32 size); // at 0x18 virtual void ReleaseWorkBuffer(); // at 0x1C u32 GetRequiredMemSize(); - bool SetParam(const ReverbHiParam& rParam); + bool SetParam(const ReverbHiParam &rParam); private: detail::AxfxImpl mImpl; // at 0xC diff --git a/include/nw4r/snd/snd_FxReverbHiDpl2.h b/include/nw4r/snd/snd_FxReverbHiDpl2.h index 8c3124f0..db5b2dc5 100644 --- a/include/nw4r/snd/snd_FxReverbHiDpl2.h +++ b/include/nw4r/snd/snd_FxReverbHiDpl2.h @@ -1,11 +1,9 @@ #ifndef NW4R_SND_FX_REVERB_HI_DPL2_H #define NW4R_SND_FX_REVERB_HI_DPL2_H -#include - -#include -#include - -#include +#include "nw4r/snd/snd_AxfxImpl.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/types_nw4r.h" +#include "rvl/AXFX.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -32,15 +30,16 @@ class FxReverbHiDpl2 : public FxBase { virtual bool StartUp(); // at 0xC virtual void Shutdown(); // at 0x10 - virtual void UpdateBuffer(int channels, void** ppBuffer, u32 size, - SampleFormat format, f32 sampleRate, - OutputMode mode); // at 0x14 + virtual void UpdateBuffer( + int channels, void **ppBuffer, u32 size, SampleFormat format, f32 sampleRate, + OutputMode mode + ); // at 0x14 - virtual bool AssignWorkBuffer(void* pBuffer, u32 size); // at 0x18 + virtual bool AssignWorkBuffer(void *pBuffer, u32 size); // at 0x18 virtual void ReleaseWorkBuffer(); // at 0x1C u32 GetRequiredMemSize(); - bool SetParam(const ReverbHiDpl2Param& rParam); + bool SetParam(const ReverbHiDpl2Param &rParam); private: detail::AxfxImpl mImpl; // at 0xC diff --git a/include/nw4r/snd/snd_InstancePool.h b/include/nw4r/snd/snd_InstancePool.h index 12618f4c..949e2198 100644 --- a/include/nw4r/snd/snd_InstancePool.h +++ b/include/nw4r/snd/snd_InstancePool.h @@ -1,6 +1,6 @@ #ifndef NW4R_SND_INSTANCE_POOL_H #define NW4R_SND_INSTANCE_POOL_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -11,24 +11,25 @@ class PoolImpl { PoolImpl() : mNext(NULL) {} protected: - u32 CreateImpl(void* pBuffer, u32 size, u32 stride); - void DestroyImpl(void* pBuffer, u32 size); + u32 CreateImpl(void *pBuffer, u32 size, u32 stride); + void DestroyImpl(void *pBuffer, u32 size); int CountImpl() const; - void* AllocImpl(); - void FreeImpl(void* pElem); + void *AllocImpl(); + void FreeImpl(void *pElem); private: - PoolImpl* mNext; // at 0x0 + PoolImpl *mNext; // at 0x0 }; -template class InstancePool : private PoolImpl { +template +class InstancePool : private PoolImpl { public: - u32 Create(void* pBuffer, u32 size) { + u32 Create(void *pBuffer, u32 size) { return CreateImpl(pBuffer, size, sizeof(T)); } - void Destroy(void* pPtr, u32 size) { + void Destroy(void *pPtr, u32 size) { DestroyImpl(pPtr, size); } @@ -36,8 +37,8 @@ template class InstancePool : private PoolImpl { return CountImpl(); } - T* Alloc() { - void* pPtr = AllocImpl(); + T *Alloc() { + void *pPtr = AllocImpl(); if (pPtr == NULL) { return NULL; } @@ -45,7 +46,7 @@ template class InstancePool : private PoolImpl { return new (pPtr) T; } - void Free(T* pElem) { + void Free(T *pElem) { if (pElem != NULL) { pElem->~T(); FreeImpl(pElem); @@ -53,13 +54,14 @@ template class InstancePool : private PoolImpl { } }; -template class MemoryPool : private PoolImpl { +template +class MemoryPool : private PoolImpl { public: - u32 Create(void* pBuffer, u32 size) { + u32 Create(void *pBuffer, u32 size) { return CreateImpl(pBuffer, size, sizeof(T)); } - void Destroy(void* pPtr, u32 size) { + void Destroy(void *pPtr, u32 size) { DestroyImpl(pPtr, size); } @@ -67,11 +69,11 @@ template class MemoryPool : private PoolImpl { return CountImpl(); } - T* Alloc() { - return static_cast(AllocImpl()); + T *Alloc() { + return static_cast(AllocImpl()); } - void Free(T* pElem) { + void Free(T *pElem) { FreeImpl(pElem); } }; diff --git a/include/nw4r/snd/snd_Lfo.h b/include/nw4r/snd/snd_Lfo.h index 6b33e5c5..8c6c73f9 100644 --- a/include/nw4r/snd/snd_Lfo.h +++ b/include/nw4r/snd/snd_Lfo.h @@ -1,6 +1,6 @@ #ifndef NW4R_SND_LFO_H #define NW4R_SND_LFO_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -24,10 +24,10 @@ class Lfo { public: Lfo() : mDelayCounter(0), mCounter(0.0f) {} - LfoParam& GetParam() { + LfoParam &GetParam() { return mParam; } - void SetParam(const LfoParam& rParam) { + void SetParam(const LfoParam &rParam) { mParam = rParam; } diff --git a/include/nw4r/snd/snd_MemorySoundArchive.h b/include/nw4r/snd/snd_MemorySoundArchive.h index 447b4d80..02b414c9 100644 --- a/include/nw4r/snd/snd_MemorySoundArchive.h +++ b/include/nw4r/snd/snd_MemorySoundArchive.h @@ -1,11 +1,10 @@ #ifndef NW4R_SND_MEMORY_SOUND_ARCHIVE_H #define NW4R_SND_MEMORY_SOUND_ARCHIVE_H -#include +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundArchiveFile.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include - -#include namespace nw4r { namespace snd { @@ -18,23 +17,24 @@ class MemorySoundArchive : public SoundArchive { MemorySoundArchive(); virtual ~MemorySoundArchive(); // at 0x8 - virtual const void* detail_GetFileAddress(u32 id) const; // at 0xC - virtual const void* detail_GetWaveDataFileAddress(u32 id) const; // at 0x10 + virtual const void *detail_GetFileAddress(u32 id) const; // at 0xC + virtual const void *detail_GetWaveDataFileAddress(u32 id) const; // at 0x10 virtual int detail_GetRequiredStreamBufferSize() const; // at 0x14 - virtual ut::FileStream* OpenStream(void* pBuffer, int size, u32 offset, + virtual ut::FileStream *OpenStream(void *pBuffer, int size, u32 offset, u32 length) const; // at 0x18 - virtual ut::FileStream* OpenExtStream(void* pBuffer, int size, - const char* pExtPath, u32 offset, - u32 length) const; // at 0x1C + virtual ut::FileStream *OpenExtStream( + void *pBuffer, int size, const char *pExtPath, u32 offset, + u32 length + ) const; // at 0x1C - bool Setup(const void* pBuffer); + bool Setup(const void *pBuffer); void Shutdown(); private: - const void* mData; // at 0x108 + const void *mData; // at 0x108 detail::SoundArchiveFileReader mFileReader; // at 0x10C }; diff --git a/include/nw4r/snd/snd_MmlParser.h b/include/nw4r/snd/snd_MmlParser.h index 7795649b..d8610f2e 100644 --- a/include/nw4r/snd/snd_MmlParser.h +++ b/include/nw4r/snd/snd_MmlParser.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_MML_PARSER_H #define NW4R_SND_MML_PARSER_H -#include +#include "nw4r/snd/snd_SeqTrack.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -25,17 +25,17 @@ class MmlParser { static const int CALL_STACK_MAX_DEPTH = 3; public: - virtual void CommandProc(MmlSeqTrack* pTrack, u32 command, s32 arg1, + virtual void CommandProc(MmlSeqTrack *pTrack, u32 command, s32 arg1, s32 arg2) const; // at 0x8 - virtual Channel* NoteOnCommandProc(MmlSeqTrack* pTrack, int key, - int velocity, s32 length, - bool tie) const; // at 0xC + virtual Channel *NoteOnCommandProc( + MmlSeqTrack *pTrack, int key, int velocity, s32 length, + bool tie + ) const; // at 0xC - ParseResult Parse(MmlSeqTrack* pTrack, bool doNoteOn) const; + ParseResult Parse(MmlSeqTrack *pTrack, bool doNoteOn) const; - volatile s16* GetVariablePtr(SeqPlayer* pPlayer, SeqTrack* pTrack, - int i) const; + volatile s16 *GetVariablePtr(SeqPlayer *pPlayer, SeqTrack *pTrack, int i) const; static void EnablePrintVar(bool enable) { mPrintVarEnabledFlag = enable; @@ -140,15 +140,14 @@ class MmlParser { }; private: - u8 ReadByte(const u8** ppData) const { + u8 ReadByte(const u8 **ppData) const { return *(*ppData)++; } - u16 Read16(const u8** ppData) const; - u32 Read24(const u8** ppData) const; - s32 ReadVar(const u8** ppData) const; - s32 ReadArg(const u8** ppData, SeqPlayer* pPlayer, SeqTrack* pTrack, - SeqArgType type) const; + u16 Read16(const u8 **ppData) const; + u32 Read24(const u8 **ppData) const; + s32 ReadVar(const u8 **ppData) const; + s32 ReadArg(const u8 **ppData, SeqPlayer *pPlayer, SeqTrack *pTrack, SeqArgType type) const; private: static bool mPrintVarEnabledFlag; diff --git a/include/nw4r/snd/snd_MmlSeqTrack.h b/include/nw4r/snd/snd_MmlSeqTrack.h index a5c9c114..547cdd0f 100644 --- a/include/nw4r/snd/snd_MmlSeqTrack.h +++ b/include/nw4r/snd/snd_MmlSeqTrack.h @@ -1,9 +1,9 @@ #ifndef NW4R_SND_MML_SEQ_TRACK_H #define NW4R_SND_MML_SEQ_TRACK_H -#include +#include "nw4r/snd/snd_MmlParser.h" +#include "nw4r/snd/snd_SeqTrack.h" +#include "nw4r/types_nw4r.h" -#include -#include namespace nw4r { namespace snd { @@ -20,23 +20,23 @@ class MmlSeqTrack : public SeqTrack { bool tieFlag; // at 0x2 u8 loopCount[MmlParser::CALL_STACK_MAX_DEPTH]; // at 0x3 u8 callStackDepth; // at 0x6 - const u8* callStack[MmlParser::CALL_STACK_MAX_DEPTH]; // at 0x8 + const u8 *callStack[MmlParser::CALL_STACK_MAX_DEPTH]; // at 0x8 }; public: MmlSeqTrack(); virtual ParseResult Parse(bool doNoteOn); // at 0xC - void SetMmlParser(const MmlParser* pParser) { + void SetMmlParser(const MmlParser *pParser) { mParser = pParser; } - MmlParserParam& GetMmlParserParam() { + MmlParserParam &GetMmlParserParam() { return mMmlParserParam; } private: - const MmlParser* mParser; // at 0xC0 + const MmlParser *mParser; // at 0xC0 MmlParserParam mMmlParserParam; // at 0xC4 }; diff --git a/include/nw4r/snd/snd_MmlSeqTrackAllocator.h b/include/nw4r/snd/snd_MmlSeqTrackAllocator.h index 4cc7e274..a4ae2918 100644 --- a/include/nw4r/snd/snd_MmlSeqTrackAllocator.h +++ b/include/nw4r/snd/snd_MmlSeqTrackAllocator.h @@ -1,9 +1,9 @@ #ifndef NW4R_SND_MML_SEQ_TRACK_ALLOCATOR_H #define NW4R_SND_MML_SEQ_TRACK_ALLOCATOR_H -#include +#include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/snd/snd_SeqTrackAllocator.h" +#include "nw4r/types_nw4r.h" -#include -#include namespace nw4r { namespace snd { @@ -16,20 +16,20 @@ class SeqTrack; class MmlSeqTrackAllocator : public SeqTrackAllocator { public: - MmlSeqTrackAllocator(MmlParser* pParser) : mParser(pParser) {} + MmlSeqTrackAllocator(MmlParser *pParser) : mParser(pParser) {} - virtual SeqTrack* AllocTrack(SeqPlayer* pPlayer); // at 0xC - virtual void FreeTrack(SeqTrack* pTrack); // at 0x10 + virtual SeqTrack *AllocTrack(SeqPlayer *pPlayer); // at 0xC + virtual void FreeTrack(SeqTrack *pTrack); // at 0x10 virtual int GetAllocatableTrackCount() const { return mTrackPool.Count(); } // at 0x14 - u32 Create(void* pBuffer, u32 size); - void Destroy(void* pBuffer, u32 size); + u32 Create(void *pBuffer, u32 size); + void Destroy(void *pBuffer, u32 size); private: - MmlParser* mParser; // at 0x4 + MmlParser *mParser; // at 0x4 InstancePool mTrackPool; // at 0x8 }; diff --git a/include/nw4r/snd/snd_MoveValue.h b/include/nw4r/snd/snd_MoveValue.h index 750a5e79..0ee38d2d 100644 --- a/include/nw4r/snd/snd_MoveValue.h +++ b/include/nw4r/snd/snd_MoveValue.h @@ -1,18 +1,15 @@ #ifndef NW4R_SND_MOVE_VALUE_H #define NW4R_SND_MOVE_VALUE_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { namespace detail { -template class MoveValue { +template +class MoveValue { public: - MoveValue() - : mOrigin(TValue()), - mTarget(TValue()), - mFrame(TTime()), - mCounter(TTime()) {} + MoveValue() : mOrigin(TValue()), mTarget(TValue()), mFrame(TTime()), mCounter(TTime()) {} void InitValue(TValue t1) { mOrigin = t1; diff --git a/include/nw4r/snd/snd_NandSoundArchive.h b/include/nw4r/snd/snd_NandSoundArchive.h index d7ae910e..6675fb90 100644 --- a/include/nw4r/snd/snd_NandSoundArchive.h +++ b/include/nw4r/snd/snd_NandSoundArchive.h @@ -1,13 +1,10 @@ #ifndef NW4R_SND_NAND_SOUND_ARCHIVE_H #define NW4R_SND_NAND_SOUND_ARCHIVE_H -#include - -#include -#include - -#include - -#include +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundArchiveFile.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/NAND.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -20,28 +17,29 @@ class NandSoundArchive : public SoundArchive { NandSoundArchive(); virtual ~NandSoundArchive(); // at 0x8 - virtual const void* detail_GetFileAddress(u32 /* id */) const { + virtual const void *detail_GetFileAddress(u32 /* id */) const { return NULL; } // at 0xC - virtual const void* detail_GetWaveDataFileAddress(u32 /* id */) const { + virtual const void *detail_GetWaveDataFileAddress(u32 /* id */) const { return NULL; } // at 0x10 virtual int detail_GetRequiredStreamBufferSize() const; // at 0x14 - virtual ut::FileStream* OpenStream(void* pBuffer, int size, u32 offset, + virtual ut::FileStream *OpenStream(void *pBuffer, int size, u32 offset, u32 length) const; // at 0x18 - virtual ut::FileStream* OpenExtStream(void* pBuffer, int size, - const char* pExtPath, u32 offset, - u32 length) const; // at 0x1C + virtual ut::FileStream *OpenExtStream( + void *pBuffer, int size, const char *pExtPath, u32 offset, + u32 length + ) const; // at 0x1C - bool Open(const char* pPath); + bool Open(const char *pPath); void Close(); - bool LoadHeader(void* pBuffer, u32 size); - bool LoadLabelStringData(void* pBuffer, u32 size); + bool LoadHeader(void *pBuffer, u32 size); + bool LoadLabelStringData(void *pBuffer, u32 size); u32 GetHeaderSize() const { return mFileReader.GetInfoChunkSize(); @@ -51,7 +49,7 @@ class NandSoundArchive : public SoundArchive { } private: - bool LoadFileHeader() DECOMP_DONT_INLINE; + bool LoadFileHeader() DONT_INLINE; private: detail::SoundArchiveFileReader mFileReader; // at 0x108 diff --git a/include/nw4r/snd/snd_NoteOnCallback.h b/include/nw4r/snd/snd_NoteOnCallback.h index 258520f7..e6845a5f 100644 --- a/include/nw4r/snd/snd_NoteOnCallback.h +++ b/include/nw4r/snd/snd_NoteOnCallback.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_NOTE_ON_CALLBACK_H #define NW4R_SND_NOTE_ON_CALLBACK_H -#include +#include "nw4r/snd/snd_Channel.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -27,8 +27,8 @@ class NoteOnCallback { public: virtual ~NoteOnCallback() {} // at 0x8 - virtual Channel* NoteOn(SeqPlayer* pPlayer, int bankNo, - const NoteOnInfo& rInfo) = 0; // at 0xC + virtual Channel *NoteOn(SeqPlayer *pPlayer, int bankNo, + const NoteOnInfo &rInfo) = 0; // at 0xC }; } // namespace detail diff --git a/include/nw4r/snd/snd_PlayerHeap.h b/include/nw4r/snd/snd_PlayerHeap.h index 38fc2334..7c3dc735 100644 --- a/include/nw4r/snd/snd_PlayerHeap.h +++ b/include/nw4r/snd/snd_PlayerHeap.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_PLAYER_HEAP_H #define NW4R_SND_PLAYER_HEAP_H -#include +#include "nw4r/snd/snd_SoundHeap.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -20,11 +20,11 @@ class PlayerHeap : public SoundHeap { PlayerHeap() : mSound(NULL), mPlayer(NULL) {} virtual ~PlayerHeap() {} // at 0x8 - void SetSound(BasicSound* pSound) { + void SetSound(BasicSound *pSound) { mSound = pSound; } - void SetSoundPlayer(SoundPlayer* pPlayer) { + void SetSoundPlayer(SoundPlayer *pPlayer) { mPlayer = pPlayer; } @@ -32,8 +32,8 @@ class PlayerHeap : public SoundHeap { NW4R_UT_LIST_NODE_DECL(); // at 0x2C private: - BasicSound* mSound; // at 0x34 - SoundPlayer* mPlayer; // at 0x38 + BasicSound *mSound; // at 0x34 + SoundPlayer *mPlayer; // at 0x38 }; NW4R_UT_LIST_TYPEDEF_DECL(PlayerHeap); diff --git a/include/nw4r/snd/snd_RemoteSpeaker.h b/include/nw4r/snd/snd_RemoteSpeaker.h index 884ec247..09b393b4 100644 --- a/include/nw4r/snd/snd_RemoteSpeaker.h +++ b/include/nw4r/snd/snd_RemoteSpeaker.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_REMOTE_SPEAKER_H #define NW4R_SND_REMOTE_SPEAKER_H -#include -#include -#include -#include +#include "rvl/OS.h" // IWYU pragma: export +#include "rvl/WENC.h" // IWYU pragma: export +#include "rvl/WPAD.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -41,7 +40,7 @@ class RemoteSpeaker { bool IsEnabledOutput() const; void Update(); - void UpdateStreamData(const s16* pRmtSamples); + void UpdateStreamData(const s16 *pRmtSamples); bool IsAvailable() const { return mState == STATE_SPEAKER_PLAY; @@ -52,8 +51,7 @@ class RemoteSpeaker { } private: - static const int SAMPLES_PER_ENCODED_PACKET = - (SAMPLES_PER_AUDIO_PACKET + 1) / 2; + static const int SAMPLES_PER_ENCODED_PACKET = (SAMPLES_PER_AUDIO_PACKET + 1) / 2; static const int CONTINUOUS_PLAY_INTERVAL_MINUTES = 8; @@ -61,25 +59,25 @@ class RemoteSpeaker { void ClearParam(); void ExecCommand(SpeakerCommand command); - bool IsAllSampleZero(const s16* pRmtSamples); + bool IsAllSampleZero(const s16 *pRmtSamples); void NotifyCallback(s32 chan, s32 result); static void SpeakerOnCallback(s32 chan, s32 result); static void SpeakerPlayCallback(s32 chan, s32 result); static void SpeakerOffCallback(s32 chan, s32 result); - static void ContinueAlarmHandler(OSAlarm* pAlarm, OSContext* pCtx); - static void IntervalAlarmHandler(OSAlarm* pAlarm, OSContext* pCtx); + static void ContinueAlarmHandler(OSAlarm *pAlarm, OSContext *pCtx); + static void IntervalAlarmHandler(OSAlarm *pAlarm, OSContext *pCtx); private: - bool mInitFlag; // at 0x0 - bool mPlayFlag; // at 0x1 - bool mEnableFlag; // at 0x2 - bool mFirstEncodeFlag; // at 0x3 - bool mValidCallbackFlag; // at 0x4 - bool mCommandBusyFlag; // at 0x5 - bool mForceResumeFlag; // at 0x6 - bool mContinueFlag; // at 0x7 + bool mInitFlag; // at 0x0 + bool mPlayFlag; // at 0x1 + bool mEnableFlag; // at 0x2 + bool mFirstEncodeFlag; // at 0x3 + bool mValidCallbackFlag; // at 0x4 + bool mCommandBusyFlag; // at 0x5 + bool mForceResumeFlag; // at 0x6 + bool mContinueFlag; // at 0x7 // TODO commenting out a random flag to make eggAudioRmtSpeakerMgr match // TODO offsets are wrong as a result // volatile bool mIntervalFlag; // at 0x8 diff --git a/include/nw4r/snd/snd_RemoteSpeakerManager.h b/include/nw4r/snd/snd_RemoteSpeakerManager.h index 100541d9..79ebd56d 100644 --- a/include/nw4r/snd/snd_RemoteSpeakerManager.h +++ b/include/nw4r/snd/snd_RemoteSpeakerManager.h @@ -1,11 +1,9 @@ #ifndef NW4R_SND_REMOTE_SPEAKER_MANAGER_H #define NW4R_SND_REMOTE_SPEAKER_MANAGER_H -#include +#include "nw4r/snd/snd_RemoteSpeaker.h" +#include "rvl/OS.h" // IWYU pragma: export +#include "rvl/WPAD.h" // IWYU pragma: export -#include - -#include -#include namespace nw4r { namespace snd { @@ -13,9 +11,9 @@ namespace detail { class RemoteSpeakerManager { public: - static RemoteSpeakerManager& GetInstance(); + static RemoteSpeakerManager &GetInstance(); - RemoteSpeaker& GetRemoteSpeaker(int i); + RemoteSpeaker &GetRemoteSpeaker(int i); void Setup(); void Shutdown(); @@ -23,13 +21,12 @@ class RemoteSpeakerManager { private: static const int SPEAKER_ALARM_HZ = 150; - static const int SPEAKER_ALARM_PERIOD_NSEC = - static_cast(1.0f / SPEAKER_ALARM_HZ * 1000 * 1000 * 1000); + static const int SPEAKER_ALARM_PERIOD_NSEC = static_cast(1.0f / SPEAKER_ALARM_HZ * 1000 * 1000 * 1000); private: RemoteSpeakerManager(); - static void RemoteSpeakerAlarmProc(OSAlarm* pAlarm, OSContext* pCtx); + static void RemoteSpeakerAlarmProc(OSAlarm *pAlarm, OSContext *pCtx); private: bool mInitialized; // at 0x0 diff --git a/include/nw4r/snd/snd_SeqFile.h b/include/nw4r/snd/snd_SeqFile.h index ae50d756..f6ac4eb3 100644 --- a/include/nw4r/snd/snd_SeqFile.h +++ b/include/nw4r/snd/snd_SeqFile.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_SEQ_FILE_H #define NW4R_SND_SEQ_FILE_H -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include namespace nw4r { namespace snd { @@ -30,15 +30,15 @@ class SeqFileReader { static const int VERSION = NW4R_VERSION(1, 0); public: - explicit SeqFileReader(const void* pSeqBin); + explicit SeqFileReader(const void *pSeqBin); - bool IsValidFileHeader(const void* pSeqBin); + bool IsValidFileHeader(const void *pSeqBin); - const void* GetBaseAddress() const; + const void *GetBaseAddress() const; private: - const SeqFile::Header* mHeader; // at 0x0 - const SeqFile::DataBlock* mDataBlock; // at 0x4 + const SeqFile::Header *mHeader; // at 0x0 + const SeqFile::DataBlock *mDataBlock; // at 0x4 }; } // namespace detail diff --git a/include/nw4r/snd/snd_SeqPlayer.h b/include/nw4r/snd/snd_SeqPlayer.h index 34062af2..353d5402 100644 --- a/include/nw4r/snd/snd_SeqPlayer.h +++ b/include/nw4r/snd/snd_SeqPlayer.h @@ -1,12 +1,11 @@ #ifndef NW4R_SND_SEQ_PLAYER_H #define NW4R_SND_SEQ_PLAYER_H -#include +#include "nw4r/snd/snd_BasicPlayer.h" +#include "nw4r/snd/snd_DisposeCallback.h" +#include "nw4r/snd/snd_SoundThread.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include -#include - -#include namespace nw4r { namespace snd { @@ -19,19 +18,20 @@ class NoteOnCallback; class SeqTrack; class SeqTrackAllocator; -class SeqPlayer : public BasicPlayer, - public DisposeCallback, - public SoundThread::PlayerCallback { +class SeqPlayer : public BasicPlayer, public DisposeCallback, public SoundThread::PlayerCallback { public: struct ParserPlayerParam { u8 volume; // at 0x0 u8 priority; // at 0x1 u8 timebase; // at 0x2 u16 tempo; // at 0x4 - NoteOnCallback* callback; // at 0x8 + NoteOnCallback *callback; // at 0x8 }; - enum OffsetType { OFFSET_TYPE_TICK, OFFSET_TYPE_MILLISEC }; + enum OffsetType { + OFFSET_TYPE_TICK, + OFFSET_TYPE_MILLISEC + }; enum SetupResult { SETUP_SUCCESS, @@ -65,13 +65,12 @@ class SeqPlayer : public BasicPlayer, return mPauseFlag; } // at 0x20 - virtual void InvalidateData(const void* pStart, - const void* pEnd); // at 0x50 + virtual void InvalidateData(const void *pStart, + const void *pEnd); // at 0x50 - virtual void InvalidateWaveData(const void* /* pStart */, - const void* /* pEnd */) {} // at 0x54 + virtual void InvalidateWaveData(const void * /* pStart */, const void * /* pEnd */) {} // at 0x54 - virtual void ChannelCallback(Channel* /* pChannel */) {} // at 0x58 + virtual void ChannelCallback(Channel * /* pChannel */) {} // at 0x58 virtual void OnUpdateFrameSoundThread() { Update(); @@ -81,11 +80,10 @@ class SeqPlayer : public BasicPlayer, Stop(); } // at 0x60 - void InitParam(int voices, NoteOnCallback* pCallback); + void InitParam(int voices, NoteOnCallback *pCallback); - SetupResult Setup(SeqTrackAllocator* pAllocator, u32 allocTrackFlags, - int voices, NoteOnCallback* pCallback); - void SetSeqData(const void* pBase, s32 offset); + SetupResult Setup(SeqTrackAllocator *pAllocator, u32 allocTrackFlags, int voices, NoteOnCallback *pCallback); + void SetSeqData(const void *pBase, s32 offset); void Skip(OffsetType type, int offset); @@ -99,21 +97,19 @@ class SeqPlayer : public BasicPlayer, void SetTrackVolume(u32 trackFlags, f32 volume); void SetTrackPitch(u32 trackFlags, f32 pitch); - SeqTrack* GetPlayerTrack(int i); - volatile s16* GetVariablePtr(int i); + SeqTrack *GetPlayerTrack(int i); + volatile s16 *GetVariablePtr(int i); void Update(); - Channel* NoteOn(int bankNo, const NoteOnInfo& rInfo); + Channel *NoteOn(int bankNo, const NoteOnInfo &rInfo); template void SetTrackParam(u32 trackFlags, void (SeqTrack::*pSetter)(T), T param) { ut::AutoInterruptLock lock; - for (int i = 0; i < TRACK_NUM && trackFlags != 0; - trackFlags >>= 1, i++) { - + for (int i = 0; i < TRACK_NUM && trackFlags != 0; trackFlags >>= 1, i++) { if (trackFlags & 1) { - SeqTrack* pTrack = GetPlayerTrack(i); + SeqTrack *pTrack = GetPlayerTrack(i); if (pTrack != NULL) { (pTrack->*pSetter)(param); @@ -131,15 +127,14 @@ class SeqPlayer : public BasicPlayer, } f32 GetBaseTempo() const { - return mTempoRatio * (mParserParam.timebase * mParserParam.tempo) / - 60000.0f; + return mTempoRatio * (mParserParam.timebase * mParserParam.tempo) / 60000.0f; } int GetVoiceOutCount() const { return mVoiceOutCount; } - ParserPlayerParam& GetParserPlayerParam() { + ParserPlayerParam &GetParserPlayerParam() { return mParserParam; } @@ -153,7 +148,7 @@ class SeqPlayer : public BasicPlayer, private: void CloseTrack(int i); - void SetPlayerTrack(int i, SeqTrack* pTrack); + void SetPlayerTrack(int i, SeqTrack *pTrack); void FinishPlayer(); void UpdateChannelParam(); @@ -177,8 +172,8 @@ class SeqPlayer : public BasicPlayer, f32 mSkipTimeCounter; // at 0xA0 int mVoiceOutCount; // at 0xA4 ParserPlayerParam mParserParam; // at 0xA8 - SeqTrackAllocator* mSeqTrackAllocator; // at 0xB4 - SeqTrack* mTracks[TRACK_NUM]; // at 0xB8 + SeqTrackAllocator *mSeqTrackAllocator; // at 0xB4 + SeqTrack *mTracks[TRACK_NUM]; // at 0xB8 volatile s16 mLocalVariable[LOCAL_VARIABLE_NUM]; // at 0xF8 u32 mTickCounter; // at 0x118 diff --git a/include/nw4r/snd/snd_SeqSound.h b/include/nw4r/snd/snd_SeqSound.h index 28be96b9..3c933343 100644 --- a/include/nw4r/snd/snd_SeqSound.h +++ b/include/nw4r/snd/snd_SeqSound.h @@ -1,14 +1,11 @@ #ifndef NW4R_SND_SEQ_SOUND_H #define NW4R_SND_SEQ_SOUND_H -#include - -#include -#include -#include - -#include - -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_SeqPlayer.h" +#include "nw4r/snd/snd_Task.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -19,7 +16,8 @@ class SeqSoundHandle; namespace detail { // Forward declarations -template class SoundInstanceManager; +template +class SoundInstanceManager; class SeqSound : public BasicSound { friend class SeqSoundHandle; @@ -28,7 +26,7 @@ class SeqSound : public BasicSound { NW4R_UT_RTTI_DECL(SeqSound); public: - explicit SeqSound(SoundInstanceManager* pManager); + explicit SeqSound(SoundInstanceManager *pManager); virtual void Shutdown(); // at 0x28 virtual bool IsPrepared() const { @@ -42,22 +40,19 @@ class SeqSound : public BasicSound { virtual void InitParam(); // at 0x64 - virtual BasicPlayer& GetBasicPlayer() { + virtual BasicPlayer &GetBasicPlayer() { return mSeqPlayer; } // at 0x68 - virtual const BasicPlayer& GetBasicPlayer() const { + virtual const BasicPlayer &GetBasicPlayer() const { return mSeqPlayer; } // at 0x6C - SeqPlayer::SetupResult Setup(SeqTrackAllocator* pAllocator, - u32 allocTrackFlags, int voices, - NoteOnCallback* pCallback); + SeqPlayer::SetupResult + Setup(SeqTrackAllocator *pAllocator, u32 allocTrackFlags, int voices, NoteOnCallback *pCallback); - void Prepare(const void* pBase, s32 seqOffset, - SeqPlayer::OffsetType startType, int startOffset); + void Prepare(const void *pBase, s32 seqOffset, SeqPlayer::OffsetType startType, int startOffset); - void Prepare(ut::FileStream* pStream, s32 seqOffset, - SeqPlayer::OffsetType startType, int startOffset); + void Prepare(ut::FileStream *pStream, s32 seqOffset, SeqPlayer::OffsetType startType, int startOffset); void Skip(SeqPlayer::OffsetType offsetType, int offset); @@ -71,7 +66,7 @@ class SeqSound : public BasicSound { bool WriteVariable(int i, s16 value); static bool WriteGlobalVariable(int i, s16 value); - void* GetFileStreamBuffer() { + void *GetFileStreamBuffer() { return mFileStreamBuffer; } s32 GetFileStreamBufferSize() { @@ -79,8 +74,7 @@ class SeqSound : public BasicSound { } private: - typedef void (*SeqLoadCallback)(bool success, const void* pBase, - void* pCallbackArg); + typedef void (*SeqLoadCallback)(bool success, const void *pBase, void *pCallbackArg); struct SeqLoadTask : public Task { SeqLoadTask(); @@ -89,25 +83,24 @@ class SeqSound : public BasicSound { virtual void Cancel(); // at 0x10 virtual void OnCancel(); // at 0x14 - ut::FileStream* fileStream; // at 0x10 - void* buffer; // at 0x14 + ut::FileStream *fileStream; // at 0x10 + void *buffer; // at 0x14 int bufferSize; // at 0x18 SeqLoadCallback callback; // at 0x1C - SeqSound* callbackData; // at 0x20 + SeqSound *callbackData; // at 0x20 }; static const int FILE_STREAM_BUFFER_SIZE = 512; private: - bool LoadData(SeqLoadCallback pCalllback, void* pCallbackArg); + bool LoadData(SeqLoadCallback pCalllback, void *pCallbackArg); - static void NotifyLoadAsyncEndSeqData(bool success, const void* pBase, - void* pCallbackArg); + static void NotifyLoadAsyncEndSeqData(bool success, const void *pBase, void *pCallbackArg); private: SeqPlayer mSeqPlayer; // at 0xD8 - SeqSoundHandle* mTempSpecialHandle; // at 0x1F4 - SoundInstanceManager* mManager; // at 0x1F8 + SeqSoundHandle *mTempSpecialHandle; // at 0x1F4 + SoundInstanceManager *mManager; // at 0x1F8 s32 mSeqOffset; // at 0x1FC SeqPlayer::OffsetType mStartOffsetType; // at 0x200 @@ -116,7 +109,7 @@ class SeqSound : public BasicSound { bool mLoadingFlag; // at 0x208 volatile bool mPreparedFlag; // at 0x209 - ut::FileStream* mFileStream; // at 0x20C + ut::FileStream *mFileStream; // at 0x20C char mFileStreamBuffer[FILE_STREAM_BUFFER_SIZE]; // at 0x210 SeqLoadTask mSeqLoadTask; // at 0x410 diff --git a/include/nw4r/snd/snd_SeqSoundHandle.h b/include/nw4r/snd/snd_SeqSoundHandle.h index afafb6a5..bc4b67cf 100644 --- a/include/nw4r/snd/snd_SeqSoundHandle.h +++ b/include/nw4r/snd/snd_SeqSoundHandle.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_SEQ_SOUND_HANDLE_H #define NW4R_SND_SEQ_SOUND_HANDLE_H -#include +#include "nw4r/snd/snd_SeqSound.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include - -#include namespace nw4r { namespace snd { @@ -14,7 +13,7 @@ class SoundHandle; class SeqSoundHandle : private ut::NonCopyable { public: - explicit SeqSoundHandle(SoundHandle* pHandle); + explicit SeqSoundHandle(SoundHandle *pHandle); ~SeqSoundHandle() { DetachSound(); } @@ -44,7 +43,7 @@ class SeqSoundHandle : private ut::NonCopyable { } private: - detail::SeqSound* mSound; // at 0x0 + detail::SeqSound *mSound; // at 0x0 }; } // namespace snd diff --git a/include/nw4r/snd/snd_SeqTrack.h b/include/nw4r/snd/snd_SeqTrack.h index 714d61d0..ad54b9f6 100644 --- a/include/nw4r/snd/snd_SeqTrack.h +++ b/include/nw4r/snd/snd_SeqTrack.h @@ -1,18 +1,25 @@ #ifndef NW4R_SND_SEQ_TRACK_H #define NW4R_SND_SEQ_TRACK_H -#include -#include -#include - -#include +#include "nw4r/snd/snd_Channel.h" +#include "nw4r/snd/snd_Lfo.h" +#include "nw4r/types_nw4r.h" +#include "rvl/WPAD.h" // IWYU pragma: export namespace nw4r { namespace snd { -enum SeqMute { MUTE_OFF, MUTE_NO_STOP, MUTE_RELEASE, MUTE_STOP }; +enum SeqMute { + MUTE_OFF, + MUTE_NO_STOP, + MUTE_RELEASE, + MUTE_STOP +}; -enum ParseResult { PARSE_RESULT_CONTINUE, PARSE_RESULT_FINISH }; +enum ParseResult { + PARSE_RESULT_CONTINUE, + PARSE_RESULT_FINISH +}; namespace detail { @@ -22,8 +29,8 @@ class SeqTrack { static const int PRGNO_MAX = 0xFFFF; struct ParserTrackParam { - const u8* baseAddr; // at 0x0 - const u8* currentAddr; // at 0x4 + const u8 *baseAddr; // at 0x0 + const u8 *currentAddr; // at 0x4 s32 wait; // at 0x8 bool muteFlag; // at 0xC @@ -82,20 +89,20 @@ class SeqTrack { } void InitParam(); - void SetSeqData(const void* pBase, s32 offset); + void SetSeqData(const void *pBase, s32 offset); void Open(); void Close(); void UpdateChannelLength(); - void UpdateChannelRelease(Channel* pChannel); + void UpdateChannelRelease(Channel *pChannel); int ParseNextTick(bool doNoteOn); void StopAllChannel(); void ReleaseAllChannel(int release); void PauseAllChannel(bool flag); - void AddChannel(Channel* pChannel); + void AddChannel(Channel *pChannel); void UpdateChannelParam(); void FreeAllChannel(); @@ -103,24 +110,24 @@ class SeqTrack { void SetVolume(f32 volume); void SetPitch(f32 pitch); - ParserTrackParam& GetParserTrackParam() { + ParserTrackParam &GetParserTrackParam() { return mParserTrackParam; } - volatile s16* GetVariablePtr(int i); + volatile s16 *GetVariablePtr(int i); - SeqPlayer* GetSeqPlayer() { + SeqPlayer *GetSeqPlayer() { return mPlayer; } - void SetSeqPlayer(SeqPlayer* pPlayer) { + void SetSeqPlayer(SeqPlayer *pPlayer) { mPlayer = pPlayer; } - Channel* GetLastChannel() const { + Channel *GetLastChannel() const { return mChannelList; } - Channel* NoteOn(int key, int velocity, s32 length, bool tie); + Channel *NoteOn(int key, int velocity, s32 length, bool tie); private: static const int DEFAULT_PRIORITY = 64; @@ -129,9 +136,7 @@ class SeqTrack { static const int DEFAULT_VARIABLE_VALUE = -1; private: - static void ChannelCallbackFunc(Channel* pDropChannel, - Channel::ChannelCallbackStatus status, - u32 callbackArg); + static void ChannelCallbackFunc(Channel *pDropChannel, Channel::ChannelCallbackStatus status, u32 callbackArg); private: u8 mPlayerTrackNo; // at 0x4 @@ -150,8 +155,8 @@ class SeqTrack { ParserTrackParam mParserTrackParam; // at 0x50 volatile s16 mTrackVariable[VARIABLE_NUM]; // at 0x98 - SeqPlayer* mPlayer; // at 0xB8 - Channel* mChannelList; // at 0xBC + SeqPlayer *mPlayer; // at 0xB8 + Channel *mChannelList; // at 0xBC }; } // namespace detail diff --git a/include/nw4r/snd/snd_SeqTrackAllocator.h b/include/nw4r/snd/snd_SeqTrackAllocator.h index 92413ce0..a4daf439 100644 --- a/include/nw4r/snd/snd_SeqTrackAllocator.h +++ b/include/nw4r/snd/snd_SeqTrackAllocator.h @@ -1,6 +1,6 @@ #ifndef NW4R_SND_SEQ_TRACK_ALLOCATOR_H #define NW4R_SND_SEQ_TRACK_ALLOCATOR_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -14,8 +14,8 @@ class SeqTrackAllocator { public: virtual ~SeqTrackAllocator() {} // at 0x8 - virtual SeqTrack* AllocTrack(SeqPlayer* pPlayer) = 0; // at 0xC - virtual void FreeTrack(SeqTrack* pTrack) = 0; // at 0x10 + virtual SeqTrack *AllocTrack(SeqPlayer *pPlayer) = 0; // at 0xC + virtual void FreeTrack(SeqTrack *pTrack) = 0; // at 0x10 virtual int GetAllocatableTrackCount() const = 0; // at 0x14 }; diff --git a/include/nw4r/snd/snd_Sound3DActor.h b/include/nw4r/snd/snd_Sound3DActor.h index 43e61537..935cc272 100644 --- a/include/nw4r/snd/snd_Sound3DActor.h +++ b/include/nw4r/snd/snd_Sound3DActor.h @@ -1,39 +1,37 @@ #ifndef NW4R_SND_SOUND_3D_ACTOR_H #define NW4R_SND_SOUND_3D_ACTOR_H -#include +#include "nw4r/math.h" +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_SoundActor.h" +#include "nw4r/types_nw4r.h" -#include -#include - -#include namespace nw4r { namespace snd { -class Sound3DActor : public detail::SoundActor, - public detail::BasicSound::AmbientArgUpdateCallback { +class Sound3DActor : public detail::SoundActor, public detail::BasicSound::AmbientArgUpdateCallback { public: - Sound3DActor(SoundArchivePlayer& rPlayer, Sound3DManager& rManager); + Sound3DActor(SoundArchivePlayer &rPlayer, Sound3DManager &rManager); virtual ~Sound3DActor(); // at 0x8 - virtual StartResult - detail_SetupSound(SoundHandle* pHandle, u32 id, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pPlayer, bool hold, - const StartInfo* pStartInfo); // at 0xC + virtual StartResult detail_SetupSound( + SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pPlayer, bool hold, + const StartInfo *pStartInfo + ); // at 0xC - virtual void detail_Update(void* pArg, - const detail::BasicSound* pSound); // at 0xC + virtual void detail_Update(void *pArg, + const detail::BasicSound *pSound); // at 0xC - void SetPosition(const math::VEC3& rPosition); + void SetPosition(const math::VEC3 &rPosition); private: - static void ClearUpdateCallback(SoundHandle& rHandle); + static void ClearUpdateCallback(SoundHandle &rHandle); private: - Sound3DManager& m3DManager; // at 0xAC - SoundArchivePlayer& mSoundArchivePlayer; // at 0xB0 + Sound3DManager &m3DManager; // at 0xAC + SoundArchivePlayer &mSoundArchivePlayer; // at 0xB0 u32 mUserParam; // at 0xB4 math::VEC3 mPosition; // at 0xB8 }; diff --git a/include/nw4r/snd/snd_Sound3DListener.h b/include/nw4r/snd/snd_Sound3DListener.h index d2bf333b..911279ac 100644 --- a/include/nw4r/snd/snd_Sound3DListener.h +++ b/include/nw4r/snd/snd_Sound3DListener.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_SOUND_3D_LISTENER_H #define NW4R_SND_SOUND_3D_LISTENER_H -#include +#include "nw4r/math.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -11,7 +11,7 @@ class Sound3DListener { public: Sound3DListener(); - const math::MTX34& GetMatrix() const { + const math::MTX34 &GetMatrix() const { return mMtx; } diff --git a/include/nw4r/snd/snd_Sound3DManager.h b/include/nw4r/snd/snd_Sound3DManager.h index 337e1eb4..b2d8b076 100644 --- a/include/nw4r/snd/snd_Sound3DManager.h +++ b/include/nw4r/snd/snd_Sound3DManager.h @@ -1,12 +1,11 @@ #ifndef NW4R_SND_SOUND_3D_MANAGER_H #define NW4R_SND_SOUND_3D_MANAGER_H -#include +#include "nw4r/math.h" +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/types_nw4r.h" -#include -#include -#include - -#include namespace nw4r { namespace snd { @@ -25,24 +24,23 @@ class Sound3DManager : public detail::BasicSound::AmbientParamUpdateCallback, public: Sound3DManager(); - virtual void detail_Update(SoundParam* pParam, u32 id, - detail::BasicSound* pSound, const void* pArg, - u32 flags); // at 0x8 + virtual void detail_Update( + SoundParam *pParam, u32 id, detail::BasicSound *pSound, const void *pArg, + u32 flags + ); // at 0x8 - virtual void Update(SoundParam* pParam, u32 id, SoundHandle* pHandle, - const void* pArg, + virtual void Update(SoundParam *pParam, u32 id, SoundHandle *pHandle, const void *pArg, u32 flags); // at 0x10 - virtual void* detail_AllocAmbientArg(u32 size); // at 0x14 + virtual void *detail_AllocAmbientArg(u32 size); // at 0x14 - virtual void - detail_FreeAmbientArg(void* pArg, - const detail::BasicSound* pSound); // at 0x18 + virtual void detail_FreeAmbientArg(void *pArg, + const detail::BasicSound *pSound); // at 0x18 - u32 GetRequiredMemSize(const SoundArchive* pArchive); - bool Setup(const SoundArchive* pArchive, void* pBuffer, u32 size); + u32 GetRequiredMemSize(const SoundArchive *pArchive); + bool Setup(const SoundArchive *pArchive, void *pBuffer, u32 size); - Sound3DListener* GetListener() const { + Sound3DListener *GetListener() const { return mListener; } @@ -66,7 +64,7 @@ class Sound3DManager : public detail::BasicSound::AmbientParamUpdateCallback, private: detail::InstancePool mParamPool; // at 0x8 - Sound3DListener* mListener; // at 0xC + Sound3DListener *mListener; // at 0xC s32 mMaxPriorityReduction; // at 0x10 f32 mSpeakerAngleStereo; // at 0x14 diff --git a/include/nw4r/snd/snd_SoundActor.h b/include/nw4r/snd/snd_SoundActor.h index 280df27f..625417cf 100644 --- a/include/nw4r/snd/snd_SoundActor.h +++ b/include/nw4r/snd/snd_SoundActor.h @@ -1,11 +1,10 @@ #ifndef NW4R_SND_SOUND_ACTOR_H #define NW4R_SND_SOUND_ACTOR_H -#include +#include "limits.h" +#include "nw4r/snd/snd_ExternalSoundPlayer.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/types_nw4r.h" -#include -#include - -#include namespace nw4r { namespace snd { @@ -13,21 +12,21 @@ namespace detail { class SoundActor : public SoundStartable { public: - explicit SoundActor(SoundStartable& rStartable) : mStartable(rStartable) { + explicit SoundActor(SoundStartable &rStartable) : mStartable(rStartable) { detail_GetActorSoundPlayer(0)->SetPlayableSoundCount(INT_MAX); } - virtual StartResult - detail_SetupSound(SoundHandle* pHandle, u32 id, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pPlayer, bool hold, - const StartInfo* pStartInfo); // at 0xC + virtual StartResult detail_SetupSound( + SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pPlayer, bool hold, + const StartInfo *pStartInfo + ); // at 0xC - virtual u32 detail_ConvertLabelStringToSoundId(const char* pLabel) { + virtual u32 detail_ConvertLabelStringToSoundId(const char *pLabel) { return mStartable.detail_ConvertLabelStringToSoundId(pLabel); } // at 0x10 - ExternalSoundPlayer* detail_GetActorSoundPlayer(int i) { + ExternalSoundPlayer *detail_GetActorSoundPlayer(int i) { if (i < 0 || i >= ACTOR_PLAYER_COUNT) { return NULL; } @@ -38,7 +37,7 @@ class SoundActor : public SoundStartable { template TForEachFunc ForEachSound(TForEachFunc pFunction, bool reverse) { int i; - ExternalSoundPlayer* pPlayer = detail_GetActorSoundPlayer(0); + ExternalSoundPlayer *pPlayer = detail_GetActorSoundPlayer(0); for (i = 0; i < ACTOR_PLAYER_COUNT; i++) { pPlayer->ForEachSound(pFunction, reverse); @@ -52,7 +51,7 @@ class SoundActor : public SoundStartable { static const int ACTOR_PLAYER_COUNT = 8; private: - SoundStartable& mStartable; // at 0x4 + SoundStartable &mStartable; // at 0x4 ExternalSoundPlayer mActorPlayer[ACTOR_PLAYER_COUNT]; // at 0x8 }; diff --git a/include/nw4r/snd/snd_SoundArchive.h b/include/nw4r/snd/snd_SoundArchive.h index 50ef8cc9..5f9169a8 100644 --- a/include/nw4r/snd/snd_SoundArchive.h +++ b/include/nw4r/snd/snd_SoundArchive.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_SOUND_ARCHIVE_H #define NW4R_SND_SOUND_ARCHIVE_H -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include - -#include namespace nw4r { namespace snd { @@ -61,7 +60,7 @@ class SoundArchive { struct GroupInfo { u32 itemCount; // at 0x0 - const char* extFilePath; // at 0x4 + const char *extFilePath; // at 0x4 u32 offset; // at 0x8 u32 size; // at 0xC u32 waveDataOffset; // at 0x10 @@ -78,7 +77,7 @@ class SoundArchive { struct FileInfo { u32 fileSize; // at 0x0 u32 waveDataFileSize; // at 0x4 - const char* extFilePath; // at 0x8 + const char *extFilePath; // at 0x8 u32 filePosCount; // at 0xC }; struct FilePos { @@ -102,73 +101,66 @@ class SoundArchive { SoundArchive(); virtual ~SoundArchive(); // at 0x8 - virtual const void* detail_GetFileAddress(u32 id) const = 0; // at 0xC + virtual const void *detail_GetFileAddress(u32 id) const = 0; // at 0xC - virtual const void* - detail_GetWaveDataFileAddress(u32 id) const = 0; // at 0x10 + virtual const void *detail_GetWaveDataFileAddress(u32 id) const = 0; // at 0x10 virtual int detail_GetRequiredStreamBufferSize() const = 0; // at 0x14 - virtual ut::FileStream* OpenStream(void* pBuffer, int bufferSize, - u32 offset, + virtual ut::FileStream *OpenStream(void *pBuffer, int bufferSize, u32 offset, u32 length) const = 0; // at 0x18 - virtual ut::FileStream* OpenExtStream(void* pBuffer, int bufferSize, - const char* pExtPath, u32 offset, - u32 length) const = 0; // at 0x1C + virtual ut::FileStream *OpenExtStream( + void *pBuffer, int bufferSize, const char *pExtPath, u32 offset, + u32 length + ) const = 0; // at 0x1C bool IsAvailable() const; - void Setup(detail::SoundArchiveFileReader* pReader); + void Setup(detail::SoundArchiveFileReader *pReader); void Shutdown(); u32 GetPlayerCount() const; u32 GetGroupCount() const; - const char* GetSoundLabelString(u32 id) const; - u32 ConvertLabelStringToSoundId(const char* pLabel) const; - u32 ConvertLabelStringToPlayerId(const char* pLabel) const; - u32 ConvertLabelStringToGroupId(const char* pLabel) const; + const char *GetSoundLabelString(u32 id) const; + u32 ConvertLabelStringToSoundId(const char *pLabel) const; + u32 ConvertLabelStringToPlayerId(const char *pLabel) const; + u32 ConvertLabelStringToGroupId(const char *pLabel) const; u32 GetSoundUserParam(u32 id) const; SoundType GetSoundType(u32 id) const; - bool ReadSoundInfo(u32 id, SoundInfo* pInfo) const; - bool detail_ReadSeqSoundInfo(u32 id, SeqSoundInfo* pInfo) const; - bool detail_ReadStrmSoundInfo(u32 id, StrmSoundInfo* pInfo) const; - bool detail_ReadWaveSoundInfo(u32 id, WaveSoundInfo* pInfo) const; + bool ReadSoundInfo(u32 id, SoundInfo *pInfo) const; + bool detail_ReadSeqSoundInfo(u32 id, SeqSoundInfo *pInfo) const; + bool detail_ReadStrmSoundInfo(u32 id, StrmSoundInfo *pInfo) const; + bool detail_ReadWaveSoundInfo(u32 id, WaveSoundInfo *pInfo) const; - bool ReadPlayerInfo(u32 id, PlayerInfo* pInfo) const; - bool ReadSoundArchivePlayerInfo(SoundArchivePlayerInfo* pInfo) const; + bool ReadPlayerInfo(u32 id, PlayerInfo *pInfo) const; + bool ReadSoundArchivePlayerInfo(SoundArchivePlayerInfo *pInfo) const; - bool detail_ReadSound3DParam(u32 id, Sound3DParam* pParam) const; - bool detail_ReadBankInfo(u32 id, BankInfo* pInfo) const; - bool detail_ReadGroupInfo(u32 id, GroupInfo* pInfo) const; - bool detail_ReadGroupItemInfo(u32 groupId, u32 itemId, - GroupItemInfo* pInfo) const; + bool detail_ReadSound3DParam(u32 id, Sound3DParam *pParam) const; + bool detail_ReadBankInfo(u32 id, BankInfo *pInfo) const; + bool detail_ReadGroupInfo(u32 id, GroupInfo *pInfo) const; + bool detail_ReadGroupItemInfo(u32 groupId, u32 itemId, GroupItemInfo *pInfo) const; - bool detail_ReadFileInfo(u32 id, FileInfo* pInfo) const; - bool detail_ReadFilePos(u32 fileId, u32 posId, FilePos* pPos) const; + bool detail_ReadFileInfo(u32 id, FileInfo *pInfo) const; + bool detail_ReadFilePos(u32 fileId, u32 posId, FilePos *pPos) const; - ut::FileStream* detail_OpenFileStream(u32 id, void* pBuffer, - int bufferSize) const; - ut::FileStream* detail_OpenGroupStream(u32 id, void* pBuffer, - int bufferSize) const; - ut::FileStream* detail_OpenGroupWaveDataStream(u32 id, void* pBuffer, - int bufferSize) const; + ut::FileStream *detail_OpenFileStream(u32 id, void *pBuffer, int bufferSize) const; + ut::FileStream *detail_OpenGroupStream(u32 id, void *pBuffer, int bufferSize) const; + ut::FileStream *detail_OpenGroupWaveDataStream(u32 id, void *pBuffer, int bufferSize) const; - void SetExternalFileRoot(const char* pExtFileRoot); + void SetExternalFileRoot(const char *pExtFileRoot); protected: static const int FILE_PATH_MAX = 256; private: - ut::FileStream* OpenExtStreamImpl(void* pBuffer, int bufferSize, - const char* pExtPath, u32 offset, - u32 size) const; + ut::FileStream *OpenExtStreamImpl(void *pBuffer, int bufferSize, const char *pExtPath, u32 offset, u32 size) const; private: - detail::SoundArchiveFileReader* mFileReader; // at 0x4 + detail::SoundArchiveFileReader *mFileReader; // at 0x4 char mExtFileRoot[FILE_PATH_MAX]; // at 0x8 }; diff --git a/include/nw4r/snd/snd_SoundArchiveFile.h b/include/nw4r/snd/snd_SoundArchiveFile.h index b025f9d1..67c9069b 100644 --- a/include/nw4r/snd/snd_SoundArchiveFile.h +++ b/include/nw4r/snd/snd_SoundArchiveFile.h @@ -1,11 +1,8 @@ #ifndef NW4R_SND_SOUND_ARCHIVE_FILE_H #define NW4R_SND_SOUND_ARCHIVE_FILE_H -#include - -#include -#include - -#include +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_Util.h" +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -76,8 +73,7 @@ struct WaveSoundInfo { u8 channelPriority; // at 0x8 u8 releasePriorityFix; // at 0x9 }; -typedef Util::DataRef - SoundInfoOffset; +typedef Util::DataRef SoundInfoOffset; struct Sound3DParam { u32 flags; // at 0x0 @@ -198,45 +194,43 @@ class SoundArchiveFileReader { public: SoundArchiveFileReader(); - void Init(const void* pSoundArchiveBin); - bool IsValidFileHeader(const void* pSoundArchiveBin); + void Init(const void *pSoundArchiveBin); + bool IsValidFileHeader(const void *pSoundArchiveBin); - void SetStringChunk(const void* pChunk, u32 size); - void SetInfoChunk(const void* pChunk, u32 size); + void SetStringChunk(const void *pChunk, u32 size); + void SetInfoChunk(const void *pChunk, u32 size); SoundType GetSoundType(u32 id) const; - bool ReadSoundInfo(u32 id, SoundArchive::SoundInfo* pInfo) const; - bool ReadSound3DParam(u32 id, SoundArchive::Sound3DParam* pParam) const; - bool ReadSeqSoundInfo(u32 id, SoundArchive::SeqSoundInfo* pInfo) const; - bool ReadStrmSoundInfo(u32 id, SoundArchive::StrmSoundInfo* pInfo) const; - bool ReadWaveSoundInfo(u32 id, SoundArchive::WaveSoundInfo* pInfo) const; - bool ReadBankInfo(u32 id, SoundArchive::BankInfo* pInfo) const; - bool ReadPlayerInfo(u32 id, SoundArchive::PlayerInfo* pInfo) const; - bool ReadGroupInfo(u32 id, SoundArchive::GroupInfo* pInfo) const; - bool ReadGroupItemInfo(u32 groupId, u32 itemId, - SoundArchive::GroupItemInfo* pInfo) const; - bool ReadSoundArchivePlayerInfo( - SoundArchive::SoundArchivePlayerInfo* pInfo) const; + bool ReadSoundInfo(u32 id, SoundArchive::SoundInfo *pInfo) const; + bool ReadSound3DParam(u32 id, SoundArchive::Sound3DParam *pParam) const; + bool ReadSeqSoundInfo(u32 id, SoundArchive::SeqSoundInfo *pInfo) const; + bool ReadStrmSoundInfo(u32 id, SoundArchive::StrmSoundInfo *pInfo) const; + bool ReadWaveSoundInfo(u32 id, SoundArchive::WaveSoundInfo *pInfo) const; + bool ReadBankInfo(u32 id, SoundArchive::BankInfo *pInfo) const; + bool ReadPlayerInfo(u32 id, SoundArchive::PlayerInfo *pInfo) const; + bool ReadGroupInfo(u32 id, SoundArchive::GroupInfo *pInfo) const; + bool ReadGroupItemInfo(u32 groupId, u32 itemId, SoundArchive::GroupItemInfo *pInfo) const; + bool ReadSoundArchivePlayerInfo(SoundArchive::SoundArchivePlayerInfo *pInfo) const; u32 GetSoundStringId(u32 id) const; u32 GetPlayerCount() const; u32 GetGroupCount() const; - const char* GetSoundLabelString(u32 id) const; + const char *GetSoundLabelString(u32 id) const; u32 GetSoundUserParam(u32 id) const; - bool ReadFileInfo(u32 id, SoundArchive::FileInfo* pInfo) const; - bool ReadFilePos(u32 fileId, u32 id, SoundArchive::FilePos* pPos) const; + bool ReadFileInfo(u32 id, SoundArchive::FileInfo *pInfo) const; + bool ReadFilePos(u32 fileId, u32 id, SoundArchive::FilePos *pPos) const; - const char* GetString(u32 id) const; + const char *GetString(u32 id) const; - u32 ConvertLabelStringToSoundId(const char* pLabel) const { + u32 ConvertLabelStringToSoundId(const char *pLabel) const { return ConvertLabelStringToId(mStringTreeSound, pLabel); } - u32 ConvertLabelStringToPlayerId(const char* pLabel) const { + u32 ConvertLabelStringToPlayerId(const char *pLabel) const { return ConvertLabelStringToId(mStringTreePlayer, pLabel); } - u32 ConvertLabelStringToGroupId(const char* pLabel) const { + u32 ConvertLabelStringToGroupId(const char *pLabel) const { return ConvertLabelStringToId(mStringTreeGroup, pLabel); } @@ -261,22 +255,20 @@ class SoundArchiveFileReader { } private: - u32 ConvertLabelStringToId(const SoundArchiveFile::StringTree* pTree, - const char* pLabel) const; + u32 ConvertLabelStringToId(const SoundArchiveFile::StringTree *pTree, const char *pLabel) const; - const SoundArchiveFile::SoundCommonInfo* impl_GetSoundInfo(u32 id) const; - SoundArchiveFile::SoundInfoOffset impl_GetSoundInfoOffset(u32 id) const - DECOMP_DONT_INLINE; + const SoundArchiveFile::SoundCommonInfo *impl_GetSoundInfo(u32 id) const; + SoundArchiveFile::SoundInfoOffset impl_GetSoundInfoOffset(u32 id) const DONT_INLINE; - const SoundArchiveFile::SeqSoundInfo* impl_GetSeqSoundInfo(u32 id) const; - const SoundArchiveFile::StrmSoundInfo* impl_GetStrmSoundInfo(u32 id) const; - const SoundArchiveFile::WaveSoundInfo* impl_GetWaveSoundInfo(u32 id) const; + const SoundArchiveFile::SeqSoundInfo *impl_GetSeqSoundInfo(u32 id) const; + const SoundArchiveFile::StrmSoundInfo *impl_GetStrmSoundInfo(u32 id) const; + const SoundArchiveFile::WaveSoundInfo *impl_GetWaveSoundInfo(u32 id) const; - const SoundArchiveFile::BankInfo* impl_GetBankInfo(u32 id) const; - const SoundArchiveFile::PlayerInfo* impl_GetPlayerInfo(u32 id) const; - const SoundArchiveFile::GroupInfo* impl_GetGroupInfo(u32 id) const; + const SoundArchiveFile::BankInfo *impl_GetBankInfo(u32 id) const; + const SoundArchiveFile::PlayerInfo *impl_GetPlayerInfo(u32 id) const; + const SoundArchiveFile::GroupInfo *impl_GetGroupInfo(u32 id) const; - const void* GetPtrConst(const void* pBase, u32 offset) const { + const void *GetPtrConst(const void *pBase, u32 offset) const { if (offset == 0) { return NULL; } @@ -286,13 +278,13 @@ class SoundArchiveFileReader { private: SoundArchiveFile::Header mHeader; // at 0x0 - const SoundArchiveFile::Info* mInfo; // at 0x28 - const void* mStringBase; // at 0x2C - const SoundArchiveFile::StringTable* mStringTable; // at 0x30 - const SoundArchiveFile::StringTree* mStringTreeSound; // at 0x34 - const SoundArchiveFile::StringTree* mStringTreePlayer; // at 0x38 - const SoundArchiveFile::StringTree* mStringTreeGroup; // at 0x3C - const SoundArchiveFile::StringTree* mStringTreeBank; // at 0x40 + const SoundArchiveFile::Info *mInfo; // at 0x28 + const void *mStringBase; // at 0x2C + const SoundArchiveFile::StringTable *mStringTable; // at 0x30 + const SoundArchiveFile::StringTree *mStringTreeSound; // at 0x34 + const SoundArchiveFile::StringTree *mStringTreePlayer; // at 0x38 + const SoundArchiveFile::StringTree *mStringTreeGroup; // at 0x3C + const SoundArchiveFile::StringTree *mStringTreeBank; // at 0x40 }; } // namespace detail diff --git a/include/nw4r/snd/snd_SoundArchiveLoader.h b/include/nw4r/snd/snd_SoundArchiveLoader.h index 38ca99de..da2f22e9 100644 --- a/include/nw4r/snd/snd_SoundArchiveLoader.h +++ b/include/nw4r/snd/snd_SoundArchiveLoader.h @@ -1,10 +1,8 @@ #ifndef NW4R_SND_SOUND_ARCHIVE_LOADER_H #define NW4R_SND_SOUND_ARCHIVE_LOADER_H -#include - -#include - -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -16,7 +14,7 @@ namespace detail { class FileStreamHandle { public: - FileStreamHandle(ut::FileStream* pFileStream) : mStream(pFileStream) {} + FileStreamHandle(ut::FileStream *pFileStream) : mStream(pFileStream) {} ~FileStreamHandle() { if (mStream != NULL) { @@ -24,11 +22,11 @@ class FileStreamHandle { } } - ut::FileStream* GetFileStream() { + ut::FileStream *GetFileStream() { return mStream; } - ut::FileStream* operator->() { + ut::FileStream *operator->() { return mStream; } @@ -37,22 +35,21 @@ class FileStreamHandle { } private: - ut::FileStream* mStream; // at 0x0 + ut::FileStream *mStream; // at 0x0 }; class SoundArchiveLoader { public: - explicit SoundArchiveLoader(const SoundArchive& rArchive); + explicit SoundArchiveLoader(const SoundArchive &rArchive); ~SoundArchiveLoader(); - void* LoadGroup(u32 id, SoundMemoryAllocatable* pAllocatable, - void** ppWaveBuffer, u32 blockSize); + void *LoadGroup(u32 id, SoundMemoryAllocatable *pAllocatable, void **ppWaveBuffer, u32 blockSize); private: mutable OSMutex mMutex; // at 0x0 - const SoundArchive& mArc; // at 0x18 + const SoundArchive &mArc; // at 0x18 u8 mStreamArea[512]; // at 0x1C - ut::FileStream* mStream; // at 0x21C + ut::FileStream *mStream; // at 0x21C }; } // namespace detail diff --git a/include/nw4r/snd/snd_SoundArchivePlayer.h b/include/nw4r/snd/snd_SoundArchivePlayer.h index 2846d9d4..c60cb995 100644 --- a/include/nw4r/snd/snd_SoundArchivePlayer.h +++ b/include/nw4r/snd/snd_SoundArchivePlayer.h @@ -1,20 +1,20 @@ #ifndef NW4R_SND_SOUND_ARCHIVE_PLAYER_H #define NW4R_SND_SOUND_ARCHIVE_PLAYER_H -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "nw4r/snd/snd_DisposeCallback.h" +#include "nw4r/snd/snd_MmlParser.h" +#include "nw4r/snd/snd_MmlSeqTrackAllocator.h" +#include "nw4r/snd/snd_NoteOnCallback.h" +#include "nw4r/snd/snd_SeqSound.h" +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundInstanceManager.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/snd/snd_StrmChannel.h" +#include "nw4r/snd/snd_StrmSound.h" +#include "nw4r/snd/snd_Util.h" +#include "nw4r/snd/snd_WaveSound.h" +#include "nw4r/snd/snd_WsdPlayer.h" +#include "nw4r/types_nw4r.h" + namespace nw4r { namespace snd { @@ -28,69 +28,65 @@ class SoundPlayer; class SoundArchivePlayer_FileManager { public: - virtual const void* GetFileAddress(u32 id) = 0; // at 0x8 - virtual const void* GetFileWaveDataAddress(u32 id) = 0; // at 0x8 + virtual const void *GetFileAddress(u32 id) = 0; // at 0x8 + virtual const void *GetFileWaveDataAddress(u32 id) = 0; // at 0x8 }; -class SoundArchivePlayer : public detail::DisposeCallback, - public SoundStartable { +class SoundArchivePlayer : public detail::DisposeCallback, public SoundStartable { public: SoundArchivePlayer(); virtual ~SoundArchivePlayer(); // at 0x8 - virtual void InvalidateData(const void* pStart, - const void* pEnd); // at 0xC + virtual void InvalidateData(const void *pStart, + const void *pEnd); // at 0xC - virtual void InvalidateWaveData(const void* pStart, - const void* pEnd); // at 0x10 + virtual void InvalidateWaveData(const void *pStart, + const void *pEnd); // at 0x10 - virtual u32 detail_ConvertLabelStringToSoundId(const char* pLabel) { + virtual u32 detail_ConvertLabelStringToSoundId(const char *pLabel) { return mSoundArchive->ConvertLabelStringToSoundId(pLabel); } // at 0x28 - virtual StartResult - detail_SetupSound(SoundHandle* pHandle, u32 id, - bool hold, - const StartInfo* pStartInfo); // at 0x2C + virtual StartResult detail_SetupSound( + SoundHandle *pHandle, u32 id, bool hold, + const StartInfo *pStartInfo + ); // at 0x2C bool IsAvailable() const; - bool Setup(const SoundArchive* pArchive, void* pMramBuffer, - u32 mramBufferSize, void* pStrmBuffer, u32 strmBufferSize); + bool + Setup(const SoundArchive *pArchive, void *pMramBuffer, u32 mramBufferSize, void *pStrmBuffer, u32 strmBufferSize); void Shutdown(); - u32 GetRequiredMemSize(const SoundArchive* pArchive); - u32 GetRequiredStrmBufferSize(const SoundArchive* pArchive); + u32 GetRequiredMemSize(const SoundArchive *pArchive); + u32 GetRequiredStrmBufferSize(const SoundArchive *pArchive); void Update(); - const SoundArchive& GetSoundArchive() const; + const SoundArchive &GetSoundArchive() const; - SoundPlayer& GetSoundPlayer(u32 i); - SoundPlayer& GetSoundPlayer(int i) { + SoundPlayer &GetSoundPlayer(u32 i); + SoundPlayer &GetSoundPlayer(int i) { return GetSoundPlayer(static_cast(i)); } - const void* detail_GetFileAddress(u32 id) const; - const void* detail_GetFileWaveDataAddress(u32 id) const; + const void *detail_GetFileAddress(u32 id) const; + const void *detail_GetFileWaveDataAddress(u32 id) const; - const void* GetGroupAddress(u32 id) const; - void SetGroupAddress(u32 id, const void* pAddr); + const void *GetGroupAddress(u32 id) const; + void SetGroupAddress(u32 id, const void *pAddr); - const void* GetGroupWaveDataAddress(u32 id) const; - void SetGroupWaveDataAddress(u32 id, const void* pAddr); + const void *GetGroupWaveDataAddress(u32 id) const; + void SetGroupWaveDataAddress(u32 id, const void *pAddr); - bool LoadGroup(u32 id, SoundMemoryAllocatable* pAllocatable, u32 blockSize); - bool LoadGroup(const char* pLabel, SoundMemoryAllocatable* pAllocatable, - u32 blockSize); + bool LoadGroup(u32 id, SoundMemoryAllocatable *pAllocatable, u32 blockSize); + bool LoadGroup(const char *pLabel, SoundMemoryAllocatable *pAllocatable, u32 blockSize); - bool LoadGroup(int id, SoundMemoryAllocatable* pAllocatable, - u32 blockSize) { + bool LoadGroup(int id, SoundMemoryAllocatable *pAllocatable, u32 blockSize) { return LoadGroup(static_cast(id), pAllocatable, blockSize); } - bool LoadGroup(unsigned int id, SoundMemoryAllocatable* pAllocatable, - u32 blockSize) { + bool LoadGroup(unsigned int id, SoundMemoryAllocatable *pAllocatable, u32 blockSize) { return LoadGroup(static_cast(id), pAllocatable, blockSize); } @@ -110,90 +106,76 @@ class SoundArchivePlayer : public detail::DisposeCallback, private: struct Group { - const void* address; // at 0x0 - const void* waveDataAddress; // at 0x4 + const void *address; // at 0x0 + const void *waveDataAddress; // at 0x4 }; typedef detail::Util::Table GroupTable; class SeqNoteOnCallback : public detail::NoteOnCallback { public: - explicit SeqNoteOnCallback(const SoundArchivePlayer& rPlayer) - : mSoundArchivePlayer(rPlayer) {} + explicit SeqNoteOnCallback(const SoundArchivePlayer &rPlayer) : mSoundArchivePlayer(rPlayer) {} - virtual detail::Channel* - NoteOn(detail::SeqPlayer* pPlayer, int bankNo, - const detail::NoteOnInfo& rInfo); // at 0xC + virtual detail::Channel *NoteOn( + detail::SeqPlayer *pPlayer, int bankNo, + const detail::NoteOnInfo &rInfo + ); // at 0xC private: - const SoundArchivePlayer& mSoundArchivePlayer; // at 0x0 + const SoundArchivePlayer &mSoundArchivePlayer; // at 0x0 }; class WsdCallback : public detail::WsdPlayer::WsdCallback { public: - explicit WsdCallback(const SoundArchivePlayer& rPlayer) - : mSoundArchivePlayer(rPlayer) {} + explicit WsdCallback(const SoundArchivePlayer &rPlayer) : mSoundArchivePlayer(rPlayer) {} - virtual bool GetWaveSoundData(detail::WaveSoundInfo* pSoundInfo, - detail::WaveSoundNoteInfo* pNoteInfo, - detail::WaveData* pWaveData, - const void* pWsdData, int index, - int noteIndex, - u32 callbackArg) const; // at 0xC + virtual bool GetWaveSoundData( + detail::WaveSoundInfo *pSoundInfo, detail::WaveSoundNoteInfo *pNoteInfo, detail::WaveData *pWaveData, + const void *pWsdData, int index, int noteIndex, + u32 callbackArg + ) const; // at 0xC private: - const SoundArchivePlayer& mSoundArchivePlayer; // at 0x0 + const SoundArchivePlayer &mSoundArchivePlayer; // at 0x0 }; private: - bool SetupMram(const SoundArchive* pArchive, void* pBuffer, u32 bufferSize); - - detail::PlayerHeap* CreatePlayerHeap(void* pBuffer, u32 bufferSize); - - bool SetupSoundPlayer(const SoundArchive* pArchive, void** ppBuffer, - void* pEnd); - - bool CreateGroupAddressTable(const SoundArchive* pArchive, void** ppBuffer, - void* pEnd); - - bool SetupSeqSound(const SoundArchive* pArchive, int sounds, - void** ppBuffer, void* pEnd); - bool SetupWaveSound(const SoundArchive* pArchive, int sounds, - void** ppBuffer, void* pEnd); - bool SetupStrmSound(const SoundArchive* pArchive, int sounds, - void** ppBuffer, void* pEnd); - bool SetupSeqTrack(const SoundArchive* pArchive, int tracks, - void** ppBuffer, void* pEnd); - bool SetupStrmBuffer(const SoundArchive* pArchive, void* pBuffer, - u32 bufferSize); - - StartResult - PrepareSeqImpl(detail::SeqSound* pSound, - const SoundArchive::SoundInfo* pSndInfo, - const SoundArchive::SeqSoundInfo* pSeqInfo, - SoundStartable::StartInfo::StartOffsetType startType, - int startOffset, int voices); - - StartResult - PrepareStrmImpl(detail::StrmSound* pSound, - const SoundArchive::SoundInfo* pSndInfo, - const SoundArchive::StrmSoundInfo* pStrmInfo, - SoundStartable::StartInfo::StartOffsetType startType, - int startOffset, int voices); - - StartResult - PrepareWaveSoundImpl(detail::WaveSound* pSound, - const SoundArchive::SoundInfo* pSndInfo, - const SoundArchive::WaveSoundInfo* pWsdInfo, - SoundStartable::StartInfo::StartOffsetType startType, - int startOffset, int voices); + bool SetupMram(const SoundArchive *pArchive, void *pBuffer, u32 bufferSize); + + detail::PlayerHeap *CreatePlayerHeap(void *pBuffer, u32 bufferSize); + + bool SetupSoundPlayer(const SoundArchive *pArchive, void **ppBuffer, void *pEnd); + + bool CreateGroupAddressTable(const SoundArchive *pArchive, void **ppBuffer, void *pEnd); + + bool SetupSeqSound(const SoundArchive *pArchive, int sounds, void **ppBuffer, void *pEnd); + bool SetupWaveSound(const SoundArchive *pArchive, int sounds, void **ppBuffer, void *pEnd); + bool SetupStrmSound(const SoundArchive *pArchive, int sounds, void **ppBuffer, void *pEnd); + bool SetupSeqTrack(const SoundArchive *pArchive, int tracks, void **ppBuffer, void *pEnd); + bool SetupStrmBuffer(const SoundArchive *pArchive, void *pBuffer, u32 bufferSize); + + StartResult PrepareSeqImpl( + detail::SeqSound *pSound, const SoundArchive::SoundInfo *pSndInfo, const SoundArchive::SeqSoundInfo *pSeqInfo, + SoundStartable::StartInfo::StartOffsetType startType, int startOffset, int voices + ); + + StartResult PrepareStrmImpl( + detail::StrmSound *pSound, const SoundArchive::SoundInfo *pSndInfo, + const SoundArchive::StrmSoundInfo *pStrmInfo, SoundStartable::StartInfo::StartOffsetType startType, + int startOffset, int voices + ); + + StartResult PrepareWaveSoundImpl( + detail::WaveSound *pSound, const SoundArchive::SoundInfo *pSndInfo, const SoundArchive::WaveSoundInfo *pWsdInfo, + SoundStartable::StartInfo::StartOffsetType startType, int startOffset, int voices + ); private: - const SoundArchive* mSoundArchive; // at 0x10 - GroupTable* mGroupTable; // at 0x14 - SoundArchivePlayer_FileManager* mFileManager; // at 0x18 + const SoundArchive *mSoundArchive; // at 0x10 + GroupTable *mGroupTable; // at 0x14 + SoundArchivePlayer_FileManager *mFileManager; // at 0x18 - detail::SeqTrackAllocator* mSeqTrackAllocator; // at 0x1C + detail::SeqTrackAllocator *mSeqTrackAllocator; // at 0x1C SeqNoteOnCallback mSeqCallback; // at 0x20 WsdCallback mWsdCallback; // at 0x28 @@ -201,22 +183,19 @@ class SoundArchivePlayer : public detail::DisposeCallback, u8 field_0x30[0x3C - 0x30]; u32 mSoundPlayerCount; // at 0x30 - SoundPlayer* mSoundPlayers; // at 0x34 + SoundPlayer *mSoundPlayers; // at 0x34 - detail::SoundInstanceManager - mSeqSoundInstanceManager; // at 0x38 + detail::SoundInstanceManager mSeqSoundInstanceManager; // at 0x38 - detail::SoundInstanceManager - mStrmSoundInstanceManager; // at 0x60 + detail::SoundInstanceManager mStrmSoundInstanceManager; // at 0x60 - detail::SoundInstanceManager - mWaveSoundInstanceManager; // at 0x88 + detail::SoundInstanceManager mWaveSoundInstanceManager; // at 0x88 detail::MmlSeqTrackAllocator mMmlSeqTrackAllocator; // at 0xB0 detail::StrmBufferPool mStrmBufferPool; // at 0xBC detail::MmlParser mMmlParser; // at 0xD4 - void* mSetupBufferAddress; // at 0xD8 + void *mSetupBufferAddress; // at 0xD8 u32 mSetupBufferSize; // at 0xDC }; diff --git a/include/nw4r/snd/snd_SoundHandle.h b/include/nw4r/snd/snd_SoundHandle.h index f616781b..ff16cbaf 100644 --- a/include/nw4r/snd/snd_SoundHandle.h +++ b/include/nw4r/snd/snd_SoundHandle.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_SOUND_HANDLE_H #define NW4R_SND_SOUND_HANDLE_H -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include - -#include namespace nw4r { namespace snd { @@ -16,14 +15,14 @@ class SoundHandle : private ut::NonCopyable { DetachSound(); } - void detail_AttachSound(detail::BasicSound* pSound); - void detail_AttachSoundAsTempHandle(detail::BasicSound* pSound); + void detail_AttachSound(detail::BasicSound *pSound); + void detail_AttachSoundAsTempHandle(detail::BasicSound *pSound); bool IsAttachedSound() const { return mSound != NULL; } - detail::BasicSound* detail_GetAttachedSound() { + detail::BasicSound *detail_GetAttachedSound() { return mSound; } @@ -102,7 +101,7 @@ class SoundHandle : private ut::NonCopyable { } private: - detail::BasicSound* mSound; // at 0x0 + detail::BasicSound *mSound; // at 0x0 }; } // namespace snd diff --git a/include/nw4r/snd/snd_SoundHeap.h b/include/nw4r/snd/snd_SoundHeap.h index 1b399f2c..206c4b3b 100644 --- a/include/nw4r/snd/snd_SoundHeap.h +++ b/include/nw4r/snd/snd_SoundHeap.h @@ -1,13 +1,10 @@ #ifndef NW4R_SND_SOUND_HEAP_H #define NW4R_SND_SOUND_HEAP_H -#include +#include "nw4r/snd/snd_FrameHeap.h" +#include "nw4r/snd/snd_SoundMemoryAllocatable.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export -#include -#include - -#include - -#include namespace nw4r { namespace snd { @@ -17,12 +14,11 @@ class SoundHeap : public SoundMemoryAllocatable { SoundHeap(); virtual ~SoundHeap(); // at 0x8 - virtual void* Alloc(u32 size); // at 0xC + virtual void *Alloc(u32 size); // at 0xC - void* Alloc(u32 size, detail::FrameHeap::FreeCallback pCallback, - void* pCallbackArg); + void *Alloc(u32 size, detail::FrameHeap::FreeCallback pCallback, void *pCallbackArg); - bool Create(void* pBase, u32 size); + bool Create(void *pBase, u32 size); void Destroy(); void Clear(); @@ -45,8 +41,7 @@ class SoundHeap : public SoundMemoryAllocatable { } private: - static void DisposeCallbackFunc(void* pBuffer, u32 size, - void* pCallbackArg); + static void DisposeCallbackFunc(void *pBuffer, u32 size, void *pCallbackArg); private: mutable OSMutex mMutex; // at 0x0 diff --git a/include/nw4r/snd/snd_SoundInstanceManager.h b/include/nw4r/snd/snd_SoundInstanceManager.h index fab721a9..d6aa4f2b 100644 --- a/include/nw4r/snd/snd_SoundInstanceManager.h +++ b/include/nw4r/snd/snd_SoundInstanceManager.h @@ -1,18 +1,16 @@ #ifndef NW4R_SND_SOUND_INSTANCE_MANAGER_H #define NW4R_SND_SOUND_INSTANCE_MANAGER_H -#include - -#include - -#include - -#include +#include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { namespace detail { -template class SoundInstanceManager { +template +class SoundInstanceManager { private: NW4R_UT_LIST_TYPEDEF_DECL_EX(T, Prio); @@ -21,27 +19,27 @@ template class SoundInstanceManager { OSInitMutex(&mMutex); } - u32 Create(void* pBuffer, u32 size) { + u32 Create(void *pBuffer, u32 size) { ut::detail::AutoLock lock(mMutex); return mPool.Create(pBuffer, size); } - void Destroy(void* pBuffer, u32 size) { + void Destroy(void *pBuffer, u32 size) { ut::detail::AutoLock lock(mMutex); mPool.Destroy(pBuffer, size); } - T* Alloc(int priority) { + T *Alloc(int priority) { ut::detail::AutoLock lock(mMutex); - T* pSound = NULL; + T *pSound = NULL; while (pSound == NULL) { - void* pBuffer = mPool.Alloc(); + void *pBuffer = mPool.Alloc(); if (pBuffer != NULL) { pSound = new (pBuffer) T(this); } else { - T* pLowest = GetLowestPrioritySound(); + T *pLowest = GetLowestPrioritySound(); if (pLowest == NULL) { return NULL; @@ -61,7 +59,7 @@ template class SoundInstanceManager { return pSound; } - void Free(T* pSound) { + void Free(T *pSound) { ut::detail::AutoLock lock(mMutex); if (mPriorityList.IsEmpty()) { @@ -81,15 +79,15 @@ template class SoundInstanceManager { return mPool.Count(); } - T* GetLowestPrioritySound() { + T *GetLowestPrioritySound() { if (mPriorityList.IsEmpty()) { return NULL; } - return static_cast(&mPriorityList.GetFront()); + return static_cast(&mPriorityList.GetFront()); } - void InsertPriorityList(T* pSound, int priority) { + void InsertPriorityList(T *pSound, int priority) { TPrioList::Iterator it = mPriorityList.GetBeginIter(); for (; it != mPriorityList.GetEndIter(); ++it) { @@ -101,7 +99,7 @@ template class SoundInstanceManager { mPriorityList.Insert(it, pSound); } - void RemovePriorityList(T* pSound) { + void RemovePriorityList(T *pSound) { mPriorityList.Erase(pSound); } @@ -110,21 +108,21 @@ template class SoundInstanceManager { ut::detail::AutoLock lock(mMutex); while (!mPriorityList.IsEmpty()) { - T& rSound = mPriorityList.GetFront(); + T &rSound = mPriorityList.GetFront(); mPriorityList.PopFront(); listsByPrio[rSound.CalcCurrentPlayerPriority()].PushBack(&rSound); } for (int i = 0; i < T::PRIORITY_MAX + 1; i++) { while (!listsByPrio[i].IsEmpty()) { - T& rSound = listsByPrio[i].GetFront(); + T &rSound = listsByPrio[i].GetFront(); listsByPrio[i].PopFront(); mPriorityList.PushBack(&rSound); } } } - void UpdatePriority(T* pSound, int priority) { + void UpdatePriority(T *pSound, int priority) { ut::detail::AutoLock lock(mMutex); RemovePriorityList(pSound); diff --git a/include/nw4r/snd/snd_SoundMemoryAllocatable.h b/include/nw4r/snd/snd_SoundMemoryAllocatable.h index ae51eb9d..5fae7595 100644 --- a/include/nw4r/snd/snd_SoundMemoryAllocatable.h +++ b/include/nw4r/snd/snd_SoundMemoryAllocatable.h @@ -1,6 +1,6 @@ #ifndef NW4R_SND_SOUND_MEMORY_ALLOCATABLE_H #define NW4R_SND_SOUND_MEMORY_ALLOCATABLE_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -9,7 +9,7 @@ class SoundMemoryAllocatable { public: virtual ~SoundMemoryAllocatable() {} // at 0x8 - virtual void* Alloc(u32 size) = 0; // at 0xC + virtual void *Alloc(u32 size) = 0; // at 0xC }; } // namespace snd diff --git a/include/nw4r/snd/snd_SoundPlayer.h b/include/nw4r/snd/snd_SoundPlayer.h index 540b7722..ff276794 100644 --- a/include/nw4r/snd/snd_SoundPlayer.h +++ b/include/nw4r/snd/snd_SoundPlayer.h @@ -1,12 +1,10 @@ #ifndef NW4R_SND_SOUND_PLAYER_H #define NW4R_SND_SOUND_PLAYER_H -#include - -#include -#include - -#include -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_PlayerHeap.h" +#include "nw4r/types_nw4r.h" +#include "rvl/OS.h" // IWYU pragma: export +#include "rvl/WPAD.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -17,7 +15,8 @@ class ExternalSoundPlayer; class SeqSound; class StrmSound; class WaveSound; -template class SoundInstanceManager; +template +class SoundInstanceManager; } // namespace detail class SoundPlayer { @@ -38,47 +37,41 @@ class SoundPlayer { f32 detail_GetRemoteOutVolume(int i) const; - void detail_InsertSoundList(detail::BasicSound* pSound); - void detail_RemoveSoundList(detail::BasicSound* pSound); + void detail_InsertSoundList(detail::BasicSound *pSound); + void detail_RemoveSoundList(detail::BasicSound *pSound); - void detail_InsertPriorityList(detail::BasicSound* pSound); - void detail_RemovePriorityList(detail::BasicSound* pSound); + void detail_InsertPriorityList(detail::BasicSound *pSound); + void detail_RemovePriorityList(detail::BasicSound *pSound); void detail_SortPriorityList(); - detail::SeqSound* detail_AllocSeqSound( - int priority, int startPriority, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pExtPlayer, u32 id, - detail::SoundInstanceManager* pManager); + detail::SeqSound *detail_AllocSeqSound( + int priority, int startPriority, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pExtPlayer, u32 id, detail::SoundInstanceManager *pManager + ); - detail::StrmSound* detail_AllocStrmSound( - int priority, int startPriority, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pExtPlayer, u32 id, - detail::SoundInstanceManager* pManager); + detail::StrmSound *detail_AllocStrmSound( + int priority, int startPriority, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pExtPlayer, u32 id, detail::SoundInstanceManager *pManager + ); - detail::WaveSound* detail_AllocWaveSound( - int priority, int startPriority, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pExtPlayer, u32 id, - detail::SoundInstanceManager* pManager); + detail::WaveSound *detail_AllocWaveSound( + int priority, int startPriority, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pExtPlayer, u32 id, detail::SoundInstanceManager *pManager + ); - int CalcPriorityReduction(detail::BasicSound::AmbientArgInfo* pArgInfo, - u32 id); + int CalcPriorityReduction(detail::BasicSound::AmbientArgInfo *pArgInfo, u32 id); - void InitAmbientArg(detail::BasicSound* pSound, - detail::BasicSound::AmbientArgInfo* pArgInfo); + void InitAmbientArg(detail::BasicSound *pSound, detail::BasicSound::AmbientArgInfo *pArgInfo); void SetPlayableSoundCount(int count); void detail_SetPlayableSoundLimit(int limit); - bool CheckPlayableSoundCount(int startPriority, - detail::ExternalSoundPlayer* pExtPlayer); + bool CheckPlayableSoundCount(int startPriority, detail::ExternalSoundPlayer *pExtPlayer); - void detail_AppendPlayerHeap(detail::PlayerHeap* pHeap); - detail::PlayerHeap* detail_AllocPlayerHeap(detail::BasicSound* pSound); - void detail_FreePlayerHeap(detail::BasicSound* pSound); + void detail_AppendPlayerHeap(detail::PlayerHeap *pHeap); + detail::PlayerHeap *detail_AllocPlayerHeap(detail::BasicSound *pSound); + void detail_FreePlayerHeap(detail::BasicSound *pSound); int GetPlayingSoundCount() const { return mSoundList.GetSize(); @@ -91,7 +84,7 @@ class SoundPlayer { return mVolume; } - detail::BasicSound* detail_GetLowestPrioritySound() { + detail::BasicSound *detail_GetLowestPrioritySound() { // @bug UB when the list is empty return &mPriorityList.GetFront(); } diff --git a/include/nw4r/snd/snd_SoundStartable.h b/include/nw4r/snd/snd_SoundStartable.h index 86d5cd2c..7a2ad15d 100644 --- a/include/nw4r/snd/snd_SoundStartable.h +++ b/include/nw4r/snd/snd_SoundStartable.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_SOUND_STARTABLE_H #define NW4R_SND_SOUND_STARTABLE_H -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -57,66 +57,58 @@ class SoundStartable { public: virtual ~SoundStartable() {} // at 0x8 - virtual StartResult - detail_SetupSound(SoundHandle* pHandle, u32 id, - bool hold, - const StartInfo* pStartInfo) = 0; // at 0xC + virtual StartResult detail_SetupSound( + SoundHandle *pHandle, u32 id, bool hold, + const StartInfo *pStartInfo + ) = 0; // at 0xC - virtual u32 - detail_ConvertLabelStringToSoundId(const char* pLabel) = 0; // at 0x10 + virtual u32 detail_ConvertLabelStringToSoundId(const char *pLabel) = 0; // at 0x10 - bool StartSound(SoundHandle* pHandle, u32 id) { - return detail_StartSound(pHandle, id, NULL, NULL, NULL) == - START_SUCCESS; + bool StartSound(SoundHandle *pHandle, u32 id) { + return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool StartSound(SoundHandle* pHandle, unsigned int id) { - return detail_StartSound(pHandle, id, NULL, NULL, NULL) == - START_SUCCESS; + bool StartSound(SoundHandle *pHandle, unsigned int id) { + return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool StartSound(SoundHandle* pHandle, int id) { - return detail_StartSound(pHandle, id, NULL, NULL, NULL) == - START_SUCCESS; + bool StartSound(SoundHandle *pHandle, int id) { + return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool HoldSound(SoundHandle* pHandle, u32 id) { + bool HoldSound(SoundHandle *pHandle, u32 id) { return detail_HoldSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool HoldSound(SoundHandle* pHandle, unsigned int id) { + bool HoldSound(SoundHandle *pHandle, unsigned int id) { return detail_HoldSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool HoldSound(SoundHandle* pHandle, int id) { + bool HoldSound(SoundHandle *pHandle, int id) { return detail_HoldSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool PrepareSound(SoundHandle* pHandle, u32 id) { - return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == - START_SUCCESS; + bool PrepareSound(SoundHandle *pHandle, u32 id) { + return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool PrepareSound(SoundHandle* pHandle, unsigned int id) { - return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == - START_SUCCESS; + bool PrepareSound(SoundHandle *pHandle, unsigned int id) { + return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } - bool PrepareSound(SoundHandle* pHandle, int id) { - return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == - START_SUCCESS; + bool PrepareSound(SoundHandle *pHandle, int id) { + return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; } private: - StartResult detail_StartSound(SoundHandle* pHandle, u32 id, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pPlayer, - const StartInfo* pStartInfo); - - StartResult detail_HoldSound(SoundHandle* pHandle, u32 id, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pPlayer, - const StartInfo* pStartInfo); - - StartResult - detail_PrepareSound(SoundHandle* pHandle, u32 id, - detail::BasicSound::AmbientArgInfo* pArgInfo, - detail::ExternalSoundPlayer* pPlayer, - const StartInfo* pStartInfo); + StartResult detail_StartSound( + SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo + ); + + StartResult detail_HoldSound( + SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo + ); + + StartResult detail_PrepareSound( + SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientArgInfo *pArgInfo, + detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo + ); }; } // namespace snd diff --git a/include/nw4r/snd/snd_SoundSystem.h b/include/nw4r/snd/snd_SoundSystem.h index ca8c8c22..d71fd5e6 100644 --- a/include/nw4r/snd/snd_SoundSystem.h +++ b/include/nw4r/snd/snd_SoundSystem.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_SOUND_SYSTEM_H #define NW4R_SND_SOUND_SYSTEM_H -#include - -#include -#include -#include +#include "nw4r/snd/snd_AxManager.h" +#include "nw4r/snd/snd_RemoteSpeakerManager.h" +#include "nw4r/snd/snd_TaskThread.h" +#include "nw4r/types_nw4r.h" namespace nw4r { namespace snd { @@ -18,18 +17,15 @@ class SoundSystem { u32 dvdThreadStackSize; // at 0xC SoundSystemParam() - : soundThreadPriority(DEFAULT_SOUND_THREAD_PRIORITY), - soundThreadStackSize(DEFAULT_SOUND_THREAD_STACK_SIZE), - dvdThreadPriority(DEFAULT_DVD_THREAD_PRIORITY), - dvdThreadStackSize(DEFAULT_DVD_THREAD_STACK_SIZE) {} + : soundThreadPriority(DEFAULT_SOUND_THREAD_PRIORITY), soundThreadStackSize(DEFAULT_SOUND_THREAD_STACK_SIZE), + dvdThreadPriority(DEFAULT_DVD_THREAD_PRIORITY), dvdThreadStackSize(DEFAULT_DVD_THREAD_STACK_SIZE) {} }; public: static void InitSoundSystem(s32 soundThreadPrio, s32 dvdThreadPriority); - static u32 GetRequiredMemSize(const SoundSystemParam& rParam); + static u32 GetRequiredMemSize(const SoundSystemParam &rParam); - static void InitSoundSystem(const SoundSystemParam& rParam, void* pWork, - u32 workSize); + static void InitSoundSystem(const SoundSystemParam &rParam, void *pWork, u32 workSize); static void ShutdownSoundSystem(); static void WaitForResetReady(); @@ -49,11 +45,11 @@ class SoundSystem { detail::AxManager::GetInstance().SetMasterVolume(volume, frame); } - static RemoteSpeaker& GetRemoteSpeaker(int i) { + static RemoteSpeaker &GetRemoteSpeaker(int i) { return detail::RemoteSpeakerManager::GetInstance().GetRemoteSpeaker(i); } - static void AppendEffect(AuxBus bus, FxBase* pFx) { + static void AppendEffect(AuxBus bus, FxBase *pFx) { detail::AxManager::GetInstance().AppendEffect(bus, pFx); } static void ClearEffect(AuxBus bus, int frame) { diff --git a/include/nw4r/snd/snd_SoundThread.h b/include/nw4r/snd/snd_SoundThread.h index 45eaba8a..84004e16 100644 --- a/include/nw4r/snd/snd_SoundThread.h +++ b/include/nw4r/snd/snd_SoundThread.h @@ -1,12 +1,9 @@ #ifndef NW4R_SND_SOUND_THREAD_H #define NW4R_SND_SOUND_THREAD_H -#include - -#include - -#include - -#include +#include "nw4r/snd/snd_AxManager.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -51,13 +48,13 @@ class SoundThread { }; public: - static SoundThread& GetInstance(); + static SoundThread &GetInstance(); - bool Create(s32 priority, void* pStack, u32 stackSize); + bool Create(s32 priority, void *pStack, u32 stackSize); void Shutdown(); - void RegisterPlayerCallback(PlayerCallback* pCallback); - void UnregisterPlayerCallback(PlayerCallback* pCallback); + void RegisterPlayerCallback(PlayerCallback *pCallback); + void UnregisterPlayerCallback(PlayerCallback *pCallback); private: enum ThreadMessage { @@ -74,7 +71,7 @@ class SoundThread { static void AxCallbackFunc(); void AxCallbackProc(); - static void* SoundThreadFunc(void* pArg); + static void *SoundThreadFunc(void *pArg); void SoundThreadProc(); void Lock() { @@ -89,7 +86,7 @@ class SoundThread { OSThreadQueue mThreadQueue; // at 0x318 OSMessageQueue mMsgQueue; // at 0x320 OSMessage mMsgBuffer[MSG_QUEUE_CAPACITY]; // at 0x340 - void* mStackEnd; // at 0x350 + void *mStackEnd; // at 0x350 mutable OSMutex mMutex; // at 0x354 AxManager::CallbackListNode mAxCallbackNode; // at 0x36C diff --git a/include/nw4r/snd/snd_StrmChannel.h b/include/nw4r/snd/snd_StrmChannel.h index 9d31a4ae..ccc0da32 100644 --- a/include/nw4r/snd/snd_StrmChannel.h +++ b/include/nw4r/snd/snd_StrmChannel.h @@ -1,26 +1,26 @@ #ifndef NW4R_SND_STRM_CHANNEL_H #define NW4R_SND_STRM_CHANNEL_H -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { namespace detail { struct StrmChannel { - void* bufferAddress; // at 0x0 + void *bufferAddress; // at 0x0 u32 bufferSize; // at 0x4 AdpcmInfo adpcmInfo; // at 0x8 }; class StrmBufferPool { public: - void Setup(void* pBase, u32 size, int count); + void Setup(void *pBase, u32 size, int count); void Shutdown(); - void* Alloc(); - void Free(void* pBuffer); + void *Alloc(); + void Free(void *pBuffer); u32 GetBlockSize() const { return mBlockSize; @@ -31,7 +31,7 @@ class StrmBufferPool { static const int BITS_PER_BYTE = 8; private: - void* mBuffer; // at 0x0 + void *mBuffer; // at 0x0 u32 mBufferSize; // at 0x4 u32 mBlockSize; // at 0x8 diff --git a/include/nw4r/snd/snd_StrmFile.h b/include/nw4r/snd/snd_StrmFile.h index a4f47eb3..e8a37d50 100644 --- a/include/nw4r/snd/snd_StrmFile.h +++ b/include/nw4r/snd/snd_StrmFile.h @@ -1,11 +1,10 @@ #ifndef NW4R_SND_STRM_FILE_H #define NW4R_SND_STRM_FILE_H -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/snd/snd_Util.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include - -#include namespace nw4r { namespace snd { @@ -102,11 +101,11 @@ class StrmFileReader { return mHeader != NULL; } - bool IsValidFileHeader(const void* pStrmBin); - void Setup(const void* pStrmBin); + bool IsValidFileHeader(const void *pStrmBin); + void Setup(const void *pStrmBin); - bool ReadStrmInfo(StrmInfo* pStrmInfo) const; - bool ReadAdpcmInfo(AdpcmInfo* pAdpcmInfo, int channels) const; + bool ReadStrmInfo(StrmInfo *pStrmInfo) const; + bool ReadAdpcmInfo(AdpcmInfo *pAdpcmInfo, int channels) const; u32 GetAdpcBlockOffset() const { if (IsAvailable()) { @@ -117,19 +116,18 @@ class StrmFileReader { } private: - const StrmFile::Header* mHeader; // at 0x0 - const StrmFile::HeadBlock* mHeadBlock; // at 0x4 + const StrmFile::Header *mHeader; // at 0x0 + const StrmFile::HeadBlock *mHeadBlock; // at 0x4 }; class StrmFileLoader { public: - explicit StrmFileLoader(ut::FileStream& rFileStream) - : mStream(rFileStream) {} + explicit StrmFileLoader(ut::FileStream &rFileStream) : mStream(rFileStream) {} - bool LoadFileHeader(void* pStrmBin, u32 size); - bool ReadAdpcBlockData(u16* pYN1, u16* pYN2, int block, int channels); + bool LoadFileHeader(void *pStrmBin, u32 size); + bool ReadAdpcBlockData(u16 *pYN1, u16 *pYN2, int block, int channels); - bool ReadStrmInfo(StrmInfo* pStrmInfo) const { + bool ReadStrmInfo(StrmInfo *pStrmInfo) const { if (!mReader.IsAvailable()) { return false; } @@ -137,7 +135,7 @@ class StrmFileLoader { return mReader.ReadStrmInfo(pStrmInfo); } - bool ReadAdpcmInfo(AdpcmInfo* pAdpcmInfo, int channel) const { + bool ReadAdpcmInfo(AdpcmInfo *pAdpcmInfo, int channel) const { if (!mReader.IsAvailable()) { return false; } @@ -146,11 +144,10 @@ class StrmFileLoader { } private: - static const int HEADER_ALIGNED_SIZE = - ROUND_UP(sizeof(StrmFile::Header), 32); + static const int HEADER_ALIGNED_SIZE = ROUND_UP(sizeof(StrmFile::Header), 32); private: - ut::FileStream& mStream; // at 0x0 + ut::FileStream &mStream; // at 0x0 StrmFileReader mReader; // at 0x4 }; diff --git a/include/nw4r/snd/snd_StrmPlayer.h b/include/nw4r/snd/snd_StrmPlayer.h index c1979bf1..342dd140 100644 --- a/include/nw4r/snd/snd_StrmPlayer.h +++ b/include/nw4r/snd/snd_StrmPlayer.h @@ -1,18 +1,16 @@ #ifndef NW4R_SND_STRM_PLAYER_H #define NW4R_SND_STRM_PLAYER_H -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include +#include "common.h" +#include "nw4r/snd/snd_BasicPlayer.h" +#include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/snd/snd_SoundThread.h" +#include "nw4r/snd/snd_StrmChannel.h" +#include "nw4r/snd/snd_StrmFile.h" +#include "nw4r/snd/snd_Task.h" +#include "nw4r/snd/snd_Voice.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -77,11 +75,10 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { mTaskCancelFlag = true; } - bool Setup(StrmBufferPool* pBufferPool); + bool Setup(StrmBufferPool *pBufferPool); void Shutdown(); - bool Prepare(ut::FileStream* pFileStream, int voices, - StartOffsetType offsetType, int offset); + bool Prepare(ut::FileStream *pFileStream, int voices, StartOffsetType offsetType, int offset); void InitParam(); void Update(); @@ -94,8 +91,8 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { virtual void Cancel(); // at 0x10 virtual void OnCancel(); // at 0x14 - StrmPlayer* strmPlayer; // at 0x10 - ut::FileStream* fileStream; // at 0x14 + StrmPlayer *strmPlayer; // at 0x10 + ut::FileStream *fileStream; // at 0x14 StartOffsetType startOffsetType; // at 0x18 s32 startOffset; // at 0x1C }; @@ -107,8 +104,8 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { virtual void Cancel(); // at 0x10 virtual void OnCancel(); // at 0x14 - StrmPlayer* strmPlayer; // at 0x10 - ut::FileStream* fileStream; // at 0x14 + StrmPlayer *strmPlayer; // at 0x10 + ut::FileStream *fileStream; // at 0x14 u32 size; // at 0x18 s32 offset; // at 0x1C u32 blockSize; // at 0x20 @@ -128,13 +125,12 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { static const int LOAD_BUFFER_SIZE = 0x4000 + 32; private: - bool LoadHeader(ut::FileStream* pFileStream, StartOffsetType offsetType, - int offset); - bool LoadStreamData(ut::FileStream* pFileStream, int offset, u32 size, - u32 blockSize, int blockIndex, - bool needUpdateAdpcmLoop); + bool LoadHeader(ut::FileStream *pFileStream, StartOffsetType offsetType, int offset); + bool LoadStreamData( + ut::FileStream *pFileStream, int offset, u32 size, u32 blockSize, int blockIndex, bool needUpdateAdpcmLoop + ); - bool SetupPlayer(const StrmHeader* pStrmHeader); + bool SetupPlayer(const StrmHeader *pStrmHeader); bool AllocChannels(int channels, int voices); void FreeChannels(); @@ -148,13 +144,11 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { void UpdatePauseStatus(); int CalcLoadingBufferBlockCount() const; - bool CalcStartOffset(s32* pBlockIndex, u32* pBlockOffset, s32* pLoopCount); + bool CalcStartOffset(s32 *pBlockIndex, u32 *pBlockOffset, s32 *pLoopCount); - static void VoiceCallbackFunc(Voice* pDropVoice, - Voice::VoiceCallbackStatus status, - void* pCallbackArg); + static void VoiceCallbackFunc(Voice *pDropVoice, Voice::VoiceCallbackStatus status, void *pCallbackArg); - void SetAdpcmLoopContext(int channels, u16* pPredScale); + void SetAdpcmLoopContext(int channels, u16 *pPredScale); private: StrmInfo mStrmInfo; // at 0x80 @@ -201,9 +195,9 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { InstancePool mStrmDataLoadTaskPool; // at 0x134 StrmDataLoadTask mStrmDataLoadTaskArea[DATA_BLOCK_COUNT_MAX]; // at 0x138 - StrmBufferPool* mBufferPool; // at 0x7B8 - ut::FileStream* mFileStream; // at 0x7BC - Voice* mVoice; // at 0x7C0 + StrmBufferPool *mBufferPool; // at 0x7B8 + ut::FileStream *mFileStream; // at 0x7BC + Voice *mVoice; // at 0x7C0 s32 mChannelCount; // at 0x7C4 s32 mVoiceOutCount; // at 0x7C8 @@ -212,7 +206,7 @@ class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback { u16 mAdpcmLoopYn1[CHANNEL_MAX]; // at 0x840 u16 mAdpcmLoopYn2[CHANNEL_MAX]; // at 0x844 - static u8 sLoadBuffer[LOAD_BUFFER_SIZE] ALIGN(32); + static u8 sLoadBuffer[LOAD_BUFFER_SIZE] ALIGN_DECL(32); static OSMutex sLoadBufferMutex; static bool sStaticInitFlag; diff --git a/include/nw4r/snd/snd_StrmSound.h b/include/nw4r/snd/snd_StrmSound.h index edbca21a..443e154b 100644 --- a/include/nw4r/snd/snd_StrmSound.h +++ b/include/nw4r/snd/snd_StrmSound.h @@ -1,11 +1,10 @@ #ifndef NW4R_SND_STRM_SOUND_H #define NW4R_SND_STRM_SOUND_H -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_StrmPlayer.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include - -#include namespace nw4r { namespace snd { @@ -16,7 +15,8 @@ class StrmSoundHandle; namespace detail { // Forward declarations -template class SoundInstanceManager; +template +class SoundInstanceManager; class StrmSound : public BasicSound { friend class StrmSoundHandle; @@ -25,7 +25,7 @@ class StrmSound : public BasicSound { NW4R_UT_RTTI_DECL(StrmSound); public: - explicit StrmSound(SoundInstanceManager* pManager); + explicit StrmSound(SoundInstanceManager *pManager); virtual void Shutdown(); // at 0x28 virtual bool IsPrepared() const { @@ -36,17 +36,18 @@ class StrmSound : public BasicSound { virtual bool IsAttachedTempSpecialHandle(); // at 0x5C virtual void DetachTempSpecialHandle(); // at 0x60 - virtual BasicPlayer& GetBasicPlayer() { + virtual BasicPlayer &GetBasicPlayer() { return mStrmPlayer; } // at 0x68 - virtual const BasicPlayer& GetBasicPlayer() const { + virtual const BasicPlayer &GetBasicPlayer() const { return mStrmPlayer; } // at 0x6C - bool Prepare(StrmBufferPool* pPool, StrmPlayer::StartOffsetType offsetType, - s32 offset, int voices, ut::FileStream* pStream); + bool Prepare( + StrmBufferPool *pPool, StrmPlayer::StartOffsetType offsetType, s32 offset, int voices, ut::FileStream *pStream + ); - void* GetFileStreamBuffer() { + void *GetFileStreamBuffer() { return mFileStreamBuffer; } s32 GetFileStreamBufferSize() { @@ -58,8 +59,8 @@ class StrmSound : public BasicSound { private: StrmPlayer mStrmPlayer; // at 0xD8 - StrmSoundHandle* mTempSpecialHandle; // at 0x920 - SoundInstanceManager* mManager; // at 0x924 + StrmSoundHandle *mTempSpecialHandle; // at 0x920 + SoundInstanceManager *mManager; // at 0x924 char UNK_0x928[0x93C - 0x928]; char mFileStreamBuffer[FILE_STREAM_BUFFER_SIZE]; // at 0x93C }; diff --git a/include/nw4r/snd/snd_StrmSoundHandle.h b/include/nw4r/snd/snd_StrmSoundHandle.h index 98a876c3..3c578d9a 100644 --- a/include/nw4r/snd/snd_StrmSoundHandle.h +++ b/include/nw4r/snd/snd_StrmSoundHandle.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_STRM_SOUND_HANDLE_H #define NW4R_SND_STRM_SOUND_HANDLE_H -#include +#include "nw4r/snd/snd_StrmSound.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include - -#include namespace nw4r { namespace snd { @@ -18,7 +17,7 @@ class StrmSoundHandle : private ut::NonCopyable { } private: - detail::StrmSound* mSound; // at 0x0 + detail::StrmSound *mSound; // at 0x0 }; } // namespace snd diff --git a/include/nw4r/snd/snd_Task.h b/include/nw4r/snd/snd_Task.h index ae69e660..c34a265d 100644 --- a/include/nw4r/snd/snd_Task.h +++ b/include/nw4r/snd/snd_Task.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_TASK_H #define NW4R_SND_TASK_H -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include namespace nw4r { namespace snd { diff --git a/include/nw4r/snd/snd_TaskManager.h b/include/nw4r/snd/snd_TaskManager.h index fd31489e..df09c48d 100644 --- a/include/nw4r/snd/snd_TaskManager.h +++ b/include/nw4r/snd/snd_TaskManager.h @@ -1,12 +1,9 @@ #ifndef NW4R_SND_TASK_MANAGER_H #define NW4R_SND_TASK_MANAGER_H -#include -#include - -#include - -#include +#include "nw4r/snd/snd_Task.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -23,12 +20,12 @@ class TaskManager { }; public: - static TaskManager& GetInstance(); + static TaskManager &GetInstance(); - void AppendTask(Task* pTask, TaskPriority priority = PRIORITY_MIDDLE); + void AppendTask(Task *pTask, TaskPriority priority = PRIORITY_MIDDLE); - Task* ExecuteTask(); - void CancelTask(Task* pTask); + Task *ExecuteTask(); + void CancelTask(Task *pTask); void CancelAllTask(); void WaitTask(); @@ -37,13 +34,13 @@ class TaskManager { private: TaskManager(); - Task* PopTask(); - Task* GetNextTask(); - Task* GetNextTask(TaskPriority priority, bool remove); + Task *PopTask(); + Task *GetNextTask(); + Task *GetNextTask(TaskPriority priority, bool remove); private: TaskList mTaskList[PRIORITY_MAX]; // at 0x0 - Task* volatile mCurrentTask; // at 0x24 + Task *volatile mCurrentTask; // at 0x24 bool mCancelWaitTaskFlag; // at 0x28 OSThreadQueue mAppendThreadQueue; // at 0x2C OSThreadQueue mDoneThreadQueue; // at 0x34 diff --git a/include/nw4r/snd/snd_TaskThread.h b/include/nw4r/snd/snd_TaskThread.h index deb9a641..4f6f5f6e 100644 --- a/include/nw4r/snd/snd_TaskThread.h +++ b/include/nw4r/snd/snd_TaskThread.h @@ -1,8 +1,7 @@ #ifndef NW4R_SND_TASK_THREAD_H #define NW4R_SND_TASK_THREAD_H -#include -#include +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace snd { @@ -13,16 +12,16 @@ class TaskThread { TaskThread(); ~TaskThread(); - bool Create(s32 priority, void* pStack, u32 stackSize); + bool Create(s32 priority, void *pStack, u32 stackSize); void Destroy(); private: - static void* ThreadFunc(void* pArg); + static void *ThreadFunc(void *pArg); void ThreadProc(); private: OSThread mThread; // at 0x0 - u32* mStackEnd; // at 0x318 + u32 *mStackEnd; // at 0x318 volatile bool mFinishFlag; // at 0x31C bool mCreateFlag; // at 0x31D diff --git a/include/nw4r/snd/snd_Util.h b/include/nw4r/snd/snd_Util.h index b00de255..ca100f18 100644 --- a/include/nw4r/snd/snd_Util.h +++ b/include/nw4r/snd/snd_Util.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_UTIL_H #define NW4R_SND_UTIL_H -#include +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -36,8 +36,7 @@ enum DataType { DATATYPE_INVALID }; -template +template struct DataRef { u8 refType; // at 0x0 u8 dataType; // at 0x1 @@ -45,37 +44,30 @@ struct DataRef { u32 value; // at 0x4 }; -template struct Table { - u32 count; // at 0x0 +template +struct Table { + u32 count; // at 0x0 T items[1]; // at 0x4 }; template -inline const T0* GetDataRefAddress0(const DataRef& rRef, - const void* pBase) { - return static_cast(GetDataRefAddressImpl( - static_cast(rRef.refType), rRef.value, pBase)); +inline const T0 *GetDataRefAddress0(const DataRef &rRef, const void *pBase) { + return static_cast(GetDataRefAddressImpl(static_cast(rRef.refType), rRef.value, pBase)); } template -inline const T1* GetDataRefAddress1(const DataRef& rRef, - const void* pBase) { - return static_cast(GetDataRefAddressImpl( - static_cast(rRef.refType), rRef.value, pBase)); +inline const T1 *GetDataRefAddress1(const DataRef &rRef, const void *pBase) { + return static_cast(GetDataRefAddressImpl(static_cast(rRef.refType), rRef.value, pBase)); } template -inline const T2* GetDataRefAddress2(const DataRef& rRef, - const void* pBase) { - return static_cast(GetDataRefAddressImpl( - static_cast(rRef.refType), rRef.value, pBase)); +inline const T2 *GetDataRefAddress2(const DataRef &rRef, const void *pBase) { + return static_cast(GetDataRefAddressImpl(static_cast(rRef.refType), rRef.value, pBase)); } template -inline const T3* GetDataRefAddress3(const DataRef& rRef, - const void* pBase) { - return static_cast(GetDataRefAddressImpl( - static_cast(rRef.refType), rRef.value, pBase)); +inline const T3 *GetDataRefAddress3(const DataRef &rRef, const void *pBase) { + return static_cast(GetDataRefAddressImpl(static_cast(rRef.refType), rRef.value, pBase)); } #ifdef NW4R_LITLE_ENDIAN @@ -84,8 +76,7 @@ inline u16 ReadBigEndian(u16 x) { } inline u32 ReadBigEndian(u32 x) { - return (x >> 24) & 0x000000FF | (x >> 8) & 0x0000FF00 | - (x << 8) & 0x00FF0000 | (x << 24) & 0xFF000000; + return (x >> 24) & 0x000000FF | (x >> 8) & 0x0000FF00 | (x << 8) & 0x00FF0000 | (x << 24) & 0xFF000000; } #else inline u16 ReadBigEndian(u16 x) { @@ -99,13 +90,12 @@ inline u32 ReadBigEndian(u32 x) { f32 CalcPitchRatio(int pitch); f32 CalcVolumeRatio(f32 db); -f32 CalcPanRatio(f32 pan, const PanInfo& rInfo); -f32 CalcSurroundPanRatio(f32 pan, const PanInfo& rInfo); +f32 CalcPanRatio(f32 pan, const PanInfo &rInfo); +f32 CalcSurroundPanRatio(f32 pan, const PanInfo &rInfo); int CalcLpfFreq(f32 scale); -void GetRemoteFilterCoefs(int filter, u16* pB0, u16* pB1, u16* pB2, u16* pA1, - u16* pA2); +void GetRemoteFilterCoefs(int filter, u16 *pB0, u16 *pB1, u16 *pB2, u16 *pA1, u16 *pA2); u16 CalcRandom(); -const void* GetDataRefAddressImpl(RefType type, u32 value, const void* pBase); +const void *GetDataRefAddressImpl(RefType type, u32 value, const void *pBase); } // namespace Util } // namespace detail diff --git a/include/nw4r/snd/snd_Voice.h b/include/nw4r/snd/snd_Voice.h index acfca5d5..8657ea28 100644 --- a/include/nw4r/snd/snd_Voice.h +++ b/include/nw4r/snd/snd_Voice.h @@ -1,14 +1,11 @@ #ifndef NW4R_SND_VOICE_H #define NW4R_SND_VOICE_H -#include +#include "nw4r/snd/snd_AxVoice.h" +#include "nw4r/snd/snd_Common.h" +#include "nw4r/snd/snd_DisposeCallback.h" +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/WPAD.h" // IWYU pragma: export -#include -#include -#include - -#include - -#include namespace nw4r { namespace snd { @@ -28,8 +25,7 @@ class Voice : public DisposeCallback { CALLBACK_STATUS_DROP_DSP, }; - typedef void (*VoiceCallback)(Voice* pDropVoice, VoiceCallbackStatus status, - void* pCallbackArg); + typedef void (*VoiceCallback)(Voice *pDropVoice, VoiceCallbackStatus status, void *pCallbackArg); enum VoiceSyncFlag { SYNC_AX_SRC_INITIAL = (1 << 0), @@ -48,11 +44,10 @@ class Voice : public DisposeCallback { Voice(); virtual ~Voice(); // at 0x8 - virtual void InvalidateData(const void* /* pStart */, - const void* /* pEnd */) {} // at 0xC + virtual void InvalidateData(const void * /* pStart */, const void * /* pEnd */) {} // at 0xC - virtual void InvalidateWaveData(const void* pStart, - const void* pEnd); // at 0x10 + virtual void InvalidateWaveData(const void *pStart, + const void *pEnd); // at 0x10 int GetPriority() const { return mPriority; @@ -68,18 +63,16 @@ class Voice : public DisposeCallback { return IsActive() && mAxVoice[0][0]->IsPlayFinished(); } - void InitParam(int channels, int voices, VoiceCallback pCallback, - void* pCallbackArg); + void InitParam(int channels, int voices, VoiceCallback pCallback, void *pCallbackArg); void StopFinished(); void Calc(); void Update(); - bool Acquire(int channels, int voices, int priority, - VoiceCallback pCallback, void* pCallbackArg); + bool Acquire(int channels, int voices, int priority, VoiceCallback pCallback, void *pCallbackArg); void Free(); - void Setup(const WaveData& rData, u32 offset); + void Setup(const WaveData &rData, u32 offset); void Start(); void Stop(); @@ -111,12 +104,12 @@ class Voice : public DisposeCallback { void SetPriority(int priority); void UpdateVoicesPriority(); - void SetAdpcmLoop(int channel, const AdpcmLoopParam* pParam); + void SetAdpcmLoop(int channel, const AdpcmLoopParam *pParam); u32 GetCurrentPlayingSample() const; - void SetLoopStart(int channel, const void* pBase, u32 samples); - void SetLoopEnd(int channel, const void* pBase, u32 samples); + void SetLoopStart(int channel, const void *pBase, u32 samples); + void SetLoopEnd(int channel, const void *pBase, u32 samples); void SetLoopFlag(bool loop); - void StopAtPoint(int channel, const void* pBase, u32 samples); + void StopAtPoint(int channel, const void *pBase, u32 samples); void SetVoiceType(AxVoice::VoiceType type); void CalcAxSrc(bool initial); @@ -133,26 +126,22 @@ class Voice : public DisposeCallback { void SyncAxVoice(); void ResetDelta(); - static void AxVoiceCallbackFunc(AxVoice* pVoice, - AxVoice::AxVoiceCallbackStatus status, - void* pCallbackArg); + static void AxVoiceCallbackFunc(AxVoice *pVoice, AxVoice::AxVoiceCallbackStatus status, void *pCallbackArg); - void TransformDpl2Pan(f32* pPan, f32* pSurroundPan, f32 pan, - f32 surroundPan); - void CalcMixParam(int channel, int voice, AxVoice::MixParam* pMix, - AxVoice::RemoteMixParam* pRmtMix); + void TransformDpl2Pan(f32 *pPan, f32 *pSurroundPan, f32 pan, f32 surroundPan); + void CalcMixParam(int channel, int voice, AxVoice::MixParam *pMix, AxVoice::RemoteMixParam *pRmtMix); void RunAllAxVoice(); void StopAllAxVoice(); private: - AxVoice* mAxVoice[CHANNEL_MAX][VOICES_MAX]; // at 0xC + AxVoice *mAxVoice[CHANNEL_MAX][VOICES_MAX]; // at 0xC SoundParam mVoiceOutParam[VOICES_MAX]; // at 0x2C int mChannelCount; // at 0x9C int mVoiceOutCount; // at 0xA0 VoiceCallback mCallback; // at 0xA4 - void* mCallbackArg; // at 0xA8 + void *mCallbackArg; // at 0xA8 bool mIsActive; // at 0xAC bool mIsStarting; // at 0xAD diff --git a/include/nw4r/snd/snd_VoiceManager.h b/include/nw4r/snd/snd_VoiceManager.h index e416a20c..854ae9ac 100644 --- a/include/nw4r/snd/snd_VoiceManager.h +++ b/include/nw4r/snd/snd_VoiceManager.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_VOICE_MANAGER_H #define NW4R_SND_VOICE_MANAGER_H -#include +#include "nw4r/snd/snd_Voice.h" +#include "nw4r/types_nw4r.h" -#include namespace nw4r { namespace snd { @@ -14,35 +14,33 @@ class VoiceManager { static const int WORK_SIZE_MAX = VOICE_MAX * sizeof(Voice); public: - static VoiceManager& GetInstance(); + static VoiceManager &GetInstance(); u32 GetRequiredMemSize(); - void Setup(void* pBuffer, u32 size); + void Setup(void *pBuffer, u32 size); void Shutdown(); void StopAllVoices(); - Voice* AllocVoice(int channels, int voices, int priority, - Voice::VoiceCallback pCallback, void* pCallbackArg); - void FreeVoice(Voice* pVoice); + Voice *AllocVoice(int channels, int voices, int priority, Voice::VoiceCallback pCallback, void *pCallbackArg); + void FreeVoice(Voice *pVoice); void UpdateAllVoices(); void NotifyVoiceUpdate(); - void ChangeVoicePriority(Voice* pVoice); + void ChangeVoicePriority(Voice *pVoice); void UpdateAllVoicesSync(u32 syncFlag); - const VoiceList& GetVoiceList() const { + const VoiceList &GetVoiceList() const { return mPrioVoiceList; } private: VoiceManager(); - void AppendVoiceList(Voice* pVoice); - void RemoveVoiceList(Voice* pVoice); + void AppendVoiceList(Voice *pVoice); + void RemoveVoiceList(Voice *pVoice); - void UpdateEachVoicePriority(const VoiceList::Iterator& rBegin, - const VoiceList::Iterator& rEnd); + void UpdateEachVoicePriority(const VoiceList::Iterator &rBegin, const VoiceList::Iterator &rEnd); int DropLowestPriorityVoice(int priority); diff --git a/include/nw4r/snd/snd_WaveFile.h b/include/nw4r/snd/snd_WaveFile.h index 7c309ef4..cd5de7a2 100644 --- a/include/nw4r/snd/snd_WaveFile.h +++ b/include/nw4r/snd/snd_WaveFile.h @@ -1,18 +1,21 @@ #ifndef NW4R_SND_WAVE_FILE_H #define NW4R_SND_WAVE_FILE_H -#include +#include "nw4r/snd/snd_AxVoice.h" +#include "nw4r/snd/snd_Common.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include - -#include namespace nw4r { namespace snd { namespace detail { namespace WaveFile { -enum Format { FORMAT_PCM8, FORMAT_PCM16, FORMAT_ADPCM }; +enum Format { + FORMAT_PCM8, + FORMAT_PCM16, + FORMAT_ADPCM +}; struct WaveInfo { u8 format; // at 0x0 @@ -41,7 +44,7 @@ struct WaveChannelInfo { }; // namespace WaveFile struct ChannelParam { - void* dataAddr; // at 0x0 + void *dataAddr; // at 0x0 u32 volumeFrontLeft; // at 0x4 u32 volumeFrontRight; // at 0x8 u32 volumeRearLeft; // at 0xC @@ -61,14 +64,14 @@ struct WaveData { class WaveFileReader { public: - explicit WaveFileReader(const WaveFile::WaveInfo* pWaveInfo); + explicit WaveFileReader(const WaveFile::WaveInfo *pWaveInfo); - bool ReadWaveParam(WaveData* pWaveData, const void* pWaveAddr) const; + bool ReadWaveParam(WaveData *pWaveData, const void *pWaveAddr) const; static AxVoice::Format GetAxVoiceFormatFromWaveFileFormat(u32 format); private: - const WaveFile::WaveInfo* mWaveInfo; // at 0x0 + const WaveFile::WaveInfo *mWaveInfo; // at 0x0 }; inline AxVoice::Format WaveFormatToAxFormat(u32 format) { diff --git a/include/nw4r/snd/snd_WaveSound.h b/include/nw4r/snd/snd_WaveSound.h index 8ea92f2f..d0ec2c31 100644 --- a/include/nw4r/snd/snd_WaveSound.h +++ b/include/nw4r/snd/snd_WaveSound.h @@ -1,11 +1,10 @@ #ifndef NW4R_SND_WAVE_SOUND_H #define NW4R_SND_WAVE_SOUND_H -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_WsdPlayer.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include - -#include namespace nw4r { namespace snd { @@ -16,7 +15,8 @@ class WaveSoundHandle; namespace detail { // Forward declarations -template class SoundInstanceManager; +template +class SoundInstanceManager; class WaveSound : public BasicSound { friend class WaveSoundHandle; @@ -25,7 +25,7 @@ class WaveSound : public BasicSound { NW4R_UT_RTTI_DECL(WaveSound); public: - explicit WaveSound(SoundInstanceManager* pManager); + explicit WaveSound(SoundInstanceManager *pManager); virtual void Shutdown(); // at 0x28 virtual bool IsPrepared() const { @@ -36,25 +36,25 @@ class WaveSound : public BasicSound { virtual bool IsAttachedTempSpecialHandle(); // at 0x5C virtual void DetachTempSpecialHandle(); // at 0x60 - virtual BasicPlayer& GetBasicPlayer() { + virtual BasicPlayer &GetBasicPlayer() { return mWsdPlayer; } // at 0x68 - virtual const BasicPlayer& GetBasicPlayer() const { + virtual const BasicPlayer &GetBasicPlayer() const { return mWsdPlayer; } // at 0x6C - bool Prepare(const void* pWsdData, s32 wsdOffset, - WsdPlayer::StartOffsetType startType, s32 startOffset, - int voices, const WsdPlayer::WsdCallback* pCallback, - u32 callbackArg); + bool Prepare( + const void *pWsdData, s32 wsdOffset, WsdPlayer::StartOffsetType startType, s32 startOffset, int voices, + const WsdPlayer::WsdCallback *pCallback, u32 callbackArg + ); void SetChannelPriority(int priority); void SetReleasePriorityFix(bool flag); private: WsdPlayer mWsdPlayer; // at 0xD8 - WaveSoundHandle* mTempSpecialHandle; // at 0x1B0 - SoundInstanceManager* mManager; // at 0x1B4 + WaveSoundHandle *mTempSpecialHandle; // at 0x1B0 + SoundInstanceManager *mManager; // at 0x1B4 bool mPreparedFlag; // at 0x1B8 }; diff --git a/include/nw4r/snd/snd_WaveSoundHandle.h b/include/nw4r/snd/snd_WaveSoundHandle.h index 2833b4a9..2f373a52 100644 --- a/include/nw4r/snd/snd_WaveSoundHandle.h +++ b/include/nw4r/snd/snd_WaveSoundHandle.h @@ -1,10 +1,9 @@ #ifndef NW4R_SND_WAVE_SOUND_HANDLE_H #define NW4R_SND_WAVE_SOUND_HANDLE_H -#include +#include "nw4r/snd/snd_WaveSound.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include - -#include namespace nw4r { namespace snd { @@ -22,7 +21,7 @@ class WaveSoundHandle : private ut::NonCopyable { } private: - detail::WaveSound* mSound; // at 0x0 + detail::WaveSound *mSound; // at 0x0 }; } // namespace snd diff --git a/include/nw4r/snd/snd_WsdFile.h b/include/nw4r/snd/snd_WsdFile.h index dd1f01b1..7d9024a3 100644 --- a/include/nw4r/snd/snd_WsdFile.h +++ b/include/nw4r/snd/snd_WsdFile.h @@ -1,8 +1,8 @@ #ifndef NW4R_SND_WSD_FILE_H #define NW4R_SND_WSD_FILE_H -#include +#include "nw4r/snd/snd_Util.h" +#include "nw4r/ut.h" -#include namespace nw4r { namespace snd { @@ -110,20 +110,18 @@ class WsdFileReader { static const int VERSION = NW4R_VERSION(1, 2); public: - explicit WsdFileReader(const void* pWsdBin); + explicit WsdFileReader(const void *pWsdBin); - bool IsValidFileHeader(const void* pWsdBin); + bool IsValidFileHeader(const void *pWsdBin); - bool ReadWaveSoundInfo(WaveSoundInfo* pSoundInfo, int id) const; - bool ReadWaveSoundNoteInfo(WaveSoundNoteInfo* pSoundNoteInfo, int id, - int note) const; - bool ReadWaveParam(int id, WaveData* pWaveData, - const void* pWaveAddr) const; + bool ReadWaveSoundInfo(WaveSoundInfo *pSoundInfo, int id) const; + bool ReadWaveSoundNoteInfo(WaveSoundNoteInfo *pSoundNoteInfo, int id, int note) const; + bool ReadWaveParam(int id, WaveData *pWaveData, const void *pWaveAddr) const; private: - const WsdFile::Header* mHeader; // at 0x0 - const WsdFile::DataBlock* mDataBlock; // at 0x4 - const WsdFile::WaveBlock* mWaveBlock; // at 0x8 + const WsdFile::Header *mHeader; // at 0x0 + const WsdFile::DataBlock *mDataBlock; // at 0x4 + const WsdFile::WaveBlock *mWaveBlock; // at 0x8 }; } // namespace detail diff --git a/include/nw4r/snd/snd_WsdPlayer.h b/include/nw4r/snd/snd_WsdPlayer.h index 4d0d52f1..27370242 100644 --- a/include/nw4r/snd/snd_WsdPlayer.h +++ b/include/nw4r/snd/snd_WsdPlayer.h @@ -1,33 +1,30 @@ #ifndef NW4R_SND_WSD_PLAYER_H #define NW4R_SND_WSD_PLAYER_H -#include +#include "nw4r/snd/snd_BasicPlayer.h" +#include "nw4r/snd/snd_Channel.h" +#include "nw4r/snd/snd_DisposeCallback.h" +#include "nw4r/snd/snd_Lfo.h" +#include "nw4r/snd/snd_SoundThread.h" +#include "nw4r/snd/snd_WsdFile.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut.h" -#include -#include -#include -#include -#include -#include - -#include namespace nw4r { namespace snd { namespace detail { -class WsdPlayer : public BasicPlayer, - public DisposeCallback, - public SoundThread::PlayerCallback { +class WsdPlayer : public BasicPlayer, public DisposeCallback, public SoundThread::PlayerCallback { public: class WsdCallback { public: virtual ~WsdCallback() {} // at 0x8 - virtual bool GetWaveSoundData(WaveSoundInfo* pSoundInfo, - WaveSoundNoteInfo* pNoteInfo, - WaveData* pWaveData, const void* pWsdData, - int index, int noteIndex, - u32 callbackArg) const = 0; // at 0xC + virtual bool GetWaveSoundData( + WaveSoundInfo *pSoundInfo, WaveSoundNoteInfo *pNoteInfo, WaveData *pWaveData, const void *pWsdData, + int index, int noteIndex, + u32 callbackArg + ) const = 0; // at 0xC }; enum StartOffsetType { @@ -54,11 +51,10 @@ class WsdPlayer : public BasicPlayer, return mPauseFlag != 0; } // at 0x20 - virtual void InvalidateData(const void* pStart, - const void* pEnd); // at 0x50 + virtual void InvalidateData(const void *pStart, + const void *pEnd); // at 0x50 - virtual void InvalidateWaveData(const void* /* pStart */, - const void* /* pEnd */) {} // at 0x54 + virtual void InvalidateWaveData(const void * /* pStart */, const void * /* pEnd */) {} // at 0x54 virtual void OnUpdateFrameSoundThread() { Update(); @@ -68,11 +64,12 @@ class WsdPlayer : public BasicPlayer, Stop(); } // at 0x60 - void InitParam(int voices, const WsdCallback* pCallback, u32 callbackArg); + void InitParam(int voices, const WsdCallback *pCallback, u32 callbackArg); - bool Prepare(const void* pWsdData, int index, StartOffsetType startType, - int startOffset, int voices, const WsdCallback* pCallback, - u32 callbackArg); + bool Prepare( + const void *pWsdData, int index, StartOffsetType startType, int startOffset, int voices, + const WsdCallback *pCallback, u32 callbackArg + ); void SetChannelPriority(int priority); void SetReleasePriorityFix(bool flag); @@ -89,7 +86,7 @@ class WsdPlayer : public BasicPlayer, return mPriority; } - const void* GetWsdDataAddress() const { + const void *GetWsdDataAddress() const { return mWsdData; } @@ -104,13 +101,11 @@ class WsdPlayer : public BasicPlayer, void FinishPlayer(); void Update(); - bool StartChannel(const WsdCallback* pCallback, u32 callbackArg); + bool StartChannel(const WsdCallback *pCallback, u32 callbackArg); void CloseChannel(); void UpdateChannel(); - static void ChannelCallbackFunc(Channel* pDropChannel, - Channel::ChannelCallbackStatus status, - u32 callbackArg); + static void ChannelCallbackFunc(Channel *pDropChannel, Channel::ChannelCallbackStatus status, u32 callbackArg); private: bool mActiveFlag; // at 0x8C @@ -123,10 +118,10 @@ class WsdPlayer : public BasicPlayer, int mVoiceOutCount; // at 0x98 u8 mPriority; // at 0x9C - const WsdCallback* mCallback; // at 0xA0 + const WsdCallback *mCallback; // at 0xA0 u32 mCallbackData; // at 0xA4 - const void* mWsdData; // at 0xA8 + const void *mWsdData; // at 0xA8 int mWsdIndex; // at 0xAC StartOffsetType mStartOffsetType; // at 0xB0 @@ -134,7 +129,7 @@ class WsdPlayer : public BasicPlayer, LfoParam mLfoParam; // at 0xB8 WaveSoundInfo mWaveSoundInfo; // at 0xC8 - Channel* mChannel; // at 0xD4 + Channel *mChannel; // at 0xD4 }; } // namespace detail diff --git a/include/nw4r/snd/snd_adpcm.h b/include/nw4r/snd/snd_adpcm.h index 89980c0b..f38a2eb5 100644 --- a/include/nw4r/snd/snd_adpcm.h +++ b/include/nw4r/snd/snd_adpcm.h @@ -1,14 +1,13 @@ #ifndef NW4R_SND_ADPCM_H #define NW4R_SND_ADPCM_H -#include -#include +#include "rvl/AX.h" // IWYU pragma: export namespace nw4r { namespace snd { namespace detail { -s16 DecodeDspAdpcm(AXPBADPCM* pAdpcm, u8 bits); +s16 DecodeDspAdpcm(AXPBADPCM *pAdpcm, u8 bits); } // namespace detail } // namespace snd diff --git a/include/nw4r/types_nw4r.h b/include/nw4r/types_nw4r.h index 47e53320..f9a31cf2 100644 --- a/include/nw4r/types_nw4r.h +++ b/include/nw4r/types_nw4r.h @@ -1,6 +1,6 @@ #ifndef NW4R_TYPES_H #define NW4R_TYPES_H -#include +#include "common.h" #define NW4R_BYTEORDER_BIG 0xFEFF #define NW4R_BYTEORDER_LITTLE 0xFFFE diff --git a/include/nw4r/ut.h b/include/nw4r/ut.h index 0b8309fc..428eb4d4 100644 --- a/include/nw4r/ut.h +++ b/include/nw4r/ut.h @@ -1,28 +1,28 @@ #ifndef NW4R_PUBLIC_UT_H #define NW4R_PUBLIC_UT_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "nw4r/ut/ut_CharStrmReader.h" +#include "nw4r/ut/ut_CharWriter.h" +#include "nw4r/ut/ut_Color.h" +#include "nw4r/ut/ut_DvdFileStream.h" +#include "nw4r/ut/ut_DvdLockedFileStream.h" +#include "nw4r/ut/ut_FileStream.h" +#include "nw4r/ut/ut_Font.h" +#include "nw4r/ut/ut_IOStream.h" +#include "nw4r/ut/ut_LinkList.h" +#include "nw4r/ut/ut_LockedCache.h" +#include "nw4r/ut/ut_NandFileStream.h" +#include "nw4r/ut/ut_NonCopyable.h" +#include "nw4r/ut/ut_Rect.h" +#include "nw4r/ut/ut_ResFont.h" +#include "nw4r/ut/ut_ResFontBase.h" +#include "nw4r/ut/ut_RomFont.h" +#include "nw4r/ut/ut_RuntimeTypeInfo.h" +#include "nw4r/ut/ut_TagProcessorBase.h" +#include "nw4r/ut/ut_TextWriterBase.h" +#include "nw4r/ut/ut_algorithm.h" +#include "nw4r/ut/ut_binaryFileFormat.h" +#include "nw4r/ut/ut_list.h" +#include "nw4r/ut/ut_lock.h" #endif diff --git a/include/nw4r/ut/ut_CharStrmReader.h b/include/nw4r/ut/ut_CharStrmReader.h index e5305c47..994dd523 100644 --- a/include/nw4r/ut/ut_CharStrmReader.h +++ b/include/nw4r/ut/ut_CharStrmReader.h @@ -1,6 +1,6 @@ #ifndef NW4R_UT_CHAR_STRM_READER_H #define NW4R_UT_CHAR_STRM_READER_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace ut { @@ -17,23 +17,33 @@ class CharStrmReader { u16 ReadNextCharCP1252(); u16 ReadNextCharSJIS(); - const void* GetCurrentPos() const { return mCharStrm; } + const void *GetCurrentPos() const { + return mCharStrm; + } - template T GetChar(int offset) const { - return static_cast(mCharStrm)[offset]; + template + T GetChar(int offset) const { + return static_cast(mCharStrm)[offset]; } - template void StepStrm(int offset) { - static_cast(mCharStrm) += offset; + template + void StepStrm(int offset) { + static_cast(mCharStrm) += offset; } - u16 Next() { return (this->*mReadFunc)(); } + u16 Next() { + return (this->*mReadFunc)(); + } - void Set(const char* strm) { mCharStrm = strm; } - void Set(const wchar_t* strm) { mCharStrm = strm; } + void Set(const char *strm) { + mCharStrm = strm; + } + void Set(const wchar_t *strm) { + mCharStrm = strm; + } private: - const void* mCharStrm; // at 0x0 + const void *mCharStrm; // at 0x0 ReadFunc mReadFunc; // at 0x4 }; diff --git a/include/nw4r/ut/ut_CharWriter.h b/include/nw4r/ut/ut_CharWriter.h index 0ef0cee4..a70c293d 100644 --- a/include/nw4r/ut/ut_CharWriter.h +++ b/include/nw4r/ut/ut_CharWriter.h @@ -1,16 +1,20 @@ #ifndef NW4R_UT_CHAR_WRITER_H #define NW4R_UT_CHAR_WRITER_H -#include -#include -#include -#include +#include "nw4r/math.h" // IWYU pragma: export +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_Color.h" +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace ut { class CharWriter { public: - enum GradationMode { GRADMODE_NONE, GRADMODE_H, GRADMODE_V }; + enum GradationMode { + GRADMODE_NONE, + GRADMODE_H, + GRADMODE_V + }; struct ColorMapping { Color min; // at 0x0 diff --git a/include/nw4r/ut/ut_Color.h b/include/nw4r/ut/ut_Color.h index 5f3374c3..f6e8349e 100644 --- a/include/nw4r/ut/ut_Color.h +++ b/include/nw4r/ut/ut_Color.h @@ -1,7 +1,8 @@ #ifndef NW4R_UT_COLOR_H #define NW4R_UT_COLOR_H -#include -#include + +#include "nw4r/types_nw4r.h" +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace ut { @@ -60,7 +61,7 @@ class Color : public GXColor { operator u32() const { return ToU32ref(); } -} ALIGN(4); +} ALIGN_DECL(4); } // namespace ut } // namespace nw4r diff --git a/include/nw4r/ut/ut_DvdFileStream.h b/include/nw4r/ut/ut_DvdFileStream.h index 5b000b6e..3f0c1b43 100644 --- a/include/nw4r/ut/ut_DvdFileStream.h +++ b/include/nw4r/ut/ut_DvdFileStream.h @@ -1,8 +1,9 @@ #ifndef NW4R_UT_DVD_FILE_STREAM_H #define NW4R_UT_DVD_FILE_STREAM_H -#include -#include -#include + +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_FileStream.h" +#include "rvl/DVD.h" // IWYU pragma: export namespace nw4r { namespace ut { @@ -69,11 +70,11 @@ class DvdFileStream : public FileStream { virtual s32 Read(void *dst, u32 size); // at 0x14 virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback, - void *arg); // at 0x18 + void *arg); // at 0x18 virtual s32 Peek(void *dst, u32 size); // at 0x5C virtual bool PeekAsync(void *dst, u32 size, AsyncCallback callback, - void *arg); // at 0x60 + void *arg); // at 0x60 virtual void Seek(s32 offset, u32 origin); // at 0x44 diff --git a/include/nw4r/ut/ut_DvdLockedFileStream.h b/include/nw4r/ut/ut_DvdLockedFileStream.h index 5b784ee2..e519e764 100644 --- a/include/nw4r/ut/ut_DvdLockedFileStream.h +++ b/include/nw4r/ut/ut_DvdLockedFileStream.h @@ -1,8 +1,8 @@ #ifndef NW4R_UT_DVD_LOCKED_FILE_STREAM_H #define NW4R_UT_DVD_LOCKED_FILE_STREAM_H -#include -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_DvdFileStream.h" +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_FileStream.h b/include/nw4r/ut/ut_FileStream.h index 71cf0fd8..283bff8a 100644 --- a/include/nw4r/ut/ut_FileStream.h +++ b/include/nw4r/ut/ut_FileStream.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_FILE_STREAM_H #define NW4R_UT_FILE_STREAM_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_IOStream.h" namespace nw4r { namespace ut { @@ -9,8 +9,12 @@ namespace ut { class FileStream : public IOStream { public: NW4R_UT_RTTI_DECL(FileStream); - - enum SeekOrigin { SEEKORG_BEG, SEEKORG_CUR, SEEKORG_END }; + + enum SeekOrigin { + SEEKORG_BEG, + SEEKORG_CUR, + SEEKORG_END + }; class FilePosition { public: diff --git a/include/nw4r/ut/ut_Font.h b/include/nw4r/ut/ut_Font.h index 4cda439a..4df7724e 100644 --- a/include/nw4r/ut/ut_Font.h +++ b/include/nw4r/ut/ut_Font.h @@ -1,8 +1,8 @@ #ifndef NW4R_UT_FONT_H #define NW4R_UT_FONT_H -#include -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_CharStrmReader.h" +#include "rvl/GX.h" // IWYU pragma: export namespace nw4r { namespace ut { @@ -24,11 +24,21 @@ struct Glyph { u16 cellY; // at 0x12 }; -enum FontEncoding { FONT_ENCODE_UTF8, FONT_ENCODE_UTF16, FONT_ENCODE_SJIS, FONT_ENCODE_CP1252 }; +enum FontEncoding { + FONT_ENCODE_UTF8, + FONT_ENCODE_UTF16, + FONT_ENCODE_SJIS, + FONT_ENCODE_CP1252 +}; class Font { public: - enum Type { TYPE_NULL, TYPE_ROM, TYPE_RESOURCE, TYPE_PAIR }; + enum Type { + TYPE_NULL, + TYPE_ROM, + TYPE_RESOURCE, + TYPE_PAIR + }; public: Font() : mReadFunc(&CharStrmReader::ReadNextCharCP1252) {} diff --git a/include/nw4r/ut/ut_IOStream.h b/include/nw4r/ut/ut_IOStream.h index 303b8687..00a3a1a9 100644 --- a/include/nw4r/ut/ut_IOStream.h +++ b/include/nw4r/ut/ut_IOStream.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_IO_STREAM_H #define NW4R_UT_IO_STREAM_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_RuntimeTypeInfo.h" namespace nw4r { namespace ut { @@ -18,14 +18,14 @@ class IOStream { virtual void Close() = 0; // at 0x10 virtual s32 Read(void *dst, u32 size) = 0; // at 0x14 virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback, - void *arg); // at 0x18 + void *arg); // at 0x18 virtual s32 Write(const void *src, u32 size); // at 0x1C virtual bool WriteAsync(const void *src, u32 size, AsyncCallback callback, - void *arg); // at 0x20 - virtual bool IsBusy() const; // at 0x24 - virtual bool CanAsync() const = 0; // at 0x28 - virtual bool CanRead() const = 0; // at 0x2C - virtual bool CanWrite() const = 0; // at 0x30 + void *arg); // at 0x20 + virtual bool IsBusy() const; // at 0x24 + virtual bool CanAsync() const = 0; // at 0x28 + virtual bool CanRead() const = 0; // at 0x2C + virtual bool CanWrite() const = 0; // at 0x30 virtual u32 GetOffsetAlign() const { return 1; } // at 0x34 diff --git a/include/nw4r/ut/ut_LinkList.h b/include/nw4r/ut/ut_LinkList.h index 580c6187..92a8f1a0 100644 --- a/include/nw4r/ut/ut_LinkList.h +++ b/include/nw4r/ut/ut_LinkList.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_LINK_LIST_H #define NW4R_UT_LINK_LIST_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_NonCopyable.h" /** * Declare typedef for linked-list specialization. @@ -13,7 +13,7 @@ * * Use the specified link node (name suffix) for classes with multiple nodes. */ -#define NW4R_UT_LIST_TYPEDEF_DECL_EX(T, SUFFIX) \ +#define NW4R_UT_LIST_TYPEDEF_DECL_EX(T, SUFFIX) \ typedef nw4r::ut::LinkList T##SUFFIX##List; /** diff --git a/include/nw4r/ut/ut_LockedCache.h b/include/nw4r/ut/ut_LockedCache.h index 290b1036..a5f18700 100644 --- a/include/nw4r/ut/ut_LockedCache.h +++ b/include/nw4r/ut/ut_LockedCache.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_LOCKED_CACHE_H #define NW4R_UT_LOCKED_CACHE_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_NandFileStream.h b/include/nw4r/ut/ut_NandFileStream.h index 8ec84b94..6387f105 100644 --- a/include/nw4r/ut/ut_NandFileStream.h +++ b/include/nw4r/ut/ut_NandFileStream.h @@ -1,8 +1,8 @@ #ifndef NW4R_UT_NAND_FILE_STREAM_H #define NW4R_UT_NAND_FILE_STREAM_H -#include -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_FileStream.h" +#include "rvl/NAND.h" // IWYU pragma: export namespace nw4r { namespace ut { @@ -70,16 +70,16 @@ class NandFileStream : public FileStream { virtual s32 Read(void *dst, u32 size); // at 0x14 virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback, - void *arg); // at 0x18 + void *arg); // at 0x18 virtual s32 Write(const void *src, u32 size); // at 0x1C virtual bool WriteAsync(const void *src, u32 size, AsyncCallback callback, - void *arg); // at 0x20 + void *arg); // at 0x20 virtual void Seek(s32 offset, u32 origin); // at 0x44 bool Open(const char *path, u32 access); - bool Open(const NANDFileInfo *info, u32 access, bool close) DECOMP_DONT_INLINE; + bool Open(const NANDFileInfo *info, u32 access, bool close) DONT_INLINE; private: static void NandAsyncCallback_(s32 result, NANDCommandBlock *block); diff --git a/include/nw4r/ut/ut_NonCopyable.h b/include/nw4r/ut/ut_NonCopyable.h index 7e37309b..64c1d141 100644 --- a/include/nw4r/ut/ut_NonCopyable.h +++ b/include/nw4r/ut/ut_NonCopyable.h @@ -1,6 +1,6 @@ #ifndef NW4R_UT_NON_COPYABLE_H #define NW4R_UT_NON_COPYABLE_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace ut { @@ -9,7 +9,7 @@ namespace { class NonCopyable { protected: NonCopyable() {} - NonCopyable(const NonCopyable&) {} + NonCopyable(const NonCopyable &) {} ~NonCopyable() {} }; @@ -17,4 +17,4 @@ class NonCopyable { } // namespace ut } // namespace nw4r -#endif \ No newline at end of file +#endif diff --git a/include/nw4r/ut/ut_Rect.h b/include/nw4r/ut/ut_Rect.h index 4b9bd9b3..d43ff937 100644 --- a/include/nw4r/ut/ut_Rect.h +++ b/include/nw4r/ut/ut_Rect.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_RECT_H #define NW4R_UT_RECT_H -#include -#include +#include "nw4r/math.h" +#include "nw4r/types_nw4r.h" namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_ResFont.h b/include/nw4r/ut/ut_ResFont.h index c1dc3109..3d2b472b 100644 --- a/include/nw4r/ut/ut_ResFont.h +++ b/include/nw4r/ut/ut_ResFont.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_RES_FONT_H #define NW4R_UT_RES_FONT_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_ResFontBase.h" namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_ResFontBase.h b/include/nw4r/ut/ut_ResFontBase.h index 6d7bad76..6958802e 100644 --- a/include/nw4r/ut/ut_ResFontBase.h +++ b/include/nw4r/ut/ut_ResFontBase.h @@ -1,12 +1,16 @@ #ifndef NW4R_UT_RES_FONT_BASE_H #define NW4R_UT_RES_FONT_BASE_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_Font.h" namespace nw4r { namespace ut { -enum FontMapMethod { FONT_MAPMETHOD_LINEAR, FONT_MAPMETHOD_ARRAY, FONT_MAPMETHOD_SCAN }; +enum FontMapMethod { + FONT_MAPMETHOD_LINEAR, + FONT_MAPMETHOD_ARRAY, + FONT_MAPMETHOD_SCAN +}; struct FontTextureGlyph { u8 cellWidth; // at 0x0 diff --git a/include/nw4r/ut/ut_RomFont.h b/include/nw4r/ut/ut_RomFont.h index e444d362..b312969f 100644 --- a/include/nw4r/ut/ut_RomFont.h +++ b/include/nw4r/ut/ut_RomFont.h @@ -1,8 +1,8 @@ #ifndef NW4R_UT_ROM_FONT_H #define NW4R_UT_ROM_FONT_H -#include -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_Font.h" +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_RuntimeTypeInfo.h b/include/nw4r/ut/ut_RuntimeTypeInfo.h index 83ac5d85..12bf7cc4 100644 --- a/include/nw4r/ut/ut_RuntimeTypeInfo.h +++ b/include/nw4r/ut/ut_RuntimeTypeInfo.h @@ -1,12 +1,12 @@ #ifndef NW4R_UT_RUNTIME_TYPE_INFO_H #define NW4R_UT_RUNTIME_TYPE_INFO_H -#include +#include "nw4r/types_nw4r.h" // Declare type RTTI and accessor function -#define NW4R_UT_RTTI_DECL(T) \ - static nw4r::ut::detail::RuntimeTypeInfo typeInfo; \ - virtual const nw4r::ut::detail::RuntimeTypeInfo *GetRuntimeTypeInfo() const { \ - return &typeInfo; \ +#define NW4R_UT_RTTI_DECL(T) \ + static nw4r::ut::detail::RuntimeTypeInfo typeInfo; \ + virtual const nw4r::ut::detail::RuntimeTypeInfo *GetRuntimeTypeInfo() const { \ + return &typeInfo; \ } // Define type RTTI (base type) diff --git a/include/nw4r/ut/ut_TagProcessorBase.h b/include/nw4r/ut/ut_TagProcessorBase.h index 3c8f19ea..cbcf180a 100644 --- a/include/nw4r/ut/ut_TagProcessorBase.h +++ b/include/nw4r/ut/ut_TagProcessorBase.h @@ -1,7 +1,7 @@ #ifndef NW4R_UT_TAG_PROCESSOR_BASE_H #define NW4R_UT_TAG_PROCESSOR_BASE_H -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_Rect.h" namespace nw4r { namespace ut { @@ -35,7 +35,7 @@ class TagProcessorBase { virtual Operation Process(u16 ch, PrintContext *ctx); // at 0xC virtual Operation CalcRect(Rect *rect, u16 ch, - PrintContext *ctx); // at 0x10 + PrintContext *ctx); // at 0x10 void ProcessLinefeed(PrintContext *ctx); void ProcessTab(PrintContext *ctx); diff --git a/include/nw4r/ut/ut_TextWriterBase.h b/include/nw4r/ut/ut_TextWriterBase.h index 3df2a37f..277e3033 100644 --- a/include/nw4r/ut/ut_TextWriterBase.h +++ b/include/nw4r/ut/ut_TextWriterBase.h @@ -1,11 +1,11 @@ #ifndef NW4R_UT_TEXT_WRITER_BASE_H #define NW4R_UT_TEXT_WRITER_BASE_H -#include -#include -#include -#include -#include -#include +#include "nw4r/math.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_CharWriter.h" +#include "nw4r/ut/ut_TagProcessorBase.h" +#include "stdio.h" +#include "wchar.h" namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_algorithm.h b/include/nw4r/ut/ut_algorithm.h index b84f4247..6980453a 100644 --- a/include/nw4r/ut/ut_algorithm.h +++ b/include/nw4r/ut/ut_algorithm.h @@ -1,6 +1,6 @@ #ifndef NW4R_UT_ALGORITHM_H #define NW4R_UT_ALGORITHM_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace ut { @@ -9,24 +9,29 @@ namespace { /** * Value operations */ -template inline T Max(T t1, T t2) { +template +inline T Max(T t1, T t2) { return (t1 < t2) ? t2 : t1; } -template inline T Min(T t1, T t2) { +template +inline T Min(T t1, T t2) { return (t1 > t2) ? t2 : t1; } -template inline T Clamp(T value, T min, T max) { +template +inline T Clamp(T value, T min, T max) { return value > max ? max : (value < min ? min : value); } -template inline T Abs(T x) { +template +inline T Abs(T x) { // Static cast needed to break abs optimization during instruction selection return x < 0 ? static_cast(-x) : static_cast(x); } -template <> f32 inline Abs(register f32 x) { +template <> +f32 inline Abs(register f32 x) { register f32 ax; // clang-format off @@ -41,59 +46,66 @@ template <> f32 inline Abs(register f32 x) { /** * Bit operations */ -template inline T BitExtract(T bits, int pos, int len) { +template +inline T BitExtract(T bits, int pos, int len) { T mask = (1 << len) - 1; return (bits >> pos) & mask; } -template inline bool TestBit(T t, int pos) { +template +inline bool TestBit(T t, int pos) { return BitExtract(t, sizeof(T), pos); } /** * Pointer operations */ -inline u32 GetIntPtr(const void* pPtr) { +inline u32 GetIntPtr(const void *pPtr) { return reinterpret_cast(pPtr); } template -inline const void* AddOffsetToPtr(const void* pBase, T offset) { - return reinterpret_cast(GetIntPtr(pBase) + offset); +inline const void *AddOffsetToPtr(const void *pBase, T offset) { + return reinterpret_cast(GetIntPtr(pBase) + offset); } -template inline void* AddOffsetToPtr(void* pBase, T offset) { - return reinterpret_cast(GetIntPtr(pBase) + offset); +template +inline void *AddOffsetToPtr(void *pBase, T offset) { + return reinterpret_cast(GetIntPtr(pBase) + offset); } -inline s32 GetOffsetFromPtr(const void* pStart, const void* pEnd) { +inline s32 GetOffsetFromPtr(const void *pStart, const void *pEnd) { return static_cast(GetIntPtr(pEnd) - GetIntPtr(pStart)); } -inline int ComparePtr(const void* pPtr1, const void* pPtr2) { +inline int ComparePtr(const void *pPtr1, const void *pPtr2) { return static_cast(GetIntPtr(pPtr1) - GetIntPtr(pPtr2)); } /** * Rounding */ -template inline T RoundUp(T t, unsigned int alignment) { +template +inline T RoundUp(T t, unsigned int alignment) { return (alignment + t - 1) & ~(alignment - 1); } -template inline void* RoundUp(T* pPtr, unsigned int alignment) { +template +inline void *RoundUp(T *pPtr, unsigned int alignment) { u32 value = reinterpret_cast(pPtr); u32 rounded = (alignment + value - 1) & ~(alignment - 1); - return reinterpret_cast(rounded); + return reinterpret_cast(rounded); } -template inline T RoundDown(T t, unsigned int alignment) { +template +inline T RoundDown(T t, unsigned int alignment) { return t & ~(alignment - 1); } -template inline void* RoundDown(T* pPtr, unsigned int alignment) { +template +inline void *RoundDown(T *pPtr, unsigned int alignment) { u32 value = reinterpret_cast(pPtr); u32 rounded = value & ~(alignment - 1); - return reinterpret_cast(rounded); + return reinterpret_cast(rounded); } } // namespace diff --git a/include/nw4r/ut/ut_binaryFileFormat.h b/include/nw4r/ut/ut_binaryFileFormat.h index e0196533..e01fb155 100644 --- a/include/nw4r/ut/ut_binaryFileFormat.h +++ b/include/nw4r/ut/ut_binaryFileFormat.h @@ -1,6 +1,6 @@ #ifndef NW4R_UT_BINARY_FILE_FORMAT_H #define NW4R_UT_BINARY_FILE_FORMAT_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace ut { diff --git a/include/nw4r/ut/ut_list.h b/include/nw4r/ut/ut_list.h index f6b13a0a..6e8d63aa 100644 --- a/include/nw4r/ut/ut_list.h +++ b/include/nw4r/ut/ut_list.h @@ -1,54 +1,58 @@ #ifndef NW4R_UT_LIST_H #define NW4R_UT_LIST_H -#include +#include "nw4r/types_nw4r.h" namespace nw4r { namespace ut { struct List { - void* first; // at 0x0 - void* last; // at 0x4 + void *first; // at 0x0 + void *last; // at 0x4 u16 size; // at 0x8 u16 offset; // at 0xA }; struct Node { - void* prev; // at 0x0 - void* next; // at 0x4 + void *prev; // at 0x0 + void *next; // at 0x4 }; -void List_Init(List* list, u16 offset); -void List_Append(List* list, void* object); -void List_Prepend(List* list, void* object); -void List_Insert(List* list, void* next, void* object); -void List_Remove(List* list, void* object); -void* List_GetNext(const List* list, const void* object); -void* List_GetPrev(const List* list, const void* object); -void* List_GetNth(const List* list, u16 n); +void List_Init(List *list, u16 offset); +void List_Append(List *list, void *object); +void List_Prepend(List *list, void *object); +void List_Insert(List *list, void *next, void *object); +void List_Remove(List *list, void *object); +void *List_GetNext(const List *list, const void *object); +void *List_GetPrev(const List *list, const void *object); +void *List_GetNth(const List *list, u16 n); -inline void* List_GetFirst(const List* list) { +inline void *List_GetFirst(const List *list) { return List_GetNext(list, NULL); } -inline const void* List_GetFirstConst(const List* list) { +inline const void *List_GetFirstConst(const List *list) { return List_GetFirst(list); } -inline void* List_GetLast(const List* list) { return List_GetPrev(list, NULL); } +inline void *List_GetLast(const List *list) { + return List_GetPrev(list, NULL); +} -inline const void* List_GetLastConst(const List* list) { +inline const void *List_GetLastConst(const List *list) { return List_GetLast(list); } -inline const void* List_GetNextConst(const List* list, const void* object) { +inline const void *List_GetNextConst(const List *list, const void *object) { return List_GetNext(list, object); } -inline const void* List_GetNthConst(const List* list, u16 n) { +inline const void *List_GetNthConst(const List *list, u16 n) { return List_GetNth(list, n); } -inline u16 List_GetSize(const List* list) { return list->size; } +inline u16 List_GetSize(const List *list) { + return list->size; +} } // namespace ut } // namespace nw4r diff --git a/include/nw4r/ut/ut_lock.h b/include/nw4r/ut/ut_lock.h index 905514f4..03db02f8 100644 --- a/include/nw4r/ut/ut_lock.h +++ b/include/nw4r/ut/ut_lock.h @@ -1,8 +1,8 @@ #ifndef NW4R_UT_LOCK_H #define NW4R_UT_LOCK_H -#include -#include -#include +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_NonCopyable.h" +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace ut { diff --git a/include/rvl/AI/ai.h b/include/rvl/AI/ai.h index 4ddf3854..3fe542be 100644 --- a/include/rvl/AI/ai.h +++ b/include/rvl/AI/ai.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AI_H #define RVL_SDK_AI_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AI/ai_hardware.h b/include/rvl/AI/ai_hardware.h index c9630d43..e7bce5f2 100644 --- a/include/rvl/AI/ai_hardware.h +++ b/include/rvl/AI/ai_hardware.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AI_HARDWARE_H #define RVL_SDK_AI_HARDWARE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/ARC/arc.h b/include/rvl/ARC/arc.h index 11c2eb16..9a735361 100644 --- a/include/rvl/ARC/arc.h +++ b/include/rvl/ARC/arc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_ARC_H #define RVL_SDK_ARC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -10,7 +10,10 @@ extern "C" { * https://github.com/riidefi/WiiCore/tree/master/source/rx */ -typedef enum { ARC_ENTRY_FILE, ARC_ENTRY_FOLDER } ARCEntryType; +typedef enum { + ARC_ENTRY_FILE, + ARC_ENTRY_FOLDER +} ARCEntryType; typedef struct ARCNode { union { diff --git a/include/rvl/AX.h b/include/rvl/AX.h index ba62c550..8992a168 100644 --- a/include/rvl/AX.h +++ b/include/rvl/AX.h @@ -8,17 +8,17 @@ extern "C" { #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "rvl/AX/AX.h" +#include "rvl/AX/AXAlloc.h" +#include "rvl/AX/AXAux.h" +#include "rvl/AX/AXCL.h" +#include "rvl/AX/AXComp.h" +#include "rvl/AX/AXOut.h" +#include "rvl/AX/AXPB.h" +#include "rvl/AX/AXProf.h" +#include "rvl/AX/AXSPB.h" +#include "rvl/AX/AXVPB.h" +#include "rvl/AX/DSPCode.h" #ifdef __cplusplus } diff --git a/include/rvl/AX/AX.h b/include/rvl/AX/AX.h index 0f4458e6..79cf14ee 100644 --- a/include/rvl/AX/AX.h +++ b/include/rvl/AX/AX.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_H #define RVL_SDK_AX_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AX/AXAlloc.h b/include/rvl/AX/AXAlloc.h index 7622de28..2a48698b 100644 --- a/include/rvl/AX/AXAlloc.h +++ b/include/rvl/AX/AXAlloc.h @@ -1,7 +1,7 @@ #ifndef RVL_SDK_AX_ALLOC_H #define RVL_SDK_AX_ALLOC_H -#include -#include +#include "common.h" +#include "rvl/AX/AXVPB.h" #ifdef __cplusplus extern "C" { diff --git a/include/rvl/AX/AXAux.h b/include/rvl/AX/AXAux.h index 8c718ab4..2830f23a 100644 --- a/include/rvl/AX/AXAux.h +++ b/include/rvl/AX/AXAux.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_AUX_H #define RVL_SDK_AX_AUX_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AX/AXCL.h b/include/rvl/AX/AXCL.h index d69e0f2c..4a68a090 100644 --- a/include/rvl/AX/AXCL.h +++ b/include/rvl/AX/AXCL.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_CL_H #define RVL_SDK_AX_CL_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -11,7 +11,11 @@ extern "C" { // Each command takes up two bytes #define AX_CL_SIZE (AX_CL_MAX_CMD * sizeof(u16)) -typedef enum { AX_OUTPUT_STEREO, AX_OUTPUT_SURROUND, AX_OUTPUT_DPL2 } AXOutputMode; +typedef enum { + AX_OUTPUT_STEREO, + AX_OUTPUT_SURROUND, + AX_OUTPUT_DPL2 +} AXOutputMode; extern u32 __AXClMode; diff --git a/include/rvl/AX/AXComp.h b/include/rvl/AX/AXComp.h index 3fffde81..b389fde8 100644 --- a/include/rvl/AX/AXComp.h +++ b/include/rvl/AX/AXComp.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_COMP_H #define RVL_SDK_AX_COMP_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AX/AXOut.h b/include/rvl/AX/AXOut.h index 7dbb6e81..47c84070 100644 --- a/include/rvl/AX/AXOut.h +++ b/include/rvl/AX/AXOut.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_OUT_H #define RVL_SDK_AX_OUT_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AX/AXPB.h b/include/rvl/AX/AXPB.h index e3c133f0..b6de4b99 100644 --- a/include/rvl/AX/AXPB.h +++ b/include/rvl/AX/AXPB.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_PB_H #define RVL_SDK_AX_PB_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -22,9 +22,15 @@ extern "C" { // Amount of nibbles in a frame #define AX_ADPCM_NIBBLES_PER_FRAME (AX_ADPCM_FRAME_SIZE * 2) -typedef enum { AX_VOICE_NORMAL, AX_VOICE_STREAM } AXVOICETYPE; +typedef enum { + AX_VOICE_NORMAL, + AX_VOICE_STREAM +} AXVOICETYPE; -typedef enum { AX_VOICE_STOP, AX_VOICE_RUN } AXVOICESTATE; +typedef enum { + AX_VOICE_STOP, + AX_VOICE_RUN +} AXVOICESTATE; typedef enum { AX_SAMPLE_FORMAT_DSP_ADPCM = 0, diff --git a/include/rvl/AX/AXProf.h b/include/rvl/AX/AXProf.h index c0dc8f9f..14c1614d 100644 --- a/include/rvl/AX/AXProf.h +++ b/include/rvl/AX/AXProf.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_PROF_H #define RVL_SDK_AX_PROF_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AX/AXSPB.h b/include/rvl/AX/AXSPB.h index 4e562cc3..e149dfba 100644 --- a/include/rvl/AX/AXSPB.h +++ b/include/rvl/AX/AXSPB.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_SPB_H #define RVL_SDK_AX_SPB_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -70,8 +70,8 @@ typedef struct _AXSTUDIO { #pragma pack(pop) AXSTUDIO *__AXGetStudio(void); -void __AXDepopFadeMain(s32 *all, s32 *value, s16 *depop) DECOMP_DONT_INLINE; -void __AXDepopFadeRmt(s32 *all, s32 *value, s16 *depop) DECOMP_DONT_INLINE; +void __AXDepopFadeMain(s32 *all, s32 *value, s16 *depop) DONT_INLINE; +void __AXDepopFadeRmt(s32 *all, s32 *value, s16 *depop) DONT_INLINE; void __AXPrintStudio(void); void __AXSPBInit(void); void __AXDepopVoice(AXPB *pb); diff --git a/include/rvl/AX/AXVPB.h b/include/rvl/AX/AXVPB.h index 4e39e7de..f9593261 100644 --- a/include/rvl/AX/AXVPB.h +++ b/include/rvl/AX/AXVPB.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_AX_VPB_H #define RVL_SDK_AX_VPB_H -#include -#include +#include "common.h" +#include "rvl/AX/AXPB.h" + #ifdef __cplusplus extern "C" { @@ -10,7 +11,7 @@ extern "C" { #define AX_SAMPLE_RATE 32000 #define AX_VOICE_MAX 96 -typedef enum { +enum { AX_PBSYNC_SELECT = (1 << 0), AX_PBSYNC_MIXER_CTRL = (1 << 1), AX_PBSYNC_STATE = (1 << 2), diff --git a/include/rvl/AX/DSPCode.h b/include/rvl/AX/DSPCode.h index b7b5a1ac..0e4ed841 100644 --- a/include/rvl/AX/DSPCode.h +++ b/include/rvl/AX/DSPCode.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AX_DSP_CODE_H #define RVL_SDK_AX_DSP_CODE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX.h b/include/rvl/AXFX.h index 8c6b192a..fbfaaa60 100644 --- a/include/rvl/AXFX.h +++ b/include/rvl/AXFX.h @@ -4,17 +4,17 @@ extern "C" { #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "rvl/AXFX/AXFXChorus.h" +#include "rvl/AXFX/AXFXChorusExp.h" +#include "rvl/AXFX/AXFXCommon.h" +#include "rvl/AXFX/AXFXDelay.h" +#include "rvl/AXFX/AXFXHooks.h" +#include "rvl/AXFX/AXFXLfoTable.h" +#include "rvl/AXFX/AXFXReverbHi.h" +#include "rvl/AXFX/AXFXReverbHiDpl2.h" +#include "rvl/AXFX/AXFXReverbHiExp.h" +#include "rvl/AXFX/AXFXReverbHiExpDpl2.h" +#include "rvl/AXFX/AXFXSrcCoef.h" #ifdef __cplusplus } diff --git a/include/rvl/AXFX/AXFXChorus.h b/include/rvl/AXFX/AXFXChorus.h index fc515746..a6c518f2 100644 --- a/include/rvl/AXFX/AXFXChorus.h +++ b/include/rvl/AXFX/AXFXChorus.h @@ -1,7 +1,7 @@ #ifndef RVL_SDK_AXFX_CHORUS_H #define RVL_SDK_AXFX_CHORUS_H -#include -#include +#include "common.h" +#include "rvl/AXFX/AXFXChorusExp.h" #ifdef __cplusplus extern "C" { diff --git a/include/rvl/AXFX/AXFXChorusExp.h b/include/rvl/AXFX/AXFXChorusExp.h index 3892eda6..7a432cf0 100644 --- a/include/rvl/AXFX/AXFXChorusExp.h +++ b/include/rvl/AXFX/AXFXChorusExp.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_CHORUS_EXP_H #define RVL_SDK_AXFX_CHORUS_EXP_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXCommon.h b/include/rvl/AXFX/AXFXCommon.h index ac72acb3..c01037a6 100644 --- a/include/rvl/AXFX/AXFXCommon.h +++ b/include/rvl/AXFX/AXFXCommon.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_COMMON_H #define RVL_SDK_AXFX_COMMON_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXDelay.h b/include/rvl/AXFX/AXFXDelay.h index 54d35e13..0443308e 100644 --- a/include/rvl/AXFX/AXFXDelay.h +++ b/include/rvl/AXFX/AXFXDelay.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_DELAY_H #define RVL_SDK_AXFX_DELAY_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXHooks.h b/include/rvl/AXFX/AXFXHooks.h index cb210591..b870c8a4 100644 --- a/include/rvl/AXFX/AXFXHooks.h +++ b/include/rvl/AXFX/AXFXHooks.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_HOOKS_H #define RVL_SDK_AXFX_HOOKS_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXLfoTable.h b/include/rvl/AXFX/AXFXLfoTable.h index f2bbd753..3b58b1fe 100644 --- a/include/rvl/AXFX/AXFXLfoTable.h +++ b/include/rvl/AXFX/AXFXLfoTable.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_LFO_TABLE_H #define RVL_SDK_AXFX_LFO_TABLE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXReverbHi.h b/include/rvl/AXFX/AXFXReverbHi.h index dcc8a379..0302babd 100644 --- a/include/rvl/AXFX/AXFXReverbHi.h +++ b/include/rvl/AXFX/AXFXReverbHi.h @@ -1,7 +1,7 @@ #ifndef RVL_SDK_AXFX_REVERB_HI_H #define RVL_SDK_AXFX_REVERB_HI_H -#include -#include +#include "common.h" +#include "rvl/AXFX/AXFXReverbHiExp.h" #ifdef __cplusplus extern "C" { diff --git a/include/rvl/AXFX/AXFXReverbHiDpl2.h b/include/rvl/AXFX/AXFXReverbHiDpl2.h index e7fdbfd4..d46acad6 100644 --- a/include/rvl/AXFX/AXFXReverbHiDpl2.h +++ b/include/rvl/AXFX/AXFXReverbHiDpl2.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_AXFX_REVERB_HI_DPL2_H #define RVL_SDK_AXFX_REVERB_HI_DPL2_H -#include -#include +#include "common.h" +#include "rvl/AXFX/AXFXReverbHiExpDpl2.h" + #ifdef __cplusplus extern "C" { diff --git a/include/rvl/AXFX/AXFXReverbHiExp.h b/include/rvl/AXFX/AXFXReverbHiExp.h index d0089190..c7a75cbb 100644 --- a/include/rvl/AXFX/AXFXReverbHiExp.h +++ b/include/rvl/AXFX/AXFXReverbHiExp.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_REVERB_HI_EXP_H #define RVL_SDK_AXFX_REVERB_HI_EXP_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXReverbHiExpDpl2.h b/include/rvl/AXFX/AXFXReverbHiExpDpl2.h index 0fb21ae3..10232e0c 100644 --- a/include/rvl/AXFX/AXFXReverbHiExpDpl2.h +++ b/include/rvl/AXFX/AXFXReverbHiExpDpl2.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_REVERB_HI_EXP_DPL2_H #define RVL_SDK_AXFX_REVERB_HI_EXP_DPL2_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/AXFX/AXFXSrcCoef.h b/include/rvl/AXFX/AXFXSrcCoef.h index aa0aaeef..a16eae65 100644 --- a/include/rvl/AXFX/AXFXSrcCoef.h +++ b/include/rvl/AXFX/AXFXSrcCoef.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_AXFX_SRC_COEF_H #define RVL_SDK_AXFX_SRC_COEF_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/BASE/PPCArch.h b/include/rvl/BASE/PPCArch.h index 27cd1c6d..aa4b25f4 100644 --- a/include/rvl/BASE/PPCArch.h +++ b/include/rvl/BASE/PPCArch.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_PPC_ARCH_H #define RVL_SDK_PPC_ARCH_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/CARD/CARD.h b/include/rvl/CARD/CARD.h index f07e8b9f..d443e724 100644 --- a/include/rvl/CARD/CARD.h +++ b/include/rvl/CARD/CARD.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_CARD_H #define RVL_SDK_CARD_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/CNT/cnt.h b/include/rvl/CNT/cnt.h index 23c6ca98..4c22e704 100644 --- a/include/rvl/CNT/cnt.h +++ b/include/rvl/CNT/cnt.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_CNT_H #define RVL_SDK_CNT_H -#include "rvl/ARC.h" -#include +#include "common.h" +#include "rvl/ARC.h" // IWYU pragma: export + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/CX/cx.h b/include/rvl/CX/cx.h index 1c4d0e3e..4b342c44 100644 --- a/include/rvl/CX/cx.h +++ b/include/rvl/CX/cx.h @@ -1,7 +1,7 @@ #ifndef RVL_CX_H #define RVL_CX_H -#include +#include "common.h" // .text: [0x803cee90, 0x803d0b20] diff --git a/include/rvl/DB/db.h b/include/rvl/DB/db.h index 13259afd..b85ed419 100644 --- a/include/rvl/DB/db.h +++ b/include/rvl/DB/db.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DB_H #define RVL_SDK_DB_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DSP/dsp.h b/include/rvl/DSP/dsp.h index c22f37c8..313ab167 100644 --- a/include/rvl/DSP/dsp.h +++ b/include/rvl/DSP/dsp.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DSP_H #define RVL_SDK_DSP_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DSP/dsp_debug.h b/include/rvl/DSP/dsp_debug.h index 1390d7c0..6f3efe89 100644 --- a/include/rvl/DSP/dsp_debug.h +++ b/include/rvl/DSP/dsp_debug.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DSP_DEBUG_H #define RVL_SDK_DSP_DEBUG_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DSP/dsp_hardware.h b/include/rvl/DSP/dsp_hardware.h index 34797cca..40352c45 100644 --- a/include/rvl/DSP/dsp_hardware.h +++ b/include/rvl/DSP/dsp_hardware.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DSP_HARDWARE_H #define RVL_SDK_DSP_HARDWARE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DSP/dsp_task.h b/include/rvl/DSP/dsp_task.h index 98444616..aa7e54a5 100644 --- a/include/rvl/DSP/dsp_task.h +++ b/include/rvl/DSP/dsp_task.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DSP_TASK_H #define RVL_SDK_DSP_TASK_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DVD.h b/include/rvl/DVD.h index 35fc9f78..08eaaced 100644 --- a/include/rvl/DVD.h +++ b/include/rvl/DVD.h @@ -12,7 +12,6 @@ extern "C" { #include "rvl/DVD/dvdidutils.h" #include "rvl/DVD/dvdqueue.h" - #ifdef __cplusplus } #endif diff --git a/include/rvl/DVD/dvd.h b/include/rvl/DVD/dvd.h index a7b93240..aa63696a 100644 --- a/include/rvl/DVD/dvd.h +++ b/include/rvl/DVD/dvd.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DVD_H #define RVL_SDK_DVD_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -92,8 +92,9 @@ typedef struct DVDFileInfo { extern volatile u32 __DVDLayoutFormat; void DVDInit(void); -BOOL DVDReadAbsAsyncPrio(DVDCommandBlock *block, void *dst, u32 size, u32 offset, DVDCommandCallback callback, - s32 prio); +BOOL DVDReadAbsAsyncPrio( + DVDCommandBlock *block, void *dst, u32 size, u32 offset, DVDCommandCallback callback, s32 prio +); BOOL DVDInquiryAsync(DVDCommandBlock *block, DVDDriveInfo *info, DVDCommandCallback callback); s32 DVDGetCommandBlockStatus(const DVDCommandBlock *block); s32 DVDGetDriveStatus(void); diff --git a/include/rvl/DVD/dvd_broadway.h b/include/rvl/DVD/dvd_broadway.h index 01016ade..505b595a 100644 --- a/include/rvl/DVD/dvd_broadway.h +++ b/include/rvl/DVD/dvd_broadway.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DVD_BROADWAY_H #define RVL_SDK_DVD_BROADWAY_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -35,8 +35,10 @@ typedef void (*DVDLowCallback)(u32 intType); BOOL DVDLowInit(void); BOOL DVDLowReadDiskID(struct DVDDiskID *out, DVDLowCallback callback); -BOOL DVDLowOpenPartition(u32 offset, const struct ESPTicket *ticket, u32 certsSize, const void *certs, - struct ESPTmd *tmd, DVDLowCallback callback); +BOOL DVDLowOpenPartition( + u32 offset, const struct ESPTicket *ticket, u32 certsSize, const void *certs, struct ESPTmd *tmd, + DVDLowCallback callback +); BOOL DVDLowClosePartition(DVDLowCallback callback); BOOL DVDLowUnencryptedRead(void *dst, u32 size, u32 offset, DVDLowCallback callback); BOOL DVDLowStopMotor(BOOL eject, BOOL kill, DVDLowCallback callback); diff --git a/include/rvl/DVD/dvderror.h b/include/rvl/DVD/dvderror.h index 1b5fc4e1..30e048e3 100644 --- a/include/rvl/DVD/dvderror.h +++ b/include/rvl/DVD/dvderror.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DVD_ERROR_H #define RVL_SDK_DVD_ERROR_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DVD/dvdfatal.h b/include/rvl/DVD/dvdfatal.h index c221c498..2bc14a5e 100644 --- a/include/rvl/DVD/dvdfatal.h +++ b/include/rvl/DVD/dvdfatal.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_DVD_FATAL_H #define RVL_SDK_DVD_FATAL_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/DVD/dvdfs.h b/include/rvl/DVD/dvdfs.h index 1a0434ff..8426071d 100644 --- a/include/rvl/DVD/dvdfs.h +++ b/include/rvl/DVD/dvdfs.h @@ -1,8 +1,9 @@ #ifndef RVL_SDK_DVD_FS_H #define RVL_SDK_DVD_FS_H -#include -#include -#include +#include "common.h" +#include "rvl/DVD/dvd.h" +#include "rvl/OS.h" // IWYU pragma: export + #ifdef __cplusplus extern "C" { diff --git a/include/rvl/DVD/dvdidutils.h b/include/rvl/DVD/dvdidutils.h index ce832689..d877fa38 100644 --- a/include/rvl/DVD/dvdidutils.h +++ b/include/rvl/DVD/dvdidutils.h @@ -1,7 +1,7 @@ #ifndef RVL_SDK_DVD_ID_UTILS_H #define RVL_SDK_DVD_ID_UTILS_H -#include -#include +#include "common.h" +#include "rvl/DVD/dvd.h" #ifdef __cplusplus extern "C" { diff --git a/include/rvl/DVD/dvdqueue.h b/include/rvl/DVD/dvdqueue.h index 977d79aa..da713cfd 100644 --- a/include/rvl/DVD/dvdqueue.h +++ b/include/rvl/DVD/dvdqueue.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_DVD_QUEUE_H #define RVL_SDK_DVD_QUEUE_H -#include -#include +#include "common.h" +#include "rvl/DVD/dvd.h" + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/ESP/esp.h b/include/rvl/ESP/esp.h index f28c7db7..d158e3c8 100644 --- a/include/rvl/ESP/esp.h +++ b/include/rvl/ESP/esp.h @@ -1,8 +1,10 @@ #ifndef RVL_SDK_ESP_H #define RVL_SDK_ESP_H -#include "rvl/ARC.h" -#include "rvl/IPC.h" -#include +#include "common.h" +#include "rvl/ARC.h" // IWYU pragma: export +#include "rvl/IPC.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/EXI/EXIBios.h b/include/rvl/EXI/EXIBios.h index 9438d77d..53d62211 100644 --- a/include/rvl/EXI/EXIBios.h +++ b/include/rvl/EXI/EXIBios.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_EXI_BIOS_H #define RVL_SDK_EXI_BIOS_H +#include "common.h" #include "rvl/EXI/EXICommon.h" -#include + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/EXI/EXICommon.h b/include/rvl/EXI/EXICommon.h index 698964f9..663b8fa2 100644 --- a/include/rvl/EXI/EXICommon.h +++ b/include/rvl/EXI/EXICommon.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_EXI_COMMON_H #define RVL_SDK_EXI_COMMON_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -18,9 +18,19 @@ typedef enum { EXI_STATE_BUSY = EXI_STATE_DMA_ACCESS | EXI_STATE_IMM_ACCESS } EXIState; -typedef enum { EXI_CHAN_0, EXI_CHAN_1, EXI_CHAN_2, EXI_MAX_CHAN } EXIChannel; +typedef enum { + EXI_CHAN_0, + EXI_CHAN_1, + EXI_CHAN_2, + EXI_MAX_CHAN +} EXIChannel; -typedef enum { EXI_READ, EXI_WRITE, EXI_TYPE_2, EXI_MAX_TYPE } EXIType; +typedef enum { + EXI_READ, + EXI_WRITE, + EXI_TYPE_2, + EXI_MAX_TYPE +} EXIType; typedef void (*EXICallback)(EXIChannel chan, struct OSContext *ctx); diff --git a/include/rvl/EXI/EXIHardware.h b/include/rvl/EXI/EXIHardware.h index 75f949d3..d8f14b62 100644 --- a/include/rvl/EXI/EXIHardware.h +++ b/include/rvl/EXI/EXIHardware.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_EXI_HARDWARE_H #define RVL_SDK_EXI_HARDWARE_H +#include "common.h" #include "rvl/EXI/EXICommon.h" -#include + + #ifdef __cplusplus extern "C" { #endif @@ -18,7 +20,7 @@ typedef struct ExiChannelControl { u32 imm; // at 0x10 } ExiChannelControl; -volatile ExiChannelControl EXI_CHAN_CTRL[EXI_MAX_CHAN] : 0xCD006800; +volatile ExiChannelControl EXI_CHAN_CTRL[EXI_MAX_CHAN] AT_ADDRESS(0xCD006800); // CSR - Control Status Register #define EXI_CSR_EXIINTMASK (1 << 0) diff --git a/include/rvl/EXI/EXIUart.h b/include/rvl/EXI/EXIUart.h index f1f8be6a..79da918c 100644 --- a/include/rvl/EXI/EXIUart.h +++ b/include/rvl/EXI/EXIUart.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_EXI_UART_H #define RVL_SDK_EXI_UART_H -#include "rvl/EXI/EXIBios.h" -#include +#include "common.h" +#include "rvl/EXI/EXIBios.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/FS/fs.h b/include/rvl/FS/fs.h index bc15158c..64b80279 100644 --- a/include/rvl/FS/fs.h +++ b/include/rvl/FS/fs.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_FS_H #define RVL_SDK_FS_H -#include "rvl/IPC.h" -#include +#include "common.h" +#include "rvl/IPC.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif @@ -18,26 +20,32 @@ typedef struct FSStats { typedef struct FSFileStats { u32 length; // at 0x0 u32 position; // at 0x4 -} FSFileStats ALIGN(32); +} FSFileStats ALIGN_DECL(32); s32 ISFS_OpenLib(void); s32 ISFS_CreateDir(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm); -s32 ISFS_CreateDirAsync(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm, - FSAsyncCallback callback, void *callbackArg); +s32 ISFS_CreateDirAsync( + const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm, FSAsyncCallback callback, void *callbackArg +); s32 ISFS_ReadDir(const char *path, char *filesOut, u32 *fileCountOut); s32 ISFS_ReadDirAsync(const char *path, char *filesOut, u32 *fileCountOut, FSAsyncCallback callback, void *callbackArg); -s32 ISFS_GetAttr(const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, u32 *groupPermOut, - u32 *otherPermOut); -s32 ISFS_GetAttrAsync(const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, - u32 *groupPermOut, u32 *otherPermOut, FSAsyncCallback callback, void *callbackArg); +s32 ISFS_GetAttr( + const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, u32 *groupPermOut, + u32 *otherPermOut +); +s32 ISFS_GetAttrAsync( + const char *path, u32 *ownerIdOut, u16 *groupIdOut, u32 *attrOut, u32 *ownerPermOut, u32 *groupPermOut, + u32 *otherPermOut, FSAsyncCallback callback, void *callbackArg +); s32 ISFS_Delete(const char *path); s32 ISFS_DeleteAsync(const char *path, FSAsyncCallback callback, void *callbackArg); s32 ISFS_Rename(const char *from, const char *to); s32 ISFS_RenameAsync(const char *from, const char *to, FSAsyncCallback callback, void *callbackArg); s32 ISFS_GetUsage(const char *path, s32 *blockCountOut, s32 *fileCountOut); s32 ISFS_CreateFile(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm); -s32 ISFS_CreateFileAsync(const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm, - FSAsyncCallback callback, void *callbackArg); +s32 ISFS_CreateFileAsync( + const char *path, u32 attr, u32 ownerPerm, u32 groupPerm, u32 otherPerm, FSAsyncCallback callback, void *callbackArg +); s32 ISFS_Open(const char *path, IPCOpenMode mode); s32 ISFS_OpenAsync(const char *path, IPCOpenMode mode, FSAsyncCallback callback, void *callbackArg); s32 ISFS_GetFileStats(s32 fd, FSFileStats *statsOut); diff --git a/include/rvl/GX/GXAttr.h b/include/rvl/GX/GXAttr.h index e7994b6c..2733c512 100644 --- a/include/rvl/GX/GXAttr.h +++ b/include/rvl/GX/GXAttr.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_ATTR_H #define RVL_SDK_GX_ATTR_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif @@ -36,8 +37,9 @@ void GXGetVtxAttrFmt(GXVtxFmt fmt, GXAttr attr, GXCompCnt *compCnt, GXCompType * void GXGetVtxAttrFmtv(GXVtxFmt fmt, GXVtxAttrFmtList *list); void GXSetArray(GXAttr attr, u32 base, u8 stride); void GXInvalidateVtxCache(void); -void GXSetTexCoordGen2(GXTexCoordID id, GXTexGenType type, GXTexGenSrc src, u32 texMtxIdx, GXBool normalize, - u32 dualTexMtxIdx); +void GXSetTexCoordGen2( + GXTexCoordID id, GXTexGenType type, GXTexGenSrc src, u32 texMtxIdx, GXBool normalize, u32 dualTexMtxIdx +); void GXSetNumTexGens(u8 num); void __GXSetVCD(void); diff --git a/include/rvl/GX/GXBump.h b/include/rvl/GX/GXBump.h index b5bc37b3..ff004b4c 100644 --- a/include/rvl/GX/GXBump.h +++ b/include/rvl/GX/GXBump.h @@ -1,14 +1,17 @@ #ifndef RVL_SDK_GX_BUMP_H #define RVL_SDK_GX_BUMP_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif -void GXSetTevIndirect(GXTevStageID tevStage, GXIndTexStageID texStage, GXIndTexFormat texFmt, GXIndTexBiasSel biasSel, - GXIndTexMtxID mtxId, GXIndTexWrap wrapS, GXIndTexWrap wrapT, GXBool addPrev, GXBool utcLod, - GXIndTexAlphaSel alphaSel); +void GXSetTevIndirect( + GXTevStageID tevStage, GXIndTexStageID texStage, GXIndTexFormat texFmt, GXIndTexBiasSel biasSel, + GXIndTexMtxID mtxId, GXIndTexWrap wrapS, GXIndTexWrap wrapT, GXBool addPrev, GXBool utcLod, + GXIndTexAlphaSel alphaSel +); void GXSetIndTexMtx(GXIndTexMtxID id, const f32 offset[2][3], s8 scaleExp); void GXSetIndTexCoordScale(GXIndTexStageID stage, GXIndTexScale scaleS, GXIndTexScale scaleT); void GXSetIndTexOrder(GXIndTexStageID stage, GXTexCoordID coord, GXTexMapID map); diff --git a/include/rvl/GX/GXDisplayList.h b/include/rvl/GX/GXDisplayList.h index 67988977..662838f8 100644 --- a/include/rvl/GX/GXDisplayList.h +++ b/include/rvl/GX/GXDisplayList.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_GX_DISPLAY_LIST_H #define RVL_SDK_GX_DISPLAY_LIST_H +#include "common.h" #include "rvl/GX/GXHardware.h" -#include + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXDraw.h b/include/rvl/GX/GXDraw.h index 0c4a62f9..4e0120bc 100644 --- a/include/rvl/GX/GXDraw.h +++ b/include/rvl/GX/GXDraw.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_GX_DRAW_H #define RVL_SDK_GX_DRAW_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXFifo.h b/include/rvl/GX/GXFifo.h index c545fd7a..6dd6af76 100644 --- a/include/rvl/GX/GXFifo.h +++ b/include/rvl/GX/GXFifo.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_FIFO_H #define RVL_SDK_GX_FIFO_H +#include "common.h" #include "rvl/GX/GXInternal.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXFrameBuf.h b/include/rvl/GX/GXFrameBuf.h index 4b5814ca..774e6fb8 100644 --- a/include/rvl/GX/GXFrameBuf.h +++ b/include/rvl/GX/GXFrameBuf.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_GX_FRAMEBUF_H #define RVL_SDK_GX_FRAMEBUF_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXGeometry.h b/include/rvl/GX/GXGeometry.h index 289e662e..39894b26 100644 --- a/include/rvl/GX/GXGeometry.h +++ b/include/rvl/GX/GXGeometry.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_GEOMETRY_H #define RVL_SDK_GX_GEOMETRY_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXHardware.h b/include/rvl/GX/GXHardware.h index be53d68b..b15d4b0e 100644 --- a/include/rvl/GX/GXHardware.h +++ b/include/rvl/GX/GXHardware.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_GX_HARDWARE_H #define RVL_SDK_GX_HARDWARE_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + + #ifdef __cplusplus extern "C" { #endif @@ -42,7 +44,7 @@ extern volatile union { unsigned int ui; void *p; float f; -} WGPIPE : 0xCC008000; +} WGPIPE AT_ADDRESS(0xCC008000); /** * FIFO commands @@ -67,14 +69,14 @@ typedef enum { #define __GX_FIFO_SET_LOAD_INDX_NELEM(reg, x) ((reg) = GX_BITSET(reg, 16, 4, x)) #define __GX_FIFO_SET_LOAD_INDX_INDEX(reg, x) ((reg) = GX_BITSET(reg, 0, 16, x)) -#define __GX_FIFO_LOAD_INDX(reg, dst, nelem, index) \ - { \ - u32 cmd = 0; \ - __GX_FIFO_SET_LOAD_INDX_DST(cmd, dst); \ - __GX_FIFO_SET_LOAD_INDX_NELEM(cmd, nelem); \ - __GX_FIFO_SET_LOAD_INDX_INDEX(cmd, index); \ - WGPIPE.c = reg; \ - WGPIPE.i = cmd; \ +#define __GX_FIFO_LOAD_INDX(reg, dst, nelem, index) \ + { \ + u32 cmd = 0; \ + __GX_FIFO_SET_LOAD_INDX_DST(cmd, dst); \ + __GX_FIFO_SET_LOAD_INDX_NELEM(cmd, nelem); \ + __GX_FIFO_SET_LOAD_INDX_INDEX(cmd, index); \ + WGPIPE.c = reg; \ + WGPIPE.i = cmd; \ } #define GX_FIFO_LOAD_INDX_A(dst, nelem, index) __GX_FIFO_LOAD_INDX(GX_FIFO_CMD_LOAD_INDX_A, dst, nelem, index) @@ -96,8 +98,8 @@ typedef enum { /** * Load immediate value into BP register */ -#define GX_BP_LOAD_REG(data) \ - WGPIPE.c = GX_FIFO_CMD_LOAD_BP_REG; \ +#define GX_BP_LOAD_REG(data) \ + WGPIPE.c = GX_FIFO_CMD_LOAD_BP_REG; \ WGPIPE.i = (data); /** @@ -116,9 +118,9 @@ typedef enum { /** * Load immediate value into CP register */ -#define GX_CP_LOAD_REG(addr, data) \ - WGPIPE.c = GX_FIFO_CMD_LOAD_CP_REG; \ - WGPIPE.c = (addr); \ +#define GX_CP_LOAD_REG(addr, data) \ + WGPIPE.c = GX_FIFO_CMD_LOAD_CP_REG; \ + WGPIPE.c = (addr); \ WGPIPE.i = (data); /************************************************************ @@ -142,26 +144,26 @@ typedef enum { /** * Header for an XF register load */ -#define GX_XF_LOAD_REG_HDR(addr) \ - WGPIPE.c = GX_FIFO_CMD_LOAD_XF_REG; \ +#define GX_XF_LOAD_REG_HDR(addr) \ + WGPIPE.c = GX_FIFO_CMD_LOAD_XF_REG; \ WGPIPE.i = (addr); /** * Load immediate value into XF register */ -#define GX_XF_LOAD_REG(addr, data) \ - GX_XF_LOAD_REG_HDR(addr); \ +#define GX_XF_LOAD_REG(addr, data) \ + GX_XF_LOAD_REG_HDR(addr); \ WGPIPE.i = (data); /** * Load immediate values into multiple XF registers */ -#define GX_XF_LOAD_REGS(size, addr) \ - { \ - u32 cmd = 0; \ - cmd |= (addr); \ - cmd |= (size) << 16; \ - GX_XF_LOAD_REG_HDR(cmd); \ +#define GX_XF_LOAD_REGS(size, addr) \ + { \ + u32 cmd = 0; \ + cmd |= (addr); \ + cmd |= (size) << 16; \ + GX_XF_LOAD_REG_HDR(cmd); \ } /** diff --git a/include/rvl/GX/GXHardwareBP.h b/include/rvl/GX/GXHardwareBP.h index c25d1c3c..c11c5375 100644 --- a/include/rvl/GX/GXHardwareBP.h +++ b/include/rvl/GX/GXHardwareBP.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_HARDWARE_BP_H #define RVL_SDK_GX_HARDWARE_BP_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXHardwareCP.h b/include/rvl/GX/GXHardwareCP.h index 6dcef101..362def52 100644 --- a/include/rvl/GX/GXHardwareCP.h +++ b/include/rvl/GX/GXHardwareCP.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_HARDWARE_CP_H #define RVL_SDK_GX_HARDWARE_CP_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXHardwareXF.h b/include/rvl/GX/GXHardwareXF.h index a923fadb..232d6096 100644 --- a/include/rvl/GX/GXHardwareXF.h +++ b/include/rvl/GX/GXHardwareXF.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_HARDWARE_XF_H #define RVL_SDK_GX_HARDWARE_XF_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXInit.h b/include/rvl/GX/GXInit.h index f883273d..3a32d32a 100644 --- a/include/rvl/GX/GXInit.h +++ b/include/rvl/GX/GXInit.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_INIT_H #define RVL_SDK_GX_INIT_H -#include -#include +#include "common.h" +#include "rvl/GX/GXFifo.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXInternal.h b/include/rvl/GX/GXInternal.h index 8d115a80..7d361174 100644 --- a/include/rvl/GX/GXInternal.h +++ b/include/rvl/GX/GXInternal.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_INTERNAL_H #define RVL_SDK_GX_INTERNAL_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif @@ -21,9 +22,9 @@ extern "C" { * (Implementation size is included to require that such a structure already * exists.) */ -#define GX_DECL_PUBLIC_STRUCT(name, size) \ - typedef struct _##name { \ - u8 dummy[(size) - sizeof(name##Impl) + sizeof(name##Impl)]; \ +#define GX_DECL_PUBLIC_STRUCT(name, size) \ + typedef struct _##name { \ + u8 dummy[(size) - sizeof(name##Impl) + sizeof(name##Impl)]; \ } name; typedef struct _GXFifoObjImpl { diff --git a/include/rvl/GX/GXLight.h b/include/rvl/GX/GXLight.h index 2deb53e7..be0b8efb 100644 --- a/include/rvl/GX/GXLight.h +++ b/include/rvl/GX/GXLight.h @@ -1,8 +1,9 @@ #ifndef RVL_SDK_GX_LIGHT_H #define RVL_SDK_GX_LIGHT_H +#include "common.h" #include "rvl/GX/GXInternal.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif @@ -25,8 +26,10 @@ void GXLoadLightObjIndx(u16 index, GXLightID id); void GXSetChanAmbColor(GXChannelID chan, GXColor color); void GXSetChanMatColor(GXChannelID chan, GXColor color); void GXSetNumChans(u8 num); -void GXSetChanCtrl(GXChannelID chan, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc, GXLightID lightMask, - GXDiffuseFn diffFn, GXAttnFn attnFn); +void GXSetChanCtrl( + GXChannelID chan, GXBool enable, GXColorSrc ambSrc, GXColorSrc matSrc, GXLightID lightMask, GXDiffuseFn diffFn, + GXAttnFn attnFn +); #ifdef __cplusplus } diff --git a/include/rvl/GX/GXMisc.h b/include/rvl/GX/GXMisc.h index 5ab126e9..d04b4d19 100644 --- a/include/rvl/GX/GXMisc.h +++ b/include/rvl/GX/GXMisc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_GX_MISC_H #define RVL_SDK_GX_MISC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXPixel.h b/include/rvl/GX/GXPixel.h index cc110d67..905da97f 100644 --- a/include/rvl/GX/GXPixel.h +++ b/include/rvl/GX/GXPixel.h @@ -1,8 +1,10 @@ #ifndef RVL_SDK_GX_PIXEL_H #define RVL_SDK_GX_PIXEL_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include "rvl/MTX.h" -#include +#include "rvl/MTX.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXTev.h b/include/rvl/GX/GXTev.h index cdd651f0..bae86ca2 100644 --- a/include/rvl/GX/GXTev.h +++ b/include/rvl/GX/GXTev.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_TEV_H #define RVL_SDK_GX_TEV_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXTexture.h b/include/rvl/GX/GXTexture.h index 6b758649..5fdd28f7 100644 --- a/include/rvl/GX/GXTexture.h +++ b/include/rvl/GX/GXTexture.h @@ -1,7 +1,10 @@ #ifndef RVL_SDK_GX_TEXTURE_H #define RVL_SDK_GX_TEXTURE_H +#include "common.h" +#include "rvl/GX/GXInternal.h" #include "rvl/GX/GXTypes.h" -#include + + #ifdef __cplusplus extern "C" { #endif @@ -11,10 +14,14 @@ GX_DECL_PUBLIC_STRUCT(GXTlutObj, 12); void __GXSetSUTexRegs(void); -void GXInitTexObj(GXTexObj *pTexObj, void *pImage, u16 width, u16 height, GXTexFmt format, GXTexWrapMode wrapS, - GXTexWrapMode wrapT, u8 mipmap); -void GXInitTexObjLOD(GXTexObj *pTexObj, GXTexFilter minFilter, GXTexFilter magFilter, f32 minLOD, f32 maxLOD, - f32 LODBias, u8 biasClampEnable, u8 edgeLODEnable, GXAnisotropy anisotropy); +void GXInitTexObj( + GXTexObj *pTexObj, void *pImage, u16 width, u16 height, GXTexFmt format, GXTexWrapMode wrapS, GXTexWrapMode wrapT, + u8 mipmap +); +void GXInitTexObjLOD( + GXTexObj *pTexObj, GXTexFilter minFilter, GXTexFilter magFilter, f32 minLOD, f32 maxLOD, f32 LODBias, + u8 biasClampEnable, u8 edgeLODEnable, GXAnisotropy anisotropy +); void GXInitTexObjTlut(GXTexObj *, u32); void GXInitTexObjCI(GXTexObj *, void *, u16, u16, GXTexFmt, GXTexWrapMode, GXTexWrapMode, u8, u32); @@ -22,10 +29,14 @@ void GXInitTlutObj(GXTlutObj *, void *, GXTlutFmt, u16); void GXLoadTlut(GXTlutObj *, u32); void GXLoadTexObj(GXTexObj *, GXTexMapID); -void GXGetTexObjAll(const GXTexObj *pTexObj, void **pImage, u16 *width, u16 *height, GXTexFmt *format, - GXTexWrapMode *wrapS, GXTexWrapMode *wrapT, u8 *mipmap); -void GXGetTexObjLODAll(const GXTexObj *pTexObj, GXTexFilter *minFilter, GXTexFilter *magFilter, f32 *minLOD, - f32 *maxLOD, f32 *LODBias, u8 *biasClampEnable, u8 *edgeLODEnable, GXAnisotropy *anisotropy); +void GXGetTexObjAll( + const GXTexObj *pTexObj, void **pImage, u16 *width, u16 *height, GXTexFmt *format, GXTexWrapMode *wrapS, + GXTexWrapMode *wrapT, u8 *mipmap +); +void GXGetTexObjLODAll( + const GXTexObj *pTexObj, GXTexFilter *minFilter, GXTexFilter *magFilter, f32 *minLOD, f32 *maxLOD, f32 *LODBias, + u8 *biasClampEnable, u8 *edgeLODEnable, GXAnisotropy *anisotropy +); u32 GXGetTexObjTlut(GXTexObj *); u32 GXGetTexBufferSize(u16 width, u16 height, u32 format, GXBool arg3, u8 arg4); void GXInvalidateTexAll(); diff --git a/include/rvl/GX/GXTransform.h b/include/rvl/GX/GXTransform.h index 6a9ed39a..7911636a 100644 --- a/include/rvl/GX/GXTransform.h +++ b/include/rvl/GX/GXTransform.h @@ -1,8 +1,9 @@ #ifndef RVL_SDK_GX_TRANSFORM_H #define RVL_SDK_GX_TRANSFORM_H +#include "common.h" #include "rvl/GX/GXTypes.h" #include "rvl/MTX.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/GX/GXTypes.h b/include/rvl/GX/GXTypes.h index 745cbda6..1fcdfb91 100644 --- a/include/rvl/GX/GXTypes.h +++ b/include/rvl/GX/GXTypes.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_GX_TYPES_H #define RVL_SDK_GX_TYPES_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -175,7 +175,10 @@ typedef enum _GXClipMode { GX_CLIP_DISABLE, } GXClipMode; -typedef enum _GXColorSrc { GX_SRC_REG, GX_SRC_VTX } GXColorSrc; +typedef enum _GXColorSrc { + GX_SRC_REG, + GX_SRC_VTX +} GXColorSrc; typedef enum _GXCompare { GX_NEVER, @@ -225,9 +228,18 @@ typedef enum _GXCopyClamp { GX_CLAMP_ALL, } GXCopyClamp; -typedef enum _GXCullMode { GX_CULL_NONE, GX_CULL_FRONT, GX_CULL_BACK, GX_CULL_ALL } GXCullMode; +typedef enum _GXCullMode { + GX_CULL_NONE, + GX_CULL_FRONT, + GX_CULL_BACK, + GX_CULL_ALL +} GXCullMode; -typedef enum _GXDiffuseFn { GX_DF_NONE, GX_DF_SIGN, GX_DF_CLAMP } GXDiffuseFn; +typedef enum _GXDiffuseFn { + GX_DF_NONE, + GX_DF_SIGN, + GX_DF_CLAMP +} GXDiffuseFn; typedef enum _GXDirtyFlag { GX_DIRTY_SU_TEX = (1 << 0), @@ -260,13 +272,18 @@ typedef enum _GXDirtyFlag { GX_AMB_MAT_MASK = GX_DIRTY_AMB_COLOR0 | GX_DIRTY_AMB_COLOR1 | GX_DIRTY_MAT_COLOR0 | GX_DIRTY_MAT_COLOR1, - GX_LIGHT_CHAN_MASK = GX_DIRTY_CHAN_COLOR0 | GX_DIRTY_CHAN_COLOR1 | GX_DIRTY_CHAN_ALPHA0 | GX_DIRTY_CHAN_ALPHA1 | - GX_DIRTY_NUM_COLORS, + GX_LIGHT_CHAN_MASK = + GX_DIRTY_CHAN_COLOR0 | GX_DIRTY_CHAN_COLOR1 | GX_DIRTY_CHAN_ALPHA0 | GX_DIRTY_CHAN_ALPHA1 | GX_DIRTY_NUM_COLORS, GX_TEX_GEN_MASK = 0x2FF0000, } GXDirtyFlag; -typedef enum _GXDistAttnFn { GX_DA_OFF, GX_DA_GENTLE, GX_DA_MEDIUM, GX_DA_STEEP } GXDistAttnFn; +typedef enum _GXDistAttnFn { + GX_DA_OFF, + GX_DA_GENTLE, + GX_DA_MEDIUM, + GX_DA_STEEP +} GXDistAttnFn; typedef enum _GXFogType { GX_FOG_NONE, @@ -448,9 +465,20 @@ typedef enum _GXPrimitive { GX_QUADS = 0x80, } GXPrimitive; -typedef enum _GXProjectionType { GX_PERSPECTIVE, GX_ORTHOGRAPHIC } GXProjectionType; - -typedef enum _GXSpotFn { GX_SP_OFF, GX_SP_FLAT, GX_SP_COS, GX_SP_COS2, GX_SP_SHARP, GX_SP_RING1, GX_SP_RING2 } GXSpotFn; +typedef enum _GXProjectionType { + GX_PERSPECTIVE, + GX_ORTHOGRAPHIC +} GXProjectionType; + +typedef enum _GXSpotFn { + GX_SP_OFF, + GX_SP_FLAT, + GX_SP_COS, + GX_SP_COS2, + GX_SP_SHARP, + GX_SP_RING1, + GX_SP_RING2 +} GXSpotFn; typedef enum _GXTevAlphaArg { GX_CA_APREV, @@ -496,7 +524,12 @@ typedef enum _GXTevColorArg { GX_CC_QUARTER = GX_CC_KONST } GXTevColorArg; -typedef enum _GXTevColorChan { GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA } GXTevColorChan; +typedef enum _GXTevColorChan { + GX_CH_RED, + GX_CH_GREEN, + GX_CH_BLUE, + GX_CH_ALPHA +} GXTevColorChan; typedef enum _GXTevOp { GX_TEV_ADD, @@ -642,7 +675,13 @@ typedef enum _GXTevKColorSel { GX_TEV_KCSEL_K3_A } GXTevKColorSel; -typedef enum _GXTevMode { GX_MODULATE, GX_DECAL, GX_REPLACE, GX_PASSCLR, GX_BLEND } GXTevMode; +typedef enum _GXTevMode { + GX_MODULATE, + GX_DECAL, + GX_REPLACE, + GX_PASSCLR, + GX_BLEND +} GXTevMode; typedef enum _GXTexCoordID { GX_TEXCOORD0, diff --git a/include/rvl/GX/GXVert.h b/include/rvl/GX/GXVert.h index 7cb87a19..02edfe0d 100644 --- a/include/rvl/GX/GXVert.h +++ b/include/rvl/GX/GXVert.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_GX_VERT_H #define RVL_SDK_GX_VERT_H +#include "common.h" #include "rvl/GX/GXHardware.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/IPC/ipcMain.h b/include/rvl/IPC/ipcMain.h index 4ab9787b..5b8c6daf 100644 --- a/include/rvl/IPC/ipcMain.h +++ b/include/rvl/IPC/ipcMain.h @@ -1,11 +1,12 @@ #ifndef RVL_SDK_IPC_MAIN_H #define RVL_SDK_IPC_MAIN_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif -u32 IPC_HW_REGS[] : 0xCD000000; +// Random number for arg typing +u32 IPC_HW_REGS[10] AT_ADDRESS(0xCD000000); static inline u32 ACRReadReg(u32 reg) { return *(u32 *)((char *)IPC_HW_REGS + (reg & ~0x3)); diff --git a/include/rvl/IPC/ipcProfile.h b/include/rvl/IPC/ipcProfile.h index 3dea2177..8358dbc3 100644 --- a/include/rvl/IPC/ipcProfile.h +++ b/include/rvl/IPC/ipcProfile.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_IPC_PROFILE_H #define RVL_SDK_IPC_PROFILE_H +#include "common.h" #include "rvl/IPC/ipcclt.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/IPC/ipcclt.h b/include/rvl/IPC/ipcclt.h index 064759c2..ad931aea 100644 --- a/include/rvl/IPC/ipcclt.h +++ b/include/rvl/IPC/ipcclt.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_IPC_CLT_H #define RVL_SDK_IPC_CLT_H -#include "rvl/OS.h" -#include +#include "common.h" +#include "rvl/OS.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif @@ -134,11 +136,13 @@ s32 IOS_WriteAsync(s32 fd, const void *buf, s32 len, IPCAsyncCallback callback, s32 IOS_Write(s32 fd, const void *buf, s32 len); s32 IOS_SeekAsync(s32 fd, s32 offset, IPCSeekMode mode, IPCAsyncCallback callback, void *callbackArg); s32 IOS_Seek(s32 fd, s32 offset, IPCSeekMode mode); -s32 IOS_IoctlAsync(s32 fd, s32 type, void *in, s32 inSize, void *out, s32 outSize, IPCAsyncCallback callback, - void *callbackArg); +s32 IOS_IoctlAsync( + s32 fd, s32 type, void *in, s32 inSize, void *out, s32 outSize, IPCAsyncCallback callback, void *callbackArg +); s32 IOS_Ioctl(s32 fd, s32 type, void *in, s32 inSize, void *out, s32 outSize); -s32 IOS_IoctlvAsync(s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors, IPCAsyncCallback callback, - void *callbackArg); +s32 IOS_IoctlvAsync( + s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors, IPCAsyncCallback callback, void *callbackArg +); s32 IOS_Ioctlv(s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors); s32 IOS_IoctlvReboot(s32 fd, s32 type, s32 inCount, s32 outCount, IPCIOVector *vectors); diff --git a/include/rvl/IPC/memory.h b/include/rvl/IPC/memory.h index b38f63bb..a755ce2f 100644 --- a/include/rvl/IPC/memory.h +++ b/include/rvl/IPC/memory.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_IPC_MEMORY_H #define RVL_SDK_IPC_MEMORY_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/KPAD.h b/include/rvl/KPAD.h index 8286be8c..8caa7990 100644 --- a/include/rvl/KPAD.h +++ b/include/rvl/KPAD.h @@ -4,7 +4,7 @@ extern "C" { #endif -#include +#include "rvl/KPAD/KPAD.h" #ifdef __cplusplus } diff --git a/include/rvl/KPAD/KPAD.h b/include/rvl/KPAD/KPAD.h index 87f47832..1efeeb3e 100644 --- a/include/rvl/KPAD/KPAD.h +++ b/include/rvl/KPAD/KPAD.h @@ -1,7 +1,7 @@ #ifndef REVOSDK_KPAD_H #define REVOSDK_KPAD_H #ifdef __cplusplus -#include +#include "common.h" extern "C" { #endif diff --git a/include/rvl/MEM.h b/include/rvl/MEM.h index 18321f49..7573d4cd 100644 --- a/include/rvl/MEM.h +++ b/include/rvl/MEM.h @@ -4,11 +4,11 @@ extern "C" { #endif -#include -#include -#include -#include -#include +#include "rvl/MEM/mem_allocator.h" +#include "rvl/MEM/mem_expHeap.h" +#include "rvl/MEM/mem_frameHeap.h" +#include "rvl/MEM/mem_heapCommon.h" +#include "rvl/MEM/mem_list.h" #ifdef __cplusplus } diff --git a/include/rvl/MEM/mem_allocator.h b/include/rvl/MEM/mem_allocator.h index c29054c4..2b58e3bd 100644 --- a/include/rvl/MEM/mem_allocator.h +++ b/include/rvl/MEM/mem_allocator.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_MEM_ALLOCATOR_H #define RVL_SDK_MEM_ALLOCATOR_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/MEM/mem_expHeap.h b/include/rvl/MEM/mem_expHeap.h index be08516c..b39f9c9f 100644 --- a/include/rvl/MEM/mem_expHeap.h +++ b/include/rvl/MEM/mem_expHeap.h @@ -1,14 +1,12 @@ #ifndef RVL_SDK_MEM_EXP_HEAP_H #define RVL_SDK_MEM_EXP_HEAP_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif -#define MEM_EXP_HEAP_MIN_SIZE \ - (sizeof(MEMiHeapHead) + sizeof(MEMiExpHeapHead) + \ - sizeof(MEMiExpHeapMBlock) + 4) - +#define MEM_EXP_HEAP_MIN_SIZE (sizeof(MEMiHeapHead) + sizeof(MEMiExpHeapHead) + sizeof(MEMiExpHeapMBlock) + 4) + // Forward declarations typedef struct MEMiHeapHead; diff --git a/include/rvl/MEM/mem_frameHeap.h b/include/rvl/MEM/mem_frameHeap.h index e9c59c59..faf9497f 100644 --- a/include/rvl/MEM/mem_frameHeap.h +++ b/include/rvl/MEM/mem_frameHeap.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_MEM_FRAME_HEAP_H #define RVL_SDK_MEM_FRAME_HEAP_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -14,11 +14,9 @@ typedef struct MEMiHeapHead; typedef enum { MEM_FRM_HEAP_FREE_TO_HEAD = (1 << 0), MEM_FRM_HEAP_FREE_TO_TAIL = (1 << 1), - MEM_FRM_HEAP_FREE_ALL = - MEM_FRM_HEAP_FREE_TO_HEAD | MEM_FRM_HEAP_FREE_TO_TAIL + MEM_FRM_HEAP_FREE_ALL = MEM_FRM_HEAP_FREE_TO_HEAD | MEM_FRM_HEAP_FREE_TO_TAIL } MEMiFrmFreeFlag; - typedef struct MEMiFrmHeapState { u32 id; // at 0x0 u8 *head; // at 0x4 diff --git a/include/rvl/MEM/mem_heapCommon.h b/include/rvl/MEM/mem_heapCommon.h index 55a06524..aa7f97ad 100644 --- a/include/rvl/MEM/mem_heapCommon.h +++ b/include/rvl/MEM/mem_heapCommon.h @@ -1,9 +1,10 @@ #ifndef RVL_SDK_MEM_HEAP_COMMON_H #define RVL_SDK_MEM_HEAP_COMMON_H +#include "common.h" #include "rvl/MEM/mem_list.h" -#include "rvl/OS.h" -#include -#include +#include "rvl/OS.h" // IWYU pragma: export +#include "string.h" + // #include "string.h" #ifdef __cplusplus @@ -75,19 +76,19 @@ static inline void LockHeap(MEMiHeapHead *heap) { } } -static void UnlockHeap(MEMiHeapHead* heap) { +static void UnlockHeap(MEMiHeapHead *heap) { if (GetOptForHeap(heap) & MEM_HEAP_OPT_CAN_LOCK) { OSUnlockMutex(&heap->mutex); } } -static void FillAllocMemory(MEMiHeapHead* heap, void* memBlock, u32 size) { +static void FillAllocMemory(MEMiHeapHead *heap, void *memBlock, u32 size) { if (GetOptForHeap(heap) & MEM_HEAP_OPT_CLEAR_ALLOC) { memset(memBlock, 0, size); } } -static s32 MEMGetHeapTotalSize(MEMiHeapHead* heap) { +static s32 MEMGetHeapTotalSize(MEMiHeapHead *heap) { return GetOffsetFromPtr(heap, heap->end); } diff --git a/include/rvl/MEM/mem_list.h b/include/rvl/MEM/mem_list.h index c54b906b..821c90dc 100644 --- a/include/rvl/MEM/mem_list.h +++ b/include/rvl/MEM/mem_list.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_MEM_LIST_H #define RVL_SDK_MEM_LIST_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/MTX/mtx.h b/include/rvl/MTX/mtx.h index c973a20e..6ae07eb2 100644 --- a/include/rvl/MTX/mtx.h +++ b/include/rvl/MTX/mtx.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_MTX_MTX_H #define RVL_SDK_MTX_MTX_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/MTX/mtx44.h b/include/rvl/MTX/mtx44.h index 8834028b..65dfacc7 100644 --- a/include/rvl/MTX/mtx44.h +++ b/include/rvl/MTX/mtx44.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_MTX_MTX44_H #define RVL_SDK_MTX_MTX44_H +#include "common.h" #include "rvl/MTX/mtx.h" -#include + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/MTX/mtxvec.h b/include/rvl/MTX/mtxvec.h index b744d6f4..882c5413 100644 --- a/include/rvl/MTX/mtxvec.h +++ b/include/rvl/MTX/mtxvec.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_MTX_MTXVEC_H #define RVL_SDK_MTX_MTXVEC_H +#include "common.h" #include "rvl/MTX/mtx.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/MTX/quat.h b/include/rvl/MTX/quat.h index 7a92b9cf..9ec45305 100644 --- a/include/rvl/MTX/quat.h +++ b/include/rvl/MTX/quat.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_MTX_QUAT_H #define RVL_SDK_MTX_QUAT_H +#include "common.h" #include "rvl/MTX/mtx.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/MTX/vec.h b/include/rvl/MTX/vec.h index bed89af0..12577264 100644 --- a/include/rvl/MTX/vec.h +++ b/include/rvl/MTX/vec.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_MTX_VEC_H #define RVL_SDK_MTX_VEC_H +#include "common.h" #include "rvl/MTX/mtx.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NAND/NANDCheck.h b/include/rvl/NAND/NANDCheck.h index 52d87ce0..8f996d05 100644 --- a/include/rvl/NAND/NANDCheck.h +++ b/include/rvl/NAND/NANDCheck.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_NAND_CHECK_H #define RVL_SDK_NAND_CHECK_H +#include "common.h" #include "rvl/NAND/nand.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NAND/NANDCore.h b/include/rvl/NAND/NANDCore.h index dc2616a1..0417b43c 100644 --- a/include/rvl/NAND/NANDCore.h +++ b/include/rvl/NAND/NANDCore.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_NAND_CORE_H #define RVL_SDK_NAND_CORE_H +#include "common.h" #include "rvl/NAND/nand.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NAND/NANDOpenClose.h b/include/rvl/NAND/NANDOpenClose.h index de9106d8..afabe1d2 100644 --- a/include/rvl/NAND/NANDOpenClose.h +++ b/include/rvl/NAND/NANDOpenClose.h @@ -1,23 +1,27 @@ #ifndef RVL_SDK_NAND_OPEN_CLOSE_H #define RVL_SDK_NAND_OPEN_CLOSE_H +#include "common.h" #include "rvl/NAND/nand.h" -#include + #ifdef __cplusplus extern "C" { #endif NANDResult NANDOpen(const char *path, NANDFileInfo *info, u8 mode); NANDResult NANDPrivateOpen(const char *path, NANDFileInfo *info, u8 mode); -NANDResult NANDOpenAsync(const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback, - NANDCommandBlock *block); -NANDResult NANDPrivateOpenAsync(const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback, - NANDCommandBlock *block); +NANDResult +NANDOpenAsync(const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback, NANDCommandBlock *block); +NANDResult NANDPrivateOpenAsync( + const char *path, NANDFileInfo *info, u8 mode, NANDAsyncCallback callback, NANDCommandBlock *block +); NANDResult NANDClose(NANDFileInfo *info); NANDResult NANDCloseAsync(NANDFileInfo *info, NANDAsyncCallback callback, NANDCommandBlock *block); -NANDResult NANDPrivateSafeOpenAsync(const char *path, NANDFileInfo *info, u8 access, void *buffer, u32 bufferSize, - NANDAsyncCallback callback, NANDCommandBlock *block); +NANDResult NANDPrivateSafeOpenAsync( + const char *path, NANDFileInfo *info, u8 access, void *buffer, u32 bufferSize, NANDAsyncCallback callback, + NANDCommandBlock *block +); NANDResult NANDSafeCloseAsync(NANDFileInfo *info, NANDAsyncCallback callback, NANDCommandBlock *block); #ifdef __cplusplus diff --git a/include/rvl/NAND/nand.h b/include/rvl/NAND/nand.h index 4aa56179..6482ecc6 100644 --- a/include/rvl/NAND/nand.h +++ b/include/rvl/NAND/nand.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_NAND_H #define RVL_SDK_NAND_H +#include "common.h" #include "rvl/FS.h" -#include + #ifdef __cplusplus extern "C" { #endif @@ -42,7 +43,12 @@ typedef enum { NAND_SEEK_END, } NANDSeekMode; -typedef enum { NAND_ACCESS_NONE, NAND_ACCESS_READ, NAND_ACCESS_WRITE, NAND_ACCESS_RW } NANDAccessType; +typedef enum { + NAND_ACCESS_NONE, + NAND_ACCESS_READ, + NAND_ACCESS_WRITE, + NAND_ACCESS_RW +} NANDAccessType; typedef enum { NAND_FILE_TYPE_NONE, @@ -134,8 +140,8 @@ typedef struct NANDBanner { NANDResult NANDCreate(const char *path, u8 perm, u8 attr); NANDResult NANDPrivateCreate(const char *path, u8 perm, u8 attr); -NANDResult NANDPrivateCreateAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback, - NANDCommandBlock *block); +NANDResult +NANDPrivateCreateAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback, NANDCommandBlock *block); NANDResult NANDDelete(const char *path); NANDResult NANDPrivateDelete(const char *path); @@ -145,16 +151,16 @@ NANDResult NANDRead(NANDFileInfo *info, void *buf, u32 len); NANDResult NANDReadAsync(NANDFileInfo *info, void *buf, u32 len, NANDAsyncCallback callback, NANDCommandBlock *block); NANDResult NANDWrite(NANDFileInfo *info, const void *buf, u32 len); -NANDResult NANDWriteAsync(NANDFileInfo *info, const void *buf, u32 len, NANDAsyncCallback callback, - NANDCommandBlock *block); +NANDResult +NANDWriteAsync(NANDFileInfo *info, const void *buf, u32 len, NANDAsyncCallback callback, NANDCommandBlock *block); NANDResult NANDSeek(NANDFileInfo *info, s32 offset, NANDSeekMode whence); -NANDResult NANDSeekAsync(NANDFileInfo *info, s32 offset, NANDSeekMode whence, NANDAsyncCallback callback, - NANDCommandBlock *block); +NANDResult +NANDSeekAsync(NANDFileInfo *info, s32 offset, NANDSeekMode whence, NANDAsyncCallback callback, NANDCommandBlock *block); NANDResult NANDPrivateCreateDir(const char *path, u8 perm, u8 attr); -NANDResult NANDPrivateCreateDirAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback, - NANDCommandBlock *block); +NANDResult +NANDPrivateCreateDirAsync(const char *path, u8 perm, u8 attr, NANDAsyncCallback callback, NANDCommandBlock *block); NANDResult NANDMove(const char *from, const char *to); @@ -162,8 +168,8 @@ NANDResult NANDGetLength(NANDFileInfo *info, u32 *length); NANDResult NANDGetLengthAsync(NANDFileInfo *info, u32 *lengthOut, NANDAsyncCallback callback, NANDCommandBlock *block); NANDResult NANDGetStatus(const char *path, NANDStatus *status); -NANDResult NANDPrivateGetStatusAsync(const char *path, NANDStatus *status, NANDAsyncCallback callback, - NANDCommandBlock *block); +NANDResult +NANDPrivateGetStatusAsync(const char *path, NANDStatus *status, NANDAsyncCallback callback, NANDCommandBlock *block); void NANDSetUserData(NANDCommandBlock *block, void *data); void *NANDGetUserData(NANDCommandBlock *block); diff --git a/include/rvl/NWC24/NWC24Schedule.h b/include/rvl/NWC24/NWC24Schedule.h index 922af2ca..7e3e7fac 100644 --- a/include/rvl/NWC24/NWC24Schedule.h +++ b/include/rvl/NWC24/NWC24Schedule.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_NWC24_SCHEDULE_H #define RVL_SDK_NWC24_SCHEDULE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NWC24/NWC24System.h b/include/rvl/NWC24/NWC24System.h index 75cc1c60..c8523b02 100644 --- a/include/rvl/NWC24/NWC24System.h +++ b/include/rvl/NWC24/NWC24System.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_NWC24_SYSTEM_H #define RVL_SDK_NWC24_SYSTEM_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NWC24/NWC24Time.h b/include/rvl/NWC24/NWC24Time.h index e7b55119..60dcade7 100644 --- a/include/rvl/NWC24/NWC24Time.h +++ b/include/rvl/NWC24/NWC24Time.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_NWC24_TIME_H #define RVL_SDK_NWC24_TIME_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NdevExi2AD/DebuggerDriver.h b/include/rvl/NdevExi2AD/DebuggerDriver.h index be907319..e9eaef34 100644 --- a/include/rvl/NdevExi2AD/DebuggerDriver.h +++ b/include/rvl/NdevExi2AD/DebuggerDriver.h @@ -1,8 +1,10 @@ #ifndef RVL_SDK_NDEV_EXI2_AD_DEBUGGER_DRIVER_H #define RVL_SDK_NDEV_EXI2_AD_DEBUGGER_DRIVER_H +#include "common.h" #include "rvl/NdevExi2AD/exi2.h" -#include "rvl/OS.h" -#include +#include "rvl/OS.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NdevExi2AD/ODEMU.h b/include/rvl/NdevExi2AD/ODEMU.h index 8de6ddb7..e93eabe5 100644 --- a/include/rvl/NdevExi2AD/ODEMU.h +++ b/include/rvl/NdevExi2AD/ODEMU.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_NDEV_EXI2_AD_ODEMU_H #define RVL_SDK_NDEV_EXI2_AD_ODEMU_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/NdevExi2AD/exi2.h b/include/rvl/NdevExi2AD/exi2.h index d240bce3..cbc552b9 100644 --- a/include/rvl/NdevExi2AD/exi2.h +++ b/include/rvl/NdevExi2AD/exi2.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_NDEV_EXI2_AD_EXI2_H #define RVL_SDK_NDEV_EXI2_AD_EXI2_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS.h b/include/rvl/OS.h index 4604c7dd..e298765c 100644 --- a/include/rvl/OS.h +++ b/include/rvl/OS.h @@ -1,5 +1,8 @@ #ifndef RVL_SDK_PUBLIC_OS_H #define RVL_SDK_PUBLIC_OS_H + +#include "common.h" + #ifdef __cplusplus extern "C" { #endif @@ -40,4 +43,5 @@ extern "C" { #ifdef __cplusplus } #endif + #endif diff --git a/include/rvl/OS/OS.h b/include/rvl/OS/OS.h index 290ab6a4..32d3a78c 100644 --- a/include/rvl/OS/OS.h +++ b/include/rvl/OS/OS.h @@ -1,8 +1,10 @@ #ifndef RVL_SDK_OS_H #define RVL_SDK_OS_H +#include "common.h" #include "rvl/OS/OSContext.h" #include "rvl/OS/OSExec.h" -#include + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSAddress.h b/include/rvl/OS/OSAddress.h index 9563cd1d..f5fc51cc 100644 --- a/include/rvl/OS/OSAddress.h +++ b/include/rvl/OS/OSAddress.h @@ -1,6 +1,8 @@ #ifndef RVL_SDK_OS_ADDRESS_H #define RVL_SDK_OS_ADDRESS_H -#include + +#include "common.h" + #ifdef __cplusplus extern "C" { #endif @@ -20,4 +22,5 @@ static inline void *OSCachedToPhysical(const void *ofs) { #ifdef __cplusplus } #endif + #endif diff --git a/include/rvl/OS/OSAlarm.h b/include/rvl/OS/OSAlarm.h index 10f7f99b..5ec841b8 100644 --- a/include/rvl/OS/OSAlarm.h +++ b/include/rvl/OS/OSAlarm.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_ALARM_H #define RVL_SDK_OS_ALARM_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSAlloc.h b/include/rvl/OS/OSAlloc.h index a7baddc5..6e2ddb5c 100644 --- a/include/rvl/OS/OSAlloc.h +++ b/include/rvl/OS/OSAlloc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_ALLOC_H #define RVL_SDK_OS_ALLOC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSArena.h b/include/rvl/OS/OSArena.h index 3900c202..77adb6ba 100644 --- a/include/rvl/OS/OSArena.h +++ b/include/rvl/OS/OSArena.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_ARENA_H #define RVL_SDK_OS_ARENA_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSAudioSystem.h b/include/rvl/OS/OSAudioSystem.h index dbf7a60d..97ff605b 100644 --- a/include/rvl/OS/OSAudioSystem.h +++ b/include/rvl/OS/OSAudioSystem.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_AUDIOSYSTEM_H #define RVL_SDK_OS_AUDIOSYSTEM_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSCache.h b/include/rvl/OS/OSCache.h index 1eecfb1f..e4d48bb5 100644 --- a/include/rvl/OS/OSCache.h +++ b/include/rvl/OS/OSCache.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_CACHE_H #define RVL_SDK_OS_CACHE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSContext.h b/include/rvl/OS/OSContext.h index 136d2e00..bc87b69c 100644 --- a/include/rvl/OS/OSContext.h +++ b/include/rvl/OS/OSContext.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_CONTEXT_H #define RVL_SDK_OS_CONTEXT_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSCrc.h b/include/rvl/OS/OSCrc.h index 5a24ef3e..7c5e94a1 100644 --- a/include/rvl/OS/OSCrc.h +++ b/include/rvl/OS/OSCrc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_CRC_H #define RVL_SDK_OS_CRC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSError.h b/include/rvl/OS/OSError.h index 76b5463f..f26db27e 100644 --- a/include/rvl/OS/OSError.h +++ b/include/rvl/OS/OSError.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_OS_ERROR_H #define RVL_SDK_OS_ERROR_H -#include -#include +#include "__va_arg.h" +#include "common.h" + #ifdef __cplusplus extern "C" { #endif @@ -10,8 +11,8 @@ extern "C" { typedef struct OSContext; #define OSError(...) OSPanic(__FILE__, __LINE__, __VA_ARGS__) -#define OSAssert(exp, ...) \ - if (!(exp)) \ +#define OSAssert(exp, ...) \ + if (!(exp)) \ OSPanic(__FILE__, __LINE__, __VA_ARGS__) typedef enum { @@ -41,9 +42,9 @@ typedef void (*OSErrorHandler)(u16 error, OSContext *ctx, u32 dsisr, u32 dar); extern OSErrorHandler __OSErrorTable[OS_ERR_MAX]; extern u32 __OSFpscrEnableBits; -DECL_WEAK void OSReport(const char *msg, ...); -DECL_WEAK void OSVReport(const char *msg, va_list args); -DECL_WEAK void OSPanic(const char *file, int line, const char *msg, ...); +void OSReport(const char *msg, ...); +void OSVReport(const char *msg, va_list args); +void OSPanic(const char *file, int line, const char *msg, ...); OSErrorHandler OSSetErrorHandler(u16 error, OSErrorHandler handler); void __OSUnhandledException(u8 error, OSContext *ctx, u32 dsisr, u32 dar); diff --git a/include/rvl/OS/OSExec.h b/include/rvl/OS/OSExec.h index fc2c1213..37b72f80 100644 --- a/include/rvl/OS/OSExec.h +++ b/include/rvl/OS/OSExec.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_EXEC_H #define RVL_SDK_OS_EXEC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSFastCast.h b/include/rvl/OS/OSFastCast.h index 8aa2e04a..3f7aace6 100644 --- a/include/rvl/OS/OSFastCast.h +++ b/include/rvl/OS/OSFastCast.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_FAST_CAST_H #define RVL_SDK_OS_FAST_CAST_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSFatal.h b/include/rvl/OS/OSFatal.h index 2c145072..2f8694c9 100644 --- a/include/rvl/OS/OSFatal.h +++ b/include/rvl/OS/OSFatal.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_OS_FATAL_H #define RVL_SDK_OS_FATAL_H +#include "common.h" #include "rvl/GX/GXTypes.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSFont.h b/include/rvl/OS/OSFont.h index 73ca9a03..80051307 100644 --- a/include/rvl/OS/OSFont.h +++ b/include/rvl/OS/OSFont.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_FONT_H #define RVL_SDK_OS_FONT_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSHardware.h b/include/rvl/OS/OSHardware.h index 9db8881e..898eae50 100644 --- a/include/rvl/OS/OSHardware.h +++ b/include/rvl/OS/OSHardware.h @@ -1,14 +1,17 @@ #ifndef RVL_SDK_OS_HARDWARE_H #define RVL_SDK_OS_HARDWARE_H -#include "rvl/OS/OSAddress.h" + +// #include "rvl/OS/OSAddress.h" +#include "common.h" #include "rvl/OS/OSThread.h" -#include + + #ifdef __cplusplus extern "C" { #endif -typedef struct OSContext; -typedef struct OSExecParams; +typedef struct OSContext OSContext; +typedef struct OSExecParams OSExecParams; /** * For more details, see: @@ -18,29 +21,29 @@ typedef struct OSExecParams; */ // Derive offsets for use with OSAddress functions -#define __DEF_ADDR_OFFSETS(name, addr) \ - static const u32 OS_PHYS_##name = (addr)-0x80000000; \ - static const u32 OS_CACHED_##name = (addr); \ +#define __DEF_ADDR_OFFSETS(name, addr) \ + static const u32 OS_PHYS_##name = (addr)-0x80000000; \ + static const u32 OS_CACHED_##name = (addr); \ static const u32 OS_UNCACHED_##name = (addr) + (0xC0000000 - 0x80000000); // Define a global variable in *CACHED* MEM1. // Can be accessed directly or with OSAddress functions. -#define OS_DEF_GLOBAL_VAR(type, name, addr) \ - /* Memory-mapped value for direct access */ \ - type OS_##name : (addr); \ +#define OS_DEF_GLOBAL_VAR(type, name, addr) \ + /* Memory-mapped value for direct access */ \ + type OS_##name AT_ADDRESS(addr); \ __DEF_ADDR_OFFSETS(name, addr) // Define a global array in *CACHED* MEM1. // Can be accessed directly or with OSAddress functions. -#define OS_DEF_GLOBAL_ARR(type, name, arr, addr) \ - /* Memory-mapped value for direct access */ \ - type OS_##name arr : (addr); \ +#define OS_DEF_GLOBAL_ARR(type, name, arr, addr) \ + /* Memory-mapped value for direct access */ \ + type OS_##name arr AT_ADDRESS(addr); \ __DEF_ADDR_OFFSETS(name, addr) // Define an global variable in the hardware-register range. -#define OS_DEF_HW_REG(type, name, addr) \ - /* Memory-mapped value for direct access */ \ - type OS_##name : (addr); +#define OS_DEF_HW_REG(type, name, addr) \ + /* Memory-mapped value for direct access */ \ + type OS_##name AT_ADDRESS(addr); typedef struct OSBootInfo { u32 appName; // at 0x0 @@ -114,7 +117,7 @@ OS_DEF_GLOBAL_VAR(u32, CPU_CLOCK_SPEED, 0x800000FC); // clang-format off OS_DEF_GLOBAL_ARR(void*, EXCEPTION_TABLE, [15], 0x80003000); OS_DEF_GLOBAL_VAR(void*, INTR_HANDLER_TABLE, 0x80003040); -OS_DEF_GLOBAL_ARR(volatile s32, EXI_800030C0, [], 0x800030C0); +OS_DEF_GLOBAL_ARR(volatile s32, EXI_800030C0, [2], 0x800030C0); OS_DEF_GLOBAL_VAR(void*, FIRST_REL, 0x800030C8); OS_DEF_GLOBAL_VAR(void*, LAST_REL, 0x800030CC); OS_DEF_GLOBAL_VAR(void*, REL_NAME_TABLE, 0x800030D0); @@ -154,9 +157,9 @@ OS_DEF_GLOBAL_ARR(u8, SC_PRDINFO, [0x100], 0x80003800); // clang-format on /** - * PI hardware globals + * PI hardware globals - Number in arr is just to satisfy typing */ -volatile u32 PI_HW_REGS[] : 0xCC003000; +volatile u32 PI_HW_REGS[10] AT_ADDRESS(0xCC003000); typedef enum { PI_INTSR, //!< 0xCC003000 PI_INTMR, //!< 0xCC003004 @@ -207,10 +210,10 @@ typedef enum { #define PI_INTMR_ACR (1 << 14) /** - * MI Hardware Registers + * MI Hardware Registers - Arr size just to satisfy typing * https://www.gc-forever.com/yagcd/chap5.html#sec5.5 */ -volatile u16 MI_HW_REGS[] : 0xCC004000; +volatile u16 MI_HW_REGS[22] AT_ADDRESS(0xCC004000); typedef enum { MI_PAGE_MEM0_H, //!< 0xCC004000 MI_PAGE_MEM0_L, //!< 0xCC004002 diff --git a/include/rvl/OS/OSInterrupt.h b/include/rvl/OS/OSInterrupt.h index 875200d6..7db68c59 100644 --- a/include/rvl/OS/OSInterrupt.h +++ b/include/rvl/OS/OSInterrupt.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_INTERRUPT_H #define RVL_SDK_OS_INTERRUPT_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSIpc.h b/include/rvl/OS/OSIpc.h index f681ac39..ce4cb59c 100644 --- a/include/rvl/OS/OSIpc.h +++ b/include/rvl/OS/OSIpc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_IPC_H #define RVL_SDK_OS_IPC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSLink.h b/include/rvl/OS/OSLink.h index 0bc13dc3..ddb04350 100644 --- a/include/rvl/OS/OSLink.h +++ b/include/rvl/OS/OSLink.h @@ -1,7 +1,7 @@ #ifndef OSLINK_H #define OSLINK_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { @@ -22,16 +22,16 @@ typedef struct OSRel OSRel; // OSModuleQueue __OSModuleList : 0x800030C8; // void* __OSStringTable : 0x800030D0; extern OSModuleQueue __OSModuleList; -extern void * __OSStringTable; +extern void *__OSStringTable; struct OSModuleQueue { - OSModuleInfo* head; - OSModuleInfo* tail; + OSModuleInfo *head; + OSModuleInfo *tail; }; struct OSModuleLink { - OSModuleInfo* next; - OSModuleInfo* prev; + OSModuleInfo *next; + OSModuleInfo *prev; }; struct OSSectionInfo { @@ -40,13 +40,13 @@ struct OSSectionInfo { }; struct OSModuleInfo { - OSModuleID id; // unique identifier for the module - OSModuleLink link; // doubly linked list of modules - u32 numSections; // # of sections - u32 sectionInfoOffset; // offset to section info table - u32 nameOffset; // offset to module name - u32 nameSize; // size of module name - u32 version; // version number + OSModuleID id; // unique identifier for the module + OSModuleLink link; // doubly linked list of modules + u32 numSections; // # of sections + u32 sectionInfoOffset; // offset to section info table + u32 nameOffset; // offset to module name + u32 nameSize; // size of module name + u32 version; // version number }; struct OSModuleHeader { @@ -54,22 +54,22 @@ struct OSModuleHeader { OSModuleInfo info; // OS_MODULE_VERSION == 1 - u32 bssSize; // total size of bss sections in bytes + u32 bssSize; // total size of bss sections in bytes u32 relOffset; u32 impOffset; - u32 impSize; // size in bytes - u8 prologSection; // section # for prolog function - u8 epilogSection; // section # for epilog function - u8 unresolvedSection; // section # for unresolved function - u8 bssSection; // section # for bss section (set at run-time) - u32 prolog; // prolog function offset - u32 epilog; // epilog function offset - u32 unresolved; // unresolved function offset + u32 impSize; // size in bytes + u8 prologSection; // section # for prolog function + u8 epilogSection; // section # for epilog function + u8 unresolvedSection; // section # for unresolved function + u8 bssSection; // section # for bss section (set at run-time) + u32 prolog; // prolog function offset + u32 epilog; // epilog function offset + u32 unresolved; // unresolved function offset // OS_MODULE_VERSION == 2 #if (2 <= OS_MODULE_VERSION) - u32 align; // module alignment constraint - u32 bssAlign; // bss alignment constraint + u32 align; // module alignment constraint + u32 bssAlign; // bss alignment constraint #endif // OS_MODULE_VERSION == 3 @@ -78,34 +78,34 @@ struct OSModuleHeader { #endif }; -#define OSGetSectionInfo(module) ((OSSectionInfo*)(((OSModuleInfo*)(module))->sectionInfoOffset)) +#define OSGetSectionInfo(module) ((OSSectionInfo *)(((OSModuleInfo *)(module))->sectionInfoOffset)) #define OS_SECTIONINFO_EXEC 0x1 #define OS_SECTIONINFO_OFFSET(offset) ((offset) & ~0x1) struct OSImportInfo { - OSModuleID id; // external module id - u32 offset; // offset to OSRel instructions + OSModuleID id; // external module id + u32 offset; // offset to OSRel instructions }; struct OSRel { - u16 offset; // byte offset from the previous entry + u16 offset; // byte offset from the previous entry u8 type; u8 section; u32 addend; }; -#define R_DOLPHIN_NOP 201 // C9h current offset += OSRel.offset -#define R_DOLPHIN_SECTION 202 // CAh current section = OSRel.section -#define R_DOLPHIN_END 203 // CBh -#define R_DOLPHIN_MRKREF 204 // CCh +#define R_DOLPHIN_NOP 201 // C9h current offset += OSRel.offset +#define R_DOLPHIN_SECTION 202 // CAh current section = OSRel.section +#define R_DOLPHIN_END 203 // CBh +#define R_DOLPHIN_MRKREF 204 // CCh -BOOL OSLink(OSModuleInfo* newModule, void* bss); -BOOL OSLinkFixed(OSModuleInfo* newModule, void* bss); -BOOL OSUnlink(OSModuleInfo* module); -void OSSetStringTable(void* string_table); +BOOL OSLink(OSModuleInfo *newModule, void *bss); +BOOL OSLinkFixed(OSModuleInfo *newModule, void *bss); +BOOL OSUnlink(OSModuleInfo *module); +void OSSetStringTable(void *string_table); void __OSModuleInit(void); -OSModuleInfo* OSSearchModule(void* ptr, u32* section, u32* offset); +OSModuleInfo *OSSearchModule(void *ptr, u32 *section, u32 *offset); #ifdef __cplusplus }; diff --git a/include/rvl/OS/OSMemory.h b/include/rvl/OS/OSMemory.h index ae25cae4..5a186e1b 100644 --- a/include/rvl/OS/OSMemory.h +++ b/include/rvl/OS/OSMemory.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_MEMORY_H #define RVL_SDK_OS_MEMORY_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSMessage.h b/include/rvl/OS/OSMessage.h index 38f7358b..7761bddc 100644 --- a/include/rvl/OS/OSMessage.h +++ b/include/rvl/OS/OSMessage.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_OS_MESSAGE_H #define RVL_SDK_OS_MESSAGE_H +#include "common.h" #include "rvl/OS/OSThread.h" -#include + + #ifdef __cplusplus extern "C" { #endif @@ -9,7 +11,9 @@ extern "C" { // General-purpose typedef typedef void *OSMessage; -typedef enum { OS_MSG_PERSISTENT = (1 << 0) } OSMessageFlags; +typedef enum { + OS_MSG_PERSISTENT = (1 << 0) +} OSMessageFlags; typedef struct OSMessageQueue { OSThreadQueue sendQueue; // at 0x0 diff --git a/include/rvl/OS/OSMutex.h b/include/rvl/OS/OSMutex.h index f83dee73..94d21f02 100644 --- a/include/rvl/OS/OSMutex.h +++ b/include/rvl/OS/OSMutex.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_OS_MUTEX_H #define RVL_SDK_OS_MUTEX_H +#include "common.h" #include "rvl/OS/OSThread.h" -#include + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSNet.h b/include/rvl/OS/OSNet.h index 2025165f..83342095 100644 --- a/include/rvl/OS/OSNet.h +++ b/include/rvl/OS/OSNet.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_NET_H #define RVL_SDK_OS_NET_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSPlayRecord.h b/include/rvl/OS/OSPlayRecord.h index d5a65e07..9c9e2a4d 100644 --- a/include/rvl/OS/OSPlayRecord.h +++ b/include/rvl/OS/OSPlayRecord.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_PLAY_RECORD_H #define RVL_SDK_OS_PLAY_RECORD_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSReset.h b/include/rvl/OS/OSReset.h index d6e065c1..06d5a344 100644 --- a/include/rvl/OS/OSReset.h +++ b/include/rvl/OS/OSReset.h @@ -1,13 +1,16 @@ #ifndef RVL_SDK_OS_RESET_H #define RVL_SDK_OS_RESET_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif typedef BOOL (*OSShutdownFunction)(u32 pass, u32 event); -typedef enum { OS_SD_PASS_FIRST, OS_SD_PASS_SECOND } OSShutdownPass; +typedef enum { + OS_SD_PASS_FIRST, + OS_SD_PASS_SECOND +} OSShutdownPass; typedef enum { OS_SD_EVENT_SHUTDOWN = 2, diff --git a/include/rvl/OS/OSRtc.h b/include/rvl/OS/OSRtc.h index 0d345ca3..c535e300 100644 --- a/include/rvl/OS/OSRtc.h +++ b/include/rvl/OS/OSRtc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_RTC_H #define RVL_SDK_OS_RTC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSStateFlags.h b/include/rvl/OS/OSStateFlags.h index c6a457ce..80abc345 100644 --- a/include/rvl/OS/OSStateFlags.h +++ b/include/rvl/OS/OSStateFlags.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_STATE_FLAGS_H #define RVL_SDK_OS_STATE_FLAGS_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSStateTM.h b/include/rvl/OS/OSStateTM.h index c22aec74..ca21d9b6 100644 --- a/include/rvl/OS/OSStateTM.h +++ b/include/rvl/OS/OSStateTM.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_STATETM_H #define RVL_SDK_OS_STATETM_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSSync.h b/include/rvl/OS/OSSync.h index 5edc5746..ae0796ce 100644 --- a/include/rvl/OS/OSSync.h +++ b/include/rvl/OS/OSSync.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_SYNC_H #define RVL_SDK_OS_SYNC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSThread.h b/include/rvl/OS/OSThread.h index dfe07d5f..148b099d 100644 --- a/include/rvl/OS/OSThread.h +++ b/include/rvl/OS/OSThread.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_OS_THREAD_H #define RVL_SDK_OS_THREAD_H +#include "common.h" #include "rvl/OS/OSContext.h" -#include + #ifdef __cplusplus extern "C" { #endif @@ -19,7 +20,9 @@ typedef enum { OS_THREAD_STATE_MORIBUND = 8 } OSThreadState; -typedef enum { OS_THREAD_DETACHED = (1 << 0) } OSThreadFlag; +typedef enum { + OS_THREAD_DETACHED = (1 << 0) +} OSThreadFlag; typedef struct OSThreadQueue { struct OSThread *head; // at 0x0 @@ -47,8 +50,8 @@ typedef struct OSThread { OSMutexQueue mutexQueue; // at 0x2F4 struct OSThread *nextActive; // at 0x2FC struct OSThread *prevActive; // at 0x300 - void *stackBegin; // at 0x304 - void *stackEnd; // at 0x308 + void *stackBegin; // at 0x304 + void *stackEnd; // at 0x308 s32 error; // at 0x30C void *specific[2]; // at 0x310 } OSThread; @@ -69,8 +72,9 @@ s32 __OSGetEffectivePriority(OSThread *thread); void __OSPromoteThread(OSThread *thread, s32 prio); void __OSReschedule(void); void OSYieldThread(void); -BOOL OSCreateThread(OSThread *thread, OSThreadFunc func, void *funcArg, void *stackBegin, u32 stackSize, s32 prio, - u16 flags); +BOOL OSCreateThread( + OSThread *thread, OSThreadFunc func, void *funcArg, void *stackBegin, u32 stackSize, s32 prio, u16 flags +); void OSExitThread(OSThread *thread); void OSCancelThread(OSThread *thread); BOOL OSJoinThread(OSThread *thread, void *val); diff --git a/include/rvl/OS/OSTime.h b/include/rvl/OS/OSTime.h index 1d1310d2..761760b9 100644 --- a/include/rvl/OS/OSTime.h +++ b/include/rvl/OS/OSTime.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_OS_TIME_H #define RVL_SDK_OS_TIME_H -#include "rvl/OS/OSHardware.h" -#include +#include "common.h" +#include "rvl/OS/OSHardware.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/OSUtf.h b/include/rvl/OS/OSUtf.h index 5e52925e..aa863340 100644 --- a/include/rvl/OS/OSUtf.h +++ b/include/rvl/OS/OSUtf.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_UTF_H #define RVL_SDK_OS_UTF_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/OS/__ppc_eabi_init.h b/include/rvl/OS/__ppc_eabi_init.h index b0a40e72..087ecfd9 100644 --- a/include/rvl/OS/__ppc_eabi_init.h +++ b/include/rvl/OS/__ppc_eabi_init.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_OS_PPC_EABI_INIT_H #define RVL_SDK_OS_PPC_EABI_INIT_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -20,14 +20,14 @@ void _ExitProcess(void); */ // Declare linker symbols for a section in the ROM -#define DECL_ROM_SECTION(x) \ - extern u8 _f##x[]; \ - extern u8 _f##x##_rom[]; \ +#define DECL_ROM_SECTION(x) \ + extern u8 _f##x[]; \ + extern u8 _f##x##_rom[]; \ extern u8 _e##x[]; // Declare linker symbols for a BSS section -#define DECL_BSS_SECTION(x) \ - extern u8 _f##x[]; \ +#define DECL_BSS_SECTION(x) \ + extern u8 _f##x[]; \ extern u8 _e##x[]; // Debugger stack diff --git a/include/rvl/PAD/Pad.h b/include/rvl/PAD/Pad.h index 9766355a..45d85714 100644 --- a/include/rvl/PAD/Pad.h +++ b/include/rvl/PAD/Pad.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_PAD_H #define RVL_SDK_PAD_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/SC/scapi.h b/include/rvl/SC/scapi.h index 52708b4c..b9a120a7 100644 --- a/include/rvl/SC/scapi.h +++ b/include/rvl/SC/scapi.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_SC_SCAPI_H #define RVL_SDK_SC_SCAPI_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -10,9 +10,15 @@ extern "C" { * https://wiibrew.org/wiki//shared2/sys/SYSCONF */ -typedef enum { SC_ASPECT_STD, SC_ASPECT_WIDE } SCAspectRatio; +typedef enum { + SC_ASPECT_STD, + SC_ASPECT_WIDE +} SCAspectRatio; -typedef enum { SC_EURGB_50_HZ, SC_EURGB_60_HZ } SCEuRgb60Mode; +typedef enum { + SC_EURGB_50_HZ, + SC_EURGB_60_HZ +} SCEuRgb60Mode; typedef enum { SC_LANG_JP, @@ -27,9 +33,16 @@ typedef enum { SC_LANG_KR, } SCLanguage; -typedef enum { SC_SND_MONO, SC_SND_STEREO, SC_SND_SURROUND } SCSoundMode; +typedef enum { + SC_SND_MONO, + SC_SND_STEREO, + SC_SND_SURROUND +} SCSoundMode; -typedef enum { SC_SENSOR_BAR_BOTTOM, SC_SENSOR_BAR_TOP } SCSensorBarPos; +typedef enum { + SC_SENSOR_BAR_BOTTOM, + SC_SENSOR_BAR_TOP +} SCSensorBarPos; typedef struct SCIdleMode { u8 wc24; // at 0x0 diff --git a/include/rvl/SC/scapi_prdinfo.h b/include/rvl/SC/scapi_prdinfo.h index 21f66aaf..66ac407f 100644 --- a/include/rvl/SC/scapi_prdinfo.h +++ b/include/rvl/SC/scapi_prdinfo.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_SC_SCAPI_PRDINFO_H #define RVL_SDK_SC_SCAPI_PRDINFO_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/SC/scsystem.h b/include/rvl/SC/scsystem.h index d01ace55..26fcea2b 100644 --- a/include/rvl/SC/scsystem.h +++ b/include/rvl/SC/scsystem.h @@ -1,9 +1,11 @@ #ifndef RVL_SDK_SC_SCSYSTEM_H #define RVL_SDK_SC_SCSYSTEM_H -#include "rvl/FS.h" -#include "rvl/NAND.h" -#include "rvl/OS.h" -#include +#include "common.h" +#include "rvl/FS.h" // IWYU pragma: export +#include "rvl/NAND.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/SI/SIBios.h b/include/rvl/SI/SIBios.h index eae3e606..805ab88a 100644 --- a/include/rvl/SI/SIBios.h +++ b/include/rvl/SI/SIBios.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_SI_SIBIOS_H #define RVL_SDK_SI_SIBIOS_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/TPL/TPL.h b/include/rvl/TPL/TPL.h index acf56ab1..7669f4cd 100644 --- a/include/rvl/TPL/TPL.h +++ b/include/rvl/TPL/TPL.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_TPL_H #define RVL_SDK_TPL_H -#include "rvl/GX.h" -#include +#include "common.h" +#include "rvl/GX.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/USB/usb.h b/include/rvl/USB/usb.h index 018dfaff..2a38193f 100644 --- a/include/rvl/USB/usb.h +++ b/include/rvl/USB/usb.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_USB_H #define RVL_SDK_USB_H -#include "rvl/IPC.h" -#include +#include "common.h" +#include "rvl/IPC.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif @@ -12,13 +14,15 @@ IPCResult IUSB_OpenLib(void); IPCResult IUSB_CloseLib(void); IPCResult IUSB_OpenDeviceIds(const char *interface, u16 vid, u16 pid, IPCResult *resultOut); IPCResult IUSB_CloseDeviceAsync(s32 fd, USBCallback callback, void *callbackArg); -IPCResult IUSB_ReadIntrMsgAsync(s32 fd, u32 endpoint, u32 length, void *buffer, USBCallback callback, - void *callbackArg); +IPCResult +IUSB_ReadIntrMsgAsync(s32 fd, u32 endpoint, u32 length, void *buffer, USBCallback callback, void *callbackArg); IPCResult IUSB_ReadBlkMsgAsync(s32 fd, u32 endpoint, u32 length, void *buffer, USBCallback callback, void *callbackArg); -IPCResult IUSB_WriteBlkMsgAsync(s32 fd, u32 endpoint, u32 length, const void *buffer, USBCallback callback, - void *callbackArg); -IPCResult IUSB_WriteCtrlMsgAsync(s32 fd, u8 requestType, u8 request, u16 value, u16 index, u16 length, void *buffer, - USBCallback callback, void *callbackArg); +IPCResult +IUSB_WriteBlkMsgAsync(s32 fd, u32 endpoint, u32 length, const void *buffer, USBCallback callback, void *callbackArg); +IPCResult IUSB_WriteCtrlMsgAsync( + s32 fd, u8 requestType, u8 request, u16 value, u16 index, u16 length, void *buffer, USBCallback callback, + void *callbackArg +); #ifdef __cplusplus } diff --git a/include/rvl/VF/pf.h b/include/rvl/VF/pf.h index 8041c2e2..8078d61a 100644 --- a/include/rvl/VF/pf.h +++ b/include/rvl/VF/pf.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_VF_PF_H #define RVL_SDK_VF_PF_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VF/pf_clib.h b/include/rvl/VF/pf_clib.h index d6c6bd5b..d755a9d6 100644 --- a/include/rvl/VF/pf_clib.h +++ b/include/rvl/VF/pf_clib.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_VF_PF_CLIB_H #define RVL_SDK_VF_PF_CLIB_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VF/pf_code.h b/include/rvl/VF/pf_code.h index 4e6720ce..c7eb82a1 100644 --- a/include/rvl/VF/pf_code.h +++ b/include/rvl/VF/pf_code.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_VF_PF_CODE_H #define RVL_SDK_VF_PF_CODE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VF/pf_service.h b/include/rvl/VF/pf_service.h index f158f391..5bd4a1d8 100644 --- a/include/rvl/VF/pf_service.h +++ b/include/rvl/VF/pf_service.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_VF_PF_SERVICE_H #define RVL_SDK_VF_PF_SERVICE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VF/pf_str.h b/include/rvl/VF/pf_str.h index bde314e1..dad5aafc 100644 --- a/include/rvl/VF/pf_str.h +++ b/include/rvl/VF/pf_str.h @@ -1,7 +1,7 @@ #ifndef RVL_SDK_VF_PF_STRING_H #define RVL_SDK_VF_PF_STRING_H -#include "rvl/VF/pf.h" -#include + +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VF/pf_volume.h b/include/rvl/VF/pf_volume.h index f737f38d..a043a982 100644 --- a/include/rvl/VF/pf_volume.h +++ b/include/rvl/VF/pf_volume.h @@ -1,7 +1,8 @@ #ifndef RVL_SDK_VF_PF_VOLUME_H #define RVL_SDK_VF_PF_VOLUME_H +#include "common.h" #include "rvl/VF/pf_code.h" -#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VF/pf_w_clib.h b/include/rvl/VF/pf_w_clib.h index 4c86447d..25bc7755 100644 --- a/include/rvl/VF/pf_w_clib.h +++ b/include/rvl/VF/pf_w_clib.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_VF_PF_W_CLIB_H #define RVL_SDK_VF_PF_W_CLIB_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VI/vi.h b/include/rvl/VI/vi.h index 7a892813..5a6d943b 100644 --- a/include/rvl/VI/vi.h +++ b/include/rvl/VI/vi.h @@ -1,7 +1,9 @@ #ifndef RVL_SDK_VI_H #define RVL_SDK_VI_H -#include "rvl/GX.h" -#include +#include "common.h" +#include "rvl/GX.h" // IWYU pragma: export + + #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VI/vi3in1.h b/include/rvl/VI/vi3in1.h index db46897e..e0de6556 100644 --- a/include/rvl/VI/vi3in1.h +++ b/include/rvl/VI/vi3in1.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_VI_VI3IN1_H #define RVL_SDK_VI_VI3IN1_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/include/rvl/VI/vihardware.h b/include/rvl/VI/vihardware.h index 6c0c6331..47370089 100644 --- a/include/rvl/VI/vihardware.h +++ b/include/rvl/VI/vihardware.h @@ -1,15 +1,15 @@ #ifndef RVL_SDK_VI_HARDWARE_H #define RVL_SDK_VI_HARDWARE_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif /** - * VI Hardware Registers + * VI Hardware Registers - arr size for typing * https://www.gc-forever.com/yagcd/chap5.html#sec5.3 */ -volatile u16 VI_HW_REGS[] : 0xCC002000; +volatile u16 VI_HW_REGS[63] AT_ADDRESS(0xCC002000); /** * Hardware register indexes diff --git a/include/rvl/WENC.h b/include/rvl/WENC.h index aca777d1..268070da 100644 --- a/include/rvl/WENC.h +++ b/include/rvl/WENC.h @@ -4,7 +4,7 @@ extern "C" { #endif -#include +#include "rvl/WENC/wenc.h" #ifdef __cplusplus } diff --git a/include/rvl/WENC/wenc.h b/include/rvl/WENC/wenc.h index 3e247ce8..e2ec47dd 100644 --- a/include/rvl/WENC/wenc.h +++ b/include/rvl/WENC/wenc.h @@ -1,6 +1,6 @@ #ifndef RVL_SDK_WENC_H #define RVL_SDK_WENC_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif @@ -19,8 +19,7 @@ typedef struct WENCInfo { u8 padding[8]; // at 0x18 } WENCInfo; -s32 WENCGetEncodeData(WENCInfo* info, u32 flag, const s16* pcmData, s32 samples, - u8* adpcmData); +s32 WENCGetEncodeData(WENCInfo *info, u32 flag, const s16 *pcmData, s32 samples, u8 *adpcmData); #ifdef __cplusplus } diff --git a/include/rvl/WPAD.h b/include/rvl/WPAD.h index 8f63eb9e..8e4556aa 100644 --- a/include/rvl/WPAD.h +++ b/include/rvl/WPAD.h @@ -4,8 +4,8 @@ extern "C" { #endif -#include -#include +#include "rvl/WPAD/WPAD.h" +#include "rvl/WPAD/WPADMem.h" #ifdef __cplusplus } diff --git a/include/rvl/WPAD/WPAD.h b/include/rvl/WPAD/WPAD.h index 5154aadc..683b0e2a 100644 --- a/include/rvl/WPAD/WPAD.h +++ b/include/rvl/WPAD/WPAD.h @@ -4,9 +4,10 @@ // From // https://github.com/muff1n1634/wpad_11dec2009/blob/3c3aa5416d15ccc5867517d9ed4aaf6d25a70e9c/include/revolution/WPAD/WPAD.h -#include -#include -#include +#include "common.h" +#include "rvl/SC/scsystem.h" +#include "rvl/WPAD/WUD.h" + /******************************************************************************* * macros diff --git a/include/rvl/WPAD/WPADMem.h b/include/rvl/WPAD/WPADMem.h index d5d2c259..e2c3c388 100644 --- a/include/rvl/WPAD/WPADMem.h +++ b/include/rvl/WPAD/WPADMem.h @@ -1,9 +1,9 @@ #ifndef RVL_SDK_WPAD_MEMORY_H #define RVL_SDK_WPAD_MEMORY_H -#include -#include -#include +#include "common.h" +#include "rvl/OS/OSTime.h" +#include "rvl/WPAD/WPAD.h" /******************************************************************************* diff --git a/include/rvl/WPAD/WUD.h b/include/rvl/WPAD/WUD.h index a363bd40..f719d04b 100644 --- a/include/rvl/WPAD/WUD.h +++ b/include/rvl/WPAD/WUD.h @@ -1,7 +1,7 @@ #ifndef RVL_SDK_WPAD_WUD_H #define RVL_SDK_WPAD_WUD_H -#include +#include "common.h" // TODO: Fix when possible #include "context_bte.h" diff --git a/include/s/s_Crc.h b/include/s/s_Crc.h index 044e7d99..2e7809a0 100644 --- a/include/s/s_Crc.h +++ b/include/s/s_Crc.h @@ -1,7 +1,7 @@ #ifndef S_CRC_H #define S_CRC_H -#include +#include "common.h" namespace sCrc { diff --git a/include/s/s_FState.hpp b/include/s/s_FState.hpp index 5ce14991..fe38f8c4 100644 --- a/include/s/s_FState.hpp +++ b/include/s/s_FState.hpp @@ -1,8 +1,10 @@ #ifndef S_FSTATE_H #define S_FSTATE_H -#include -#include +// clang-format off +#include "s/s_StateInterfaces.hpp" +#include "s/s_FStateID.hpp" +// clang-format on // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -10,10 +12,12 @@ /// @brief A state holder for a given class. /// @tparam T The class that this state belongs to. /// @ingroup state -template +template class sFState_c : public sStateIf_c { public: - sFState_c(T &owner) : mpOwner(owner) { mpID = nullptr; } + sFState_c(T &owner) : mpOwner(owner) { + mpID = nullptr; + } enum STATE_ACTION_e { INITIALIZE, @@ -34,14 +38,22 @@ class sFState_c : public sStateIf_c { } } - virtual void initialize() { performAction(INITIALIZE); } - virtual void execute() { performAction(EXECUTE); } - virtual void finalize() { performAction(FINALIZE); } + virtual const void initialize() { + performAction(INITIALIZE); + } + virtual const void execute() { + performAction(EXECUTE); + } + virtual const void finalize() { + performAction(FINALIZE); + } - void setID(const sFStateID_c *id) { mpID = id; } + void setID(const sFStateID_c *id) { + mpID = id; + } private: - T &mpOwner; ///< The owner of this state. + T &mpOwner; ///< The owner of this state. const sFStateID_c *mpID; ///< The state ID that runs the state methods. }; diff --git a/include/s/s_FStateFct.hpp b/include/s/s_FStateFct.hpp index cb488d2d..d3515649 100644 --- a/include/s/s_FStateFct.hpp +++ b/include/s/s_FStateFct.hpp @@ -1,9 +1,11 @@ #ifndef S_FSTATEFCT_H #define S_FSTATEFCT_H -#include -#include -#include +// clang-format off +#include "s/s_StateInterfaces.hpp" +#include "s/s_FState.hpp" +#include "s/s_StateID.hpp" +// clang-format on // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -16,15 +18,17 @@ class sFStateFct_c : public sStateFctIf_c { public: sFStateFct_c(T &owner) : mState(owner) {} - virtual sStateIf_c* build(const sStateIDIf_c &id) { + virtual sStateIf_c *build(const sStateIDIf_c &id) { if (!id.isNull()) { - mState.setID((const sFStateID_c *) &id); + mState.setID((const sFStateID_c *)&id); return &mState; } return nullptr; } - virtual void dispose(sStateIf_c *&id) { id = nullptr; } + virtual void dispose(sStateIf_c *&id) { + id = nullptr; + } private: sFState_c mState; diff --git a/include/s/s_FStateID.hpp b/include/s/s_FStateID.hpp index 5fd05476..243fbb4d 100644 --- a/include/s/s_FStateID.hpp +++ b/include/s/s_FStateID.hpp @@ -1,8 +1,8 @@ #ifndef S_FSTATEID_H #define S_FSTATEID_H -#include -#include +#include "s/s_StateID.hpp" +#include "string.h" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -11,24 +11,21 @@ /// @details It adds the ability to call the three state methods on a state owner class. /// @tparam T The class that this state belongs to. /// @ingroup state -template +template class sFStateID_c : public sStateID_c { public: typedef void (T::*stateFunc)(); /** * @brief Constructs a new sFStateID_c instance. - * + * * @param name The name of this state ID. * @param initialize The initialize method for this state ID. * @param execute The execute method for this state ID. * @param finalize The finalize method for this state ID. */ - sFStateID_c(const char *name, stateFunc initialize, stateFunc execute, stateFunc finalize) : - sStateID_c(name), - mpInitialize(initialize), - mpExecute(execute), - mpFinalize(finalize) {} + sFStateID_c(const char *name, stateFunc initialize, stateFunc execute, stateFunc finalize) + : sStateID_c(name), mpInitialize(initialize), mpExecute(execute), mpFinalize(finalize) {} /// @brief Returns true if the given name matches this state ID's name. virtual bool isSameName(const char *otherName) const { @@ -46,20 +43,26 @@ class sFStateID_c : public sStateID_c { /// @brief Calls the initialize method on the owner. /// @param owner The owner of this state ID. - virtual void initializeState(T &owner) const { (owner.*mpInitialize)(); } + virtual void initializeState(T &owner) const { + (owner.*mpInitialize)(); + } /// @brief Calls the execute method on the owner. /// @param owner The owner of this state ID. - virtual void executeState(T &owner) const { (owner.*mpExecute)(); } + virtual void executeState(T &owner) const { + (owner.*mpExecute)(); + } /// @brief Calls the finalize method on the owner. /// @param owner The owner of this state ID. - virtual void finalizeState(T &owner) const { (owner.*mpFinalize)(); } + virtual void finalizeState(T &owner) const { + (owner.*mpFinalize)(); + } private: stateFunc mpInitialize; ///< The initialize method for this state ID. - stateFunc mpExecute; ///< The execute method for this state ID. - stateFunc mpFinalize; ///< The finalize method for this state ID. + stateFunc mpExecute; ///< The execute method for this state ID. + stateFunc mpFinalize; ///< The finalize method for this state ID. }; #endif diff --git a/include/s/s_FStateMgr.hpp b/include/s/s_FStateMgr.hpp index a001ffea..cac7efc1 100644 --- a/include/s/s_FStateMgr.hpp +++ b/include/s/s_FStateMgr.hpp @@ -1,11 +1,13 @@ #ifndef S_FSTATEMGR_H #define S_FSTATEMGR_H -#include -#include -#include -#include -#include +// clang-format off +#include "s/s_FStateID.hpp" +#include "s/s_StateMgr.hpp" +#include "s/s_FState.hpp" +#include "s/s_FStateFct.hpp" +#include "s/s_StateIDChk.hpp" +// clang-format on // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -17,8 +19,8 @@ template class sFStateMgr_c : public sStateMgr_c { public: - sFStateMgr_c(T &owner, const sStateIDIf_c &initializeState) : - sStateMgr_c(owner, initializeState) {} + sFStateMgr_c(T &owner, const sStateIDIf_c &initializeState) + : sStateMgr_c(owner, initializeState) {} }; #endif diff --git a/include/s/s_Math.h b/include/s/s_Math.h index 78d7c1d4..753f18b5 100644 --- a/include/s/s_Math.h +++ b/include/s/s_Math.h @@ -1,7 +1,7 @@ #ifndef S_MATH_H #define S_MATH_H -#include +#include "common.h" namespace sLib { diff --git a/include/s/s_State.hpp b/include/s/s_State.hpp index 54559191..0a00cce4 100644 --- a/include/s/s_State.hpp +++ b/include/s/s_State.hpp @@ -1,28 +1,29 @@ #ifndef S_STATE_H #define S_STATE_H -#include -#include +#include "s/s_FStateMgr.hpp" +#include "s/s_StateMethodUsr_FI.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made -#define STATE_FUNC_DECLARE(class, name) \ - void initializeState_##name(); \ - void executeState_##name(); \ - void finalizeState_##name(); \ +#define STATE_FUNC_DECLARE(class, name) \ + void initializeState_##name(); \ + void executeState_##name(); \ + void finalizeState_##name(); \ static sFStateID_c StateID_##name -#define STATE_DEFINE(class, name) \ - sFStateID_c class ::StateID_##name(#class "::StateID_" #name, &class ::initializeState_##name, \ - &class ::executeState_##name, &class ::finalizeState_##name) +#define STATE_DEFINE(class, name) \ + sFStateID_c class ::StateID_##name( \ + #class "::StateID_" #name, &class ::initializeState_##name, &class ::executeState_##name, \ + &class ::finalizeState_##name \ + ) -#define STATE_MGR_DECLARE(class_name) \ - sFStateMgr_c mStateMgr; \ - void dummy_GetStateID() { \ - mStateMgr.getStateID(); \ +#define STATE_MGR_DECLARE(class_name) \ + sFStateMgr_c mStateMgr; \ + void dummy_GetStateID() { \ + mStateMgr.getStateID(); \ } -#define UI_STATE_MGR_DECLARE(class_name) \ - sFStateMgr_c mStateMgr; +#define UI_STATE_MGR_DECLARE(class_name) sFStateMgr_c mStateMgr; #endif diff --git a/include/s/s_StateID.hpp b/include/s/s_StateID.hpp index 4c2ee84f..cff3ed9f 100644 --- a/include/s/s_StateID.hpp +++ b/include/s/s_StateID.hpp @@ -1,7 +1,7 @@ #ifndef S_STATEID_H #define S_STATEID_H -#include +#include "s/s_StateInterfaces.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -35,7 +35,7 @@ class sStateID_c : public sStateIDIf_c { virtual unsigned int number() const; protected: - const char *mpName; ///< The name of this state ID. + const char *mpName; ///< The name of this state ID. unsigned int mNumber; ///< The number of this state ID. static NumberMemo_c sm_numberMemo; ///< Used to give each state a unique number. @@ -43,8 +43,8 @@ class sStateID_c : public sStateIDIf_c { namespace sStateID { - /// @ingroup state - extern sStateID_c null; ///< A null state instance. -} +/// @ingroup state +extern sStateID_c null; ///< A null state instance. +} // namespace sStateID #endif diff --git a/include/s/s_StateIDChk.hpp b/include/s/s_StateIDChk.hpp index 5237cbaf..1be72b1f 100644 --- a/include/s/s_StateIDChk.hpp +++ b/include/s/s_StateIDChk.hpp @@ -1,7 +1,7 @@ #ifndef S_STATEIDCHK_H #define S_STATEIDCHK_H -#include +#include "s/s_StateInterfaces.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -11,7 +11,9 @@ class sStateIDChk_c : public sStateIDChkIf_c { public: virtual ~sStateIDChk_c(); - virtual bool isNormalID(const sStateIDIf_c &) const { return true; } + virtual bool isNormalID(const sStateIDIf_c &) const { + return true; + } }; #endif diff --git a/include/s/s_StateInterfaces.hpp b/include/s/s_StateInterfaces.hpp index 10b9986e..68a80d29 100644 --- a/include/s/s_StateInterfaces.hpp +++ b/include/s/s_StateInterfaces.hpp @@ -1,7 +1,7 @@ #ifndef S_STATEINTERFACES_H #define S_STATEINTERFACES_H -#include +#include "common.h" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -22,15 +22,15 @@ class sStateIDIf_c { public: virtual ~sStateIDIf_c(); - virtual bool isNull() const = 0; ///< Returns whether this is a null state. - virtual bool isEqual(const sStateIDIf_c &other) const = 0; ///< Returns whether both states have the same number. + virtual bool isNull() const = 0; ///< Returns whether this is a null state. + virtual bool isEqual(const sStateIDIf_c &other) const = 0; ///< Returns whether both states have the same number. - virtual BOOL operator==(const sStateIDIf_c &other) const = 0; ///< Overloaded equality operator, using ::isEqual. - virtual BOOL operator!=(const sStateIDIf_c &other) const = 0; ///< Overloaded inequality operator, using ::isEqual. + virtual BOOL operator==(const sStateIDIf_c &other) const = 0; ///< Overloaded equality operator, using ::isEqual. + virtual BOOL operator!=(const sStateIDIf_c &other) const = 0; ///< Overloaded inequality operator, using ::isEqual. - virtual bool isSameName(const char *name) const = 0; ///< Returns whether this state ID is called @p name. - virtual const char *name() const = 0; ///< Returns the name of this state ID. - virtual unsigned int number() const = 0; ///< Returns the number of this state ID. + virtual bool isSameName(const char *name) const = 0; ///< Returns whether this state ID is called @p name. + virtual const char *name() const = 0; ///< Returns the name of this state ID. + virtual unsigned int number() const = 0; ///< Returns the number of this state ID. }; /// @brief The interface for a state holder. @@ -38,9 +38,9 @@ class sStateIDIf_c { class sStateIf_c { public: virtual ~sStateIf_c(); - virtual const void initialize() = 0; ///< Initializes the state. - virtual const void execute() = 0; ///< Executes the state. - virtual const void finalize() = 0; ///< Prepares the state for termination. + virtual const void initialize() = 0; ///< Initializes the state. + virtual const void execute() = 0; ///< Executes the state. + virtual const void finalize() = 0; ///< Prepares the state for termination. }; /// @brief The interface for state factories. @@ -49,11 +49,12 @@ class sStateFctIf_c { public: virtual ~sStateFctIf_c(); virtual sStateIf_c *build(sStateIDIf_c const &id) = 0; ///< Returns a new state with a given state ID. - virtual void dispose(sStateIf_c *&id) = 0; ///< Clears out the pointer to a state. + virtual void dispose(sStateIf_c *&id) = 0; ///< Clears out the pointer to a state. }; /// @brief The interface for state ID checkers. -/// @details [This class is not really used, but it seems to be intended for testing if a state is "normal", most likely a debug leftover]. +/// @details [This class is not really used, but it seems to be intended for testing if a state is "normal", most likely +/// a debug leftover]. class sStateIDChkIf_c { public: virtual ~sStateIDChkIf_c(); @@ -65,15 +66,15 @@ class sStateIDChkIf_c { class sStateMgrIf_c { public: virtual ~sStateMgrIf_c(); - virtual void initializeState() = 0; ///< Initializes the current state. - virtual void executeState() = 0; ///< Executes the current state. - virtual void finalizeState() = 0; ///< Prepares the current state for termination. - virtual void changeState(const sStateIDIf_c &newStateID) = 0; ///< Transitions to a new state ID. - virtual void refreshState() = 0; ///< Marks the current state to be executed again. - virtual sStateIf_c *getState() const = 0; ///< Gets the state holder. - virtual const sStateIDIf_c *getNewStateID() const = 0; ///< Gets the next state ID. - virtual const sStateIDIf_c *getStateID() const = 0; ///< Gets the current state ID. - virtual const sStateIDIf_c *getOldStateID() const = 0; ///< Gets the previous state ID. + virtual void initializeState() = 0; ///< Initializes the current state. + virtual void executeState() = 0; ///< Executes the current state. + virtual void finalizeState() = 0; ///< Prepares the current state for termination. + virtual void changeState(const sStateIDIf_c &newStateID) = 0; ///< Transitions to a new state ID. + virtual void refreshState() = 0; ///< Marks the current state to be executed again. + virtual sStateIf_c *getState() const = 0; ///< Gets the state holder. + virtual const sStateIDIf_c *getNewStateID() const = 0; ///< Gets the next state ID. + virtual const sStateIDIf_c *getStateID() const = 0; ///< Gets the current state ID. + virtual const sStateIDIf_c *getOldStateID() const = 0; ///< Gets the previous state ID. }; /// @} diff --git a/include/s/s_StateMethod.hpp b/include/s/s_StateMethod.hpp index 4d7b630d..df70f827 100644 --- a/include/s/s_StateMethod.hpp +++ b/include/s/s_StateMethod.hpp @@ -1,7 +1,7 @@ #ifndef S_STATEMETHOD_H #define S_STATEMETHOD_H -#include +#include "s/s_StateInterfaces.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made @@ -21,34 +21,45 @@ class sStateMethod_c : public sStateMethodIf_c { sStateMethod_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState); virtual ~sStateMethod_c(); ///< Destroys the sStateMethod_c instance. - virtual void initializeStateMethod(); ///< @copydoc sStateMgrIf_c::initializeState - virtual void executeStateMethod(); ///< @copydoc sStateMgrIf_c::executeState - virtual void finalizeStateMethod(); ///< @copydoc sStateMgrIf_c::finalizeState - virtual void changeStateMethod(const sStateIDIf_c &newStateID); ///< @copydoc sStateMgrIf_c::changeState - virtual void refreshStateMethod() { mRefreshStateMethod = true; } ///< @copydoc sStateMgrIf_c::refreshState - virtual sStateIf_c *getState() const { return mpState; } ///< @copydoc sStateMgrIf_c::getState - virtual const sStateIDIf_c *getNewStateID() const { return mpNewStateID; } ///< @copydoc sStateMgrIf_c::getNewStateID - virtual const sStateIDIf_c *getStateID() const { return mpStateID; } ///< @copydoc sStateMgrIf_c::getStateID - virtual const sStateIDIf_c *getOldStateID() const { return mpOldStateID; } ///< @copydoc sStateMgrIf_c::getOldStateID - - virtual int initializeStateLocalMethod() = 0; ///< Performs the actual state initialization. - virtual void executeStateLocalMethod() = 0; ///< Performs the actual state execution. - virtual void finalizeStateLocalMethod() = 0; ///< Performs the actual state termination. - virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID) = 0; ///< Performs the actual state transition. + virtual void initializeStateMethod(); ///< @copydoc sStateMgrIf_c::initializeState + virtual void executeStateMethod(); ///< @copydoc sStateMgrIf_c::executeState + virtual void finalizeStateMethod(); ///< @copydoc sStateMgrIf_c::finalizeState + virtual void changeStateMethod(const sStateIDIf_c &newStateID); ///< @copydoc sStateMgrIf_c::changeState + virtual void refreshStateMethod() { + mRefreshStateMethod = true; + } ///< @copydoc sStateMgrIf_c::refreshState + virtual sStateIf_c *getState() const { + return mpState; + } ///< @copydoc sStateMgrIf_c::getState + virtual const sStateIDIf_c *getNewStateID() const { + return mpNewStateID; + } ///< @copydoc sStateMgrIf_c::getNewStateID + virtual const sStateIDIf_c *getStateID() const { + return mpStateID; + } ///< @copydoc sStateMgrIf_c::getStateID + virtual const sStateIDIf_c *getOldStateID() const { + return mpOldStateID; + } ///< @copydoc sStateMgrIf_c::getOldStateID + + virtual int initializeStateLocalMethod() = 0; ///< Performs the actual state initialization. + virtual void executeStateLocalMethod() = 0; ///< Performs the actual state execution. + virtual void finalizeStateLocalMethod() = 0; ///< Performs the actual state termination. + virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID) = 0; ///< Performs the actual state transition. protected: sStateIDChkIf_c &mpStateChk; ///< @unused The state checker to use. - sStateFctIf_c &mpStateFct; ///< The state factory which produces the state holder. + sStateFctIf_c &mpStateFct; ///< The state factory which produces the state holder. - bool mInitFinalizeLock; ///< A lock to ensure ::initializeStateMethod and ::finalizeStateMethod are not called recursively. - bool mExecutionLock; ///< A lock to ensure ::executeStateMethod is not called recursively. - bool mIsValid; ///< If the state holder contains a valid state ID. - bool mStateChanged; ///< If the current state has changed during execution. + bool mInitFinalizeLock; ///< A lock to ensure ::initializeStateMethod and ::finalizeStateMethod are not called + ///< recursively. + bool mExecutionLock; ///< A lock to ensure ::executeStateMethod is not called recursively. + bool mIsValid; ///< If the state holder contains a valid state ID. + bool mStateChanged; ///< If the current state has changed during execution. bool mRefreshStateMethod; ///< True, if after a state transition, the state should be executed again. const sStateIDIf_c *mpNewStateID; ///< The next state ID. const sStateIDIf_c *mpOldStateID; ///< The previous state ID. - const sStateIDIf_c *mpStateID; ///< The current state ID. + const sStateIDIf_c *mpStateID; ///< The current state ID. sStateIf_c *mpState; ///< The current state holder. }; diff --git a/include/s/s_StateMethodUsr_FI.hpp b/include/s/s_StateMethodUsr_FI.hpp index a18516df..5d3ae9d6 100644 --- a/include/s/s_StateMethodUsr_FI.hpp +++ b/include/s/s_StateMethodUsr_FI.hpp @@ -1,7 +1,7 @@ #ifndef S_STATEMETHODUSR_FI_H #define S_STATEMETHODUSR_FI_H -#include +#include "s/s_StateMethod.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made diff --git a/include/s/s_StateMgr.hpp b/include/s/s_StateMgr.hpp index 6c486927..388f72c6 100644 --- a/include/s/s_StateMgr.hpp +++ b/include/s/s_StateMgr.hpp @@ -1,14 +1,14 @@ #ifndef S_STATEMGR_H #define S_STATEMGR_H -#include +#include "s/s_StateInterfaces.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made /** * @brief An implementation of sStateMgrIf_c. - * + * * @tparam T The parent class for this state manager. * @tparam Method The state method handler to use. * @tparam Factory The state factory to use. @@ -18,25 +18,42 @@ template class Factory, class Check> class sStateMgr_c : sStateMgrIf_c { public: - sStateMgr_c(T &owner, const sStateIDIf_c &initialState) : - mFactory(owner), - mMethod(mCheck, mFactory, initialState) {} + sStateMgr_c(T &owner, const sStateIDIf_c &initialState) + : mFactory(owner), mMethod(mCheck, mFactory, initialState) {} - virtual void initializeState() { mMethod.initializeStateMethod(); } - virtual void executeState() { mMethod.executeStateMethod(); } - virtual void finalizeState() { mMethod.finalizeStateMethod(); } + virtual void initializeState() { + mMethod.initializeStateMethod(); + } + virtual void executeState() { + mMethod.executeStateMethod(); + } + virtual void finalizeState() { + mMethod.finalizeStateMethod(); + } - virtual void changeState(const sStateIDIf_c &newState) { mMethod.changeStateMethod(newState); } + virtual void changeState(const sStateIDIf_c &newState) { + mMethod.changeStateMethod(newState); + } - virtual void refreshState() { mMethod.refreshStateMethod(); } + virtual void refreshState() { + mMethod.refreshStateMethod(); + } - virtual sStateIf_c *getState() const { return mMethod.getState(); } - virtual const sStateIDIf_c *getNewStateID() const { return mMethod.getNewStateID(); } - virtual const sStateIDIf_c *getStateID() const { return mMethod.getStateID(); } - virtual const sStateIDIf_c *getOldStateID() const { return mMethod.getOldStateID(); } + virtual sStateIf_c *getState() const { + return mMethod.getState(); + } + virtual const sStateIDIf_c *getNewStateID() const { + return mMethod.getNewStateID(); + } + virtual const sStateIDIf_c *getStateID() const { + return mMethod.getStateID(); + } + virtual const sStateIDIf_c *getOldStateID() const { + return mMethod.getOldStateID(); + } // SS addition - bool isState(const sStateIDIf_c& other) const { + bool isState(const sStateIDIf_c &other) const { return *getStateID() == other; } diff --git a/include/sized_string.h b/include/sized_string.h index e5c63521..9d06409b 100644 --- a/include/sized_string.h +++ b/include/sized_string.h @@ -1,14 +1,16 @@ #ifndef SIZED_STRING_H #define SIZED_STRING_H -#include +#include "__va_arg.h" +#include "common.h" +#include "string.h" extern "C" bool strequals(const char *a, const char *b); /** * A statically sized string buffer used for resource * identification where strings are guaranteed to be short. - * + * * Note: We aren't aware of any other projects that use a similar * class and given that SS has no debugging info anywhere it's hard * to be certain about anything. @@ -59,7 +61,7 @@ struct SizedString { } } - bool operator==(const char* other) const { + bool operator==(const char *other) const { return strequals(mChars, other); } diff --git a/include/sound_mgrs/sound_audio_manager.h b/include/sound_mgrs/sound_audio_manager.h index b247d767..1bfe885c 100644 --- a/include/sound_mgrs/sound_audio_manager.h +++ b/include/sound_mgrs/sound_audio_manager.h @@ -1,8 +1,9 @@ #ifndef SOUND_AUDIO_MANAGER_H #define SOUND_AUDIO_MANAGER_H +#include "common.h" #include "egg/audio/eggAudioMgr.h" -#include + // Size: 0x6d0 class SndAudioMgr : public EGG::SimpleAudioMgr { diff --git a/include/toBeSorted/actor_event.h b/include/toBeSorted/actor_event.h index 801d5fe9..0272e9e7 100644 --- a/include/toBeSorted/actor_event.h +++ b/include/toBeSorted/actor_event.h @@ -1,9 +1,9 @@ #ifndef ACTOR_EVENT_H #define ACTOR_EVENT_H -#include -#include -#include +#include "common.h" +#include "d/a/d_a_base.h" +#include "toBeSorted/event.h" class ActorEventRelated { public: diff --git a/include/toBeSorted/actor_on_rail.h b/include/toBeSorted/actor_on_rail.h index a57d2753..91a78daa 100644 --- a/include/toBeSorted/actor_on_rail.h +++ b/include/toBeSorted/actor_on_rail.h @@ -1,7 +1,7 @@ #ifndef ACTOR_ON_RAIL_H #define ACTOR_ON_RAIL_H -#include +#include "common.h" class ActorOnRail { private: diff --git a/include/toBeSorted/arc_managers/current_stage_arc_manager.h b/include/toBeSorted/arc_managers/current_stage_arc_manager.h index 26194c8d..84e4cbe5 100644 --- a/include/toBeSorted/arc_managers/current_stage_arc_manager.h +++ b/include/toBeSorted/arc_managers/current_stage_arc_manager.h @@ -1,9 +1,9 @@ #ifndef CURRENT_STAGE_ARC_MANAGER_H #define CURRENT_STAGE_ARC_MANAGER_H -#include -#include -#include +#include "d/d_rawarchive.h" +#include "egg/core/eggHeap.h" +#include "sized_string.h" class CurrentStageArcManager { public: diff --git a/include/toBeSorted/arc_managers/layout_arc_manager.h b/include/toBeSorted/arc_managers/layout_arc_manager.h index fe84d959..65f7091c 100644 --- a/include/toBeSorted/arc_managers/layout_arc_manager.h +++ b/include/toBeSorted/arc_managers/layout_arc_manager.h @@ -1,9 +1,9 @@ #ifndef LAYOUT_ARC_MANAGER_H #define LAYOUT_ARC_MANAGER_H -#include -#include -#include +#include "d/d_rawarchive.h" +#include "egg/core/eggHeap.h" +#include "sized_string.h" class LayoutArcManager { public: diff --git a/include/toBeSorted/arc_managers/oarc_manager.h b/include/toBeSorted/arc_managers/oarc_manager.h index bc938d0e..aee63e1a 100644 --- a/include/toBeSorted/arc_managers/oarc_manager.h +++ b/include/toBeSorted/arc_managers/oarc_manager.h @@ -1,9 +1,9 @@ #ifndef OARC_MANAGER_H #define OARC_MANAGER_H -#include -#include -#include +#include "d/d_rawarchive.h" +#include "egg/core/eggHeap.h" +#include "sized_string.h" class OarcManager { public: diff --git a/include/toBeSorted/area_math.h b/include/toBeSorted/area_math.h index 08b11c35..b30a62fa 100644 --- a/include/toBeSorted/area_math.h +++ b/include/toBeSorted/area_math.h @@ -1,9 +1,9 @@ #ifndef D_AREA_MATH_H #define D_AREA_MATH_H -#include -#include -#include +#include "m/m_angle.h" +#include "m/m_mtx.h" +#include "m/m_vec.h" void matrixCreateFromPosRotYScale(mMtx_c &, const mVec3_c &, const mAng, const mVec3_c &, mMtx_c *, f32); bool checkIfVec3fInMatrix(const mMtx_c &, const mVec3_c &); diff --git a/include/toBeSorted/area_utils.h b/include/toBeSorted/area_utils.h index 04b73c0c..d2483b9a 100644 --- a/include/toBeSorted/area_utils.h +++ b/include/toBeSorted/area_utils.h @@ -1,10 +1,10 @@ #ifndef AREA_UTILS_H #define AREA_UTILS_H -#include +#include "m/m_vec.h" -/* 800a9b00 */ bool checkPosInArea(void **AREA, const mVec3_c& pos); +/* 800a9b00 */ bool checkPosInArea(void **AREA, const mVec3_c &pos); /* 800a9bd0 */ void *getAreaForIndexInRoom(s32 areaIndex, s32 roomId); -/* 800a9c50 */ bool *checkPosInArea(s32 areaIndex, s32 roomId, const mVec3_c& pos, void **AREA); +/* 800a9c50 */ bool *checkPosInArea(s32 areaIndex, s32 roomId, const mVec3_c &pos, void **AREA); #endif diff --git a/include/toBeSorted/attention.h b/include/toBeSorted/attention.h index 029194d1..6add6305 100644 --- a/include/toBeSorted/attention.h +++ b/include/toBeSorted/attention.h @@ -1,14 +1,15 @@ #ifndef TOBESORTED_ATTENTION_H #define TOBESORTED_ATTENTION_H -#include -#include -#include -#include -#include -#include -#include -#include +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmchr.h" +#include "m/m3d/m_anmmatclr.h" +#include "m/m3d/m_anmtexpat.h" +#include "m/m3d/m_smdl.h" +#include "m/m_allocator.h" +#include "toBeSorted/effects_struct.h" + static const u32 OFF = 'off '; static const u32 NONE = 'none'; @@ -89,11 +90,12 @@ class AttentionPool { s32 mNumUsedRefs; int fn_80096190(dAcObjBase_c *actor, u8 unk, InteractionType interactionType); - bool insertTarget(dAcObjBase_c *actor, u32 unk1, mVec3_c *pos, InteractionType interactionType, u8 field_0x03, - f32 field_0x04); + bool insertTarget( + dAcObjBase_c *actor, u32 unk1, mVec3_c *pos, InteractionType interactionType, u8 field_0x03, f32 field_0x04 + ); dAcObjBase_c *getActor(s32 i) { - return i < mNumUsedRefs && mInfos[i].mActorIdx != -1 ? mRefs[mInfos[i].mActorIdx].get() : nullptr; + return i < mNumUsedRefs && mInfos[i].mActorIdx != 0xFF ? mRefs[mInfos[i].mActorIdx].get() : nullptr; } void clear() { @@ -188,26 +190,30 @@ class AttentionManager { void addTalkTarget_unused(dAcObjBase_c &actor); - void addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, - f32 field_0x24); + void + addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, f32 field_0x24); void addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x20, f32 field_0x24); void addCatchTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg); - void addCatchLikeTarget(dAcObjBase_c &actor, InteractionType interactionType, u32 flags, f32 field_0x14, - f32 field_0x24_neg, f32 field_0x20_neg); + void addCatchLikeTarget( + dAcObjBase_c &actor, InteractionType interactionType, u32 flags, f32 field_0x14, f32 field_0x24_neg, + f32 field_0x20_neg + ); void addUnk3Target(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg); - void addUnk3Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, - f32 field_0x20_neg); - void addUnk3Target(dAcObjBase_c &actor, u32 arg2, mVec3_c *arg3, u32 flags, f32 arg5, f32 field_0x14, - f32 field_0x24_neg, f32 field_0x20_neg); + void + addUnk3Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg); + void addUnk3Target( + dAcObjBase_c &actor, u32 arg2, mVec3_c *arg3, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, + f32 field_0x20_neg + ); void addNpcTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, f32 field_0x24); - void addUnk7Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, - f32 field_0x20_neg); + void + addUnk7Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg); void addReadTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, f32 field_0x24); void addReadTarget2(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x20, f32 field_0x24); diff --git a/include/toBeSorted/bitwise_flag_helper.h b/include/toBeSorted/bitwise_flag_helper.h index 67be717f..c170d83b 100644 --- a/include/toBeSorted/bitwise_flag_helper.h +++ b/include/toBeSorted/bitwise_flag_helper.h @@ -1,7 +1,7 @@ #ifndef BITWISE_FLAG_HELPERS_H #define BITWISE_FLAG_HELPERS_H -#include +#include "common.h" class BitwiseFlagHelper { public: diff --git a/include/toBeSorted/counters/counter.h b/include/toBeSorted/counters/counter.h index 0741b0d3..5d0cc029 100644 --- a/include/toBeSorted/counters/counter.h +++ b/include/toBeSorted/counters/counter.h @@ -1,12 +1,12 @@ #ifndef COUNTER_H #define COUNTER_H -#include +#include "common.h" class Counter { public: - Counter(u16 id): counterId(id) {} - virtual ~Counter() {}; + Counter(u16 id) : counterId(id) {} + virtual ~Counter(){}; virtual s32 checkedAdd(s32 num); virtual u16 getCommittedValue(); virtual u16 getMax() = 0; diff --git a/include/toBeSorted/dowsing_target.h b/include/toBeSorted/dowsing_target.h index 65d5cd19..c9d40026 100644 --- a/include/toBeSorted/dowsing_target.h +++ b/include/toBeSorted/dowsing_target.h @@ -1,9 +1,9 @@ #ifndef DOWSING_TARGET_H #define DOWSING_TARGET_H -#include -#include -#include +#include "d/a/d_a_base.h" +#include "f/f_list_nd.h" +#include "m/m_vec.h" class DowsingTarget { public: diff --git a/include/toBeSorted/effects_struct.h b/include/toBeSorted/effects_struct.h index 49773237..55be29fd 100644 --- a/include/toBeSorted/effects_struct.h +++ b/include/toBeSorted/effects_struct.h @@ -1,9 +1,8 @@ #ifndef EFFECTS_STRUCT_H #define EFFECTS_STRUCT_H -#include -#include - +#include "common.h" +#include "d/a/d_a_base.h" class EffectsStruct { private: diff --git a/include/toBeSorted/event.h b/include/toBeSorted/event.h index 932b650f..01a6af2e 100644 --- a/include/toBeSorted/event.h +++ b/include/toBeSorted/event.h @@ -1,7 +1,7 @@ #ifndef EVENT_H #define EVENT_H -#include +#include "common.h" class Event { public: diff --git a/include/toBeSorted/event_manager.h b/include/toBeSorted/event_manager.h index 6f750068..43dbcabb 100644 --- a/include/toBeSorted/event_manager.h +++ b/include/toBeSorted/event_manager.h @@ -2,7 +2,7 @@ #ifndef EVENT_MANAGER_H #define EVENT_MANAGER_H -#include +#include "toBeSorted/event.h" class dAcBase_c; diff --git a/include/toBeSorted/file_manager.h b/include/toBeSorted/file_manager.h index ee134f89..185f2f23 100644 --- a/include/toBeSorted/file_manager.h +++ b/include/toBeSorted/file_manager.h @@ -1,11 +1,14 @@ +#include "common.h" #include "egg/core/eggHeap.h" #include "m/m_angle.h" #include "m/m_vec.h" #include "toBeSorted/save_file.h" -#include -enum ITEM_ID {}; -enum SAVE_ITEM_ID {}; + +enum ITEM_ID { +}; +enum SAVE_ITEM_ID { +}; class SkipData { public: diff --git a/include/toBeSorted/flag_space.h b/include/toBeSorted/flag_space.h index 068c813e..a59ae3f3 100644 --- a/include/toBeSorted/flag_space.h +++ b/include/toBeSorted/flag_space.h @@ -1,7 +1,7 @@ #ifndef FLAG_SPACE_H #define FLAG_SPACE_H -#include +#include "common.h" struct BaseFlagSpace { u16 *mpFlags; diff --git a/include/toBeSorted/item_story_flag_manager.h b/include/toBeSorted/item_story_flag_manager.h index b2eaf6f8..4ed5f275 100644 --- a/include/toBeSorted/item_story_flag_manager.h +++ b/include/toBeSorted/item_story_flag_manager.h @@ -1,8 +1,8 @@ #ifndef ITEM_STORY_FLAG_MANAGER_H #define ITEM_STORY_FLAG_MANAGER_H -#include -#include +#include "toBeSorted/flag_space.h" +#include "toBeSorted/unk_flag_stuff.h" // TODO These classes have an interesting relation and there are like 5 vtables, so // the stuff in this header should not be relied upon for actually implementing these, diff --git a/include/toBeSorted/misc_flag_managers.h b/include/toBeSorted/misc_flag_managers.h index 0904c13b..6a871cfa 100644 --- a/include/toBeSorted/misc_flag_managers.h +++ b/include/toBeSorted/misc_flag_managers.h @@ -1,9 +1,9 @@ #ifndef MISC_FLAG_MANAGERS_H #define MISC_FLAG_MANAGERS_H -#include -#include -#include +#include "common.h" +#include "toBeSorted/bitwise_flag_helper.h" +#include "toBeSorted/flag_space.h" class CommittableFlagManager { public: diff --git a/include/toBeSorted/room_manager.h b/include/toBeSorted/room_manager.h index 5e17f25c..04f5d491 100644 --- a/include/toBeSorted/room_manager.h +++ b/include/toBeSorted/room_manager.h @@ -1,10 +1,11 @@ #ifndef ROOM_MANAGER_H #define ROOM_MANAGER_H +#include "common.h" #include "d/d_base.h" #include "m/m_allocator.h" #include "m/types_m.h" -#include + #define MAX_ROOM_NUMBER 64 diff --git a/include/toBeSorted/save_file.h b/include/toBeSorted/save_file.h index 22c57de2..54fff80d 100644 --- a/include/toBeSorted/save_file.h +++ b/include/toBeSorted/save_file.h @@ -1,8 +1,9 @@ #ifndef SAVE_FILE_H #define SAVE_FILE_H +#include "common.h" #include "m/m_vec.h" -#include + // Ghidra: SaveFile // Size: 0x53c0 diff --git a/include/toBeSorted/sceneflag_manager.h b/include/toBeSorted/sceneflag_manager.h index 9eb1161d..047581eb 100644 --- a/include/toBeSorted/sceneflag_manager.h +++ b/include/toBeSorted/sceneflag_manager.h @@ -1,9 +1,10 @@ #ifndef SCENEFLAG_MANAGER_H #define SCENEFLAG_MANAGER_H -#include -#include -#include +#include "common.h" +#include "toBeSorted/bitwise_flag_helper.h" +#include "toBeSorted/flag_space.h" + class SceneflagManager { public: @@ -59,7 +60,6 @@ class SceneflagManager { void unsetTempOrSceneflag(u16 flag); s32 doCommit(); - bool checkBoolFlag(u16 roomid, u16 flag) { return checkFlag(roomid, flag); } diff --git a/include/toBeSorted/scgame.h b/include/toBeSorted/scgame.h index 6572366c..40f723d1 100644 --- a/include/toBeSorted/scgame.h +++ b/include/toBeSorted/scgame.h @@ -1,7 +1,7 @@ #ifndef SCGAME_H #define SCGAME_H -#include +#include "common.h" struct SpawnInfo { /* 0x00 */ char stageName[32]; // Probably SizedString<32> diff --git a/include/toBeSorted/special_item_drop_mgr.h b/include/toBeSorted/special_item_drop_mgr.h index 3fc1c7d8..492f0725 100644 --- a/include/toBeSorted/special_item_drop_mgr.h +++ b/include/toBeSorted/special_item_drop_mgr.h @@ -1,7 +1,8 @@ #ifndef SPECIAL_ITEM_DROP_MGR_H #define SPECIAL_ITEM_DROP_MGR_H -#include +#include "common.h" +#include "m/m_vec.h" class SpecialItemDropMgr { public: @@ -11,8 +12,11 @@ class SpecialItemDropMgr { static int fn_800C7BB0(SpecialItemDropMgr *mgr, int specialItemId); static short fn_800C7D00(SpecialItemDropMgr *mgr, int specialItemId); static short fn_800C7D20(SpecialItemDropMgr *mgr, int specialItemId); - static int giveSpecialDropItem(SpecialItemDropMgr *mgr, int specialItemId, int roomid, mVec3_c *pos, int subtype, s16 *rot, s32 unused); - static bool spawnSpecialDropItem(SpecialItemDropMgr *mgr, int specialItemId, int roomid, mVec3_c *pos, int subtype, s16 *rot); + static int giveSpecialDropItem( + SpecialItemDropMgr *mgr, int specialItemId, int roomid, mVec3_c *pos, int subtype, s16 *rot, s32 unused + ); + static bool + spawnSpecialDropItem(SpecialItemDropMgr *mgr, int specialItemId, int roomid, mVec3_c *pos, int subtype, s16 *rot); static void fn_800C81D0(s16, s16, s16); ~SpecialItemDropMgr(); }; diff --git a/include/toBeSorted/stage_render_stuff.h b/include/toBeSorted/stage_render_stuff.h index 926acb5a..602950c0 100644 --- a/include/toBeSorted/stage_render_stuff.h +++ b/include/toBeSorted/stage_render_stuff.h @@ -1,19 +1,21 @@ #ifndef D_STAGE_RENDER_STUFF_H #define D_STAGE_RENDER_STUFF_H -#include -#include -#include +#include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_scnleaf.h" +#include "nw4r/g3d/g3d_scnobj.h" + class dScnCallback_c : public nw4r::g3d::IScnObjCallback { public: - dScnCallback_c(dAcObjBase_c *arg): mpActor(arg) {} - /* vt 0x10 */ virtual void ExecCallback_CALC_MAT(nw4r::g3d::ScnObj::Timing, nw4r::g3d::ScnObj *, u32, void *) override; + dScnCallback_c(dAcObjBase_c *arg) : mpActor(arg) {} + /* vt 0x10 */ virtual void + ExecCallback_CALC_MAT(nw4r::g3d::ScnObj::Timing, nw4r::g3d::ScnObj *, u32, void *) override; /* 0x04 */ dAcObjBase_c *mpActor; /* 0x08 */ UNKWORD field_0x08; - /* 8001a230 */ void attach(m3d::scnLeaf_c&); + /* 8001a230 */ void attach(m3d::scnLeaf_c &); }; #endif diff --git a/include/toBeSorted/time_area_mgr.h b/include/toBeSorted/time_area_mgr.h index d8c0f679..38418cbb 100644 --- a/include/toBeSorted/time_area_mgr.h +++ b/include/toBeSorted/time_area_mgr.h @@ -1,10 +1,9 @@ #ifndef D_TIME_AREA_MGR_H #define D_TIME_AREA_MGR_H -#include -#include -#include - +#include "m/m3d/m_proc.h" +#include "m/m_allocator.h" +#include "m/m_vec.h" class dTimeAreaMgrProcA_c : public m3d::proc_c { public: @@ -31,7 +30,7 @@ class dTimeAreaMgrProcB_c : public m3d::proc_c { }; struct TimeAreaStruct { - TimeAreaStruct(f32 arg): field_0x00(arg), field_0x08(0) {} + TimeAreaStruct(f32 arg) : field_0x00(arg), field_0x08(0) {} /* 0x00 */ f32 field_0x00; /* 0x04 */ UNKWORD field_0x04; /* 0x08 */ u8 field_0x08; diff --git a/include/toBeSorted/tlist.h b/include/toBeSorted/tlist.h index e1146ced..bcb6b1ed 100644 --- a/include/toBeSorted/tlist.h +++ b/include/toBeSorted/tlist.h @@ -1,6 +1,8 @@ #ifndef T_LIST_H #define T_LIST_H +#include "common.h" + // A templated list, similar to nw4r::ut::LinkList. // Notable differences are: // * No dtor diff --git a/include/toBeSorted/unk_flag_stuff.h b/include/toBeSorted/unk_flag_stuff.h index 50a4d5ee..04d9a024 100644 --- a/include/toBeSorted/unk_flag_stuff.h +++ b/include/toBeSorted/unk_flag_stuff.h @@ -1,7 +1,7 @@ #ifndef UNK_FLAG_STUFF_H #define UNK_FLAG_STUFF_H -#include +#include "common.h" struct UnkFlagDefinition { u8 mIndex; diff --git a/src/DynamicLink.cpp b/src/DynamicLink.cpp index aacc4cc2..a845ba36 100644 --- a/src/DynamicLink.cpp +++ b/src/DynamicLink.cpp @@ -1,4 +1,4 @@ -#include +#include "DynamicLink.h" DynamicModuleControlBase *DynamicModuleControlBase::mFirst; DynamicModuleControlBase *DynamicModuleControlBase::mLast; @@ -311,10 +311,10 @@ int DynamicModuleControl::getModuleSize() const { const char *DynamicModuleControl::getModuleTypeString() const { static const char *REL_LOAD_TYPES[4] = { - "????", - "MEM", - "ARAM", - "DVD", + "????", + "MEM", + "ARAM", + "DVD", }; return REL_LOAD_TYPES[mResourceType & 3]; } diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm.h b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm.h new file mode 100644 index 00000000..f4b99f4b --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/algorithm.h @@ -0,0 +1,65 @@ +#ifndef MSL_ALGORITHM_H_ +#define MSL_ALGORITHM_H_ + +namespace std { +template +ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last, const T &val); + +template +ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last, const T &val); + +template +InputIt find_if(InputIt first, InputIt last, UnaryPredicate p); + +/* +template +struct __fill_n { + OutputIt fill_n(OutputIt first, Size count, const unsigned long& value); +}; + +template<> +unsigned long* __fill_n::fill_n(unsigned long* first, long count, const unsigned long& value) { + for (; count > 0; count--) { + *first++ = value; + } + return first; +} + +template +OutputIt fill_n(OutputIt first, Size count, const T& value) { + return __fill_n::fill_n(first, count, value); +} + + +template +void __fill(ForwardIt first, ForwardIt last, const T& value, std::random_access_iterator_tag param_3) { + fill_n(first, last - first, value); +} +*/ + +template +void fill(ForwardIt first, ForwardIt last, const T &value) { + for (; first != last; ++first) { + *first = value; + } +} + +template +inline OutputIt copy(InputIt first, InputIt last, OutputIt d_first) { + for (; first < last; ++first, ++d_first) { + *d_first = *first; + } + return d_first; +} + +template +inline BidirIt2 copy_backward(BidirIt1 first, BidirIt1 last, BidirIt2 d_last) { + while (first != last) { + *(--d_last) = *(--last); + } + return d_last; +} + +} // namespace std + +#endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset.h b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset.h new file mode 100644 index 00000000..5dad5735 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/bitset.h @@ -0,0 +1,89 @@ +#ifndef MSL_BITSET_H_ +#define MSL_BITSET_H_ + +#include "algorithm.h" +#include "stdio.h" +#include "stdlib.h" + + +namespace std { +// TODO: where does this go? +inline void __msl_error(const char *param_0) { + fprintf(stderr, param_0); + abort(); +} + +template +class __bitset_base { +public: + __bitset_base(); + + bool test(size_t pos) const; + bool any() const; + void set(size_t pos, bool val); + void reset(size_t pos); + +private: + size_t data[N]; +}; + +template +__bitset_base::__bitset_base() { + std::fill(data, data + N, 0); +} + +template +bool __bitset_base::test(size_t pos) const { + size_t i = pos / (sizeof(size_t) * 8); + size_t mask = 1 << (pos % (sizeof(size_t) * 8)); + return data[i] & mask; +} + +template +void __bitset_base::set(size_t pos, bool val) { + size_t i = pos / (sizeof(size_t) * 8); + size_t mask = 1 << (pos % (sizeof(size_t) * 8)); + if (val) { + data[i] |= mask; + } else { + data[i] &= ~mask; + } +} + +template +void __bitset_base::reset(size_t pos) { + size_t i = pos / (sizeof(size_t) * 8); + size_t mask = 1 << (pos % (sizeof(size_t) * 8)); + data[i] &= ~mask; +} + +template +class bitset : private __bitset_base<(N - 1) / (sizeof(size_t) * 8) + 1> { +public: + typedef __bitset_base<(N - 1) / (sizeof(size_t) * 8) + 1> base; + + bitset(){}; + + void set(size_t pos, bool val) { + if (pos >= N) { + __msl_error("index out of range of bitset::set"); + } + base::set(pos, val); + } + void reset(size_t pos) { + if (pos >= N) { + __msl_error("index out of range of bitset::reset"); + } + base::reset(pos); + } + bool test(size_t pos) const { + if (pos >= N) { + __msl_error("index out of range of bitset::test"); + } + return base::test(pos); + } + bool any() const; +}; +} // namespace std + +#endif diff --git a/include/MSL_C/functional.h b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional.h similarity index 68% rename from include/MSL_C/functional.h rename to src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional.h index d7373a7e..405e56f8 100644 --- a/include/MSL_C/functional.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/functional.h @@ -2,8 +2,7 @@ #define MSL_FUNCTIONAL_H_ namespace std { -template -struct less {}; +template struct less {}; } // namespace std -#endif +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator.h b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator.h new file mode 100644 index 00000000..f7d86e37 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/iterator.h @@ -0,0 +1,21 @@ +#ifndef MSL_ITERATOR_H_ +#define MSL_ITERATOR_H_ + +namespace std { +template< class InputIt, class Distance > +inline void advance( InputIt& it, Distance n) { + while (n > 0) { + --n; + ++it; + } +} + +// This needs to be defined with gcc concepts or something similar. Workaround. +template< class InputIt, class Distance > +inline void advance_pointer( InputIt& it, Distance n) { + it += n; +} + +} + +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/msl_memory.h b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/msl_memory.h new file mode 100644 index 00000000..9a29cd90 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/msl_memory.h @@ -0,0 +1,24 @@ +#ifndef MSL_MEMORY_H_ +#define MSL_MEMORY_H_ + +namespace std { + +template +inline ForwardIt uninitialized_fill_n(ForwardIt first, Size count, const T& value) { + for (; count > 0; ++first, (void) --count) { + *first = value; + } + return first; +} + +template +inline NoThrowForwardIt uninitialized_copy(InputIt first, InputIt last, NoThrowForwardIt d_first) { + for (; first != last; ++first, ++d_first) { + *d_first = *first; + } + return d_first; +} + +} + +#endif \ No newline at end of file diff --git a/include/MSL_C/utility.h b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility.h similarity index 96% rename from include/MSL_C/utility.h rename to src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility.h index 3a105316..02150279 100644 --- a/include/MSL_C/utility.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C++/MSL_Common/Include/utility.h @@ -14,4 +14,4 @@ struct pair { }; } // namespace std -#endif +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h new file mode 100644 index 00000000..2ea0a31a --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/FILE_POS.h @@ -0,0 +1,18 @@ +#ifndef _MSL_COMMON_FILE_POS_H +#define _MSL_COMMON_FILE_POS_H + +#include "ansi_files.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int fseek(FILE* file, unsigned long offset, int mode); +int _fseek(FILE* file, fpos_t offset, int mode); +long ftell(FILE* file); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_FILE_POS_H */ \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/abort_exit.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h similarity index 56% rename from include/MSL_C/MSL_Common/Src/abort_exit.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h index 80eea639..7c750be7 100644 --- a/include/MSL_C/MSL_Common/Src/abort_exit.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/abort_exit.h @@ -1,5 +1,5 @@ -#ifndef MSL_COMMON_SRC_ABORT_EXIT_H -#define MSL_COMMON_SRC_ABORT_EXIT_H +#ifndef _MSL_COMMON_ABORT_EXIT_H +#define _MSL_COMMON_ABORT_EXIT_H #ifdef __cplusplus extern "C" { @@ -14,4 +14,4 @@ extern void (*__stdio_exit)(void); }; #endif -#endif /* MSL_COMMON_SRC_ABORT_EXIT_H */ +#endif /* _MSL_COMMON_ABORT_EXIT_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h new file mode 100644 index 00000000..7a6673a3 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/alloc.h @@ -0,0 +1,15 @@ +#ifndef _MSL_COMMON_ALLOC_H +#define _MSL_COMMON_ALLOC_H + + +#ifdef __cplusplus +extern "C" { +#endif + +void free(void* ptr); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_ALLOC_H */ \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/ansi_files.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h similarity index 69% rename from include/MSL_C/MSL_Common/Src/ansi_files.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h index 8e8d7673..6e399f53 100644 --- a/include/MSL_C/MSL_Common/Src/ansi_files.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_files.h @@ -1,7 +1,7 @@ -#ifndef MSL_COMMON_SRC_ANSI_FILES_H -#define MSL_COMMON_SRC_ANSI_FILES_H +#ifndef _MSL_COMMON_ANSI_FILES_H +#define _MSL_COMMON_ANSI_FILES_H -#include "MSL_C/MSL_Common/Src/stddef.h" +#include "stddef.h" #ifdef __cplusplus extern "C" { @@ -17,10 +17,10 @@ typedef unsigned long fpos_t; typedef unsigned short wchar_t; #endif -#define set_error(file) \ - do { \ - (file)->file_state.error = 1; \ - (file)->buffer_length = 0; \ +#define set_error(file) \ + do { \ + (file)->file_state.error = 1; \ + (file)->buffer_length = 0; \ } while (0) enum __file_kinds { @@ -73,8 +73,9 @@ typedef struct _file_states { } file_states; typedef void (*__idle_proc)(void); -typedef int (*__pos_proc)(__file_handle file, fpos_t *position, int mode, __idle_proc idle_proc); -typedef int (*__io_proc)(__file_handle file, unsigned char *buff, size_t *count, __idle_proc idle_proc); +typedef int (*__pos_proc)(__file_handle file, fpos_t* position, int mode, __idle_proc idle_proc); +typedef int (*__io_proc)(__file_handle file, unsigned char* buff, size_t* count, + __idle_proc idle_proc); typedef int (*__close_proc)(__file_handle file); typedef struct _FILE { @@ -87,9 +88,9 @@ typedef struct _FILE { /* 0x0F */ char ungetc_buffer[2]; /* 0x12 */ wchar_t ungetc_wide_buffer[2]; /* 0x18 */ unsigned long position; - /* 0x1C */ unsigned char *buffer; + /* 0x1C */ unsigned char* buffer; /* 0x20 */ unsigned long buffer_size; - /* 0x24 */ unsigned char *buffer_ptr; + /* 0x24 */ unsigned char* buffer_ptr; /* 0x28 */ unsigned long buffer_length; /* 0x2C */ unsigned long buffer_alignment; /* 0x30 */ unsigned long save_buffer_length; @@ -99,7 +100,7 @@ typedef struct _FILE { /* 0x40 */ __io_proc write_fn; /* 0x44 */ __close_proc close_fn; /* 0x48 */ __idle_proc idle_fn; - /* 0x4C */ struct _FILE *next_file; + /* 0x4C */ struct _FILE* next_file; } FILE; typedef struct _files { @@ -115,8 +116,8 @@ typedef struct _files { extern files __files; extern int __close_console(__file_handle file); -extern int __write_console(__file_handle file, unsigned char *buf, size_t *count, __idle_proc idle_fn); -extern int __read_console(__file_handle file, unsigned char *buf, size_t *count, __idle_proc idle_fn); +extern int __write_console(__file_handle file, unsigned char* buf, size_t* count, __idle_proc idle_fn); +extern int __read_console(__file_handle file, unsigned char* buf, size_t* count, __idle_proc idle_fn); unsigned int __flush_all(void); void __close_all(void); @@ -125,4 +126,4 @@ void __close_all(void); }; #endif -#endif /* MSL_COMMON_SRC_ANSI_FILES_H */ +#endif /* _MSL_COMMON_ANSI_FILES_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h new file mode 100644 index 00000000..1c049229 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ansi_fp.h @@ -0,0 +1,35 @@ +#ifndef _MSL_COMMON_ANSI_FP_H +#define _MSL_COMMON_ANSI_FP_H + + +#define SIGDIGLEN 36 + +typedef struct decimal { + char sign; + char unk1; + short exp; + struct { + unsigned char length; + unsigned char text[36]; + unsigned char unk41; + } sig; +} decimal; + +typedef struct decform { + char style; + char unk1; + 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 \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h new file mode 100644 index 00000000..ce893446 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/arith.h @@ -0,0 +1,19 @@ +#ifndef _MSL_COMMON_ARITH_H +#define _MSL_COMMON_ARITH_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + int quot; /* quotient */ + int rem; /* remainder */ +} div_t; + +div_t div(int numerator, int denominator); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_ARITH_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h new file mode 100644 index 00000000..a764ac29 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/buffer_io.h @@ -0,0 +1,11 @@ +#ifndef _MSL_COMMON_BUFFER_IO_H +#define _MSL_COMMON_BUFFER_IO_H + +#include "ansi_files.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 */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h new file mode 100644 index 00000000..93b6383f --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/char_io.h @@ -0,0 +1,17 @@ +#ifndef _MSL_COMMON_CHAR_IO_H +#define _MSL_COMMON_CHAR_IO_H + +#include "ansi_files.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int fputs(const char *str, FILE *stream); +int __put_char(int c, FILE *stream); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_CHAR_IO_H */ diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h new file mode 100644 index 00000000..38e4772b --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h @@ -0,0 +1,23 @@ +#ifndef STD_CMATH_H_ +#define STD_CMATH_H_ + + +namespace std { +/* float fabs(float num) { + return ::fabsf(num); +} */ + +inline float fabsf(float num) { + return ::fabsf(num); +} + +inline float sqrt(float x) { + return ::sqrtf(x); +} + +inline float abs(float x) { + return ::fabsf(x); +} +} // namespace std + +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h new file mode 100644 index 00000000..a36c75d6 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/critical_regions.h @@ -0,0 +1,30 @@ +#ifndef _MSL_COMMON_CRITICAL_REGIONS_H +#define _MSL_COMMON_CRITICAL_REGIONS_H + +#ifdef __cplusplus +extern "C" { +#endif + +enum critical_regions { + atexit_funcs_access, + malloc_pool_access, + stdin_access, + stdout_access, + stderr_access, + files_access, + console_status_access, + signal_funcs_access, + thread_access, + num_critical_regions +}; + +void __init_critical_regions(void); +void __kill_critical_regions(void); +void __begin_critical_region(int region); +void __end_critical_region(int region); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring.h new file mode 100644 index 00000000..c8497d85 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring.h @@ -0,0 +1,16 @@ +#ifndef STD_CMATH_H_ +#define STD_CMATH_H_ + +#include "string.h" + +namespace std { +inline size_t strlen(const char* str) { + return ::strlen(str); +} + +inline char* strcpy(char* dest, const char* src) { + return ::strcpy(dest, src); +} +} // namespace std + +#endif \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/ctype.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ctype.h similarity index 50% rename from include/MSL_C/MSL_Common/Src/ctype.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ctype.h index 86290cf2..867dc71d 100644 --- a/include/MSL_C/MSL_Common/Src/ctype.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/ctype.h @@ -1,5 +1,5 @@ -#ifndef MSL_COMMON_SRC_CTYPE_H -#define MSL_COMMON_SRC_CTYPE_H +#ifndef _MSL_COMMON_CTYPE_H +#define _MSL_COMMON_CTYPE_H #ifdef __cplusplus extern "C" { @@ -30,8 +30,17 @@ extern unsigned char __upper_map[]; int tolower(int); +inline int isalpha(int c) { return (int)(__ctype_map[(unsigned char)c] & __letter); } +inline int isdigit(int c) { return (int)(__ctype_map[(unsigned char)c] & __digit); } +inline int isspace(int c) { return (int)(__ctype_map[(unsigned char)c] & __whitespace); } +inline int isupper(int c) { return (int)(__ctype_map[(unsigned char)c] & __upper_case); } +inline int isxdigit(int c) { return (int)(__ctype_map[(unsigned char)c] & __hex_digit); } +// added underscore to avoid naming conflicts +inline int _tolower(int c) { return (c == -1 ? -1 : (int)__lower_map[(unsigned char)c]); } +inline int toupper(int c) { return (c == -1 ? -1 : (int)__upper_map[(unsigned char)c]); } + #ifdef __cplusplus } #endif -#endif /* MSL_COMMON_SRC_CTYPE_H */ +#endif /* _MSL_COMMON_CTYPE_H */ \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/direct_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h similarity index 59% rename from include/MSL_C/MSL_Common/Src/direct_io.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h index a15d4ee9..2f293cba 100644 --- a/include/MSL_C/MSL_Common/Src/direct_io.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/direct_io.h @@ -1,7 +1,7 @@ -#ifndef MSL_COMMON_SRC_DIRECT_IO_H -#define MSL_COMMON_SRC_DIRECT_IO_H +#ifndef _MSL_COMMON_DIRECT_IO_H +#define _MSL_COMMON_DIRECT_IO_H -#include "MSL_C/MSL_Common/Src/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_SRC_DIRECT_IO_H */ +#endif /* _MSL_COMMON_DIRECT_IO_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h new file mode 100644 index 00000000..1826b92e --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/errno.h @@ -0,0 +1,20 @@ +#ifndef MSL_COMMON_SRC_ERRNO_H +#define MSL_COMMON_SRC_ERRNO_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define ENOERR 0 +#define EDOM 33 +#define ERANGE 34 +#define EFPOS 40 +#define ESIGPARM 36 + +extern int errno; + +#ifdef __cplusplus +} +#endif + +#endif /* MSL_COMMON_SRC_ERRNO_H */ diff --git a/include/MSL_C/MSL_Common/Src/extras.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h similarity index 63% rename from include/MSL_C/MSL_Common/Src/extras.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h index 2b89fc3f..e6417f07 100644 --- a/include/MSL_C/MSL_Common/Src/extras.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/extras.h @@ -1,5 +1,5 @@ -#ifndef MSL_COMMON_SRC_EXTRAS_H -#define MSL_COMMON_SRC_EXTRAS_H +#ifndef _MSL_COMMON_EXTRAS_H +#define _MSL_COMMON_EXTRAS_H #ifdef __cplusplus extern "C" { @@ -12,4 +12,4 @@ int stricmp(const char* str1, const char* str2); } #endif -#endif /* MSL_COMMON_SRC_EXTRAS_H */ +#endif /* _MSL_COMMON_EXTRAS_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h new file mode 100644 index 00000000..a71bc423 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/file_io.h @@ -0,0 +1,18 @@ +#ifndef _MSL_COMMON_FILE_IO_H +#define _MSL_COMMON_FILE_IO_H + +#include "ansi_files.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int __msl_strnicmp(const char* str1, const char* str2, int n); +int fflush(FILE* file); +int fclose(FILE* file); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_FILE_IO_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h new file mode 100644 index 00000000..399bcf35 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/float.h @@ -0,0 +1,91 @@ +#ifndef _MSL_COMMON_FLOAT_H +#define _MSL_COMMON_FLOAT_H + +#include "fdlibm.h" + +#define FP_SNAN 0 +#define FP_QNAN 1 +#define FP_INFINITE 2 +#define FP_ZERO 3 +#define FP_NORMAL 4 +#define FP_SUBNORMAL 5 + +#define FP_NAN FP_QNAN + +#define fpclassify(x) ((sizeof(x) == sizeof(float)) ? __fpclassifyf(x) : __fpclassifyd(x)) +#define signbit(x) ((sizeof(x) == sizeof(float)) ? __signbitf(x) : __signbitd(x)) +#define isfinite(x) ((fpclassify(x) > 2)) + +#define __signbitf(x) ((int)(__HI(x) & 0x80000000)) + +// TODO: OK? +#define __signbitd(x) ((int)(__HI(x) & 0x80000000)) + +extern unsigned long __float_nan[]; +extern unsigned long __float_huge[]; +extern unsigned long __float_max[]; +extern unsigned long __float_epsilon[]; + +inline int __fpclassifyf(float __value) { + unsigned long integer = *(unsigned long *)&__value; + + switch (integer & 0x7f800000) { + case 0x7f800000: + if ((integer & 0x7fffff) != 0) { + return FP_QNAN; + } + return FP_INFINITE; + + case 0: + if ((integer & 0x7fffff) != 0) { + return FP_SUBNORMAL; + } + return FP_ZERO; + } + + return FP_NORMAL; +} + +inline int __fpclassifyd(double __value) { + switch (__HI(__value) & 0x7ff00000) { + case 0x7ff00000: { + if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff)) { + return FP_QNAN; + } else { + return FP_INFINITE; + } + break; + } + case 0: { + if ((__HI(__value) & 0x000fffff) || (__LO(__value) & 0xffffffff)) { + return FP_SUBNORMAL; + } else { + return FP_ZERO; + } + break; + } + } + return FP_NORMAL; +} + +#define FLT_MANT_DIG 24 +#define FLT_DIG 6 +#define FLT_MIN_EXP (-125) +#define FLT_MIN_10_EXP (-37) +#define FLT_MAX_EXP 128 +#define FLT_MAX_10_EXP 38 + +// #define FLT_MAX (*(float*) __float_max) +// #define FLT_EPSILON (*(float*) __float_epsilon) + +#define FLT_MAX (3.402823466e+38f) +#define FLT_EPSILON (1.192092896e-07f) + +#define DBL_MANT_DIG 53 +#define DBL_DIG 15 +#define DBL_MIN_EXP (-1021) +#define DBL_MIN_10_EXP (-308) +#define DBL_MAX_EXP 1024 +#define DBL_MAX_10_EXP 308 + +#endif /* _MSL_COMMON_FLOAT_H */ diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h new file mode 100644 index 00000000..55110c72 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/limits.h @@ -0,0 +1,102 @@ +#ifndef _STD_LIMITS_H +#define _STD_LIMITS_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 +} + +namespace std { +template +class numeric_limits { +public: + inline static T min(); + inline static T max(); +}; + +template <> +class numeric_limits { +public: + inline static char min() { return -0x80; } + inline static char max() { return 0x7F; } +}; + +template <> +class numeric_limits { +public: + inline static short min() { return -0x8000; } + inline static short max() { return 0x7FFF; } +}; + +template <> +class numeric_limits { +public: + inline static int min() { return -0x80000000; } + inline static int max() { return 0x7FFFFFFF; } +}; + +template <> +class numeric_limits { +public: + inline static long min() { return -0x80000000; } + inline static long max() { return 0x7FFFFFFF; } +}; + +template <> +class numeric_limits { +public: + inline static unsigned char min() { return 0x0; } + inline static unsigned char max() { return 0xFF; } +}; + +template <> +class numeric_limits { +public: + inline static unsigned short min() { return 0x0; } + inline static unsigned short max() { return 0xFFFF; } +}; + +template <> +class numeric_limits { +public: + inline static unsigned int min() { return 0x0; } + inline static unsigned int max() { return 0xFFFFFFFF; } +}; + +template <> +class numeric_limits { +public: + inline static unsigned long min() { return 0x0; } + inline static unsigned long max() { return 0xFFFFFFFF; } +}; + +} // namespace std +#endif +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h new file mode 100644 index 00000000..5a02a030 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h @@ -0,0 +1,114 @@ +#ifndef MSL_MATH_H_ +#define MSL_MATH_H_ + +#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 + +int abs(int); +int labs(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 ceil(double); +float ceilf(float); +double frexp(double, int *); +double ldexp(double, int); +double modf(double, double *); +double pow(double, double); +double sin(double); +float sinf(float); +double tan(double); +float tanf(float); +double floor(double); +float floorf(float); +double fmod(double, double); +float fmodf(float, float); +float fmodff(float, float *); + +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 fmodf(float f1, float f2) { return fmod(f1, f2); } + +inline float modff(float x, float *iptr) { + float frac; + double intg; + + frac = modf((double)x, &intg); + *iptr = intg; + + return frac; +} +inline double sqrt_step(double tmpd, float mag) { + return tmpd * 0.5 * (3.0 - mag * (tmpd * tmpd)); +} + +extern inline float sqrtf(float x) { + const double _half = .5; + const double _three = 3.0; + volatile float y; + if (x > 0.0f) { + double guess = __frsqrte((double)x); // returns an approximation to + guess = + _half * guess * (_three - guess * guess * x); // now have 12 sig bits + guess = + _half * guess * (_three - guess * guess * x); // now have 24 sig bits + guess = + _half * guess * (_three - guess * guess * x); // now have 32 sig bits + y = (float)(x * guess); + return y; + } + return x; +} + +extern inline double sqrt(double x) { + if (x > 0.0) { + double guess = __frsqrte(x); /* returns an approximation to */ + guess = .5 * guess * (3.0 - guess * guess * x); /* now have 8 sig bits */ + guess = .5 * guess * (3.0 - guess * guess * x); /* now have 16 sig bits */ + guess = .5 * guess * (3.0 - guess * guess * x); /* now have 32 sig bits */ + guess = .5 * guess * (3.0 - guess * guess * x); /* now have > 53 sig bits */ + return x * guess; + } else if (x == 0) { + return 0; + } else if (x) { + return NAN; + } + + return HUGE_VALF; +} + +inline float atan2f(float y, float x) { return (float)atan2(y, x); } + +// these are duplicated due to sinf/cosf having a symbol, but +// still being used as inlines elsewhere +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 tanf(x); } + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h new file mode 100644 index 00000000..d999b6ea --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mbstring.h @@ -0,0 +1,16 @@ +#ifndef _MSL_COMMON_MBSTRING_H +#define _MSL_COMMON_MBSTRING_H + +#include "wchar_io.h" + +#ifdef __cplusplus +extern "C" { +#endif + +size_t wcstombs(char* dst, const wchar_t* src, size_t n); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_MBSTRING_H */ \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/mem_funcs.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h similarity index 69% rename from include/MSL_C/MSL_Common/Src/mem_funcs.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h index a5c91107..d9ee49d9 100644 --- a/include/MSL_C/MSL_Common/Src/mem_funcs.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/mem_funcs.h @@ -1,7 +1,7 @@ -#ifndef MSL_COMMON_SRC_MEM_FUNCS_H -#define MSL_COMMON_SRC_MEM_FUNCS_H +#ifndef _MSL_COMMON_MEM_FUNCS_H +#define _MSL_COMMON_MEM_FUNCS_H -#include "MSL_C/MSL_Common/Src/stddef.h" +#include "stddef.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_SRC_MEM_FUNCS_H */ +#endif /* _MSL_COMMON_MEM_FUNCS_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h new file mode 100644 index 00000000..57e41653 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/misc_io.h @@ -0,0 +1,14 @@ +#ifndef _MSL_COMMON_MISC_IO_H +#define _MSL_COMMON_MISC_IO_H + +#ifdef __cplusplus +extern "C" { +#endif + +void __stdio_atexit(void); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_MISC_IO_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/new.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/new.h new file mode 100644 index 00000000..66bceb3b --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/new.h @@ -0,0 +1,10 @@ +#ifndef MSL_NEW_H_ +#define MSL_NEW_H_ + +#include "stddef.h" + +inline void *operator new(size_t size, void *ptr) { + return ptr; +} + +#endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h new file mode 100644 index 00000000..548d8656 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/printf.h @@ -0,0 +1,22 @@ +#ifndef _MSL_COMMON_PRINTF_H +#define _MSL_COMMON_PRINTF_H + +#include "__va_arg.h" +#include "ansi_files.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int fprintf(FILE *stream, const char *format, ...); +int printf(const char *format, ...); +int sprintf(char *s, const char *format, ...); +int snprintf(char *s, size_t n, const char *format, ...); +int vsnprintf(char *s, size_t n, const char *format, va_list arg); +int vprintf(const char *format, va_list arg); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_PRINTF_H */ diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h new file mode 100644 index 00000000..ac28dd8d --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/scanf.h @@ -0,0 +1,42 @@ +#ifndef _MSL_COMMON_SCANF_H +#define _MSL_COMMON_SCANF_H + +#include "ansi_files.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum __ReadProcActions { __GetAChar, __UngetAChar, __TestForError }; + +enum __WReadProcActions { __GetAwChar, __UngetAwChar, __TestForwcsError }; + +typedef struct { + char* CharStr; + size_t MaxCharCount; + size_t CharsWritten; +} __OutStrCtrl; + +typedef struct { + char* NextChar; + int NullCharDetected; +} __InStrCtrl; + +typedef struct { + wchar_t* wCharStr; + size_t MaxCharCount; + size_t CharsWritten; +} __wOutStrCtrl; + +typedef struct { + wchar_t* wNextChar; + int wNullCharDetected; +} __wInStrCtrl; + +int __StringRead(void* str, int ch, int behavior); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_SCANF_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h new file mode 100644 index 00000000..c10b34e9 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/signal.h @@ -0,0 +1,16 @@ +#ifndef _MSL_COMMON_SIGNAL_H +#define _MSL_COMMON_SIGNAL_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void (*__signal_func_ptr)(int); + +int raise(int sig); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_SIGNAL_H */ \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/stddef.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h similarity index 79% rename from include/MSL_C/MSL_Common/Src/stddef.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h index 7d93b650..09870064 100644 --- a/include/MSL_C/MSL_Common/Src/stddef.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h @@ -13,12 +13,14 @@ 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 #ifdef __cplusplus -} +}; #endif -#endif \ No newline at end of file +#endif diff --git a/include/MSL_C/stdint.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdint.h similarity index 100% rename from include/MSL_C/stdint.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdint.h diff --git a/include/MSL_C/stdio.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio.h similarity index 54% rename from include/MSL_C/stdio.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio.h index 7c4ff318..00cecd22 100644 --- a/include/MSL_C/stdio.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdio.h @@ -1,9 +1,10 @@ #ifndef MSL_STDIO_H_ #define MSL_STDIO_H_ -#include "MSL_C/MSL_Common/Src/char_io.h" -#include "MSL_C/MSL_Common/Src/file_io.h" -#include "MSL_C/MSL_Common/Src/printf.h" +#include "char_io.h" +#include "extras.h" +#include "file_io.h" +#include "printf.h" #define stdin (&__files._stdin) #define stdout (&__files._stdout) diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib.h new file mode 100644 index 00000000..a96b8f17 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib.h @@ -0,0 +1,8 @@ +#ifndef MSL_STDLIB_H_ +#define MSL_STDLIB_H_ + +#include "abort_exit.h" +#include "arith.h" +#include "strtoul.h" + +#endif \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string.h new file mode 100644 index 00000000..4f8b1eb6 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/string.h @@ -0,0 +1,30 @@ +#ifndef _MSL_COMMON_STRING_H +#define _MSL_COMMON_STRING_H + +#include "stddef.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); +int sscanf(const char *buffer, const char *format, ...); +size_t strlen(const char *str); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_STRING_H */ diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h new file mode 100644 index 00000000..e504b955 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/strtoul.h @@ -0,0 +1,17 @@ +#ifndef _MSL_COMMON_STRTOUL_H +#define _MSL_COMMON_STRTOUL_H + +#ifdef __cplusplus +extern "C" { +#endif + +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); + +#ifdef __cplusplus +} +#endif + +#endif /* _MSL_COMMON_STRTOUL_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h new file mode 100644 index 00000000..961bc74d --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar.h @@ -0,0 +1,19 @@ +#ifndef MSL_WCHAR_H +#define MSL_WCHAR_H +#include "common.h" +#include "limits.h" +#include "mbstring.h" +#include "wprintf.h" +#include "wstring.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define WCHAR_MIN SHRT_MIN +#define WCHAR_MAX USHRT_MAX + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h new file mode 100644 index 00000000..999db811 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wchar_io.h @@ -0,0 +1,12 @@ +#ifndef _MSL_COMMON_WCHAR_IO_H +#define _MSL_COMMON_WCHAR_IO_H + +#include "ansi_files.h" + +#ifndef __cplusplus +typedef unsigned short wchar_t; +#endif + +int fwide(FILE* file, int mode); + +#endif /* _MSL_COMMON_WCHAR_IO_H */ \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/wprintf.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h similarity index 84% rename from include/MSL_C/MSL_Common/Src/wprintf.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h index 94445588..cd808eb1 100644 --- a/include/MSL_C/MSL_Common/Src/wprintf.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wprintf.h @@ -1,6 +1,9 @@ #ifndef MSL_WPRINTF_H #define MSL_WPRINTF_H -#include + +#include "__va_arg.h" +#include "common.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/MSL_C/MSL_Common/Src/wstring.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h similarity index 95% rename from include/MSL_C/MSL_Common/Src/wstring.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h index 761f17a9..316f3a59 100644 --- a/include/MSL_C/MSL_Common/Src/wstring.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/wstring.h @@ -1,6 +1,6 @@ #ifndef MSL_WSTRING_H #define MSL_WSTRING_H -#include +#include "common.h" #ifdef __cplusplus extern "C" { #endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c new file mode 100644 index 00000000..9aafb8e0 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/FILE_POS.c @@ -0,0 +1,147 @@ +#include "FILE_POS.h" +#include "critical_regions.h" +#include "errno.h" + +/* 80365E90-80365F74 3607D0 00E4+00 0/0 2/2 0/0 .text ftell */ +long ftell(FILE* stream) { + int retval; + + __begin_critical_region(stdin_access); + retval = (long)_ftell(stream); + __end_critical_region(stdin_access); + return retval; +} + +int _ftell(FILE* file) { + int charsInUndoBuffer = 0; + int position; + + unsigned char tmp_kind = file->file_mode.file_kind; + if (!(tmp_kind == __disk_file || tmp_kind == __console_file) || file->file_state.error) { + errno = 0x28; + return -1; + } + + if (file->file_state.io_state == __neutral) + return (file->position); + + position = file->buffer_position + (file->buffer_ptr - file->buffer); + + if (file->file_state.io_state >= __rereading) { + charsInUndoBuffer = file->file_state.io_state - __rereading + 1; + position -= charsInUndoBuffer; + } + + if (!file->file_mode.binary_io) { + int n = file->buffer_ptr - file->buffer - charsInUndoBuffer; + unsigned char* p = (unsigned char*)file->buffer; + + while (n--) + if (*p++ == '\n') + position++; + } + + return (position); +} + +/* 80365C20-80365E90 360560 0270+00 1/1 0/0 0/0 .text _fseek */ +int _fseek(FILE* file, unsigned long offset, int whence) { + int bufferCode; + int pos; + int adjust; + unsigned long state; + int buffLen; + + unsigned char* ptr; + + if (file->file_mode.file_kind != 1 || file->file_state.error != 0) { + errno = 0x28; + return -1; + } + + if (file->file_state.io_state == 1) { + if (__flush_buffer(file, NULL) != 0) { + file->file_state.error = 1; + file->buffer_length = 0; + errno = 0x28; + return -1; + } + } + + if (whence == SEEK_CUR) { + whence = SEEK_SET; + adjust = 0; + if ((file->file_mode.file_kind != 1 && file->file_mode.file_kind != 2) || + file->file_state.error != 0) + { + errno = 0x28; + pos = -1; + } else { + state = file->file_state.io_state; + if (state == 0) { + pos = file->position; + } else { + pos = file->buffer_position; + ptr = file->buffer; + buffLen = (file->buffer_ptr - ptr); + pos += buffLen; + if ((state >= 3)) { + adjust = (state - 2); + pos -= adjust; + } + + if (file->file_mode.binary_io == 0) { + int i; + for (i = (buffLen - adjust); i != 0; i--) { + unsigned char c = *ptr; + ptr++; + if (c == 10) { + pos++; + } + } + } + } + } + offset += pos; + } + + if ((whence != SEEK_END) && (file->file_mode.io_mode != 3) && + (file->file_state.io_state == 2 || file->file_state.io_state == 3)) + { + if ((offset >= file->position) || !(offset >= file->buffer_position)) { + file->file_state.io_state = 0; + } else { + file->buffer_ptr = file->buffer + (offset - file->buffer_position); + file->buffer_length = file->position - offset; + file->file_state.io_state = 2; + } + } else { + file->file_state.io_state = 0; + } + + if (file->file_state.io_state == 0) { + if (file->position_fn != NULL && + (int)file->position_fn(file->handle, &offset, whence, file->idle_fn)) + { + file->file_state.error = 1; + file->buffer_length = 0; + errno = 0x28; + return -1; + } else { + file->file_state.eof = 0; + file->position = offset; + file->buffer_length = 0; + } + } + + return 0; +} + +/* 80365BB4-80365C20 3604F4 006C+00 0/0 2/2 0/0 .text fseek */ +int fseek(FILE* stream, unsigned long offset, int whence) { + int code; + __begin_critical_region(stdin_access); + code = _fseek(stream, offset, whence); // 0 if successful, -1 if error + __end_critical_region(stdin_access); + return code; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c new file mode 100644 index 00000000..7d653242 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/abort_exit.c @@ -0,0 +1,77 @@ +#include "abort_exit.h" +#include "critical_regions.h" +#include "stddef.h" + +extern void (*_dtors[])(void); + +/* 8044D440-8044D540 07A160 0100+00 2/2 0/0 0/0 .bss __atexit_funcs */ +static void (*__atexit_funcs[64])(void); + +/* 8045199C-804519A0 000E9C 0004+00 2/2 0/0 0/0 .sbss __console_exit */ +static void (*__console_exit)(void); + +/* 80451998-8045199C 000E98 0004+00 1/1 1/1 0/0 .sbss __stdio_exit */ +void (*__stdio_exit)(void); + +/* 80451994-80451998 000E94 0004+00 2/2 0/0 0/0 .sbss __atexit_curr_func */ +static int __atexit_curr_func; + +/* 80451990-80451994 000E90 0004+00 2/2 0/0 0/0 .sbss __aborting */ +static int __aborting; + +/* 80362ABC-80362B58 35D3FC 009C+00 0/0 9/9 0/0 .text abort */ +void abort(void) { + raise(1); + __aborting = 1; + __begin_critical_region(atexit_funcs_access); + + while (__atexit_curr_func > 0) + __atexit_funcs[--__atexit_curr_func](); + + __end_critical_region(atexit_funcs_access); + __kill_critical_regions(); + + if (__console_exit != NULL) { + __console_exit(); + __console_exit = NULL; + } + + _ExitProcess(); +} + +/* 803629CC-80362ABC 35D30C 00F0+00 0/0 2/2 0/0 .text exit */ +void exit(int status) { + int i; + void (**dtor)(void); + + if (!__aborting) { + __begin_critical_region(atexit_funcs_access); + __end_critical_region(atexit_funcs_access); + __destroy_global_chain(); + + dtor = _dtors; + while (*dtor != NULL) { + (*dtor)(); + dtor++; + } + + if (__stdio_exit != NULL) { + __stdio_exit(); + __stdio_exit = NULL; + } + } + + __begin_critical_region(atexit_funcs_access); + while (__atexit_curr_func > 0) + __atexit_funcs[--__atexit_curr_func](); + + __end_critical_region(atexit_funcs_access); + __kill_critical_regions(); + + if (__console_exit != NULL) { + __console_exit(); + __console_exit = NULL; + } + + _ExitProcess(); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c new file mode 100644 index 00000000..264edd90 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/alloc.c @@ -0,0 +1,334 @@ +#include "alloc.h" +#include "critical_regions.h" + +typedef struct Block { + struct Block* prev; + struct Block* next; + unsigned long max_size; + unsigned long size; +} Block; + +typedef struct SubBlock { + unsigned long size; + Block* block; + struct SubBlock* prev; + struct SubBlock* next; +} SubBlock; + +struct FixSubBlock; + +typedef struct FixBlock { + struct FixBlock* prev_; + struct FixBlock* next_; + unsigned long client_size_; + struct FixSubBlock* start_; + unsigned long n_allocated_; +} FixBlock; + +typedef struct FixSubBlock { + FixBlock* block_; + struct FixSubBlock* next_; +} FixSubBlock; + +typedef struct FixStart { + FixBlock* tail_; + FixBlock* head_; +} FixStart; + +typedef struct __mem_pool_obj { + Block* start_; + FixStart fix_start[6]; +} __mem_pool_obj; + +typedef struct __mem_pool { + void* reserved[14]; +} __mem_pool; + +typedef long tag_word; + +typedef struct block_header { + tag_word tag; + struct block_header* prev; + struct block_header* next; +} block_header; + +typedef struct list_header { + block_header* rover; + block_header header; +} list_header; + +typedef struct heap_header { + struct heap_header* prev; + struct heap_header* next; +} heap_header; + +struct mem_pool_obj; +typedef void* (*sys_alloc_ptr)(unsigned long, struct mem_pool_obj*); +typedef void (*sys_free_ptr)(void*, struct mem_pool_obj*); + +typedef struct pool_options { + sys_alloc_ptr sys_alloc_func; + sys_free_ptr sys_free_func; + unsigned long min_heap_size; + int always_search_first; +} pool_options; + +typedef struct mem_pool_obj { + list_header free_list; + pool_options options; + heap_header* heap_list; + void* userData; + +} mem_pool_obj; + +mem_pool_obj __malloc_pool; +static int initialized = 0; + +static SubBlock* SubBlock_merge_prev(SubBlock*, SubBlock**); +static void SubBlock_merge_next(SubBlock*, SubBlock**); + +static const unsigned long fix_pool_sizes[] = {4, 12, 20, 36, 52, 68}; + +#define SubBlock_size(ths) ((ths)->size & 0xFFFFFFF8) +#define SubBlock_block(ths) ((Block*)((unsigned long)((ths)->block) & ~0x1)) +#define Block_size(ths) ((ths)->size & 0xFFFFFFF8) +#define Block_start(ths) (*(SubBlock**)((char*)(ths) + Block_size((ths)) - sizeof(unsigned long))) + +#define SubBlock_set_free(ths) \ + unsigned long this_size = SubBlock_size((ths)); \ + (ths)->size &= ~0x2; \ + *(unsigned long*)((char*)(ths) + this_size) &= ~0x4; \ + *(unsigned long*)((char*)(ths) + this_size - sizeof(unsigned long)) = this_size + +#define SubBlock_is_free(ths) !((ths)->size & 2) +#define SubBlock_set_size(ths, sz) \ + (ths)->size &= ~0xFFFFFFF8; \ + (ths)->size |= (sz) & 0xFFFFFFF8; \ + if (SubBlock_is_free((ths))) \ + *(unsigned long*)((char*)(ths) + (sz) - sizeof(unsigned long)) = (sz) + +#define SubBlock_from_pointer(ptr) ((SubBlock*)((char*)(ptr)-8)) +#define FixSubBlock_from_pointer(ptr) ((FixSubBlock*)((char*)(ptr)-4)) + +#define FixBlock_client_size(ths) ((ths)->client_size_) +#define FixSubBlock_size(ths) (FixBlock_client_size((ths)->block_)) + +#define classify(ptr) (*(unsigned long*)((char*)(ptr) - sizeof(unsigned long)) & 1) +#define __msize_inline(ptr) \ + (!classify(ptr) ? FixSubBlock_size(FixSubBlock_from_pointer(ptr)) : \ + SubBlock_size(SubBlock_from_pointer(ptr)) - 8) + +#define Block_empty(ths) \ + (_sb = (SubBlock*)((char*)(ths) + 16)), \ + SubBlock_is_free(_sb) && SubBlock_size(_sb) == Block_size((ths)) - 24 + +void __sys_free(); + +static inline SubBlock* SubBlock_merge_prev(SubBlock* ths, SubBlock** start) { + unsigned long prevsz; + SubBlock* p; + + if (!(ths->size & 0x04)) { + prevsz = *(unsigned long*)((char*)ths - sizeof(unsigned long)); + if (prevsz & 0x2) + return ths; + p = (SubBlock*)((char*)ths - prevsz); + SubBlock_set_size(p, prevsz + SubBlock_size(ths)); + + if (*start == ths) + *start = (*start)->next; + ths->next->prev = ths->prev; + ths->next->prev->next = ths->next; + return p; + } + return ths; +} + +static inline void SubBlock_merge_next(SubBlock* pBlock, SubBlock** pStart) { + SubBlock* next_sub_block; + unsigned long this_cur_size; + + next_sub_block = (SubBlock*)((char*)pBlock + (pBlock->size & 0xFFFFFFF8)); + + if (!(next_sub_block->size & 2)) { + this_cur_size = (pBlock->size & 0xFFFFFFF8) + (next_sub_block->size & 0xFFFFFFF8); + + pBlock->size &= ~0xFFFFFFF8; + pBlock->size |= this_cur_size & 0xFFFFFFF8; + + if (!(pBlock->size & 2)) { + *(unsigned long*)((char*)(pBlock) + (this_cur_size)-4) = (this_cur_size); + } + + if (!(pBlock->size & 2)) { + *(unsigned long*)((char*)pBlock + this_cur_size) &= ~4; + } else { + *(unsigned long*)((char*)pBlock + this_cur_size) |= 4; + } + + if (*pStart == next_sub_block) { + *pStart = (*pStart)->next; + } + + if (*pStart == next_sub_block) { + *pStart = 0; + } + + next_sub_block->next->prev = next_sub_block->prev; + next_sub_block->prev->next = next_sub_block->next; + } +} + +inline void Block_link(Block* ths, SubBlock* sb) { + SubBlock** st; + SubBlock_set_free(sb); + st = &Block_start(ths); + + if (*st != 0) { + sb->prev = (*st)->prev; + sb->prev->next = sb; + sb->next = *st; + (*st)->prev = sb; + *st = sb; + *st = SubBlock_merge_prev(*st, st); + SubBlock_merge_next(*st, st); + } else { + *st = sb; + sb->prev = sb; + sb->next = sb; + } + if (ths->max_size < SubBlock_size(*st)) + ths->max_size = SubBlock_size(*st); +} + +static inline Block* __unlink(__mem_pool_obj* pool_obj, Block* bp) { + Block* result = bp->next; + if (result == bp) { + result = 0; + } + + if (pool_obj->start_ == bp) { + pool_obj->start_ = result; + } + + if (result != 0) { + result->prev = bp->prev; + result->prev->next = result; + } + + bp->next = 0; + bp->prev = 0; + return result; +} + +/* 80362D78-8036300C 35D6B8 0294+00 2/2 0/0 0/0 .text deallocate_from_var_pools */ +static void deallocate_from_var_pools(__mem_pool_obj* pool_obj, void* ptr) { + SubBlock* sb = SubBlock_from_pointer(ptr); + SubBlock* _sb; + + Block* bp = SubBlock_block(sb); + Block_link(bp, sb); + + if (Block_empty(bp)) { + __unlink(pool_obj, bp); + __sys_free(bp); + } +} + +inline void __init_pool_obj(__mem_pool* pool_obj) { + memset(pool_obj, 0, sizeof(__mem_pool_obj)); +} + +static inline __mem_pool* get_malloc_pool(void) { + static __mem_pool protopool; + static unsigned char init = 0; + if (!init) { + __init_pool_obj(&protopool); + init = 1; + } + + return &protopool; +} + +/* 80362C20-80362D78 35D560 0158+00 1/1 0/0 0/0 .text deallocate_from_fixed_pools */ +void deallocate_from_fixed_pools(__mem_pool_obj* pool_obj, void* ptr, unsigned long size) { + unsigned long i = 0; + FixSubBlock* p; + FixBlock* b; + FixStart* fs; + + while (size > fix_pool_sizes[i]) { + ++i; + } + + fs = &pool_obj->fix_start[i]; + p = FixSubBlock_from_pointer(ptr); + b = p->block_; + + if (b->start_ == 0 && fs->head_ != b) { + if (fs->tail_ == b) { + fs->head_ = fs->head_->prev_; + fs->tail_ = fs->tail_->prev_; + } else { + b->prev_->next_ = b->next_; + b->next_->prev_ = b->prev_; + b->next_ = fs->head_; + b->prev_ = b->next_->prev_; + b->prev_->next_ = b; + b->next_->prev_ = b; + fs->head_ = b; + } + } + + p->next_ = b->start_; + b->start_ = p; + + if (--b->n_allocated_ == 0) { + if (fs->head_ == b) { + fs->head_ = b->next_; + } + + if (fs->tail_ == b) { + fs->tail_ = b->prev_; + } + + b->prev_->next_ = b->next_; + b->next_->prev_ = b->prev_; + + if (fs->head_ == b) { + fs->head_ = 0; + } + + if (fs->tail_ == b) { + fs->tail_ = 0; + } + + deallocate_from_var_pools(pool_obj, b); + } +} + +/* 80362BC8-80362C20 35D508 0058+00 1/1 0/0 0/0 .text __pool_free */ +void __pool_free(__mem_pool* pool, void* ptr) { + __mem_pool_obj* pool_obj; + unsigned long size; + + if (ptr == 0) { + return; + } + + pool_obj = (__mem_pool_obj*)pool; + size = __msize_inline(ptr); + + if (size <= 68) { + deallocate_from_fixed_pools(pool_obj, ptr, size); + } else { + deallocate_from_var_pools(pool_obj, ptr); + } +} + +/* 80362B58-80362BC8 35D498 0070+00 0/0 2/2 0/0 .text free */ +void free(void* ptr) { + __begin_critical_region(malloc_pool_access); + __pool_free(get_malloc_pool(), ptr); + __end_critical_region(malloc_pool_access); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c new file mode 100644 index 00000000..e8b656c3 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ansi_files.c @@ -0,0 +1,158 @@ +#include "ansi_files.h" +#include "critical_regions.h" + +/* 8044D778-8044D878 07A498 0100+00 1/0 0/0 0/0 .bss stdin_buff */ +static unsigned char stdin_buff[0x100]; + +/* 8044D678-8044D778 07A398 0100+00 1/0 0/0 0/0 .bss stdout_buff */ +static unsigned char stdout_buff[0x100]; + +/* 8044D578-8044D678 07A298 0100+00 1/0 0/0 0/0 .bss stderr_buff */ +static unsigned char stderr_buff[0x100]; + +/* 803D29B0-803D2AF0 -00001 0140+00 3/2 15/15 0/0 .data __files */ +extern files __files = { + { + 0, + 0, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + {0, 0}, + {0, 0}, + 0, + stdin_buff, + 0x00000100, + stdin_buff, + 0, + 0, + 0, + 0, + NULL, + __read_console, + __write_console, + __close_console, + NULL, + &__files._stdout, + }, + { + 1, + 0, + 2, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + {0, 0}, + {0, 0}, + 0, + stdout_buff, + 0x00000100, + stdout_buff, + 0, + 0, + 0, + 0, + NULL, + __read_console, + __write_console, + __close_console, + NULL, + &__files._stderr, + }, + { + 2, + 0, + 2, + 0, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + {0, 0}, + {0, 0}, + 0, + stderr_buff, + 0x00000100, + stderr_buff, + 0, + 0, + 0, + 0, + NULL, + __read_console, + __write_console, + __close_console, + NULL, + &__files.empty, + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, + {0, 0}, 0, NULL, 0x00000000, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, + }, +}; + +/* 8036307C-80363124 35D9BC 00A8+00 0/0 1/1 0/0 .text __close_all */ +void __close_all(void) { + FILE* file = &__files._stdin; + FILE* last_file; + + __begin_critical_region(stdin_access); + + while (file != NULL) { + if (file->file_mode.file_kind != __closed_file) { + fclose(file); + } + + last_file = file; + file = file->next_file; + + if (last_file->is_dynamically_allocated) { + free(last_file); + } else { + last_file->file_mode.file_kind = __unavailable_file; + if (file != NULL && file->is_dynamically_allocated) { + last_file->next_file = NULL; + } + } + } + + __end_critical_region(stdin_access); +} + +/* 8036300C-8036307C 35D94C 0070+00 0/0 2/2 0/0 .text __flush_all */ +unsigned int __flush_all(void) { + unsigned int ret = 0; + FILE* file = &__files._stdin; + + while (file) { + if (file->file_mode.file_kind != __closed_file && fflush(file)) { + ret = -1; + } + file = file->next_file; + } + + return ret; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c new file mode 100644 index 00000000..7953ff32 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/arith.c @@ -0,0 +1,30 @@ +#include "arith.h" + +/* 803650D0-803650E0 35FA10 0010+00 0/0 66/66 225/225 .text abs */ +int abs(int n) { + if (n < 0) + return (-n); + else + return (n); +} + +/* 80365078-803650D0 35F9B8 0058+00 0/0 1/1 0/0 .text div */ +div_t div(int numerator, int denominator) { + div_t ret; + int i = 1; + int j = 1; + + if (numerator < 0 ) { + numerator = -numerator; + i = -1; + } + + if (denominator < 0) { + denominator = -denominator; + j = -1; + } + + ret.quot = (numerator / denominator) * (i * j); + ret.rem = numerator * i - j * (ret.quot * denominator); + return ret; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c new file mode 100644 index 00000000..fda0958d --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/buffer_io.c @@ -0,0 +1,43 @@ +#include "buffer_io.h" + +void __convert_from_newlines(unsigned char* buf, size_t* n) {} + +void __convert_to_newlines(unsigned char* buf, size_t* n) {} + +/* 803651A4-803651D8 35FAE4 0034+00 0/0 2/2 0/0 .text __prep_buffer */ +void __prep_buffer(FILE* file) { + file->buffer_ptr = file->buffer; + file->buffer_length = file->buffer_size; + file->buffer_length -= file->position & file->buffer_alignment; + file->buffer_position = file->position; +} + +/* 803650E0-803651A4 35FA20 00C4+00 0/0 5/5 0/0 .text __flush_buffer */ +int __flush_buffer(FILE* file, size_t* bytes_flushed) { + size_t buffer_len; + int ioresult; + + buffer_len = file->buffer_ptr - file->buffer; + + if (buffer_len) { + file->buffer_length = buffer_len; + + if (!file->file_mode.binary_io) + __convert_from_newlines(file->buffer, (size_t*)&file->buffer_length); + + ioresult = (*file->write_fn)(file->handle, file->buffer, (size_t*)&file->buffer_length, + file->idle_fn); + + if (bytes_flushed) + *bytes_flushed = file->buffer_length; + + if (ioresult) + return (ioresult); + + file->position += file->buffer_length; + } + + __prep_buffer(file); + + return 0; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c new file mode 100644 index 00000000..b2163b72 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/char_io.c @@ -0,0 +1,98 @@ +#include "char_io.h" +#include "critical_regions.h" +#include "misc_io.h" +#include "wchar_io.h" + +/* 803652AC-80365464 35FBEC 01B8+00 1/1 0/0 0/0 .text __put_char */ +int __put_char(int c, FILE* stream) { + int ret; + + int file_kind = stream->file_mode.file_kind; + stream->buffer_length = 0; + + if (stream->file_state.error != 0 || file_kind == __closed_file) { + return -1; + } + + if (file_kind == __console_file) { + __stdio_atexit(); + } + + if (stream->file_state.io_state == __neutral && (stream->file_mode.io_mode & __write)) { + if ((stream->file_mode.io_mode & __append) && fseek(stream, 0, 2) != 0) { + return 0; + } + + stream->file_state.io_state = __writing; + __prep_buffer(stream); + } + + if (stream->file_state.io_state != __writing) { + stream->file_state.error = 1; + ret = -1; + stream->buffer_length = 0; + } else if ((stream->file_mode.buffer_mode == 2 || + stream->buffer_size == + (unsigned int)stream->buffer_ptr - (unsigned int)stream->buffer) && + __flush_buffer(stream, NULL) != 0) + { + stream->file_state.error = 1; + ret = -1; + stream->buffer_length = 0; + } else { + stream->buffer_length--; + *stream->buffer_ptr++ = c; + + if (stream->file_mode.buffer_mode != 2) { + if ((stream->file_mode.buffer_mode == 0 || c == 10) && + __flush_buffer(stream, NULL) != 0) + { + stream->file_state.error = 1; + ret = -1; + stream->buffer_length = 0; + goto exit; + } + stream->buffer_length = 0; + } + + ret = c & 0xFF; + } + +exit: + return ret; +} + +/* 803651D8-803652AC 35FB18 00D4+00 0/0 1/1 0/0 .text fputs */ +int fputs(const char* s, FILE* stream) { + char c; + int var_r3; + unsigned long len; + int ret = 0; + + __begin_critical_region(stdin_access); + while (c = *s++, c != 0) { + if (fwide(stream, -1) >= 0) { + var_r3 = -1; + } else { + len = stream->buffer_length; + stream->buffer_length = len - 1; + + if (len != 0) { + char* buf = (char*)stream->buffer_ptr; + stream->buffer_ptr++; + + *buf = var_r3 = c & 0xFF; + } else { + var_r3 = __put_char(c, stream); + } + } + + if (var_r3 == -1) { + ret = -1; + break; + } + } + __end_critical_region(stdin_access); + + return ret; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c new file mode 100644 index 00000000..8d0e5a8f --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/ctype.c @@ -0,0 +1,82 @@ +#include "ctype.h" + +#define ctrl __control_char +#define motn __motion_char +#define spac __space_char +#define punc __punctuation +#define digi __digit +#define hexd __hex_digit +#define lowc __lower_case +#define uppc __upper_case +#define dhex (hexd | digi) +#define uhex (hexd | uppc) +#define lhex (hexd | lowc) + +/* 803D2C18-803D2D18 02FD38 0100+00 0/0 3/3 0/0 .data __ctype_map */ +unsigned char __ctype_map[256] = { + // clang-format off + ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, motn, motn, motn, motn, motn, ctrl, ctrl, + ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, ctrl, + spac, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, punc, + dhex, dhex, dhex, dhex, dhex, dhex, dhex, dhex, dhex, dhex, punc, punc, punc, punc, punc, punc, + punc, uhex, uhex, uhex, uhex, uhex, uhex, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, + uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, uppc, punc, punc, punc, punc, punc, + punc, lhex, lhex, lhex, lhex, lhex, lhex, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, + lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, lowc, punc, punc, punc, punc, ctrl, + // clang-format on +}; + +/* 803D2D18-803D2E18 02FE38 0100+00 1/1 3/3 0/0 .data __lower_map */ +unsigned char __lower_map[256] = { + // clang-format off + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', + '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', '\\', ']', '^', '_', + '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 0x7F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, + // clang-format on +}; + +/* 80365470-80365494 35FDB0 0024+00 0/0 4/4 0/0 .text tolower */ +int tolower(int __c) { + { + if (__c == -1) { + return 0xffffffff; + } + + return (unsigned int)__lower_map[__c & 0xff]; + } +} + +/* ############################################################################################## */ +/* 803D2E18-803D2F18 02FF38 0100+00 0/0 1/1 0/0 .data __upper_map */ +unsigned char __upper_map[256] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', + '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', + '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 0x7F, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, + // clang-format on +}; \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c new file mode 100644 index 00000000..a0b35621 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/direct_io.c @@ -0,0 +1,121 @@ +#include "direct_io.h" +#include "critical_regions.h" +#include "wchar_io.h" + +/* 80365494-803657A0 35FDD4 030C+00 1/1 0/0 0/0 .text __fwrite */ +size_t fwrite(const void* buffer, size_t size, size_t count, FILE* stream) { + size_t retval; + + __begin_critical_region(stdin_access); + retval = __fwrite(buffer, size, count, stream); + __end_critical_region(stdin_access); + + return (retval); +} + +/* 803657A0-8036581C 3600E0 007C+00 0/0 1/1 0/0 .text fwrite */ +size_t __fwrite(const void* buffer, size_t size, size_t count, FILE* stream) { + unsigned char* write_ptr; + size_t num_bytes, bytes_to_go, bytes_written; + int ioresult, always_buffer; + +#ifndef __NO_WIDE_CHAR + if (fwide(stream, 0) == 0) + fwide(stream, -1); +#endif + + bytes_to_go = size * count; + + if (!bytes_to_go || stream->file_state.error || stream->file_mode.file_kind == __closed_file) + return 0; + + if (stream->file_mode.file_kind == __console_file) + __stdio_atexit(); + + always_buffer = !stream->file_mode.binary_io || stream->file_mode.buffer_mode == _IOFBF || + stream->file_mode.buffer_mode == _IOLBF; + + if (stream->file_state.io_state == __neutral) { + if (stream->file_mode.io_mode & __write) { + if (stream->file_mode.io_mode & __append) { + if (fseek(stream, 0, SEEK_END)) + return 0; + } + stream->file_state.io_state = __writing; + + __prep_buffer(stream); + } + } + + if (stream->file_state.io_state != __writing) { + set_error(stream); + return 0; + } + + write_ptr = (unsigned char*)buffer; + bytes_written = 0; + + if (bytes_to_go && (stream->buffer_ptr != stream->buffer || always_buffer)) { + stream->buffer_length = stream->buffer_size - (stream->buffer_ptr - stream->buffer); + + do { + unsigned char* newline = NULL; + + num_bytes = stream->buffer_length; + + if (num_bytes > bytes_to_go) + num_bytes = bytes_to_go; + if (stream->file_mode.buffer_mode == _IOLBF && num_bytes) + if ((newline = (unsigned char*)__memrchr(write_ptr, '\n', num_bytes)) != NULL) + num_bytes = newline + 1 - write_ptr; + + if (num_bytes) { + memcpy(stream->buffer_ptr, write_ptr, num_bytes); + + write_ptr += num_bytes; + bytes_written += num_bytes; + bytes_to_go -= num_bytes; + + stream->buffer_ptr += num_bytes; + stream->buffer_length -= num_bytes; + } + if (!stream->buffer_length || newline != NULL || + (stream->file_mode.buffer_mode == _IONBF)) + { + ioresult = __flush_buffer(stream, NULL); + + if (ioresult) { + set_error(stream); + bytes_to_go = 0; + break; + } + } + } while (bytes_to_go && always_buffer); + } + + if (bytes_to_go && !always_buffer) { + unsigned char* save_buffer = stream->buffer; + size_t save_size = stream->buffer_size; + + stream->buffer = write_ptr; + stream->buffer_size = bytes_to_go; + stream->buffer_ptr = write_ptr + bytes_to_go; + + if (__flush_buffer(stream, &num_bytes) != __no_io_error) + set_error(stream); + + bytes_written += num_bytes; + + stream->buffer = save_buffer; + stream->buffer_size = save_size; + + __prep_buffer(stream); + + stream->buffer_length = 0; + } + + if (stream->file_mode.buffer_mode != _IOFBF) + stream->buffer_length = 0; + + return ((bytes_written + size - 1) / size); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c new file mode 100644 index 00000000..32c23470 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/errno.c @@ -0,0 +1,4 @@ +#include "errno.h" + +/* 804519A8-804519B0 000EA8 0004+04 0/0 6/6 0/0 .sbss errno */ +int errno; \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c new file mode 100644 index 00000000..64629903 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/extras.c @@ -0,0 +1,27 @@ +#include "extras.h" +#include "ctype.h" + +/* 8036CA94-8036CB20 3673D4 008C+00 0/0 1/1 0/0 .text stricmp */ +int stricmp(const char* str1, const char* str2) { + char a_var; + char b_var; + + do { + b_var = _tolower(*str1++); + a_var = _tolower(*str2++); + + if (b_var < a_var) { + return -1; + } + if (b_var > a_var) { + return 1; + } + } while (b_var != 0); + + return 0; +} + +/* 8036CA74-8036CA94 3673B4 0020+00 0/0 1/1 0/0 .text strnicmp */ +int strnicmp(const char* str1, const char* str2, int n) { + return __msl_strnicmp(str1, str2, n); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c new file mode 100644 index 00000000..061977fa --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/file_io.c @@ -0,0 +1,95 @@ +#include "file_io.h" +#include "ctype.h" + +/* 803659F8-80365BB4 360338 01BC+00 0/0 1/1 0/0 .text fclose */ +int fclose(FILE* file) { + int flush_result, close_result; + + if (file == NULL) + return (-1); + if (file->file_mode.file_kind == __closed_file) + return (0); + + flush_result = fflush(file); + + close_result = (*file->close_fn)(file->handle); + + file->file_mode.file_kind = __closed_file; + file->handle = NULL; + + if (file->file_state.free_buffer) + free((FILE*)file->buffer); + return ((flush_result || close_result) ? -1 : 0); +} + +/* 803658C0-803659F8 360200 0138+00 0/0 4/4 0/0 .text fflush */ +int fflush(FILE* file) { + int pos; + + if (file == NULL) { + return __flush_all(); + } + + if (file->file_state.error != 0 || file->file_mode.file_kind == __closed_file) { + return -1; + } + + if (file->file_mode.io_mode == __read) { + return 0; + } + + if (file->file_state.io_state >= __rereading) { + file->file_state.io_state = __reading; + } + + if (file->file_state.io_state == __reading) { + file->buffer_length = 0; + } + + if (file->file_state.io_state != __writing) { + file->file_state.io_state = __neutral; + return 0; + } + + if (file->file_mode.file_kind != __disk_file) { + pos = 0; + } else { + pos = ftell(file); + } + + if (__flush_buffer(file, 0) != 0) { + file->file_state.error = 1; + file->buffer_length = 0; + return -1; + } + + file->file_state.io_state = __neutral; + file->position = pos; + file->buffer_length = 0; + return 0; +} + +/* 8036581C-803658C0 36015C 00A4+00 0/0 1/1 0/0 .text __msl_strnicmp */ +int __msl_strnicmp(const char* str1, const char* str2, int n) { + int i; + char c1, c2; + + for (i = 0; i < n; i++) { + c1 = _tolower(*str1++); + c2 = _tolower(*str2++); + + if (c1 < c2) { + return -1; + } + + if (c1 > c2) { + return 1; + } + + if (c1 == '\0') { + return 0; + } + } + + return 0; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c new file mode 100644 index 00000000..c21b5a2b --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/float.c @@ -0,0 +1,13 @@ +#include "float.h" + +/* 80450AE0-80450AE4 000560 0004+00 0/0 204/204 1060/1060 .sdata __float_nan */ +unsigned long __float_nan[] = {0x7FFFFFFF}; + +/* 80450AE4-80450AE8 000564 0004+00 0/0 1/1 0/0 .sdata __float_huge */ +unsigned long __float_huge[] = {0x7F800000}; + +/* 80450AE8-80450AEC 000568 0004+00 0/0 18/18 14/14 .sdata __float_max */ +unsigned long __float_max[] = {0x7F7FFFFF}; + +/* 80450AEC-80450AF0 00056C 0004+00 0/0 28/28 0/0 .sdata __float_epsilon */ +unsigned long __float_epsilon[] = {0x34000000}; \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c new file mode 100644 index 00000000..ef75e9cc --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mbstring.c @@ -0,0 +1,65 @@ +#include "mbstring.h" +#include "string.h" + +inline static int unicode_to_UTF8(char* s, wchar_t wchar) { + int number_of_bytes; + wchar_t wide_char; + char* target_ptr; + char first_byte_mark[4] = { 0x00, 0x00, 0xc0, 0xe0 }; + + if (!s) + return (0); + + wide_char = wchar; + if (wide_char < 0x0080) + number_of_bytes = 1; + else if (wide_char < 0x0800) + number_of_bytes = 2; + else + number_of_bytes = 3; + + target_ptr = s + number_of_bytes; + + switch (number_of_bytes) { + case 3: + *--target_ptr = (wide_char & 0x003f) | 0x80; + wide_char >>= 6; + case 2: + *--target_ptr = (wide_char & 0x003f) | 0x80; + wide_char >>= 6; + case 1: + *--target_ptr = wide_char | first_byte_mark[number_of_bytes]; + } + + return number_of_bytes; +} + +inline int wctomb(char* s, wchar_t wchar) { return (unicode_to_UTF8(s, wchar)); } + +/* 80365F74-8036608C 3608B4 0118+00 0/0 1/1 0/0 .text wcstombs */ +size_t wcstombs(char* s, const wchar_t* pwcs, size_t n) { + int chars_written = 0; + int result; + char temp[3]; + wchar_t* source; + + if (!s || !pwcs) + return (0); + + source = (wchar_t*)pwcs; + while (chars_written <= n) { + if (!*source) { + *(s + chars_written) = '\0'; + break; + } else { + result = wctomb(temp, *source++); + if ((chars_written + result) <= n) { + strncpy(s + chars_written, temp, result); + chars_written += result; + } else + break; + } + } + + return chars_written; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c new file mode 100644 index 00000000..6323fb82 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem.c @@ -0,0 +1,85 @@ +#include "string.h" + +/* 80366130-803661FC 360A70 00CC+00 0/0 2/2 0/0 .text memmove */ +void* memmove(void* dst, const void* src, size_t n) { + unsigned char* csrc; + unsigned char* cdst; + + int reverse = (unsigned int)src < (unsigned int)dst; + + if (n >= 32) { + if (((unsigned int)dst ^ (unsigned int)src) & 3) { + if (!reverse) { + __copy_longs_unaligned(dst, src, n); + } else { + __copy_longs_rev_unaligned(dst, src, n); + } + } else { + if (!reverse) { + __copy_longs_aligned(dst, src, n); + } else { + __copy_longs_rev_aligned(dst, src, n); + } + } + + return dst; + } else { + if (!reverse) { + csrc = ((unsigned char*)src) - 1; + cdst = ((unsigned char*)dst) - 1; + n++; + + while (--n > 0) { + *++cdst = *++csrc; + } + } else { + csrc = (unsigned char*)src + n; + cdst = (unsigned char*)dst + n; + n++; + + while (--n > 0) { + *--cdst = *--csrc; + } + } + } + + return dst; +} + +/* 80366104-80366130 360A44 002C+00 0/0 1/1 0/0 .text memchr */ +void* memchr(const void* ptr, int ch, size_t count) { + const unsigned char* p; + + unsigned long v = (ch & 0xff); + + for (p = (unsigned char*)ptr - 1, count++; --count;) + if ((*++p & 0xff) == v) + return (void*)p; + + return NULL; +} + +/* 803660D8-80366104 360A18 002C+00 0/0 1/1 0/0 .text __memrchr */ +void* __memrchr(const void* ptr, int ch, size_t count) { + const unsigned char* p; + + unsigned long v = (ch & 0xff); + + for (p = (unsigned char*)ptr + count, count++; --count;) + if (*--p == v) + return (void*)p; + + return NULL; +} + +/* 8036608C-803660D8 3609CC 004C+00 0/0 19/19 5/5 .text memcmp */ +int memcmp(const void* lhs, const void* rhs, size_t count) { + const unsigned char* p1; + const unsigned char* p2; + + for (p1 = (const unsigned char*)lhs - 1, p2 = (const unsigned char*)rhs - 1, count++; --count;) + if (*++p1 != *++p2) + return ((*p1 < *p2) ? -1 : +1); + + return 0; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c new file mode 100644 index 00000000..bc2eae80 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/mem_funcs.c @@ -0,0 +1,221 @@ +#include "mem_funcs.h" + +#define cps ((unsigned char*)src) +#define cpd ((unsigned char*)dst) +#define lps ((unsigned long*)src) +#define lpd ((unsigned long*)dst) +#define deref_auto_inc(p) *++(p) + +/* 80366410-803664CC 360D50 00BC+00 0/0 1/1 0/0 .text __copy_longs_aligned */ +void __copy_longs_aligned(void* dst, const void* src, size_t n) { + unsigned long i; + + i = (-(unsigned long)dst) & 3; + + cps = ((unsigned char*)src) - 1; + cpd = ((unsigned char*)dst) - 1; + + if (i) { + n -= i; + + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--i); + } + + lps = ((unsigned long*)(cps + 1)) - 1; + lpd = ((unsigned long*)(cpd + 1)) - 1; + + i = n >> 5; + + if (i) + do { + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + deref_auto_inc(lpd) = deref_auto_inc(lps); + } while (--i); + + i = (n & 31) >> 2; + + if (i) + do + deref_auto_inc(lpd) = deref_auto_inc(lps); + while (--i); + + cps = ((unsigned char*)(lps + 1)) - 1; + cpd = ((unsigned char*)(lpd + 1)) - 1; + + n &= 3; + + if (n) + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--n); + + return; +} + +/* 80366368-80366410 360CA8 00A8+00 0/0 1/1 0/0 .text __copy_longs_rev_aligned */ +void __copy_longs_rev_aligned(void* dst, const void* src, size_t n) { + unsigned long i; + + cps = ((unsigned char*)src) + n; + cpd = ((unsigned char*)dst) + n; + + i = ((unsigned long)cpd) & 3; + + if (i) { + n -= i; + + do + *--cpd = *--cps; + while (--i); + } + + i = n >> 5; + + if (i) + do { + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + *--lpd = *--lps; + } while (--i); + + i = (n & 31) >> 2; + + if (i) + do + *--lpd = *--lps; + while (--i); + + n &= 3; + + if (n) + do + *--cpd = *--cps; + while (--n); + + return; +} + +/* 803662A8-80366368 360BE8 00C0+00 0/0 1/1 0/0 .text __copy_longs_unaligned */ +void __copy_longs_unaligned(void* dst, const void* src, size_t n) { + unsigned long i, v1, v2; + unsigned int src_offset, left_shift, right_shift; + + i = (-(unsigned long)dst) & 3; + + cps = ((unsigned char*)src) - 1; + cpd = ((unsigned char*)dst) - 1; + + if (i) { + n -= i; + + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--i); + } + + src_offset = ((unsigned int)(cps + 1)) & 3; + + left_shift = src_offset << 3; + right_shift = 32 - left_shift; + + cps -= src_offset; + + lps = ((unsigned long*)(cps + 1)) - 1; + lpd = ((unsigned long*)(cpd + 1)) - 1; + + i = n >> 3; + + v1 = deref_auto_inc(lps); + + do { + v2 = deref_auto_inc(lps); + deref_auto_inc(lpd) = (v1 << left_shift) | (v2 >> right_shift); + v1 = deref_auto_inc(lps); + deref_auto_inc(lpd) = (v2 << left_shift) | (v1 >> right_shift); + } while (--i); + + if (n & 4) { + v2 = deref_auto_inc(lps); + deref_auto_inc(lpd) = (v1 << left_shift) | (v2 >> right_shift); + } + + cps = ((unsigned char*)(lps + 1)) - 1; + cpd = ((unsigned char*)(lpd + 1)) - 1; + + n &= 3; + + if (n) { + cps -= 4 - src_offset; + do + deref_auto_inc(cpd) = deref_auto_inc(cps); + while (--n); + } + + return; +} + +/* 803661FC-803662A8 360B3C 00AC+00 0/0 1/1 0/0 .text __copy_longs_rev_unaligned */ +void __copy_longs_rev_unaligned(void* dst, const void* src, size_t n) { + unsigned long i, v1, v2; + unsigned int src_offset, left_shift, right_shift; + + cps = ((unsigned char*)src) + n; + cpd = ((unsigned char*)dst) + n; + + i = ((unsigned long)cpd) & 3; + + if (i) { + n -= i; + + do + *--cpd = *--cps; + while (--i); + } + + src_offset = ((unsigned int)cps) & 3; + + left_shift = src_offset << 3; + right_shift = 32 - left_shift; + + cps += 4 - src_offset; + + i = n >> 3; + + v1 = *--lps; + + do { + v2 = *--lps; + *--lpd = (v2 << left_shift) | (v1 >> right_shift); + v1 = *--lps; + *--lpd = (v1 << left_shift) | (v2 >> right_shift); + } while (--i); + + if (n & 4) { + v2 = *--lps; + *--lpd = (v2 << left_shift) | (v1 >> right_shift); + } + + n &= 3; + + if (n) { + cps += src_offset; + do + *--cpd = *--cps; + while (--n); + } + + return; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c new file mode 100644 index 00000000..d1b7ffdf --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/misc_io.c @@ -0,0 +1,8 @@ +#include "misc_io.h" +#include "abort_exit.h" +#include "ansi_files.h" + +/* 803664CC-803664DC 360E0C 0010+00 0/0 2/2 0/0 .text __stdio_atexit */ +void __stdio_atexit(void) { + __stdio_exit = __close_all; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c new file mode 100644 index 00000000..77ddf8ef --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/printf.c @@ -0,0 +1,1265 @@ +#include "printf.h" +#include "ansi_fp.h" +#include "critical_regions.h" +#include "ctype.h" +#include "scanf.h" +#include "stdio.h" +#include "string.h" +#include "wchar_io.h" + +#define TARGET_FLOAT_BITS 64 +#define TARGET_FLOAT_BYTES (TARGET_FLOAT_BITS / 8) +#define TARGET_FLOAT_MAX_EXP LDBL_MAX_EXP +#define TARGET_FLOAT_MANT_DIG LDBL_MANT_DIG +#define TARGET_FLOAT_IMPLICIT_J_BIT 1 +#define TARGET_FLOAT_MANT_BITS (TARGET_FLOAT_MANT_DIG - TARGET_FLOAT_IMPLICIT_J_BIT) +#define TARGET_FLOAT_EXP_BITS (TARGET_FLOAT_BITS - TARGET_FLOAT_MANT_BITS - 1) + +#define PTRDIFF __typeof__((char*)0 - (char*)0) +typedef PTRDIFF ptrdiff_t; + +enum justification_options { left_justification, right_justification, zero_fill }; + +enum sign_options { only_minus, sign_always, space_holder }; + +enum argument_options { + normal_argument, + char_argument, + short_argument, + long_argument, + long_long_argument, + long_double_argument, + wchar_argument +}; + +typedef struct { + unsigned char justification_options; + unsigned char sign_options; + unsigned char precision_specified; + unsigned char alternate_form; + unsigned char argument_options; + unsigned char conversion_char; + int field_width; + int precision; +} print_format; + +/* 80368288-8036878C 362BC8 0504+00 3/1 0/0 0/0 .text parse_format */ +static const char* parse_format(const char* format_string, va_list* arg, print_format* format) { + print_format f; + const char* s = format_string; + int c; + int flag_found; + f.justification_options = right_justification; + f.sign_options = only_minus; + f.precision_specified = 0; + f.alternate_form = 0; + f.argument_options = normal_argument; + f.field_width = 0; + f.precision = 0; + + if ((c = *++s) == '%') { + f.conversion_char = c; + *format = f; + return ((const char*)s + 1); + } + + for (;;) { + flag_found = 1; + + switch (c) { + case '-': + f.justification_options = left_justification; + break; + case '+': + f.sign_options = sign_always; + break; + case ' ': + if (f.sign_options != sign_always) { + f.sign_options = space_holder; + } + break; + case '#': + f.alternate_form = 1; + break; + case '0': + if (f.justification_options != left_justification) { + f.justification_options = zero_fill; + } + break; + default: + flag_found = 0; + break; + } + + if (flag_found) { + c = *++s; + } else { + break; + } + } + + if (c == '*') { + if ((f.field_width = va_arg(*arg, int)) < 0) { + f.justification_options = left_justification; + f.field_width = -f.field_width; + } + + c = *++s; + } else { + while (isdigit(c)) { + f.field_width = (f.field_width * 10) + (c - '0'); + c = *++s; + } + } + + if (f.field_width > 509) { + f.conversion_char = 0xFF; + *format = f; + return ((const char*)s + 1); + } + + if (c == '.') { + f.precision_specified = 1; + + if ((c = *++s) == '*') { + if ((f.precision = va_arg(*arg, int)) < 0) { + f.precision_specified = 0; + } + + c = *++s; + } else { + while (isdigit(c)) { + f.precision = (f.precision * 10) + (c - '0'); + c = *++s; + } + } + } + + flag_found = 1; + + switch (c) { + case 'h': + f.argument_options = short_argument; + + if (s[1] == 'h') { + f.argument_options = char_argument; + c = *++s; + } + + break; + + case 'l': + f.argument_options = long_argument; + + if (s[1] == 'l') { + f.argument_options = long_long_argument; + c = *++s; + } + + break; + + case 'L': + f.argument_options = long_double_argument; + break; + default: + flag_found = 0; + break; + } + + if (flag_found) { + c = *++s; + } + + f.conversion_char = c; + + switch (c) { + case 'd': + case 'i': + case 'u': + case 'o': + case 'x': + case 'X': + if (f.argument_options == long_double_argument) { + f.conversion_char = 0xFF; + break; + } + + if (!f.precision_specified) { + f.precision = 1; + } else if (f.justification_options == zero_fill) { + f.justification_options = right_justification; + } + break; + + case 'f': + case 'F': + if (f.argument_options == short_argument || f.argument_options == long_long_argument) { + f.conversion_char = 0xFF; + break; + } + + if (!f.precision_specified) { + f.precision = 6; + } + break; + + case 'a': + case 'A': + if (!f.precision_specified) { + f.precision = 0xD; + } + + if (f.argument_options == short_argument || f.argument_options == long_long_argument || + f.argument_options == char_argument) + { + f.conversion_char = 0xFF; + } + + break; + + case 'g': + case 'G': + if (!f.precision) { + f.precision = 1; + } + + case 'e': + case 'E': + if (f.argument_options == short_argument || f.argument_options == long_long_argument || + f.argument_options == char_argument) + { + f.conversion_char = 0xFF; + break; + } + + if (!f.precision_specified) { + f.precision = 6; + } + break; + + case 'p': + f.conversion_char = 'x'; + f.alternate_form = 1; + f.argument_options = long_argument; + f.precision = 8; + break; + + case 'c': + if (f.argument_options == long_argument) { + f.argument_options = wchar_argument; + } else { + if (f.precision_specified || f.argument_options != normal_argument) { + f.conversion_char = 0xFF; + } + } + + break; + + case 's': + if (f.argument_options == long_argument) { + f.argument_options = wchar_argument; + } else { + if (f.argument_options != normal_argument) { + f.conversion_char = 0xFF; + } + } + + break; + + case 'n': + if (f.argument_options == long_double_argument) { + f.conversion_char = 0xFF; + } + + break; + + default: + f.conversion_char = 0xFF; + break; + } + + *format = f; + return ((const char*)s + 1); +} + +/* 80368030-80368288 362970 0258+00 3/2 0/0 0/0 .text long2str */ +static char* long2str(signed long num, char* buff, print_format format) { + unsigned long unsigned_num, base; + char* p; + int n, digits; + int minus = 0; + unsigned_num = num; + minus = 0; + + p = buff; + *--p = 0; + digits = 0; + + if (!num && !format.precision && !(format.alternate_form && format.conversion_char == 'o')) { + return p; + } + + switch (format.conversion_char) { + case 'd': + case 'i': + base = 10; + + if (num < 0) { + unsigned_num = -unsigned_num; + minus = 1; + } + break; + + case 'o': + base = 8; + format.sign_options = only_minus; + break; + + case 'u': + base = 10; + format.sign_options = only_minus; + break; + + case 'x': + case 'X': + base = 16; + format.sign_options = only_minus; + break; + } + + do { + n = unsigned_num % base; + unsigned_num /= base; + + if (n < 10) { + n += '0'; + } else { + n -= 10; + + if (format.conversion_char == 'x') { + n += 'a'; + } else { + n += 'A'; + } + } + + *--p = n; + ++digits; + } while (unsigned_num != 0); + + if (base == 8 && format.alternate_form && *p != '0') { + *--p = '0'; + ++digits; + } + + if (format.justification_options == zero_fill) { + format.precision = format.field_width; + + if (minus || format.sign_options != only_minus) + --format.precision; + + if (base == 16 && format.alternate_form) + format.precision -= 2; + } + + if (buff - p + format.precision > 509) + return (0); + + while (digits < format.precision) { + *--p = '0'; + ++digits; + } + + if (base == 16 && format.alternate_form) { + *--p = format.conversion_char; + *--p = '0'; + } + + if (minus) { + *--p = '-'; + } else if (format.sign_options == sign_always) { + *--p = '+'; + } else if (format.sign_options == space_holder) { + *--p = ' '; + } + + return p; +} + +/* 80367D1C-80368030 36265C 0314+00 2/1 0/0 0/0 .text longlong2str */ +static char* longlong2str(signed long long num, char* pBuf, print_format fmt) { + unsigned long long unsigned_num, base; + char* p; + int n, digits; + int minus = 0; + unsigned_num = num; + minus = 0; + p = pBuf; + *--p = 0; + digits = 0; + + if (!num && !fmt.precision && !(fmt.alternate_form && fmt.conversion_char == 'o')) { + return p; + } + + switch (fmt.conversion_char) { + case 'd': + case 'i': + base = 10; + + if (num < 0) { + unsigned_num = -unsigned_num; + minus = 1; + } + break; + case 'o': + base = 8; + fmt.sign_options = only_minus; + break; + case 'u': + base = 10; + fmt.sign_options = only_minus; + break; + case 'x': + case 'X': + base = 16; + fmt.sign_options = only_minus; + break; + } + + do { + n = unsigned_num % base; + unsigned_num /= base; + + if (n < 10) { + n += '0'; + } else { + n -= 10; + if (fmt.conversion_char == 'x') { + n += 'a'; + } else { + n += 'A'; + } + } + + *--p = n; + ++digits; + } while (unsigned_num != 0); + + if (base == 8 && fmt.alternate_form && *p != '0') { + *--p = '0'; + ++digits; + } + + if (fmt.justification_options == zero_fill) { + fmt.precision = fmt.field_width; + + if (minus || fmt.sign_options != only_minus) { + --fmt.precision; + } + + if (base == 16 && fmt.alternate_form) { + fmt.precision -= 2; + } + } + + if (pBuf - p + fmt.precision > 509) { + return 0; + } + + while (digits < fmt.precision) { + *--p = '0'; + ++digits; + } + + if (base == 16 && fmt.alternate_form) { + *--p = fmt.conversion_char; + *--p = '0'; + } + + if (minus) { + *--p = '-'; + } else if (fmt.sign_options == sign_always) { + *--p = '+'; + } else if (fmt.sign_options == space_holder) { + *--p = ' '; + } + + return p; +} + +/* 803679E4-80367D1C 362324 0338+00 1/1 0/0 0/0 .text double2hex */ +static char* double2hex(long double num, char* buff, print_format format) { + int offset, what_nibble = 0; + char* wrk_byte_ptr; + char *p, *q; + char working_byte; + long double ld; + signed short* sptr; + signed short snum; + signed long exp; + print_format exp_format; + int hex_precision; + decform form; + decimal dec; + + p = buff; + ld = num; + sptr = (signed short*)&ld; + + if (format.precision > 509) { + return 0; + } + + form.style = (char)0; + form.digits = 0x20; + __num2dec(&form, num, &dec); + + if (*dec.sig.text == 'I') { + if (*sptr & 0x8000) { + p = buff - 5; + if (format.conversion_char == 'A') + strcpy(p, "-INF"); + else + strcpy(p, "-inf"); + } else { + p = buff - 4; + if (format.conversion_char == 'A') + strcpy(p, "INF"); + else + strcpy(p, "inf"); + } + + return p; + } else if (*dec.sig.text == 'N') { + if (*(char*)&num & 0x80) { + p = buff - 5; + if (format.conversion_char == 'A') + strcpy(p, "-NAN"); + else + strcpy(p, "-nan"); + } else { + p = buff - 4; + if (format.conversion_char == 'A') + strcpy(p, "NAN"); + else + strcpy(p, "nan"); + } + + return p; + } + + exp_format.justification_options = right_justification; + exp_format.sign_options = sign_always; + exp_format.precision_specified = 0; + exp_format.alternate_form = 0; + exp_format.argument_options = normal_argument; + exp_format.field_width = 0; + exp_format.precision = 1; + exp_format.conversion_char = 'd'; + + snum = (*sptr & 0x7ff0) >> 4; + + exp = snum - 0x3FF; + + p = long2str(exp, buff, exp_format); + if (format.conversion_char == 'a') + *--p = 'p'; + else + *--p = 'P'; + + q = (char*)# + + for (hex_precision = format.precision; hex_precision >= 1; hex_precision--) { + working_byte = *(q + (hex_precision / 2) + 1); + if (hex_precision % 2) + working_byte = working_byte & 0x0f; + else + working_byte = (working_byte >> 4) & 0x0f; + + if (working_byte < 10) { + working_byte += '0'; + } else { + working_byte -= 10; + + if (format.conversion_char == 'a') { + working_byte += 'a'; + } else { + working_byte += 'A'; + } + } + + *--p = working_byte; + } + + if (format.precision || format.alternate_form) { + *--p = '.'; + } + + *--p = '1'; + + if (format.conversion_char == 'a') { + *--p = 'x'; + } else { + *--p = 'X'; + } + + *--p = '0'; + + if (*sptr & 0x8000) { + *--p = '-'; + } else if (format.sign_options == sign_always) { + *--p = '+'; + } else if (format.sign_options == space_holder) { + *--p = ' '; + } + + return p; +} + +/* 803678B8-803679E4 3621F8 012C+00 1/1 0/0 0/0 .text round_decimal */ +static void round_decimal(decimal* dec, int new_length) { + char c; + char* p; + int carry; + + if (new_length < 0) { + return_zero: + dec->exp = 0; + dec->sig.length = 1; + *dec->sig.text = '0'; + return; + } + + if (new_length >= dec->sig.length) { + return; + } + + p = (char*)dec->sig.text + new_length + 1; + c = *--p - '0'; + + if (c == 5) { + char* q = &((char*)dec->sig.text)[dec->sig.length]; + + while (--q > p && *q == '0') + ; + carry = (q == p) ? p[-1] & 1 : 1; + } else { + carry = (c > 5); + } + + while (new_length != 0) { + c = *--p - '0' + carry; + + if ((carry = (c > 9)) != 0 || c == 0) { + --new_length; + } else { + *p = c + '0'; + break; + } + } + + if (carry != 0) { + dec->exp += 1; + dec->sig.length = 1; + *dec->sig.text = '1'; + return; + } else if (new_length == 0) { + goto return_zero; + } + + dec->sig.length = new_length; +} + +/* 8036719C-803678B8 361ADC 071C+00 1/1 0/0 0/0 .text float2str */ +static char* float2str(long double num, char* buff, print_format format) { + decimal dec; + decform form; + char* p; + char* q; + int n, digits, sign; + int int_digits, frac_digits; + int radix_marker; + + radix_marker = '.'; + + if (format.precision > 509) { + return 0; + } + + form.style = 0; + form.digits = 0x20; + __num2dec(&form, num, &dec); + p = (char*)dec.sig.text + dec.sig.length; + + while (dec.sig.length > 1 && *--p == '0') { + --dec.sig.length; + ++dec.exp; + } + + switch (*dec.sig.text) { + case '0': + dec.exp = 0; + break; + case 'I': + if (num < 0) { + p = buff - 5; + + if (isupper(format.conversion_char)) { + strcpy(p, "-INF"); + } else { + strcpy(p, "-inf"); + } + } else { + p = buff - 4; + if (isupper(format.conversion_char)) { + strcpy(p, "INF"); + } else { + strcpy(p, "inf"); + } + } + + return p; + + case 'N': + if (dec.sign) { + p = buff - 5; + + if (isupper(format.conversion_char)) { + strcpy(p, "-NAN"); + } else { + strcpy(p, "-nan"); + } + } else { + p = buff - 4; + if (isupper(format.conversion_char)) { + strcpy(p, "NAN"); + } else { + strcpy(p, "nan"); + } + } + + return p; + } + + dec.exp += dec.sig.length - 1; + p = buff; + *--p = 0; + + switch (format.conversion_char) { + case 'g': + case 'G': + + if (dec.sig.length > format.precision) { + round_decimal(&dec, format.precision); + } + + if (dec.exp < -4 || dec.exp >= format.precision) { + if (format.alternate_form) { + --format.precision; + } else { + format.precision = dec.sig.length - 1; + } + + if (format.conversion_char == 'g') { + format.conversion_char = 'e'; + } else { + format.conversion_char = 'E'; + } + + goto e_format; + } + + if (format.alternate_form) { + format.precision -= dec.exp + 1; + } else { + if ((format.precision = dec.sig.length - (dec.exp + 1)) < 0) { + format.precision = 0; + } + } + + goto f_format; + + case 'e': + case 'E': + e_format: + + if (dec.sig.length > format.precision + 1) { + round_decimal(&dec, format.precision + 1); + } + + n = dec.exp; + sign = '+'; + + if (n < 0) { + n = -n; + sign = '-'; + } + + for (digits = 0; n || digits < 2; ++digits) { + *--p = n % 10 + '0'; + n /= 10; + } + + *--p = sign; + *--p = format.conversion_char; + + if (buff - p + format.precision > 509) { + return 0; + } + + if (dec.sig.length < format.precision + 1) { + for (n = format.precision + 1 - dec.sig.length + 1; --n;) { + *--p = '0'; + } + } + + for (n = dec.sig.length, q = (char*)dec.sig.text + dec.sig.length; --n;) { + *--p = *--q; + } + + if (format.precision || format.alternate_form) { + *--p = radix_marker; + } + + *--p = *dec.sig.text; + + if (dec.sign) + *--p = '-'; + else if (format.sign_options == sign_always) + *--p = '+'; + else if (format.sign_options == space_holder) + *--p = ' '; + + break; + + case 'f': + case 'F': + f_format: + + if ((frac_digits = -dec.exp + dec.sig.length - 1) < 0) + frac_digits = 0; + + if (frac_digits > format.precision) { + round_decimal(&dec, dec.sig.length - (frac_digits - format.precision)); + + if ((frac_digits = -dec.exp + dec.sig.length - 1) < 0) + frac_digits = 0; + } + + if ((int_digits = dec.exp + 1) < 0) + int_digits = 0; + + if (int_digits + frac_digits > 509) + return 0; + + q = (char*)dec.sig.text + dec.sig.length; + + for (digits = 0; digits < (format.precision - frac_digits); ++digits) + *--p = '0'; + + for (digits = 0; digits < frac_digits && digits < dec.sig.length; ++digits) + *--p = *--q; + + for (; digits < frac_digits; ++digits) + *--p = '0'; + + if (format.precision || format.alternate_form) + *--p = radix_marker; + + if (int_digits) { + for (digits = 0; digits < int_digits - dec.sig.length; ++digits) { + *--p = '0'; + } + + for (; digits < int_digits; ++digits) { + *--p = *--q; + } + } else { + *--p = '0'; + } + + if (dec.sign) { + *--p = '-'; + } else if (format.sign_options == sign_always) { + *--p = '+'; + } else if (format.sign_options == space_holder) { + *--p = ' '; + } + + break; + } + + return p; +} + +/* 80366A28-8036719C 361368 0774+00 6/6 0/0 0/0 .text __pformatter */ +static int __pformatter(void* (*WriteProc)(void*, const char*, size_t), void* WriteProcArg, + const char* format_str, va_list arg) { + int num_chars, chars_written, field_width; + const char* format_ptr; + const char* curr_format; + print_format format; + signed long long_num; + signed long long long_long_num; + long double long_double_num; + char buff[512]; + char* buff_ptr; + char* string_end; + char fill_char = ' '; + + format_ptr = format_str; + chars_written = 0; + + while (*format_ptr) { + if (!(curr_format = strchr(format_ptr, '%'))) { + num_chars = strlen(format_ptr); + chars_written += num_chars; + + if (num_chars && !(*WriteProc)(WriteProcArg, format_ptr, num_chars)) { + return -1; + } + + break; + } + + num_chars = curr_format - format_ptr; + chars_written += num_chars; + + if (num_chars && !(*WriteProc)(WriteProcArg, format_ptr, num_chars)) { + return -1; + } + + format_ptr = curr_format; + format_ptr = parse_format(format_ptr, (va_list*)arg, &format); + + switch (format.conversion_char) { + case 'd': + case 'i': + if (format.argument_options == long_argument) { + long_num = va_arg(arg, signed long); + } else if (format.argument_options == long_long_argument) { + long_long_num = va_arg(arg, signed long long); + } else { + long_num = va_arg(arg, int); + } + + if (format.argument_options == short_argument) { + long_num = (signed short)long_num; + } + + if (format.argument_options == char_argument) { + long_num = (signed char)long_num; + } + + if ((format.argument_options == long_long_argument)) { + if (!(buff_ptr = longlong2str(long_long_num, buff + 512, format))) { + goto conversion_error; + } + } else { + if (!(buff_ptr = long2str(long_num, buff + 512, format))) { + goto conversion_error; + } + } + + num_chars = buff + 512 - 1 - buff_ptr; + break; + + case 'o': + case 'u': + case 'x': + case 'X': + if (format.argument_options == long_argument) { + long_num = va_arg(arg, unsigned long); + } else if (format.argument_options == long_long_argument) { + long_long_num = va_arg(arg, signed long long); + } else { + long_num = va_arg(arg, unsigned int); + } + + if (format.argument_options == short_argument) { + long_num = (unsigned short)long_num; + } + + if (format.argument_options == char_argument) { + long_num = (unsigned char)long_num; + } + + if ((format.argument_options == long_long_argument)) { + if (!(buff_ptr = longlong2str(long_long_num, buff + 512, format))) { + goto conversion_error; + } + } else { + if (!(buff_ptr = long2str(long_num, buff + 512, format))) { + goto conversion_error; + } + } + + num_chars = buff + 512 - 1 - buff_ptr; + break; + + case 'f': + case 'F': + case 'e': + case 'E': + case 'g': + case 'G': + if (format.argument_options == long_double_argument) { + long_double_num = va_arg(arg, long double); + } else { + long_double_num = va_arg(arg, f64); + } + + if (!(buff_ptr = float2str(long_double_num, buff + 512, format))) { + goto conversion_error; + } + + num_chars = buff + 512 - 1 - buff_ptr; + break; + + case 'a': + case 'A': + if (format.argument_options == long_double_argument) { + long_double_num = va_arg(arg, long double); + } else { + long_double_num = va_arg(arg, f64); + } + + if (!(buff_ptr = double2hex(long_double_num, buff + 512, format))) { + goto conversion_error; + } + + num_chars = buff + 512 - 1 - buff_ptr; + break; + + case 's': + if (format.argument_options == wchar_argument) { + wchar_t* wcs_ptr = va_arg(arg, wchar_t*); + + if (wcs_ptr == NULL) { + wcs_ptr = L""; + } + + if ((num_chars = wcstombs(buff, wcs_ptr, sizeof(buff))) < 0) { + goto conversion_error; + } + + buff_ptr = &buff[0]; + } else { + buff_ptr = va_arg(arg, char*); + } + + if (buff_ptr == NULL) { + buff_ptr = ""; + } + + if (format.alternate_form) { + num_chars = (unsigned char)*buff_ptr++; + + if (format.precision_specified && num_chars > format.precision) { + num_chars = format.precision; + } + } else if (format.precision_specified) { + num_chars = format.precision; + + if ((string_end = (char*)memchr((unsigned char*)buff_ptr, 0, num_chars)) != 0) { + num_chars = string_end - buff_ptr; + } + } else { + num_chars = strlen(buff_ptr); + } + + break; + + case 'n': + buff_ptr = va_arg(arg, char*); + + switch (format.argument_options) { + case normal_argument: + *(int*)buff_ptr = chars_written; + break; + case short_argument: + *(signed short*)buff_ptr = chars_written; + break; + case long_argument: + *(signed long*)buff_ptr = chars_written; + break; + case long_long_argument: + *(signed long long*)buff_ptr = chars_written; + break; + } + + continue; + + case 'c': + buff_ptr = buff; + *buff_ptr = va_arg(arg, int); + num_chars = 1; + break; + + case '%': + buff_ptr = buff; + *buff_ptr = '%'; + num_chars = 1; + break; + + case 0xFF: + default: + conversion_error: + num_chars = strlen(curr_format); + chars_written += num_chars; + + if (num_chars && !(*WriteProc)(WriteProcArg, curr_format, num_chars)) { + return -1; + } + + return chars_written; + break; + } + + field_width = num_chars; + + if (format.justification_options != left_justification) { + fill_char = (format.justification_options == zero_fill) ? '0' : ' '; + + if (((*buff_ptr == '+') || (*buff_ptr == '-') || (*buff_ptr == ' ')) && + (fill_char == '0')) + { + if ((*WriteProc)(WriteProcArg, buff_ptr, 1) == 0) { + return -1; + } + + ++buff_ptr; + num_chars--; + } + + while (field_width < format.field_width) { + if ((*WriteProc)(WriteProcArg, &fill_char, 1) == 0) { + return -1; + } + + ++field_width; + } + } + + if (num_chars && !(*WriteProc)(WriteProcArg, buff_ptr, num_chars)) { + return -1; + } + + if (format.justification_options == left_justification) { + while (field_width < format.field_width) { + char blank = ' '; + + if ((*WriteProc)(WriteProcArg, &blank, 1) == 0) { + return -1; + } + + ++field_width; + } + } + + chars_written += field_width; + } + + return chars_written; +} + +/* 803669D0-80366A28 361310 0058+00 3/3 0/0 0/0 .text __FileWrite */ +static void* __FileWrite(void* pFile, const char* pBuffer, size_t char_num) { + return (fwrite(pBuffer, 1, char_num, (FILE*)pFile) == char_num ? pFile : 0); +} + +/* 80366964-803669D0 3612A4 006C+00 3/3 0/0 0/0 .text __StringWrite */ +static void* __StringWrite(void* pCtrl, const char* pBuffer, size_t char_num) { + size_t chars; + __OutStrCtrl* ctrl = (__OutStrCtrl*)pCtrl; + void* res; + + chars = ((ctrl->CharsWritten + char_num) <= ctrl->MaxCharCount) ? + char_num : + ctrl->MaxCharCount - ctrl->CharsWritten; + res = memcpy(ctrl->CharStr + ctrl->CharsWritten, pBuffer, chars); + ctrl->CharsWritten += chars; + return (void*)1; +} + +/* 8036687C-80366964 3611BC 00E8+00 0/0 4/4 0/0 .text printf */ +int printf(const char* format, ...) { + int res; + + if (fwide(stdout, -1) >= 0) { + return -1; + } + + __begin_critical_region(stdin_access); + { + va_list args; + va_start(args, format); + res = __pformatter(&__FileWrite, (void*)stdout, format, args); + } + __end_critical_region(stdin_access); + return res; +} + +/* 8036679C-8036687C 3610DC 00E0+00 0/0 9/9 0/0 .text fprintf */ +int fprintf(FILE* file, const char* format, ...) { + int res; + + if (fwide(file, -1) >= 0) { + return -1; + } + + __begin_critical_region(stdin_access); + { + va_list args; + va_start(args, format); + res = __pformatter(&__FileWrite, (void*)file, format, args); + } + __end_critical_region(stdin_access); + return res; +} + +/* 80366704-8036679C 361044 0098+00 0/0 2/2 0/0 .text vprintf */ +int vprintf(const char* format, va_list arg) { + int ret; + + if (fwide(stdout, -1) >= 0) { + return -1; + } + + __begin_critical_region(stdin_access); + ret = __pformatter(&__FileWrite, (void*)stdout, format, arg); + __end_critical_region(stdin_access); + return ret; +} + +/* 80366690-80366704 360FD0 0074+00 0/0 8/8 0/0 .text vsnprintf */ +int vsnprintf(char* s, size_t n, const char* format, va_list arg) { + int end; + __OutStrCtrl osc; + osc.CharStr = s; + osc.MaxCharCount = n; + osc.CharsWritten = 0; + + end = __pformatter(&__StringWrite, &osc, format, arg); + + if (s) { + s[(end < n) ? end : n - 1] = '\0'; + } + + return end; +} + +/* 803665BC-80366690 360EFC 00D4+00 0/0 19/19 0/0 .text snprintf */ +int snprintf(char* s, size_t n, const char* format, ...) { + va_list args; + va_start(args, format); + return vsnprintf(s, n, format, args); +} + +/* 803664DC-803665BC 360E1C 00E0+00 0/0 32/32 14/14 .text sprintf */ +int sprintf(char* s, const char* format, ...) { + va_list args; + va_start(args, format); + return vsnprintf(s, 0xFFFFFFFF, format, args); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c new file mode 100644 index 00000000..ca8a17fb --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/scanf.c @@ -0,0 +1,34 @@ +#include "scanf.h" + +/* 8036878C-8036881C 3630CC 0090+00 0/0 2/2 0/0 .text __StringRead */ +int __StringRead(void* pPtr, int ch, int act) { + char ret; + __InStrCtrl* Iscp = (__InStrCtrl*)pPtr; + + switch (act) { + case __GetAChar: + ret = *(Iscp->NextChar); + + if (ret == '\0') { + Iscp->NullCharDetected = 1; + return -1; + } else { + Iscp->NextChar++; + return (unsigned char)ret; + } + + case __UngetAChar: + if (Iscp->NullCharDetected == 0) { + Iscp->NextChar--; + } else { + Iscp->NullCharDetected = 0; + } + + return ch; + + case __TestForError: + return Iscp->NullCharDetected; + } + + return 0; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c new file mode 100644 index 00000000..76042b07 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/signal.c @@ -0,0 +1,38 @@ +#include "signal.h" +#include "critical_regions.h" + +#define __std(ref) ref + +/* 8044D878-8044D890 07A598 0018+00 1/1 0/0 0/0 .bss signal_funcs */ +__signal_func_ptr signal_funcs[6]; + +/* 8036881C-803688DC 36315C 00C0+00 0/0 1/1 0/0 .text raise */ +int raise(int sig) { + __signal_func_ptr signal_func; + + if (sig < 1 || sig > 6) { + return -1; + } + + __begin_critical_region(stderr_access); + signal_func = signal_funcs[sig - 1]; + + if (signal_func != ((__std(__signal_func_ptr))1)) { + signal_funcs[sig - 1] = ((__std(__signal_func_ptr))0); + } + + __end_critical_region(stderr_access); + + if (signal_func == ((__std(__signal_func_ptr))1) || + (signal_func == ((__std(__signal_func_ptr))0) && sig == 1)) + { + return 0; + } + + if (signal_func == ((__std(__signal_func_ptr))0)) { + exit(0); + } + + (*signal_func)(sig); + return 0; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c new file mode 100644 index 00000000..9afa7acf --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/string.c @@ -0,0 +1,246 @@ +#include "string.h" + +#define K1 0x80808080 +#define K2 0xFEFEFEFF + +/* 80368BE4-80368C00 363524 001C+00 0/0 28/28 8/8 .text strlen */ +size_t strlen(const char* str) { + size_t len = -1; + unsigned char* p = (unsigned char*)str - 1; + + do { + len++; + } while (*++p); + + return len; +} + +/* 80368B2C-80368BE4 36346C 00B8+00 0/0 131/131 13/13 .text strcpy */ +char* strcpy(char* dst, const char* src) { + register unsigned char *destb, *fromb; + register unsigned long w, t, align; + + fromb = (unsigned char*)src; + destb = (unsigned char*)dst; + + if ((align = ((int)fromb & 3)) != ((int)destb & 3)) { + goto bytecopy; + } + + if (align) { + if ((*destb = *fromb) == 0) { + return dst; + } + + for (align = 3 - align; align; align--) { + if ((*(++destb) = *(++fromb)) == 0) { + return dst; + } + } + ++destb; + ++fromb; + } + + w = *((int*)(fromb)); + + t = w + K2; + + t &= K1; + if (t) { + goto bytecopy; + } + --((int*)(destb)); + + do { + *(++((int*)(destb))) = w; + w = *(++((int*)(fromb))); + + t = w + K2; + t &= K1; + if (t) { + goto adjust; + } + } while (1); + +adjust: + ++((int*)(destb)); + +bytecopy: + if ((*destb = *fromb) == 0) { + return dst; + } + + do { + if ((*(++destb) = *(++fromb)) == 0) { + return dst; + } + } while (1); + + return dst; +} + +/* 80368AE8-80368B2C 363428 0044+00 0/0 9/9 1/1 .text strncpy */ +char* strncpy(char* dst, const char* src, size_t n) { + const unsigned char* p = (const unsigned char*)src - 1; + unsigned char* q = (unsigned char*)dst - 1; + + n++; + while (--n) { + if (!(*++q = *++p)) { + while (--n) { + *++q = 0; + } + break; + } + } + + return dst; +} + +/* 80368ABC-80368AE8 3633FC 002C+00 0/0 20/20 8/8 .text strcat */ +char* strcat(char* dst, const char* src) { + const unsigned char* p = (unsigned char*)src - 1; + unsigned char* q = (unsigned char*)dst - 1; + + while (*++q) { + } + + q--; + + while (*++q = *++p) { + } + + return dst; +} + +/* 80368994-80368ABC 3632D4 0128+00 0/0 155/155 279/279 .text strcmp */ +int strcmp(const char* str1, const char* str2) { + register unsigned char* left = (unsigned char*)str1; + register unsigned char* right = (unsigned char*)str2; + unsigned long align, l1, r1, x; + + l1 = *left; + r1 = *right; + if (l1 - r1) { + return l1 - r1; + } + + if ((align = ((int)left & 3)) != ((int)right & 3)) { + goto bytecopy; + } + + if (align) { + if (l1 == 0) { + return 0; + } + for (align = 3 - align; align; align--) { + l1 = *(++left); + r1 = *(++right); + if (l1 - r1) { + return l1 - r1; + } + if (l1 == 0) { + return 0; + } + } + left++; + right++; + } + + l1 = *(int*)left; + r1 = *(int*)right; + x = l1 + K2; + if (x & K1) { + goto adjust; + } + + while (l1 == r1) { + l1 = *(++((int*)(left))); + r1 = *(++((int*)(right))); + x = l1 + K2; + if (x & K1) { + goto adjust; + } + } + + if (l1 > r1) { + return 1; + } + return -1; + +adjust: + l1 = *left; + r1 = *right; + if (l1 - r1) { + return l1 - r1; + } + +bytecopy: + if (l1 == 0) { + return 0; + } + + do { + l1 = *(++left); + r1 = *(++right); + if (l1 - r1) { + return l1 - r1; + } + if (l1 == 0) { + return 0; + } + } while (1); +} + +/* 80368954-80368994 363294 0040+00 0/0 6/6 0/0 .text strncmp */ +int strncmp(const char* str1, const char* str2, size_t n) { + const unsigned char* p1 = (unsigned char*)str1 - 1; + const unsigned char* p2 = (unsigned char*)str2 - 1; + unsigned long c1, c2; + + n++; + while (--n) { + if ((c1 = *++p1) != (c2 = *++p2)) { + return c1 - c2; + } else if (c1 == 0) { + break; + } + } + + return 0; +} + +/* 80368924-80368954 363264 0030+00 0/0 3/3 0/0 .text strchr */ +char* strchr(const char* str, int c) { + const unsigned char* p = (unsigned char*)str - 1; + unsigned long chr = (c & 0xFF); + + unsigned long ch; + while (ch = *++p) { + if (ch == chr) { + return (char*)p; + } + } + + return chr ? NULL : (char*)p; +} + +/* 803688DC-80368924 36321C 0048+00 0/0 1/1 0/0 .text strrchr */ +char* strrchr(const char* str, int c) { + const unsigned char* p = (unsigned char*)str - 1; + const unsigned char* q = NULL; + unsigned long chr = (c & 0xFF); + + unsigned long ch; + while (ch = *++p) { + if (ch == chr) { + q = p; + } + } + + if (q != NULL) { + return (char*)q; + } + + return chr ? NULL : (char*)p; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c new file mode 100644 index 00000000..50cb3fe2 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/strtoul.c @@ -0,0 +1,203 @@ +#include "strtoul.h" +#include "ctype.h" +#include "errno.h" +#include "limits.h" +#include "scanf.h" + +enum scan_states { + start = 0x01, + check_for_zero = 0x02, + leading_zero = 0x04, + need_digit = 0x08, + digit_loop = 0x10, + finished = 0x20, + failure = 0x40 +}; + +#define final_state(scan_state) (scan_state & (finished | failure)) +#define success(scan_state) (scan_state & (leading_zero | digit_loop | finished)) +#define fetch() (count++, (*ReadProc)(ReadProcArg, 0, __GetAChar)) +#define unfetch(c) (*ReadProc)(ReadProcArg, c, __UngetAChar) + +/* 80368D9C-80369114 3636DC 0378+00 3/2 0/0 0/0 .text __strtoul */ +unsigned long __strtoul(int base, int max_width, int (*ReadProc)(void*, int, int), + void* ReadProcArg, int* chars_scanned, int* negative, int* overflow) { + int scan_state = start; + int count = 0; + int spaces = 0; + unsigned long value = 0; + unsigned long value_max = 0; + int c; + + *negative = *overflow = 0; + + if (base < 0 || base == 1 || base > 36 || max_width < 1) { + scan_state = failure; + } else { + c = fetch(); + } + + if (base != 0) { + value_max = ULONG_MAX / base; + } + + while (count <= max_width && c != -1 && !final_state(scan_state)) { + switch (scan_state) { + case start: + if (isspace(c)) { + c = fetch(); + count--; + spaces++; + break; + } + + if (c == '+') { + c = fetch(); + } else if (c == '-') { + c = fetch(); + *negative = 1; + } + + scan_state = check_for_zero; + break; + + case check_for_zero: + if (base == 0 || base == 16) { + if (c == '0') { + scan_state = leading_zero; + c = fetch(); + break; + } + } + + scan_state = need_digit; + break; + + case 4: + if (c == 'X' || c == 'x') { + base = 16; + scan_state = need_digit; + c = fetch(); + break; + } + + if (base == 0) { + base = 8; + } + + scan_state = digit_loop; + break; + + case need_digit: + case digit_loop: + if (base == 0) { + base = 10; + } + + if (!value_max) { + value_max = ULONG_MAX / base; + } + + if (isdigit(c)) { + if ((c -= '0') >= base) { + if (scan_state == digit_loop) { + scan_state = finished; + } else { + scan_state = failure; + } + + c += '0'; + break; + } + } else if (!isalpha(c) || (toupper(c) - 'A' + 10) >= base) { + if (scan_state == digit_loop) { + scan_state = finished; + } else { + scan_state = failure; + } + + break; + } else { + c = toupper(c) - 'A' + 10; + } + + if (value > value_max) { + *overflow = 1; + } + + value *= base; + + if (c > (ULONG_MAX - value)) { + *overflow = 1; + } + + value += c; + scan_state = digit_loop; + c = fetch(); + break; + } + } + + if (!success(scan_state)) { + count = 0; + value = 0; + *chars_scanned = 0; + } else { + count--; + *chars_scanned = count + spaces; + } + + unfetch(c); + return value; +} + +/* 80368CF0-80368D9C 363630 00AC+00 0/0 2/2 0/0 .text strtoul */ +unsigned long strtoul(const char* str, char** end, int base) { + unsigned long value; + int count, negative, overflow; + + __InStrCtrl isc; + isc.NextChar = (char*)str; + isc.NullCharDetected = 0; + + value = __strtoul(base, 0x7FFFFFFF, &__StringRead, (void*)&isc, &count, &negative, &overflow); + + if (end) { + *end = (char*)str + count; + } + + if (overflow) { + value = ULONG_MAX; + errno = 0x22; + } else if (negative) { + value = -value; + } + + return value; +} + +/* 80368C00-80368CF0 363540 00F0+00 0/0 3/3 0/0 .text strtol */ +long strtol(const char* str, char** end, int base) { + unsigned long uvalue; + long svalue; + int count, negative, overflow; + + __InStrCtrl isc; + isc.NextChar = (char*)str; + isc.NullCharDetected = 0; + + uvalue = __strtoul(base, 0x7FFFFFFF, &__StringRead, (void*)&isc, &count, &negative, &overflow); + + if (end) { + *end = (char*)str + count; + } + + if (overflow || (!negative && uvalue > LONG_MAX) || (negative && uvalue > -LONG_MIN)) { + svalue = (negative ? -LONG_MIN : LONG_MAX); + errno = ERANGE; + } else { + svalue = (negative ? (long)-uvalue : (long)uvalue); + } + + return svalue; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c new file mode 100644 index 00000000..f54bcc6b --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Src/wchar_io.c @@ -0,0 +1,22 @@ +#include "wchar_io.h" + +/* 80369114-8036919C 363A54 0088+00 0/0 5/5 0/0 .text fwide */ +int fwide(FILE* file, int mode) { + if (file == NULL || file->file_mode.file_kind == __closed_file) { + return 0; + } + + switch (file->file_mode.file_orientation) { + case UNORIENTED: + if (mode > 0) { + file->file_mode.file_orientation = WIDE_ORIENTED; + } else if (mode < 0) { + file->file_mode.file_orientation = CHAR_ORIENTED; + } + return mode; + case WIDE_ORIENTED: + return 1; + case CHAR_ORIENTED: + return -1; + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c new file mode 100644 index 00000000..d246b33d --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_acos.c @@ -0,0 +1,104 @@ +/* @(#)e_acos.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_acos(x) + * Method : + * acos(x) = pi/2 - asin(x) + * acos(-x) = pi/2 + asin(x) + * For |x|<=0.5 + * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c) + * For x>0.5 + * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2))) + * = 2asin(sqrt((1-x)/2)) + * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z) + * = 2f + (2c + 2s*z*R(z)) + * where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term + * for f so that f+c ~ sqrt(z). + * For x<-0.5 + * acos(x) = pi - 2asin(sqrt((1-|x|)/2)) + * = pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z) + * + * Special cases: + * if x is NaN, return x itself; + * if |x|>1, return NaN with invalid signal. + * + * Function needed: sqrt + */ + +#include "math.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif +one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ +pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ +pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ +pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */ +pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */ +pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */ +pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */ +pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */ +pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */ +pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */ +qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */ +qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ +qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ +qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ + +#ifdef __STDC__ + double __ieee754_acos(double x) +#else + double __ieee754_acos(x) + double x; +#endif +{ + double z,p,q,r,w,s,c,df; + int hx,ix; + hx = __HI(x); + ix = hx&0x7fffffff; + if(ix>=0x3ff00000) { /* |x| >= 1 */ + if(((ix-0x3ff00000)|__LO(x))==0) { /* |x|==1 */ + if(hx>0) return 0.0; /* acos(1) = 0 */ + else return pi+2.0*pio2_lo; /* acos(-1)= pi */ + } + return NAN; /* acos(|x|>1) is NaN */ + } + if(ix<0x3fe00000) { /* |x| < 0.5 */ + if(ix<=0x3c600000) return pio2_hi+pio2_lo;/*if|x|<2**-57*/ + z = x*x; + p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5))))); + q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4))); + r = p/q; + return pio2_hi - (x - (pio2_lo-x*r)); + } else if (hx<0) { /* x < -0.5 */ + z = (one+x)*0.5; + p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5))))); + q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4))); + s = sqrt(z); + r = p/q; + w = r*s-pio2_lo; + return pi - 2.0*(s+w); + } else { /* x > 0.5 */ + z = (one-x)*0.5; + s = sqrt(z); + df = s; + __LO(df) = 0; + c = (z-df*df)/(s+df); + p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5))))); + q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4))); + r = p/q; + w = r*s+c; + return 2.0*(df+w); + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c new file mode 100644 index 00000000..3e73711a --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_asin.c @@ -0,0 +1,115 @@ +/* @(#)e_asin.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_asin(x) + * Method : + * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... + * we approximate asin(x) on [0,0.5] by + * asin(x) = x + x*x^2*R(x^2) + * where + * R(x^2) is a rational approximation of (asin(x)-x)/x^3 + * and its remez error is bounded by + * |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75) + * + * For x in [0.5,1] + * asin(x) = pi/2-2*asin(sqrt((1-x)/2)) + * Let y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2; + * then for x>0.98 + * asin(x) = pi/2 - 2*(s+s*z*R(z)) + * = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo) + * For x<=0.98, let pio4_hi = pio2_hi/2, then + * f = hi part of s; + * c = sqrt(z) - f = (z-f*f)/(s+f) ...f+c=sqrt(z) + * and + * asin(x) = pi/2 - 2*(s+s*z*R(z)) + * = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo) + * = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c)) + * + * Special cases: + * if x is NaN, return x itself; + * if |x|>1, return NaN with invalid signal. + * + */ + +#include "math.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + one + = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + huge = 1.000e+300, pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */ + pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */ + pio4_hi = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */ + /* coefficient for R(x^2) */ + pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */ + pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */ + pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */ + pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */ + pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */ + pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */ + qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */ + qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ + qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ + qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ + +#ifdef __STDC__ +double __ieee754_asin(double x) +#else +double __ieee754_asin(x) double x; +#endif +{ + double t, w, p, q, c, r, s; + int hx, ix; + hx = __HI(x); + ix = hx & 0x7fffffff; + if (ix >= 0x3ff00000) { /* |x|>= 1 */ + if (((ix - 0x3ff00000) | __LO(x)) == 0) + /* asin(1)=+-pi/2 with inexact */ + return x * pio2_hi + x * pio2_lo; + return NAN; /* asin(|x|>1) is NaN */ + } else if (ix < 0x3fe00000) { /* |x|<0.5 */ + if (ix < 0x3e400000) { /* if |x| < 2**-27 */ + if (huge + x > one) + return x; /* return x with inexact if x!=0*/ + } else + t = x * x; + p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5))))); + q = one + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4))); + w = p / q; + return x + x * w; + } + /* 1> |x|>= 0.5 */ + w = one - fabs(x); + t = w * 0.5; + p = t * (pS0 + t * (pS1 + t * (pS2 + t * (pS3 + t * (pS4 + t * pS5))))); + q = one + t * (qS1 + t * (qS2 + t * (qS3 + t * qS4))); + s = sqrt(t); + if (ix >= 0x3FEF3333) { /* if |x| > 0.975 */ + w = p / q; + t = pio2_hi - (2.0 * (s + s * w) - pio2_lo); + } else { + w = s; + __LO(w) = 0; + c = (t - w * w) / (s + w); + r = p / q; + p = 2.0 * s * r - (pio2_lo - 2.0 * c); + q = pio4_hi - 2.0 * w; + t = pio4_hi - (p - q); + } + if (hx > 0) + return t; + else + return -t; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c new file mode 100644 index 00000000..5aaba469 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c @@ -0,0 +1,142 @@ +/* @(#)e_atan2.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* __ieee754_atan2(y,x) + * Method : + * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x). + * 2. Reduce x to positive by (if x and y are unexceptional): + * ARG (x+iy) = arctan(y/x) ... if x > 0, + * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0, + * + * Special cases: + * + * ATAN2((anything), NaN ) is NaN; + * ATAN2(NAN , (anything) ) is NaN; + * ATAN2(+-0, +(anything but NaN)) is +-0 ; + * ATAN2(+-0, -(anything but NaN)) is +-pi ; + * ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2; + * ATAN2(+-(anything but INF and NaN), +INF) is +-0 ; + * ATAN2(+-(anything but INF and NaN), -INF) is +-pi; + * ATAN2(+-INF,+INF ) is +-pi/4 ; + * ATAN2(+-INF,-INF ) is +-3pi/4; + * ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2; + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + tiny + = 1.0e-300, + zero = 0.0, pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */ + pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ + pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ + pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ + +#ifdef __STDC__ +double __ieee754_atan2(double y, double x) +#else +double __ieee754_atan2(y, x) double y, x; +#endif +{ + double z; + int k, m, hx, hy, ix, iy; + unsigned lx, ly; + + hx = __HI(x); + ix = hx & 0x7fffffff; + lx = __LO(x); + hy = __HI(y); + iy = hy & 0x7fffffff; + ly = __LO(y); + if (((ix | ((lx | -lx) >> 31)) > 0x7ff00000) || ((iy | ((ly | -ly) >> 31)) > 0x7ff00000)) /* x or y is NaN */ + return x + y; + if ((hx - 0x3ff00000 | lx) == 0) + return atan(y); /* x=1.0 */ + m = ((hy >> 31) & 1) | ((hx >> 30) & 2); /* 2*sign(x)+sign(y) */ + + /* when y = 0 */ + if ((iy | ly) == 0) { + switch (m) { + case 0: + case 1: + return y; /* atan(+-0,+anything)=+-0 */ + case 2: + return pi + tiny; /* atan(+0,-anything) = pi */ + case 3: + return -pi - tiny; /* atan(-0,-anything) =-pi */ + } + } + /* when x = 0 */ + if ((ix | lx) == 0) + return (hy < 0) ? -pi_o_2 - tiny : pi_o_2 + tiny; + + /* when x is INF */ + if (ix == 0x7ff00000) { + if (iy == 0x7ff00000) { + switch (m) { + case 0: + return pi_o_4 + tiny; /* atan(+INF,+INF) */ + case 1: + return -pi_o_4 - tiny; /* atan(-INF,+INF) */ + case 2: + return 3.0 * pi_o_4 + tiny; /*atan(+INF,-INF)*/ + case 3: + return -3.0 * pi_o_4 - tiny; /*atan(-INF,-INF)*/ + } + } else { + switch (m) { + case 0: + return zero; /* atan(+...,+INF) */ + case 1: + return -zero; /* atan(-...,+INF) */ + case 2: + return pi + tiny; /* atan(+...,-INF) */ + case 3: + return -pi - tiny; /* atan(-...,-INF) */ + } + } + } + /* when y is INF */ + if (iy == 0x7ff00000) + return (hy < 0) ? -pi_o_2 - tiny : pi_o_2 + tiny; + + /* compute y/x */ + k = (iy - ix) >> 20; + if (k > 60) + z = pi_o_2 + 0.5 * pi_lo; /* |y/x| > 2**60 */ + else if (hx < 0 && k < -60) + z = 0.0; /* |y|/x < -2**60 */ + else + z = atan(__fabs(y / x)); /* safe to do y/x */ + switch (m) { + case 0: + return z; /* atan(+,+) */ + case 1: + __HI(z) ^= 0x80000000; + return z; /* atan(-,+) */ + case 2: + return pi - (z - pi_lo); /* atan(+,-) */ + default: /* case 3 */ + return (z - pi_lo) - pi; /* atan(-,-) */ + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c new file mode 100644 index 00000000..5673c527 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_exp.c @@ -0,0 +1,161 @@ +/* @(#)e_exp.c 1.6 04/04/22 */ +/* + * ==================================================== + * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved. + * + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_exp(x) + * Returns the exponential of x. + * + * Method + * 1. Argument reduction: + * Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658. + * Given x, find r and integer k such that + * + * x = k*ln2 + r, |r| <= 0.5*ln2. + * + * Here r will be represented as r = hi-lo for better + * accuracy. + * + * 2. Approximation of exp(r) by a special rational function on + * the interval [0,0.34658]: + * Write + * R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ... + * We use a special Remes algorithm on [0,0.34658] to generate + * a polynomial of degree 5 to approximate R. The maximum error + * of this polynomial approximation is bounded by 2**-59. In + * other words, + * R(z) ~ 2.0 + P1*z + P2*z**2 + P3*z**3 + P4*z**4 + P5*z**5 + * (where z=r*r, and the values of P1 to P5 are listed below) + * and + * | 5 | -59 + * | 2.0+P1*z+...+P5*z - R(z) | <= 2 + * | | + * The computation of exp(r) thus becomes + * 2*r + * exp(r) = 1 + ------- + * R - r + * r*R1(r) + * = 1 + r + ----------- (for better accuracy) + * 2 - R1(r) + * where + * 2 4 10 + * R1(r) = r - (P1*r + P2*r + ... + P5*r ). + * + * 3. Scale back to obtain exp(x): + * From step 1, we have + * exp(x) = 2^k * exp(r) + * + * Special cases: + * exp(INF) is INF, exp(NaN) is NaN; + * exp(-INF) is 0, and + * for finite argument, only exp(0)=1 is exact. + * + * Accuracy: + * according to an error analysis, the error is always less than + * 1 ulp (unit in the last place). + * + * Misc. info. + * For IEEE double + * if x > 7.09782712893383973096e+02 then exp(x) overflow + * if x < -7.45133219101941108420e+02 then exp(x) underflow + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif +one = 1.0, +halF[2] = {0.5,-0.5,}, +huge = 1.0e+300, +twom1000= 9.33263618503218878990e-302, /* 2**-1000=0x01700000,0*/ +o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ +u_threshold= -7.45133219101941108420e+02, /* 0xc0874910, 0xD52D3051 */ +ln2HI[2] ={ 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */ + -6.93147180369123816490e-01,},/* 0xbfe62e42, 0xfee00000 */ +ln2LO[2] ={ 1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */ + -1.90821492927058770002e-10,},/* 0xbdea39ef, 0x35793c76 */ +invln2 = 1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */ +P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */ +P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */ +P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */ +P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ +P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ + +#ifdef __STDC__ +double __ieee754_exp(double x) /* default IEEE double exp */ +#else +double __ieee754_exp(x) /* default IEEE double exp */ + double x; +#endif +{ + double y, hi, lo, c, t; + int k, xsb; + unsigned hx; + + hx = __HI(x); /* high word of x */ + xsb = (hx >> 31) & 1; /* sign bit of x */ + hx &= 0x7fffffff; /* high word of |x| */ + + /* filter out non-finite argument */ + if (hx >= 0x40862E42) { /* if |x|>=709.78... */ + if (hx >= 0x7ff00000) { + if (((hx & 0xfffff) | __LO(x)) != 0) + return x + x; /* NaN */ + else + return (xsb == 0) ? x : 0.0; /* exp(+-inf)={inf,0} */ + } + if (x > o_threshold) + return huge * huge; /* overflow */ + if (x < u_threshold) + return twom1000 * twom1000; /* underflow */ + } + + /* argument reduction */ + if (hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ + if (hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ + hi = x - ln2HI[xsb]; + lo = ln2LO[xsb]; + k = 1 - xsb - xsb; + } else { + k = (int)(invln2 * x + halF[xsb]); + t = k; + hi = x - t * ln2HI[0]; /* t*ln2HI is exact here */ + lo = t * ln2LO[0]; + } + x = hi - lo; + } else if (hx < 0x3e300000) { /* when |x|<2**-28 */ + if (huge + x > one) + return one + x; /* trigger inexact */ + } else + k = 0; + + /* x is now in primary range */ + t = x * x; + c = x - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5)))); + if (k == 0) + return one - ((x * c) / (c - 2.0) - x); + else + y = one - ((lo - (x * c) / (2.0 - c)) - hi); + if (k >= -1021) { + __HI(y) += (k << 20); /* add k to y's exponent */ + return y; + } else { + __HI(y) += ((k + 1000) << 20); /* add k to y's exponent */ + return y * twom1000; + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c new file mode 100644 index 00000000..2659d584 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_fmod.c @@ -0,0 +1,166 @@ +/* @(#)e_fmod.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * __ieee754_fmod(x,y) + * Return x mod y in exact arithmetic + * Method: shift and subtract + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double one = 1.0, Zero[] = { + 0.0, + -0.0, +}; +#else +static double one = 1.0, Zero[] = { + 0.0, + -0.0, +}; +#endif + +#ifdef __STDC__ +double __ieee754_fmod(double x, double y) +#else +double __ieee754_fmod(x, y) double x, y; +#endif +{ + int n, hx, hy, hz, ix, iy, sx, i; + unsigned lx, ly, lz; + + hx = __HI(x); /* high word of x */ + lx = __LO(x); /* low word of x */ + hy = __HI(y); /* high word of y */ + ly = __LO(y); /* low word of y */ + sx = hx & 0x80000000; /* sign of x */ + hx ^= sx; /* |x| */ + hy &= 0x7fffffff; /* |y| */ + + /* purge off exception values */ + if ((hy | ly) == 0 || (hx >= 0x7ff00000) || /* y=0,or x not finite */ + ((hy | ((ly | -ly) >> 31)) > 0x7ff00000)) /* or y is NaN */ + return (x * y) / (x * y); + if (hx <= hy) { + if ((hx < hy) || (lx < ly)) + return x; /* |x|<|y| return x */ + if (lx == ly) + return Zero[(unsigned)sx >> 31]; /* |x|=|y| return x*0*/ + } + + /* determine ix = ilogb(x) */ + if (hx < 0x00100000) { /* subnormal x */ + if (hx == 0) { + for (ix = -1043, i = lx; i > 0; i <<= 1) + ix -= 1; + } else { + for (ix = -1022, i = (hx << 11); i > 0; i <<= 1) + ix -= 1; + } + } else + ix = (hx >> 20) - 1023; + + /* determine iy = ilogb(y) */ + if (hy < 0x00100000) { /* subnormal y */ + if (hy == 0) { + for (iy = -1043, i = ly; i > 0; i <<= 1) + iy -= 1; + } else { + for (iy = -1022, i = (hy << 11); i > 0; i <<= 1) + iy -= 1; + } + } else + iy = (hy >> 20) - 1023; + + /* set up {hx,lx}, {hy,ly} and align y to x */ + if (ix >= -1022) + hx = 0x00100000 | (0x000fffff & hx); + else { /* subnormal x, shift x to normal */ + n = -1022 - ix; + if (n <= 31) { + hx = (hx << n) | (lx >> (32 - n)); + lx <<= n; + } else { + hx = lx << (n - 32); + lx = 0; + } + } + if (iy >= -1022) + hy = 0x00100000 | (0x000fffff & hy); + else { /* subnormal y, shift y to normal */ + n = -1022 - iy; + if (n <= 31) { + hy = (hy << n) | (ly >> (32 - n)); + ly <<= n; + } else { + hy = ly << (n - 32); + ly = 0; + } + } + + /* fix point fmod */ + n = ix - iy; + while (n--) { + hz = hx - hy; + lz = lx - ly; + if (lx < ly) + hz -= 1; + if (hz < 0) { + hx = hx + hx + (lx >> 31); + lx = lx + lx; + } else { + if ((hz | lz) == 0) /* return sign(x)*0 */ + return Zero[(unsigned)sx >> 31]; + hx = hz + hz + (lz >> 31); + lx = lz + lz; + } + } + hz = hx - hy; + lz = lx - ly; + if (lx < ly) + hz -= 1; + if (hz >= 0) { + hx = hz; + lx = lz; + } + + /* convert back to floating value and restore the sign */ + if ((hx | lx) == 0) /* return sign(x)*0 */ + return Zero[(unsigned)sx >> 31]; + while (hx < 0x00100000) { /* normalize x */ + hx = hx + hx + (lx >> 31); + lx = lx + lx; + iy -= 1; + } + if (iy >= -1022) { /* normalize output */ + hx = ((hx - 0x00100000) | ((iy + 1023) << 20)); + __HI(x) = hx | sx; + __LO(x) = lx; + } else { /* subnormal output */ + n = -1022 - iy; + if (n <= 20) { + lx = (lx >> n) | ((unsigned)hx << (32 - n)); + hx >>= n; + } else if (n <= 31) { + lx = (hx << (32 - n)) | (lx >> n); + hx = sx; + } else { + lx = hx >> (n - 32); + hx = sx; + } + __HI(x) = hx | sx; + __LO(x) = lx; + x *= one; /* create necessary signal */ + } + return x; /* exact output */ +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c new file mode 100644 index 00000000..fb139480 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_pow.c @@ -0,0 +1,407 @@ +//======================================================================== +// +// e_pow.c +// +// Part of the standard mathematical function library +// +//======================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// +// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. +// at http://sources.redhat.com/ecos/ecos-license/ +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//======================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): jlarmour +// Contributors: +// Date: 2001-07-20 +// Purpose: +// Description: +// Usage: +// +//####DESCRIPTIONEND#### +// +//======================================================================== + +// CONFIGURATION + +/* @(#)e_pow.c 5.1 93/09/24 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_pow(x,y) return x**y + * + * n + * Method: Let x = 2 * (1+f) + * 1. Compute and return log2(x) in two pieces: + * log2(x) = w1 + w2, + * where w1 has 53-24 = 29 bit trailing zeros. + * 2. Perform y*log2(x) = n+y' by simulating muti-precision + * arithmetic, where |y'|<=0.5. + * 3. Return x**y = 2**n*exp(y'*log2) + * + * Special cases: + * 1. (anything) ** 0 is 1 + * 2. (anything) ** 1 is itself + * 3. (anything) ** NAN is NAN + * 4. NAN ** (anything except 0) is NAN + * 5. +-(|x| > 1) ** +INF is +INF + * 6. +-(|x| > 1) ** -INF is +0 + * 7. +-(|x| < 1) ** +INF is +0 + * 8. +-(|x| < 1) ** -INF is +INF + * 9. +-1 ** +-INF is NAN + * 10. +0 ** (+anything except 0, NAN) is +0 + * 11. -0 ** (+anything except 0, NAN, odd integer) is +0 + * 12. +0 ** (-anything except 0, NAN) is +INF + * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF + * 14. -0 ** (odd integer) = -( +0 ** (odd integer) ) + * 15. +INF ** (+anything except 0,NAN) is +INF + * 16. +INF ** (-anything except 0,NAN) is +0 + * 17. -INF ** (anything) = -0 ** (-anything) + * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer) + * 19. (-anything except 0 and inf) ** (non-integer) is NAN + * + * Accuracy: + * pow(x,y) returns x**y nearly rounded. In particular + * pow(integer,integer) + * always returns the correct integer provided it is + * representable. + * + * Constants : + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "types.h" +#include "errno.h" +#include "math.h" + +#ifndef _DOUBLE_IS_32BITS + +#ifdef __STDC__ +static const double +#else +static double +#endif +bp[] = {1.0, 1.5,}, +dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */ +dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */ +zero = 0.0, +one = 1.0, +two = 2.0, +two53 = 9007199254740992.0, /* 0x43400000, 0x00000000 */ +huge = 1.0e300, +tiny = 1.0e-300, + /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */ +L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */ +L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */ +L3 = 3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */ +L4 = 2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */ +L5 = 2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */ +L6 = 2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */ +P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */ +P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */ +P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */ +P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ +P5 = 4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */ +lg2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */ +lg2_h = 6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */ +lg2_l = -1.90465429995776804525e-09, /* 0xBE205C61, 0x0CA86C39 */ +ovt = 8.0085662595372944372e-0017, /* -(1024-log2(ovfl+.5ulp)) */ +cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */ +cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */ +cp_l = -7.02846165095275826516e-09, /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/ +ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */ +ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/ +ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ + +#ifdef __STDC__ +double __ieee754_pow(double x, double y) +#else +double __ieee754_pow(x, y) double x, y; +#endif +{ + double z, ax, z_h, z_l, p_h, p_l; + double y1, t1, t2, r, s, t, u, v, w; + double qqq; // necessary temp + int i0, i1, i, j, k, yisint, n; + int hx, hy, ix, iy; + u32 lx, ly; + + i0 = ((*(int*)&one) >> 29) ^ 1; + i1 = 1 - i0; + hx = __HI(x); + lx = __LO(x); + hy = __HI(y); + ly = __LO(y); + ix = hx & 0x7fffffff; + iy = hy & 0x7fffffff; + + /* y==zero: x**0 = 1 */ + if ((iy | ly) == 0) + return one; + + /* +-NaN return x+y */ + if (ix > 0x7ff00000 || ((ix == 0x7ff00000) && (lx != 0)) || iy > 0x7ff00000 || ((iy == 0x7ff00000) && (ly != 0))) + return x + y; + + /* determine if y is an odd int when x < 0 + * yisint = 0 ... y is not an integer + * yisint = 1 ... y is an odd int + * yisint = 2 ... y is an even int + */ + yisint = 0; + if (hx < 0) { + if (iy >= 0x43400000) + yisint = 2; /* even integer y */ + else if (iy >= 0x3ff00000) { + k = (iy >> 20) - 0x3ff; /* exponent */ + if (k > 20) { + j = ly >> (52 - k); + if ((j << (52 - k)) == ly) + yisint = 2 - (j & 1); + } else if (ly == 0) { + j = iy >> (20 - k); + if ((j << (20 - k)) == iy) + yisint = 2 - (j & 1); + } + } + } + + /* special value of y */ + if (ly == 0) { + if (iy == 0x7ff00000) { /* y is +-inf */ + if (((ix - 0x3ff00000) | lx) == 0) + return y - y; /* inf**+-1 is NaN */ + else if (ix >= 0x3ff00000) /* (|x|>1)**+-inf = inf,0 */ + return (hy >= 0) ? y : zero; + else /* (|x|<1)**-,+inf = inf,0 */ + return (hy < 0) ? -y : zero; + } + if (iy == 0x3ff00000) { /* y is +-1 */ + if (hy < 0) + return one / x; + else + return x; + } + if (hy == 0x40000000) + return x * x; /* y is 2 */ + if (hy == 0x3fe00000) { /* y is 0.5 */ + if (hx >= 0) /* x >= +0 */ + return sqrt(x); + } + } + + ax = __fabs(x); + qqq = ax; /*x is +-0,+-inf,+-1*/ + /* special value of x */ + if (lx == 0) { + if (ix == 0x7ff00000 || ix == 0 || ix == 0x3ff00000) { + z = qqq; /*x is +-0,+-inf,+-1*/ + if (hy < 0) + z = one / z; /* z = (1/|x|) */ + if (hx < 0) { + if (((ix - 0x3ff00000) | yisint) == 0) { + z = (z - z) / (z - z); /* (-1)**non-int is NaN */ + } else if (yisint == 1) + z = -z; /* (x<0)**odd = -(|x|**odd) */ + } + return z; + } + } + + /* (x<0)**(non-int) is NaN */ + /* CYGNUS LOCAL: This used to be + if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x); + but ANSI C says a right shift of a signed negative quantity is + implementation defined. */ + + if (((((int)hx >> 31) + 1) | yisint) == 0) { + errno = 33; + return (double)NAN; + }; + + /* |y| is huge */ + if (iy > 0x41e00000) { /* if |y| > 2**31 */ + if (iy > 0x43f00000) { /* if |y| > 2**64, must o/uflow */ + if (ix <= 0x3fefffff) + return (hy < 0) ? huge * huge : tiny * tiny; + if (ix >= 0x3ff00000) + return (hy > 0) ? huge * huge : tiny * tiny; + } + /* over/underflow if x is not close to one */ + if (ix < 0x3fefffff) + return (hy < 0) ? huge * huge : tiny * tiny; + if (ix > 0x3ff00000) + return (hy > 0) ? huge * huge : tiny * tiny; + /* now |1-x| is tiny <= 2**-20, suffice to compute + log(x) by x-x^2/2+x^3/3-x^4/4 */ + t = x - 1; /* t has 20 trailing zeros */ + w = (t * t) * (0.5 - t * (0.3333333333333333333333 - t * 0.25)); + u = ivln2_h * t; /* ivln2_h has 21 sig. bits */ + v = t * ivln2_l - w * ivln2; + t1 = u + v; + __LO(t1) = 0; + t2 = v - (t1 - u); + } else { + double s2, s_h, s_l, t_h, t_l; + n = 0; + /* take care subnormal number */ + if (ix < 0x00100000) { + ax *= two53; + n -= 53; + ix = __HI(ax); + } + n += ((ix) >> 20) - 0x3ff; + j = ix & 0x000fffff; + /* determine interval */ + ix = j | 0x3ff00000; /* normalize ix */ + if (j <= 0x3988E) + k = 0; /* |x|> 1) | 0x20000000) + 0x00080000 + (k << 18); + t_l = ax - (t_h - bp[k]); + s_l = v * ((u - s_h * t_h) - s_h * t_l); + /* compute log(ax) */ + s2 = s * s; + r = s2 * s2 * (L1 + s2 * (L2 + s2 * (L3 + s2 * (L4 + s2 * (L5 + s2 * L6))))); + r += s_l * (s_h + s); + s2 = s_h * s_h; + t_h = 3.0 + s2 + r; + __LO(t_h) = 0; + t_l = r - ((t_h - 3.0) - s2); + /* u+v = s*(1+...) */ + u = s_h * t_h; + v = s_l * t_h + t_l * s; + /* 2/(3log2)*(s+...) */ + p_h = u + v; + __LO(p_h) = 0; + p_l = v - (p_h - u); + z_h = cp_h * p_h; /* cp_h+cp_l = 2/(3*log2) */ + z_l = cp_l * p_h + p_l * cp + dp_l[k]; + /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */ + t = (double)n; + t1 = (((z_h + z_l) + dp_h[k]) + t); + __LO(t1) = 0; + t2 = z_l - (((t1 - t) - dp_h[k]) - z_h); + } + + s = one; /* s (sign of result -ve**odd) = -1 else = 1 */ + if (((((int)hx >> 31) + 1) | (yisint - 1)) == 0) + s = -one; /* (-ve)**(odd int) */ + + /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */ + y1 = y; + __LO(y1) = 0; + p_l = (y - y1) * t1 + y * t2; + p_h = y1 * t1; + z = p_l + p_h; + j = __HI(z); + i = __LO(z); + if (j >= 0x40900000) { /* z >= 1024 */ + if (((j - 0x40900000) | i) != 0) /* if z > 1024 */ + return s * huge * huge; /* overflow */ + else { + if (p_l + ovt > z - p_h) + return s * huge * huge; /* overflow */ + } + } else if ((j & 0x7fffffff) >= 0x4090cc00) { /* z <= -1075 */ + if (((j - 0xc090cc00) | i) != 0) /* z < -1075 */ + return s * tiny * tiny; /* underflow */ + else { + if (p_l <= z - p_h) + return s * tiny * tiny; /* underflow */ + } + } + /* + * compute 2**(p_h+p_l) + */ + i = j & 0x7fffffff; + k = (i >> 20) - 0x3ff; + n = 0; + if (i > 0x3fe00000) { /* if |z| > 0.5, set n = [z+0.5] */ + n = j + (0x00100000 >> (k + 1)); + k = ((n & 0x7fffffff) >> 20) - 0x3ff; /* new k for n */ + t = zero; + __HI(t) = (n & ~(0x000fffff >> k)); + n = ((n & 0x000fffff) | 0x00100000) >> (20 - k); + if (j < 0) + n = -n; + p_h -= t; + } + t = p_l + p_h; + __LO(t) = 0; + u = t * lg2_h; + v = (p_l - (t - p_h)) * lg2 + t * lg2_l; + z = u + v; + w = v - (z - u); + t = z * z; + t1 = z - t * (P1 + t * (P2 + t * (P3 + t * (P4 + t * P5)))); + r = (z * t1) / (t1 - two) - (w + z * w); + z = one - (r - z); + j = __HI(z); + j += (n << 20); + if ((j >> 20) <= 0) + z = ldexp(z, n); /* subnormal output */ + else + __HI(z) += (n << 20); + return s * z; +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ + +// EOF e_pow.c \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c new file mode 100644 index 00000000..b179a8ee --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_rem_pio2.c @@ -0,0 +1,179 @@ +/* @(#)e_rem_pio2.c 1.4 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* __ieee754_rem_pio2(x,y) + * + * return the remainder of x rem pi/2 in y[0]+y[1] + * use __kernel_rem_pio2() + */ + +#include "math.h" + +/* + * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi + */ +#ifdef __STDC__ +static const int two_over_pi[] = { +#else +static int two_over_pi[] = { +#endif + 0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, 0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, + 0x246E3A, 0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, 0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, + 0x7026B4, 0x5F7E41, 0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, 0x97FFDE, 0x05980F, 0xEF2F11, + 0x8B5A0A, 0x6D1F6D, 0x367ECF, 0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, 0xF17B3D, 0x0739F7, + 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, 0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, 0x91615E, + 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, 0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, +}; + +#ifdef __STDC__ +static const int npio2_hw[] = { +#else +static int npio2_hw[] = { +#endif + 0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C, 0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, + 0x4032D97C, 0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A, 0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, + 0x4042106C, 0x4042D97C, 0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB, 0x404858EB, 0x404921FB, +}; + +/* + * invpio2: 53 bits of 2/pi + * pio2_1: first 33 bit of pi/2 + * pio2_1t: pi/2 - pio2_1 + * pio2_2: second 33 bit of pi/2 + * pio2_2t: pi/2 - (pio2_1+pio2_2) + * pio2_3: third 33 bit of pi/2 + * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3) + */ + +#ifdef __STDC__ +static const double +#else +static double +#endif + zero + = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */ + half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ + two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ + invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */ + pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */ + pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */ + pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */ + pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */ + pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */ + pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ + +#ifdef __STDC__ +int __ieee754_rem_pio2(double x, double* y) +#else +int __ieee754_rem_pio2(x, y) double x, y[]; +#endif +{ + double z, w, t, r, fn; + double tx[3]; + int e0, i, j, nx, n, ix, hx; + + hx = __HI(x); /* high word of x */ + ix = hx & 0x7fffffff; + if (ix <= 0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */ + { + y[0] = x; + y[1] = 0; + return 0; + } + if (ix < 0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */ + if (hx > 0) { + z = x - pio2_1; + if (ix != 0x3ff921fb) { /* 33+53 bit pi is good enough */ + y[0] = z - pio2_1t; + y[1] = (z - y[0]) - pio2_1t; + } else { /* near pi/2, use 33+33+53 bit pi */ + z -= pio2_2; + y[0] = z - pio2_2t; + y[1] = (z - y[0]) - pio2_2t; + } + return 1; + } else { /* negative x */ + z = x + pio2_1; + if (ix != 0x3ff921fb) { /* 33+53 bit pi is good enough */ + y[0] = z + pio2_1t; + y[1] = (z - y[0]) + pio2_1t; + } else { /* near pi/2, use 33+33+53 bit pi */ + z += pio2_2; + y[0] = z + pio2_2t; + y[1] = (z - y[0]) + pio2_2t; + } + return -1; + } + } + if (ix <= 0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */ + t = fabs(x); + n = (int)(t * invpio2 + half); + fn = (double)n; + r = t - fn * pio2_1; + w = fn * pio2_1t; /* 1st round good to 85 bit */ + if (n < 32 && ix != npio2_hw[n - 1]) { + y[0] = r - w; /* quick check no cancellation */ + } else { + j = ix >> 20; + y[0] = r - w; + i = j - (((__HI(y[0])) >> 20) & 0x7ff); + if (i > 16) { /* 2nd iteration needed, good to 118 */ + t = r; + r = t - fn * pio2_2; + w = fn * pio2_2t - ((t - r) - fn * pio2_2); + y[0] = r - w; + i = j - (((__HI(y[0])) >> 20) & 0x7ff); + if (i > 49) { /* 3rd iteration need, 151 bits acc */ + t = r; /* will cover all possible cases */ + w = fn * pio2_3; + r = t - w; + w = fn * pio2_3t - ((t - r) - w); + y[0] = r - w; + } + } + } + y[1] = (r - y[0]) - w; + if (hx < 0) { + y[0] = -y[0]; + y[1] = -y[1]; + return -n; + } else + return n; + } + /* + * all other (large) arguments + */ + if (ix >= 0x7ff00000) { /* x is inf or NaN */ + y[0] = y[1] = x - x; + return 0; + } + /* set z = scalbn(|x|,ilogb(x)-23) */ + __LO(z) = __LO(x); + e0 = (ix >> 20) - 1046; /* e0 = ilogb(z)-23; */ + __HI(z) = ix - (e0 << 20); + for (i = 0; i < 2; i++) { + tx[i] = (double)((int)(z)); + z = (z - tx[i]) * two24; + } + tx[2] = z; + nx = 3; + while (tx[nx - 1] == zero) + nx--; /* skip zero term */ + n = __kernel_rem_pio2(tx, y, e0, nx, 2, two_over_pi); + if (hx < 0) { + y[0] = -y[0]; + y[1] = -y[1]; + return -n; + } + return n; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c new file mode 100644 index 00000000..162bd7c2 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_sqrt.c @@ -0,0 +1,461 @@ +/* @(#)e_sqrt.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __ieee754_sqrt(x) + * Return correctly rounded sqrt. + * ------------------------------------------ + * | Use the hardware sqrt if you have one | + * ------------------------------------------ + * Method: + * Bit by bit method using integer arithmetic. (Slow, but portable) + * 1. Normalization + * Scale x to y in [1,4) with even powers of 2: + * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then + * sqrt(x) = 2^k * sqrt(y) + * 2. Bit by bit computation + * Let q = sqrt(y) truncated to i bit after binary point (q = 1), + * i 0 + * i+1 2 + * s = 2*q , and y = 2 * ( y - q ). (1) + * i i i i + * + * To compute q from q , one checks whether + * i+1 i + * + * -(i+1) 2 + * (q + 2 ) <= y. (2) + * i + * -(i+1) + * If (2) is false, then q = q ; otherwise q = q + 2 . + * i+1 i i+1 i + * + * With some algebric manipulation, it is not difficult to see + * that (2) is equivalent to + * -(i+1) + * s + 2 <= y (3) + * i i + * + * The advantage of (3) is that s and y can be computed by + * i i + * the following recurrence formula: + * if (3) is false + * + * s = s , y = y ; (4) + * i+1 i i+1 i + * + * otherwise, + * -i -(i+1) + * s = s + 2 , y = y - s - 2 (5) + * i+1 i i+1 i i + * + * One may easily use induction to prove (4) and (5). + * Note. Since the left hand side of (3) contain only i+2 bits, + * it does not necessary to do a full (53-bit) comparison + * in (3). + * 3. Final rounding + * After generating the 53 bits result, we compute one more bit. + * Together with the remainder, we can decide whether the + * result is exact, bigger than 1/2ulp, or less than 1/2ulp + * (it will never equal to 1/2ulp). + * The rounding mode can be detected by checking whether + * huge + tiny is equal to huge, and whether huge - tiny is + * equal to huge for some floating point number "huge" and "tiny". + * + * Special cases: + * sqrt(+-0) = +-0 ... exact + * sqrt(inf) = inf + * sqrt(-ve) = NaN ... with invalid signal + * sqrt(NaN) = NaN ... with invalid signal for signaling NaN + * + * Other methods : see the appended file at the end of the program below. + *--------------- + */ + +#include "errno.h" +#include "math.h" + +#ifdef __STDC__ +static const double one = 1.0, tiny = 1.0e-300; +#else +static double one = 1.0, tiny = 1.0e-300; +#endif + +#ifdef __STDC__ +double __ieee754_sqrt(double x) +#else +double __ieee754_sqrt(x) double x; +#endif +{ + double z; + int sign = (int)0x80000000; + unsigned r, t1, s1, ix1, q1; + int ix0, s0, q, m, t, i; + + ix0 = __HI(x); /* high word of x */ + ix1 = __LO(x); /* low word of x */ + + /* take care of Inf and NaN */ + if ((ix0 & 0x7ff00000) == 0x7ff00000) { + errno = 33; + return x * x + x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf + sqrt(-inf)=sNaN */ + } + /* take care of zero */ + if (ix0 <= 0) { + if (((ix0 & (~sign)) | ix1) == 0) + return x; /* sqrt(+-0) = +-0 */ + else if (ix0 < 0) { + errno = 33; + return NAN; + } /* sqrt(-ve) = sNaN */ + } + /* normalize x */ + m = (ix0 >> 20); + if (m == 0) { /* subnormal x */ + while (ix0 == 0) { + m -= 21; + ix0 |= (ix1 >> 11); + ix1 <<= 21; + } + for (i = 0; (ix0 & 0x00100000) == 0; i++) + ix0 <<= 1; + m -= i - 1; + ix0 |= (ix1 >> (32 - i)); + ix1 <<= i; + } + m -= 1023; /* unbias exponent */ + ix0 = (ix0 & 0x000fffff) | 0x00100000; + if (m & 1) { /* odd m, double x to make it even */ + ix0 += ix0 + ((ix1 & sign) >> 31); + ix1 += ix1; + } + m >>= 1; /* m = [m/2] */ + + /* generate sqrt(x) bit by bit */ + ix0 += ix0 + ((ix1 & sign) >> 31); + ix1 += ix1; + q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */ + r = 0x00200000; /* r = moving bit from right to left */ + + while (r != 0) { + t = s0 + r; + if (t <= ix0) { + s0 = t + r; + ix0 -= t; + q += r; + } + ix0 += ix0 + ((ix1 & sign) >> 31); + ix1 += ix1; + r >>= 1; + } + + r = sign; + while (r != 0) { + t1 = s1 + r; + t = s0; + if ((t < ix0) || ((t == ix0) && (t1 <= ix1))) { + s1 = t1 + r; + if (((t1 & sign) == sign) && (s1 & sign) == 0) + s0 += 1; + ix0 -= t; + if (ix1 < t1) + ix0 -= 1; + ix1 -= t1; + q1 += r; + } + ix0 += ix0 + ((ix1 & sign) >> 31); + ix1 += ix1; + r >>= 1; + } + + /* use floating add to find out rounding direction */ + if ((ix0 | ix1) != 0) { + z = one - tiny; /* trigger inexact flag */ + if (z >= one) { + z = one + tiny; + if (q1 == (unsigned)0xffffffff) { + q1 = 0; + q += 1; + } else if (z > one) { + if (q1 == (unsigned)0xfffffffe) + q += 1; + q1 += 2; + } else + q1 += (q1 & 1); + } + } + ix0 = (q >> 1) + 0x3fe00000; + ix1 = q1 >> 1; + if ((q & 1) == 1) + ix1 |= sign; + ix0 += (m << 20); + __HI(z) = ix0; + __LO(z) = ix1; + return z; +} + +/* +Other methods (use floating-point arithmetic) +------------- +(This is a copy of a drafted paper by Prof W. Kahan +and K.C. Ng, written in May, 1986) + + Two algorithms are given here to implement sqrt(x) + (IEEE double precision arithmetic) in software. + Both supply sqrt(x) correctly rounded. The first algorithm (in + Section A) uses newton iterations and involves four divisions. + The second one uses reciproot iterations to avoid division, but + requires more multiplications. Both algorithms need the ability + to chop results of arithmetic operations instead of round them, + and the INEXACT flag to indicate when an arithmetic operation + is executed exactly with no roundoff error, all part of the + standard (IEEE 754-1985). The ability to perform shift, add, + subtract and logical AND operations upon 32-bit words is needed + too, though not part of the standard. + +A. sqrt(x) by Newton Iteration + + (1) Initial approximation + + Let x0 and x1 be the leading and the trailing 32-bit words of + a floating point number x (in IEEE double format) respectively + + 1 11 52 ...widths + ------------------------------------------------------ + x: |s| e | f | + ------------------------------------------------------ + msb lsb msb lsb ...order + + + ------------------------ ------------------------ + x0: |s| e | f1 | x1: | f2 | + ------------------------ ------------------------ + + By performing shifts and subtracts on x0 and x1 (both regarded + as integers), we obtain an 8-bit approximation of sqrt(x) as + follows. + + k := (x0>>1) + 0x1ff80000; + y0 := k - T1[31&(k>>15)]. ... y ~ sqrt(x) to 8 bits + Here k is a 32-bit integer and T1[] is an integer array containing + correction terms. Now magically the floating value of y (y's + leading 32-bit word is y0, the value of its trailing word is 0) + approximates sqrt(x) to almost 8-bit. + + Value of T1: + static int T1[32]= { + 0, 1024, 3062, 5746, 9193, 13348, 18162, 23592, + 29598, 36145, 43202, 50740, 58733, 67158, 75992, 85215, + 83599, 71378, 60428, 50647, 41945, 34246, 27478, 21581, + 16499, 12183, 8588, 5674, 3403, 1742, 661, 130,}; + + (2) Iterative refinement + + Apply Heron's rule three times to y, we have y approximates + sqrt(x) to within 1 ulp (Unit in the Last Place): + + y := (y+x/y)/2 ... almost 17 sig. bits + y := (y+x/y)/2 ... almost 35 sig. bits + y := y-(y-x/y)/2 ... within 1 ulp + + + Remark 1. + Another way to improve y to within 1 ulp is: + + y := (y+x/y) ... almost 17 sig. bits to 2*sqrt(x) + y := y - 0x00100006 ... almost 18 sig. bits to sqrt(x) + + 2 + (x-y )*y + y := y + 2* ---------- ...within 1 ulp + 2 + 3y + x + + + This formula has one division fewer than the one above; however, + it requires more multiplications and additions. Also x must be + scaled in advance to avoid spurious overflow in evaluating the + expression 3y*y+x. Hence it is not recommended uless division + is slow. If division is very slow, then one should use the + reciproot algorithm given in section B. + + (3) Final adjustment + + By twiddling y's last bit it is possible to force y to be + correctly rounded according to the prevailing rounding mode + as follows. Let r and i be copies of the rounding mode and + inexact flag before entering the square root program. Also we + use the expression y+-ulp for the next representable floating + numbers (up and down) of y. Note that y+-ulp = either fixed + point y+-1, or multiply y by nextafter(1,+-inf) in chopped + mode. + + I := FALSE; ... reset INEXACT flag I + R := RZ; ... set rounding mode to round-toward-zero + z := x/y; ... chopped quotient, possibly inexact + If(not I) then { ... if the quotient is exact + if(z=y) { + I := i; ... restore inexact flag + R := r; ... restore rounded mode + return sqrt(x):=y. + } else { + z := z - ulp; ... special rounding + } + } + i := TRUE; ... sqrt(x) is inexact + If (r=RN) then z=z+ulp ... rounded-to-nearest + If (r=RP) then { ... round-toward-+inf + y = y+ulp; z=z+ulp; + } + y := y+z; ... chopped sum + y0:=y0-0x00100000; ... y := y/2 is correctly rounded. + I := i; ... restore inexact flag + R := r; ... restore rounded mode + return sqrt(x):=y. + + (4) Special cases + + Square root of +inf, +-0, or NaN is itself; + Square root of a negative number is NaN with invalid signal. + + +B. sqrt(x) by Reciproot Iteration + + (1) Initial approximation + + Let x0 and x1 be the leading and the trailing 32-bit words of + a floating point number x (in IEEE double format) respectively + (see section A). By performing shifs and subtracts on x0 and y0, + we obtain a 7.8-bit approximation of 1/sqrt(x) as follows. + + k := 0x5fe80000 - (x0>>1); + y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits + + Here k is a 32-bit integer and T2[] is an integer array + containing correction terms. Now magically the floating + value of y (y's leading 32-bit word is y0, the value of + its trailing word y1 is set to zero) approximates 1/sqrt(x) + to almost 7.8-bit. + + Value of T2: + static int T2[64]= { + 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866, + 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f, + 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d, + 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0, + 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989, + 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd, + 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e, + 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd,}; + + (2) Iterative refinement + + Apply Reciproot iteration three times to y and multiply the + result by x to get an approximation z that matches sqrt(x) + to about 1 ulp. To be exact, we will have + -1ulp < sqrt(x)-z<1.0625ulp. + + ... set rounding mode to Round-to-nearest + y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x) + y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x) + ... special arrangement for better accuracy + z := x*y ... 29 bits to sqrt(x), with z*y<1 + z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x) + + Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that + (a) the term z*y in the final iteration is always less than 1; + (b) the error in the final result is biased upward so that + -1 ulp < sqrt(x) - z < 1.0625 ulp + instead of |sqrt(x)-z|<1.03125ulp. + + (3) Final adjustment + + By twiddling y's last bit it is possible to force y to be + correctly rounded according to the prevailing rounding mode + as follows. Let r and i be copies of the rounding mode and + inexact flag before entering the square root program. Also we + use the expression y+-ulp for the next representable floating + numbers (up and down) of y. Note that y+-ulp = either fixed + point y+-1, or multiply y by nextafter(1,+-inf) in chopped + mode. + + R := RZ; ... set rounding mode to round-toward-zero + switch(r) { + case RN: ... round-to-nearest + if(x<= z*(z-ulp)...chopped) z = z - ulp; else + if(x<= z*(z+ulp)...chopped) z = z; else z = z+ulp; + break; + case RZ:case RM: ... round-to-zero or round-to--inf + R:=RP; ... reset rounding mod to round-to-+inf + if(x=(z+ulp)*(z+ulp) ...rounded up) z = z+ulp; + break; + case RP: ... round-to-+inf + if(x>(z+ulp)*(z+ulp)...chopped) z = z+2*ulp; else + if(x>z*z ...chopped) z = z+ulp; + break; + } + + Remark 3. The above comparisons can be done in fixed point. For + example, to compare x and w=z*z chopped, it suffices to compare + x1 and w1 (the trailing parts of x and w), regarding them as + two's complement integers. + + ...Is z an exact square root? + To determine whether z is an exact square root of x, let z1 be the + trailing part of z, and also let x0 and x1 be the leading and + trailing parts of x. + + If ((z1&0x03ffffff)!=0) ... not exact if trailing 26 bits of z!=0 + I := 1; ... Raise Inexact flag: z is not exact + else { + j := 1 - [(x0>>20)&1] ... j = logb(x) mod 2 + k := z1 >> 26; ... get z's 25-th and 26-th + fraction bits + I := i or (k&j) or ((k&(j+j+1))!=(x1&3)); + } + R:= r ... restore rounded mode + return sqrt(x):=z. + + If multiplication is cheaper then the foregoing red tape, the + Inexact flag can be evaluated by + + I := i; + I := (z*z!=x) or I. + + Note that z*z can overwrite I; this value must be sensed if it is + True. + + Remark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be + zero. + + -------------------- + z1: | f2 | + -------------------- + bit 31 bit 0 + + Further more, bit 27 and 26 of z1, bit 0 and 1 of x1, and the odd + or even of logb(x) have the following relations: + + ------------------------------------------------- + bit 27,26 of z1 bit 1,0 of x1 logb(x) + ------------------------------------------------- + 00 00 odd and even + 01 01 even + 10 10 odd + 10 00 even + 11 01 even + ------------------------------------------------- + + (4) Special cases (see (4) of Section A). + + */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c new file mode 100644 index 00000000..73704b74 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_cos.c @@ -0,0 +1,92 @@ +/* @(#)k_cos.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * __kernel_cos( x, y ) + * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * + * Algorithm + * 1. Since cos(-x) = cos(x), we need only to consider positive x. + * 2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0. + * 3. cos(x) is approximated by a polynomial of degree 14 on + * [0,pi/4] + * 4 14 + * cos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x + * where the remez error is + * + * | 2 4 6 8 10 12 14 | -58 + * |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x +C6*x )| <= 2 + * | | + * + * 4 6 8 10 12 14 + * 4. let r = C1*x +C2*x +C3*x +C4*x +C5*x +C6*x , then + * cos(x) = 1 - x*x/2 + r + * since cos(x+y) ~ cos(x) - sin(x)*y + * ~ cos(x) - x*y, + * a correction term is necessary in cos(x) and hence + * cos(x+y) = 1 - (x*x/2 - (r - x*y)) + * For better accuracy when x > 0.3, let qx = |x|/4 with + * the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125. + * Then + * cos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)). + * Note that 1-qx and (x*x/2-qx) is EXACT here, and the + * magnitude of the latter is at least a quarter of x*x/2, + * thus, reducing the rounding error in the subtraction. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + one + = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */ + C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */ + C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */ + C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */ + C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */ + C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ + +#ifdef __STDC__ +double __kernel_cos(double x, double y) +#else +double __kernel_cos(x, y) double x, y; +#endif +{ + double a, hz, z, r, qx; + int ix; + ix = __HI(x) & 0x7fffffff; /* ix = |x|'s high word*/ + if (ix < 0x3e400000) { /* if x < 2**27 */ + if (((int)x) == 0) + return one; /* generate inexact */ + } + z = x * x; + r = z * (C1 + z * (C2 + z * (C3 + z * (C4 + z * (C5 + z * C6))))); + if (ix < 0x3FD33333) /* if |x| < 0.3 */ + return one - (0.5 * z - (z * r - x * y)); + else { + if (ix > 0x3fe90000) { /* x > 0.78125 */ + qx = 0.28125; + } else { + __HI(qx) = ix - 0x00200000; /* x/4 */ + __LO(qx) = 0; + } + hz = 0.5 * z - qx; + a = one - qx; + return a - (hz - (z * r - x * y)); + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c new file mode 100644 index 00000000..f77b012e --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_rem_pio2.c @@ -0,0 +1,352 @@ +/* @(#)k_rem_pio2.c 1.2 95/01/04 */ +/* $Id: k_rem_pio2.c,v 1.2.14.1 2002/01/31 15:24:13 ceciliar Exp $ */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) + * double x[],y[]; int e0,nx,prec; int ipio2[]; + * + * __kernel_rem_pio2 return the last three digits of N with + * y = x - N*pi/2 + * so that |y| < pi/2. + * + * The method is to compute the integer (mod 8) and fraction parts of + * (2/pi)*x without doing the full multiplication. In general we + * skip the part of the product that are known to be a huge integer ( + * more accurately, = 0 mod 8 ). Thus the number of operations are + * independent of the exponent of the input. + * + * (2/pi) is represented by an array of 24-bit integers in ipio2[]. + * + * Input parameters: + * x[] The input value (must be positive) is broken into nx + * pieces of 24-bit integers in double precision format. + * x[i] will be the i-th 24 bit of x. The scaled exponent + * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0 + * match x's up to 24 bits. + * + * Example of breaking a double positive z into x[0]+x[1]+x[2]: + * e0 = ilogb(z)-23 + * z = ldexp(z,-e0) + * for i = 0,1,2 + * x[i] = floor(z) + * z = (z-x[i])*2**24 + * + * + * y[] ouput result in an array of double precision numbers. + * The dimension of y[] is: + * 24-bit precision 1 + * 53-bit precision 2 + * 64-bit precision 2 + * 113-bit precision 3 + * The actual value is the sum of them. Thus for 113-bit + * precison, one may have to do something like: + * + * long double t,w,r_head, r_tail; + * t = (long double)y[2] + (long double)y[1]; + * w = (long double)y[0]; + * r_head = t+w; + * r_tail = w - (r_head - t); + * + * e0 The exponent of x[0] + * + * nx dimension of x[] + * + * prec an integer indicating the precision: + * 0 24 bits (single) + * 1 53 bits (double) + * 2 64 bits (extended) + * 3 113 bits (quad) + * + * ipio2[] + * integer array, contains the (24*i)-th to (24*i+23)-th + * bit of 2/pi after binary point. The corresponding + * floating value is + * + * ipio2[i] * 2^(-24(i+1)). + * + * External function: + * double ldexp(), floor(); + * + * + * Here is the description of some local variables: + * + * jk jk+1 is the initial number of terms of ipio2[] needed + * in the computation. The recommended value is 2,3,4, + * 6 for single, double, extended,and quad. + * + * jz local integer variable indicating the number of + * terms of ipio2[] used. + * + * jx nx - 1 + * + * jv index for pointing to the suitable ipio2[] for the + * computation. In general, we want + * ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8 + * is an integer. Thus + * e0-3-24*jv >= 0 or (e0-3)/24 >= jv + * Hence jv = max(0,(e0-3)/24). + * + * jp jp+1 is the number of terms in PIo2[] needed, jp = jk. + * + * q[] double array with integral value, representing the + * 24-bits chunk of the product of x and 2/pi. + * + * q0 the corresponding exponent of q[0]. Note that the + * exponent for q[i] would be q0-24*i. + * + * PIo2[] double precision array, obtained by cutting pi/2 + * into 24 bits chunks. + * + * f[] ipio2[] in floating point + * + * iq[] integer array by breaking up q[] in 24-bits chunk. + * + * fq[] final product of x*(2/pi) in fq[0],..,fq[jk] + * + * ih integer. If >0 it indicates q[] is >= 0.5, hence + * it also indicates the *sign* of the result. + * + */ + +/* + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const int init_jk[] = { 2, 3, 4, 6 }; +/* initial value for jk */ /*- cc 020130 -*/ +#else +static int init_jk[] = { 2, 3, 4, 6 }; /*- cc 020130 -*/ +#endif + +#ifdef __STDC__ +static const double PIo2[] = { +#else +static double PIo2[] = { +#endif + 1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */ + 7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */ + 5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */ + 3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */ + 1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */ + 1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */ + 2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */ + 2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */ +}; + +#ifdef __STDC__ +static const double +#else +static double +#endif + zero + = 0.0, + one = 1.0, two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ + twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */ + +#ifdef __STDC__ +int __kernel_rem_pio2(double* x, double* y, int e0, int nx, int prec, const int* ipio2) /*- cc 020130 -*/ +#else +int __kernel_rem_pio2(x, y, e0, nx, prec, ipio2) /*- cc 020130 -*/ + double x[], + y[]; +int e0, nx, prec; +int ipio2[]; /*- cc 020130 -*/ +#endif +{ + int jz, jx, jv, jp, jk, carry, n, iq[20], i, j, k, m, q0, ih; /*- cc 020130 -*/ + double z, fw, f[20], fq[20], q[20]; + + /* initialize jk*/ + jk = init_jk[prec]; + jp = jk; + + /* determine jx,jv,q0, note that 3>q0 */ + jx = nx - 1; + jv = (e0 - 3) / 24; + if (jv < 0) + jv = 0; + q0 = e0 - 24 * (jv + 1); + + /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */ + j = jv - jx; + m = jx + jk; + for (i = 0; i <= m; i++, j++) + f[i] = (j < 0) ? zero : (double)ipio2[j]; + + /* compute q[0],q[1],...q[jk] */ + for (i = 0; i <= jk; i++) { + for (j = 0, fw = 0.0; j <= jx; j++) + fw += x[j] * f[jx + i - j]; + q[i] = fw; + } + + jz = jk; +recompute: + /* distill q[] into iq[] reversingly */ + for (i = 0, j = jz, z = q[jz]; j > 0; i++, j--) { + fw = (double)((int)(twon24 * z)); /*- cc 020130 -*/ + iq[i] = (int)(z - two24 * fw); /*- cc 020130 -*/ + z = q[j - 1] + fw; + } + + /* compute n */ + z = ldexp(z, q0); /* actual value of z */ + z -= 8.0 * floor(z * 0.125); /* trim off integer >= 8 */ + n = (int)z; /*- cc 020130 -*/ + z -= (double)n; + ih = 0; + if (q0 > 0) { /* need iq[jz-1] to determine n */ + i = (iq[jz - 1] >> (24 - q0)); + n += i; + iq[jz - 1] -= i << (24 - q0); + ih = iq[jz - 1] >> (23 - q0); + } else if (q0 == 0) + ih = iq[jz - 1] >> 23; + else if (z >= 0.5) + ih = 2; + + if (ih > 0) { /* q > 0.5 */ + n += 1; + carry = 0; + for (i = 0; i < jz; i++) { /* compute 1-q */ + j = iq[i]; + if (carry == 0) { + if (j != 0) { + carry = 1; + iq[i] = 0x1000000 - j; + } + } else + iq[i] = 0xffffff - j; + } + if (q0 > 0) { /* rare case: chance is 1 in 12 */ + switch (q0) { + case 1: + iq[jz - 1] &= 0x7fffff; + break; + case 2: + iq[jz - 1] &= 0x3fffff; + break; + } + } + if (ih == 2) { + z = one - z; + if (carry != 0) + z -= ldexp(one, q0); + } + } + + /* check if recomputation is needed */ + if (z == zero) { + j = 0; + for (i = jz - 1; i >= jk; i--) + j |= iq[i]; + if (j == 0) { /* need recomputation */ + for (k = 1; iq[jk - k] == 0; k++) + ; /* k = no. of terms needed */ + + for (i = jz + 1; i <= jz + k; i++) { /* add q[jz+1] to q[jz+k] */ + f[jx + i] = (double)ipio2[jv + i]; + for (j = 0, fw = 0.0; j <= jx; j++) + fw += x[j] * f[jx + i - j]; + q[i] = fw; + } + jz += k; + goto recompute; + } + } + + /* chop off zero terms */ + if (z == 0.0) { + jz -= 1; + q0 -= 24; + while (iq[jz] == 0) { + jz--; + q0 -= 24; + } + } else { /* break z into 24-bit if necessary */ + z = ldexp(z, -q0); + if (z >= two24) { + fw = (double)((int)(twon24 * z)); /*- cc 020130 -*/ + iq[jz] = (int)(z - two24 * fw); /*- cc 020130 -*/ + jz += 1; + q0 += 24; + iq[jz] = (int)fw; /*- cc 020130 -*/ + } else + iq[jz] = (int)z; /*- cc 020130 -*/ + } + + /* convert integer "bit" chunk to floating-point value */ + fw = ldexp(one, q0); + for (i = jz; i >= 0; i--) { + q[i] = fw * (double)iq[i]; + fw *= twon24; + } + + /* compute PIo2[0,...,jp]*q[jz,...,0] */ + for (i = jz; i >= 0; i--) { + for (fw = 0.0, k = 0; k <= jp && k <= jz - i; k++) + fw += PIo2[k] * q[i + k]; + fq[jz - i] = fw; + } + + /* compress fq[] into y[] */ + switch (prec) { + case 0: + fw = 0.0; + for (i = jz; i >= 0; i--) + fw += fq[i]; + y[0] = (ih == 0) ? fw : -fw; + break; + case 1: + case 2: + fw = 0.0; + for (i = jz; i >= 0; i--) + fw += fq[i]; + y[0] = (ih == 0) ? fw : -fw; + fw = fq[0] - fw; + for (i = 1; i <= jz; i++) + fw += fq[i]; + y[1] = (ih == 0) ? fw : -fw; + break; + case 3: /* painful */ + for (i = jz; i > 0; i--) { + fw = fq[i - 1] + fq[i]; + fq[i] += fq[i - 1] - fw; + fq[i - 1] = fw; + } + for (i = jz; i > 1; i--) { + fw = fq[i - 1] + fq[i]; + fq[i] += fq[i - 1] - fw; + fq[i - 1] = fw; + } + for (fw = 0.0, i = jz; i >= 2; i--) + fw += fq[i]; + if (ih == 0) { + y[0] = fq[0]; + y[1] = fq[1]; + y[2] = fw; + } else { + y[0] = -fq[0]; + y[1] = -fq[1]; + y[2] = -fw; + } + } + return n & 7; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c new file mode 100644 index 00000000..0047adac --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_sin.c @@ -0,0 +1,79 @@ +/* @(#)k_sin.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __kernel_sin( x, y, iy) + * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * Input iy indicates whether y is 0. (if iy=0, y assume to be 0). + * + * Algorithm + * 1. Since sin(-x) = -sin(x), we need only to consider positive x. + * 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0. + * 3. sin(x) is approximated by a polynomial of degree 13 on + * [0,pi/4] + * 3 13 + * sin(x) ~ x + S1*x + ... + S6*x + * where + * + * |sin(x) 2 4 6 8 10 12 | -58 + * |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2 + * | x | + * + * 4. sin(x+y) = sin(x) + sin'(x')*y + * ~ sin(x) + (1-x*x/2)*y + * For better accuracy, let + * 3 2 2 2 2 + * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6)))) + * then 3 2 + * sin(x) = x + (S1*x + (x *(r-y/2)+y)) + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + half + = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ + S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */ + S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */ + S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */ + S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */ + S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */ + S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */ + +#ifdef __STDC__ +double __kernel_sin(double x, double y, int iy) +#else +double __kernel_sin(x, y, iy) double x, y; +int iy; /* iy=0 if y is zero */ +#endif +{ + double z, r, v; + int ix; + ix = __HI(x) & 0x7fffffff; /* high word of x */ + if (ix < 0x3e400000) /* |x| < 2**-27 */ + { + if ((int)x == 0) + return x; + } /* generate inexact */ + z = x * x; + v = z * x; + r = S2 + z * (S3 + z * (S4 + z * (S5 + z * S6))); + if (iy == 0) + return x + v * (S1 + z * r); + else + return x - ((z * (half * y - v * r) - y) - v * S1); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c new file mode 100644 index 00000000..e90d19fd --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/k_tan.c @@ -0,0 +1,180 @@ +//=========================================================================== +// +// k_tan.c +// +// Part of the standard mathematical function library +// +//=========================================================================== +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// +// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. +// at http://sources.redhat.com/ecos/ecos-license/ +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### +//=========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): jlarmour +// Contributors: jlarmour +// Date: 1998-02-13 +// Purpose: +// Description: +// Usage: +// +//####DESCRIPTIONEND#### +// +//=========================================================================== + +// Derived from code with the following copyright + +/* @(#)k_tan.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* __kernel_tan( x, y, k ) + * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854 + * Input x is assumed to be bounded by ~pi/4 in magnitude. + * Input y is the tail of x. + * Input k indicates whether tan (if k=1) or + * -1/tan (if k= -1) is returned. + * + * Algorithm + * 1. Since tan(-x) = -tan(x), we need only to consider positive x. + * 2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0. + * 3. tan(x) is approximated by a odd polynomial of degree 27 on + * [0,0.67434] + * 3 27 + * tan(x) ~ x + T1*x + ... + T13*x + * where + * + * |tan(x) 2 4 26 | -59.2 + * |----- - (1+T1*x +T2*x +.... +T13*x )| <= 2 + * | x | + * + * Note: tan(x+y) = tan(x) + tan'(x)*y + * ~ tan(x) + (1+x*x)*y + * Therefore, for better accuracy in computing tan(x+y), let + * 3 2 2 2 2 + * r = x *(T2+x *(T3+x *(...+x *(T12+x *T13)))) + * then + * 3 2 + * tan(x+y) = x + (T1*x + (x *(r+y)+y)) + * + * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then + * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y)) + * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) + */ + +#include "math.h" +static const double one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ + pio4 = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */ + pio4lo = 3.06161699786838301793e-17, /* 0x3C81A626, 0x33145C07 */ + T[] = { + 3.33333333333334091986e-01, /* 0x3FD55555, 0x55555563 */ + 1.33333333333201242699e-01, /* 0x3FC11111, 0x1110FE7A */ + 5.39682539762260521377e-02, /* 0x3FABA1BA, 0x1BB341FE */ + 2.18694882948595424599e-02, /* 0x3F9664F4, 0x8406D637 */ + 8.86323982359930005737e-03, /* 0x3F8226E3, 0xE96E8493 */ + 3.59207910759131235356e-03, /* 0x3F6D6D22, 0xC9560328 */ + 1.45620945432529025516e-03, /* 0x3F57DBC8, 0xFEE08315 */ + 5.88041240820264096874e-04, /* 0x3F4344D8, 0xF2F26501 */ + 2.46463134818469906812e-04, /* 0x3F3026F7, 0x1A8D1068 */ + 7.81794442939557092300e-05, /* 0x3F147E88, 0xA03792A6 */ + 7.14072491382608190305e-05, /* 0x3F12B80F, 0x32F0A7E9 */ + -1.85586374855275456654e-05, /* 0xBEF375CB, 0xDB605373 */ + 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */ + }; + +double __kernel_tan(double x, double y, int iy) +{ + double z, r, v, w, s; + int ix, hx; + hx = __HI(x); /* high word of x */ + ix = hx & 0x7fffffff; /* high word of |x| */ + if (ix < 0x3e300000) /* x < 2**-28 */ + { + if ((int)x == 0) { /* generate inexact */ + if (((ix | __LO(x)) | (iy + 1)) == 0) { + double ret = fabs(x); + return one / ret; + } else + return (iy == 1) ? x : -one / x; + } + } + if (ix >= 0x3FE59428) { /* |x|>=0.6744 */ + if (hx < 0) { + x = -x; + y = -y; + } + z = pio4 - x; + w = pio4lo - y; + x = z + w; + y = 0.0; + } + z = x * x; + w = z * z; + /* Break x^5*(T[1]+x^2*T[2]+...) into + * x^5(T[1]+x^4*T[3]+...+x^20*T[11]) + + * x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12])) + */ + r = T[1] + w * (T[3] + w * (T[5] + w * (T[7] + w * (T[9] + w * T[11])))); + v = z * (T[2] + w * (T[4] + w * (T[6] + w * (T[8] + w * (T[10] + w * T[12]))))); + s = z * x; + r = y + z * (s * (r + v) + y); + r += T[0] * s; + w = x + r; + if (ix >= 0x3FE59428) { + v = (double)iy; + return (double)(1 - ((hx >> 30) & 2)) * (v - 2.0 * (x - (w * w / (w + v) - r))); + } + if (iy == 1) + return w; + else { /* if allow error up to 2 ulp, + simply return -1.0/(x+r) here */ + /* compute -1.0/(x+r) accurately */ + double a, t; + z = w; + __LO(z) = 0; + v = r - (z - x); /* z+v = r+x */ + t = a = -1.0 / w; /* a = -1.0/w */ + __LO(t) = 0; + s = 1.0 + t * z; + return t + a * (s + t * v); + } +} + +// EOF k_tan.c \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c new file mode 100644 index 00000000..153618d4 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c @@ -0,0 +1,142 @@ +/* @(#)s_atan.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + * + */ + +/* atan(x) + * Method + * 1. Reduce x to positive by atan(x) = -atan(-x). + * 2. According to the integer k=4t+0.25 chopped, t=x, the argument + * is further reduced to one of the following intervals and the + * arctangent of t is evaluated by the corresponding formula: + * + * [0,7/16] atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...) + * [7/16,11/16] atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) ) + * [11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) ) + * [19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) ) + * [39/16,INF] atan(x) = atan(INF) + atan( -1/t ) + * + * Constants: + * The hexadecimal values are the intended ones for the following + * constants. The decimal values may be used, provided that the + * compiler will convert from decimal to binary accurately enough + * to produce the hexadecimal values shown. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double atanhi[] = { +#else +static double atanhi[] = { +#endif + 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */ + 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */ + 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */ + 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */ +}; + +#ifdef __STDC__ +static const double atanlo[] = { +#else +static double atanlo[] = { +#endif + 2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */ + 3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */ + 1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */ + 6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */ +}; + +#ifdef __STDC__ +static const double aT[] = { +#else +static double aT[] = { +#endif + 3.33333333333329318027e-01, /* 0x3FD55555, 0x5555550D */ + -1.99999999998764832476e-01, /* 0xBFC99999, 0x9998EBC4 */ + 1.42857142725034663711e-01, /* 0x3FC24924, 0x920083FF */ + -1.11111104054623557880e-01, /* 0xBFBC71C6, 0xFE231671 */ + 9.09088713343650656196e-02, /* 0x3FB745CD, 0xC54C206E */ + -7.69187620504482999495e-02, /* 0xBFB3B0F2, 0xAF749A6D */ + 6.66107313738753120669e-02, /* 0x3FB10D66, 0xA0D03D51 */ + -5.83357013379057348645e-02, /* 0xBFADDE2D, 0x52DEFD9A */ + 4.97687799461593236017e-02, /* 0x3FA97B4B, 0x24760DEB */ + -3.65315727442169155270e-02, /* 0xBFA2B444, 0x2C6A6C2F */ + 1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */ +}; + +#ifdef __STDC__ +static const double +#else +static double +#endif + one + = 1.0, + huge = 1.0e300; + +#ifdef __STDC__ +double atan(double x) +#else +double atan(x) double x; +#endif +{ + double w, s1, s2, z; + int ix, hx, id; + + hx = __HI(x); + ix = hx & 0x7fffffff; + if (ix >= 0x44100000) { /* if |x| >= 2^66 */ + if (ix > 0x7ff00000 || (ix == 0x7ff00000 && (__LO(x) != 0))) + return x + x; /* NaN */ + if (hx > 0) + return atanhi[3] + atanlo[3]; + else + return -atanhi[3] - atanlo[3]; + } + if (ix < 0x3fdc0000) { /* |x| < 0.4375 */ + if (ix < 0x3e200000) { /* |x| < 2^-29 */ + if (huge + x > one) + return x; /* raise inexact */ + } + id = -1; + } else { + x = __fabs(x); + if (ix < 0x3ff30000) { /* |x| < 1.1875 */ + if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */ + id = 0; + x = (2.0 * x - one) / (2.0 + x); + } else { /* 11/16<=|x|< 19/16 */ + id = 1; + x = (x - one) / (x + one); + } + } else { + if (ix < 0x40038000) { /* |x| < 2.4375 */ + id = 2; + x = (x - 1.5) / (one + 1.5 * x); + } else { /* 2.4375 <= |x| < 2^66 */ + id = 3; + x = -1.0 / x; + } + } + } + /* end of argument reduction */ + z = x * x; + w = z * z; + /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */ + s1 = z * (aT[0] + w * (aT[2] + w * (aT[4] + w * (aT[6] + w * (aT[8] + w * aT[10]))))); + s2 = w * (aT[1] + w * (aT[3] + w * (aT[5] + w * (aT[7] + w * aT[9])))); + if (id < 0) + return x - x * (s1 + s2); + else { + z = atanhi[id] - ((x * (s1 + s2) - atanlo[id]) - x); + return (hx < 0) ? -z : z; + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c new file mode 100644 index 00000000..57890e62 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ceil.c @@ -0,0 +1,89 @@ +/* @(#)s_ceil.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * ceil(x) + * Return x rounded toward -inf to integral value + * Method: + * Bit twiddling. + * Exception: + * Inexact flag raised if x not equal to ceil(x). + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double huge = 1.0e300; +#else +static double huge = 1.0e300; +#endif + +#ifdef __STDC__ +double ceil(double x) +#else +double ceil(x) double x; +#endif +{ + int i0, i1, j0; + unsigned i, j; + i0 = __HI(x); + i1 = __LO(x); + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; + if (j0 < 20) { + if (j0 < 0) { /* raise inexact if x != 0 */ + if (huge + x > 0.0) { /* return 0*sign(x) if |x|<1 */ + if (i0 < 0) { + i0 = 0x80000000; + i1 = 0; + } else if ((i0 | i1) != 0) { + i0 = 0x3ff00000; + i1 = 0; + } + } + } else { + i = (0x000fffff) >> j0; + if (((i0 & i) | i1) == 0) + return x; /* x is integral */ + if (huge + x > 0.0) { /* raise inexact flag */ + if (i0 > 0) + i0 += (0x00100000) >> j0; + i0 &= (~i); + i1 = 0; + } + } + } else if (j0 > 51) { + if (j0 == 0x400) + return x + x; /* inf or NaN */ + else + return x; /* x is integral */ + } else { + i = ((unsigned)(0xffffffff)) >> (j0 - 20); + if ((i1 & i) == 0) + return x; /* x is integral */ + if (huge + x > 0.0) { /* raise inexact flag */ + if (i0 > 0) { + if (j0 == 20) + i0 += 1; + else { + j = i1 + (1 << (52 - j0)); + if (j < i1) + i0 += 1; /* got a carry */ + i1 = j; + } + } + i1 &= (~i); + } + } + __HI(x) = i0; + __LO(x) = i1; + return x; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c new file mode 100644 index 00000000..6d0f798e --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_copysign.c @@ -0,0 +1,29 @@ +/* @(#)s_copysign.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * copysign(double x, double y) + * copysign(x,y) returns a value with the magnitude of x and + * with the sign bit of y. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double copysign(double x, double y) +#else +double copysign(x, y) double x, y; +#endif +{ + __HI(x) = (__HI(x) & 0x7fffffff) | (__HI(y) & 0x80000000); + return x; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c new file mode 100644 index 00000000..f1d4d56d --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_cos.c @@ -0,0 +1,81 @@ +/* @(#)s_cos.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* cos(x) + * Return cosine function of x. + * + * kernel function: + * __kernel_sin ... sine function on [-pi/4,pi/4] + * __kernel_cos ... cosine function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * + * Method. + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * in [-pi/4 , +pi/4], and let n = k mod 4. + * We have + * + * n sin(x) cos(x) tan(x) + * ---------------------------------------------------------- + * 0 S C T + * 1 C -S -1/T + * 2 -S -C T + * 3 -C S -1/T + * ---------------------------------------------------------- + * + * Special cases: + * Let trig be any of sin, cos, or tan. + * trig(+-INF) is NaN, with signals; + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double cos(double x) +#else +double cos(x) double x; +#endif +{ + double y[2], z = 0.0; + int n, ix; + + /* High word of x. */ + ix = __HI(x); + + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) + return __kernel_cos(x, z); + + /* cos(Inf or NaN) is NaN */ + else if (ix >= 0x7ff00000) + return x - x; + + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x, y); + switch (n & 3) { + case 0: + return __kernel_cos(y[0], y[1]); + case 1: + return -__kernel_sin(y[0], y[1], 1); + case 2: + return -__kernel_cos(y[0], y[1]); + default: + return __kernel_sin(y[0], y[1], 1); + } + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c new file mode 100644 index 00000000..1ad58004 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_floor.c @@ -0,0 +1,88 @@ +/* @(#)s_floor.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * floor(x) + * Return x rounded toward -inf to integral value + * Method: + * Bit twiddling. + * Exception: + * Inexact flag raised if x not equal to floor(x). + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double huge = 1.0e300; +#else +static double huge = 1.0e300; +#endif + +#ifdef __STDC__ +double floor(double x) +#else +double floor(x) double x; +#endif +{ + int i0, i1, j0; + unsigned i, j; + i0 = __HI(x); + i1 = __LO(x); + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; + if (j0 < 20) { + if (j0 < 0) { /* raise inexact if x != 0 */ + if (huge + x > 0.0) { /* return 0*sign(x) if |x|<1 */ + if (i0 >= 0) { + i0 = i1 = 0; + } else if (((i0 & 0x7fffffff) | i1) != 0) { + i0 = 0xbff00000; + i1 = 0; + } + } + } else { + i = (0x000fffff) >> j0; + if (((i0 & i) | i1) == 0) + return x; /* x is integral */ + if (huge + x > 0.0) { /* raise inexact flag */ + if (i0 < 0) + i0 += (0x00100000) >> j0; + i0 &= (~i); + i1 = 0; + } + } + } else if (j0 > 51) { + if (j0 == 0x400) + return x + x; /* inf or NaN */ + else + return x; /* x is integral */ + } else { + i = ((unsigned)(0xffffffff)) >> (j0 - 20); + if ((i1 & i) == 0) + return x; /* x is integral */ + if (huge + x > 0.0) { /* raise inexact flag */ + if (i0 < 0) { + if (j0 == 20) + i0 += 1; + else { + j = i1 + (1 << (52 - j0)); + if (j < i1) + i0 += 1; /* got a carry */ + i1 = j; + } + } + i1 &= (~i); + } + } + __HI(x) = i0; + __LO(x) = i1; + return x; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c new file mode 100644 index 00000000..589ae0fd --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_frexp.c @@ -0,0 +1,56 @@ +/* @(#)s_frexp.c 1.4 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * for non-zero x + * x = frexp(arg,&exp); + * return a double fp quantity x such that 0.5 <= |x| <1.0 + * and the corresponding binary exponent "exp". That is + * arg = x*2^exp. + * If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg + * with *exp=0. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double +#else +static double +#endif + two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */ + +#ifdef __STDC__ +double frexp(double x, int* eptr) +#else +double frexp(x, eptr) double x; +int* eptr; +#endif +{ + int hx, ix, lx; + hx = __HI(x); + ix = 0x7fffffff & hx; + lx = __LO(x); + *eptr = 0; + if (ix >= 0x7ff00000 || ((ix | lx) == 0)) + return x; /* 0,inf,nan */ + if (ix < 0x00100000) { /* subnormal */ + x *= two54; + hx = __HI(x); + ix = hx & 0x7fffffff; + *eptr = -54; + } + *eptr += (ix >> 20) - 1022; + hx = (hx & 0x800fffff) | 0x3fe00000; + __HI(x) = hx; + return x; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c new file mode 100644 index 00000000..fb238872 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_ldexp.c @@ -0,0 +1,58 @@ +/* @(#)s_ldexp.c 1.2 95/01/04 */ +/* $Id: s_ldexp.c,v 1.3.14.1 2002/01/31 15:24:14 ceciliar Exp $ */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include "math.h" /* for isfinite macro */ +static const double + + two54 + = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ + twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ + big = 1.0e+300, tiny = 1.0e-300; + +double ldexp(double x, int n) +{ + long k, hx, lx; /*- cc 020130 -*/ + if (!isfinite(x) || x == 0.0) + return x; + + hx = __HI(x); + lx = __LO(x); + k = (hx & 0x7ff00000) >> 20; /* extract exponent */ + if (k == 0) { /* 0 or subnormal x */ + if ((lx | (hx & 0x7fffffff)) == 0) + return x; /* +-0 */ + x *= two54; + hx = __HI(x); + k = ((hx & 0x7ff00000) >> 20) - 54; + if (n < -50000) + return tiny * x; /*underflow*/ + } + if (k == 0x7ff) + return x + x; /* NaN or Inf */ + k = k + n; + if (k > 0x7fe) + return big * copysign(big, x); /* overflow */ + if (k > 0) /* normal result */ + { + __HI(x) = (hx & 0x800fffff) | (k << 20); + return x; + } + if (k <= -54) + if (n > 50000) /* in case integer overflow in n+k */ + return big * copysign(big, x); /*overflow*/ + else + return tiny * copysign(tiny, x); /*underflow*/ + k += 54; /* subnormal result */ + __HI(x) = (hx & 0x800fffff) | (k << 20); + return x * twom54; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c new file mode 100644 index 00000000..da8c8c00 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_modf.c @@ -0,0 +1,78 @@ +/* @(#)s_modf.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* + * modf(double x, double *iptr) + * return fraction part of x, and return x's integral part in *iptr. + * Method: + * Bit twiddling. + * + * Exception: + * No exception. + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +static const double one = 1.0; +#else +static double one = 1.0; +#endif + +#ifdef __STDC__ +double modf(double x, double* iptr) +#else +double modf(x, iptr) double x, *iptr; +#endif +{ + int i0, i1, j0; + unsigned i; + i0 = __HI(x); /* high x */ + i1 = __LO(x); /* low x */ + j0 = ((i0 >> 20) & 0x7ff) - 0x3ff; /* exponent of x */ + if (j0 < 20) { /* integer part in high x */ + if (j0 < 0) { /* |x|<1 */ + __HIp(iptr) = i0 & 0x80000000; + __LOp(iptr) = 0; /* *iptr = +-0 */ + return x; + } else { + i = (0x000fffff) >> j0; + if (((i0 & i) | i1) == 0) { /* x is integral */ + *iptr = x; + __HI(x) &= 0x80000000; + __LO(x) = 0; /* return +-0 */ + return x; + } else { + __HIp(iptr) = i0 & (~i); + __LOp(iptr) = 0; + return x - *iptr; + } + } + } else if (j0 > 51) { /* no fraction part */ + *iptr = x * one; + __HI(x) &= 0x80000000; + __LO(x) = 0; /* return +-0 */ + return x; + } else { /* fraction part in low x */ + i = ((unsigned)(0xffffffff)) >> (j0 - 20); + if ((i1 & i) == 0) { /* x is integral */ + *iptr = x; + __HI(x) &= 0x80000000; + __LO(x) = 0; /* return +-0 */ + return x; + } else { + __HIp(iptr) = i0; + __LOp(iptr) = i1 & (~i); + return x - *iptr; + } + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c new file mode 100644 index 00000000..ad62cff9 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_sin.c @@ -0,0 +1,81 @@ +/* @(#)s_sin.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* sin(x) + * Return sine function of x. + * + * kernel function: + * __kernel_sin ... sine function on [-pi/4,pi/4] + * __kernel_cos ... cose function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * + * Method. + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * in [-pi/4 , +pi/4], and let n = k mod 4. + * We have + * + * n sin(x) cos(x) tan(x) + * ---------------------------------------------------------- + * 0 S C T + * 1 C -S -1/T + * 2 -S -C T + * 3 -C S -1/T + * ---------------------------------------------------------- + * + * Special cases: + * Let trig be any of sin, cos, or tan. + * trig(+-INF) is NaN, with signals; + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double sin(double x) +#else +double sin(x) double x; +#endif +{ + double y[2], z = 0.0; + int n, ix; + + /* High word of x. */ + ix = __HI(x); + + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) + return __kernel_sin(x, z, 0); + + /* sin(Inf or NaN) is NaN */ + else if (ix >= 0x7ff00000) + return x - x; + + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x, y); + switch (n & 3) { + case 0: + return __kernel_sin(y[0], y[1], 1); + case 1: + return __kernel_cos(y[0], y[1]); + case 2: + return -__kernel_sin(y[0], y[1], 1); + default: + return -__kernel_cos(y[0], y[1]); + } + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c new file mode 100644 index 00000000..88296b42 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_tan.c @@ -0,0 +1,72 @@ +/* @(#)s_tan.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +/* tan(x) + * Return tangent function of x. + * + * kernel function: + * __kernel_tan ... tangent function on [-pi/4,pi/4] + * __ieee754_rem_pio2 ... argument reduction routine + * + * Method. + * Let S,C and T denote the sin, cos and tan respectively on + * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2 + * in [-pi/4 , +pi/4], and let n = k mod 4. + * We have + * + * n sin(x) cos(x) tan(x) + * ---------------------------------------------------------- + * 0 S C T + * 1 C -S -1/T + * 2 -S -C T + * 3 -C S -1/T + * ---------------------------------------------------------- + * + * Special cases: + * Let trig be any of sin, cos, or tan. + * trig(+-INF) is NaN, with signals; + * trig(NaN) is that NaN; + * + * Accuracy: + * TRIG(x) returns trig(x) nearly rounded + */ + +#include "fdlibm.h" + +#ifdef __STDC__ +double tan(double x) +#else +double tan(x) double x; +#endif +{ + double y[2], z = 0.0; + int n, ix; + + /* High word of x. */ + ix = __HI(x); + + /* |x| ~< pi/4 */ + ix &= 0x7fffffff; + if (ix <= 0x3fe921fb) + return __kernel_tan(x, z, 1); + + /* tan(Inf or NaN) is NaN */ + else if (ix >= 0x7ff00000) + return x - x; /* NaN */ + + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x, y); + return __kernel_tan(y[0], y[1], 1 - ((n & 1) << 1)); /* 1 -- n even + -1 -- n odd */ + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c new file mode 100644 index 00000000..a6c331a1 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_acos.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036C6E0-8036C700 367020 0020+00 0/0 2/2 3/3 .text acos */ +double acos(double x) { + return __ieee754_acos(x); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c new file mode 100644 index 00000000..779c1e9b --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_asin.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036C700-8036C720 367040 0020+00 0/0 2/2 0/0 .text asin */ +double asin(double x) { + return __ieee754_asin(x); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c new file mode 100644 index 00000000..8a2dd2ec --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_atan2.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036C720-8036C740 367060 0020+00 0/0 6/6 0/0 .text atan2 */ +double atan2(double x, double y) { + return __ieee754_atan2(x, y); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c new file mode 100644 index 00000000..d8768d6e --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_exp.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036C740-8036C760 367080 0020+00 0/0 1/1 0/0 .text exp */ +double exp(double x) { + return __ieee754_exp(x); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c new file mode 100644 index 00000000..fafd1f90 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_fmod.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036C760-8036C780 3670A0 0020+00 0/0 8/8 0/0 .text fmod */ +double fmod(double x, double y) { + return __ieee754_fmod(x, y); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c new file mode 100644 index 00000000..dc48afa6 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_pow.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036C780-8036C7A0 3670C0 0020+00 0/0 3/3 24/24 .text pow */ +double pow(double x, double y) { + return __ieee754_pow(x, y); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c new file mode 100644 index 00000000..7469b6ed --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/w_sqrt.c @@ -0,0 +1,6 @@ +#include "fdlibm.h" + +/* 8036CA54-8036CA74 367394 0020+00 0/0 8/8 1/1 .text sqrt */ +double sqrt(double x) { + return __ieee754_sqrt(x); +} \ No newline at end of file diff --git a/include/MSL_C/MSL_Common/Src/fdlibm.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h similarity index 83% rename from include/MSL_C/MSL_Common/Src/fdlibm.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h index b0f144ba..407419ba 100644 --- a/include/MSL_C/MSL_Common/Src/fdlibm.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Include/fdlibm.h @@ -1,3 +1,5 @@ +#ifndef FDLIBM_H +#define FDLIBM_H /* @(#)fdlibm.h 1.5 04/04/22 */ /* @@ -10,31 +12,36 @@ * ==================================================== */ +#ifdef __cplusplus +extern "C" { +#endif + /* Sometimes it's necessary to define __LITTLE_ENDIAN explicitly but these catch some common cases. */ -#if defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc) || defined(__alpha) || \ - defined(__osf__) +#if defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc) || \ + defined(__alpha) || defined(__osf__) #define __LITTLE_ENDIAN #endif #ifdef __LITTLE_ENDIAN -#define __HI(x) *(1 + (int *)&x) -#define __LO(x) *(int *)&x -#define __HIp(x) *(1 + (int *)x) -#define __LOp(x) *(int *)x +#define __HI(x) *(1 + (int*)&x) +#define __LO(x) *(int*)&x +#define __HIp(x) *(1 + (int*)x) +#define __LOp(x) *(int*)x #else -#define __HI(x) *(int *)&x -#define __LO(x) *(1 + (int *)&x) -#define __HIp(x) *(int *)x -#define __LOp(x) *(1 + (int *)x) +#define __HI(x) *(int*)&x +#define __LO(x) *(1 + (int*)&x) +#define __HIp(x) *(int*)x +#define __LOp(x) *(1 + (int*)x) #endif -#ifdef __STDC__ +// TODO: should __STDC__ actually be defined? +//#ifdef __STDC__ #define __P(p) p -#else -#define __P(p) () -#endif +//#else +//#define __P(p) () +//#endif /* * ANSI/POSIX @@ -65,7 +72,7 @@ extern _LIB_VERSION_TYPE _LIB_VERSION; struct exception { int type; - char *name; + char* name; double arg1; double arg2; double retval; @@ -74,8 +81,8 @@ struct exception { #define HUGE MAXFLOAT /* - * set X_TLOSS = pi*2**52, which is possibly defined in - * (one may replace the following line by "#include ") + * set X_TLOSS = pi*2**52, which is possibly defined in > (bits_not_checked - n); + + while (bits_not_checked) { + if (!(x & mask)) { + result += mask_size; + x >>= mask_size; + bits_not_checked -= mask_size; + } else if (mask == 1) { + break; + } + + if (n > 1) { + n /= 2; + } + + if (mask > 1) { + mask >>= n; + mask_size -= n; + } + } + return result; +} + +static int __count_trailing_zero(double x) { + unsigned long* l = (unsigned long*)&x; + + if (l[1] != 0) { + return __count_trailing_zerol(l[1]); + } + + return (int)(sizeof(unsigned long) * CHAR_BIT + __count_trailing_zerol(l[0] | 0x00100000)); +} + +static int __must_round(const decimal* d, int digits) { + unsigned char const* i = d->sig.text + digits; + + if (*i > 5) { + return 1; + } + + if (*i < 5) { + return -1; + } + + { + unsigned char const* e = d->sig.text + d->sig.length; + + for (i++; i < e; i++) { + if (*i != 0) { + return 1; + } + } + } + + if (d->sig.text[digits - 1] & 1) { + return 1; + } + + return -1; +} + +static void __dorounddecup(decimal* d, int digits) { + unsigned char* b = d->sig.text; + unsigned char* i = b + digits - 1; + + while (1) { + if (*i < 9) { + *i += 1; + break; + } + if (i == b) { + *i = 1; + d->exp++; + break; + } + *i-- = 0; + } +} + +static void __rounddec(decimal* d, int digits) { + if (digits > 0 && digits < d->sig.length) { + int unkBool = __must_round(d, digits); + d->sig.length = digits; + + if (unkBool >= 0) { + __dorounddecup(d, digits); + } + } +} + +void __ull2dec(decimal* result, unsigned long long val) { + result->sign = 0; + + if (val == 0) { + result->exp = 0; + result->sig.length = 1; + result->sig.text[0] = 0; + return; + } + + if (val < 0) { + val = -val; + result->sign = 1; + } + + result->sig.length = 0; + + for (; val != 0; val /= 10) { + result->sig.text[result->sig.length++] = (unsigned char)(val % 10); + } + + { + unsigned char* i = result->sig.text; + unsigned char* j = result->sig.text + result->sig.length; + + for (; i < --j; ++i) { + unsigned char t = *i; + *i = *j; + *j = t; + } + } + + result->exp = result->sig.length - 1; +} + +/* 80364E00-80365078 35F740 0278+00 2/2 0/0 0/0 .text __timesdec */ +void __timesdec(decimal* result, const decimal* x, const decimal* y) { + unsigned long accumulator = 0; + unsigned char mantissa[SIGDIGLEN * 2]; + int i = x->sig.length + y->sig.length - 1; + unsigned char* pDigit; + unsigned char* ip = mantissa + i + 1; + unsigned char* ep = ip; + + result->sign = 0; + + for (; i > 0; i--) { + int k = y->sig.length - 1; + int j = i - k - 1; + int l; + int t; + const unsigned char* jp; + const unsigned char* kp; + + if (j < 0) { + j = 0; + k = i - 1; + } + + jp = x->sig.text + j; + kp = y->sig.text + k; + l = k + 1; + t = x->sig.length - j; + + if (l > t) + l = t; + + for (; l > 0; l--, jp++, kp--) { + accumulator += *jp * *kp; + } + + *--ip = (unsigned char)(accumulator % 10); + accumulator /= 10; + } + + result->exp = (short)(x->exp + y->exp); + + if (accumulator) { + *--ip = (unsigned char)(accumulator); + result->exp++; + } + + for (i = 0; i < SIGDIGLEN && ip < ep; i++, ip++) { + result->sig.text[i] = *ip; + } + result->sig.length = (unsigned char)(i); + + if (ip < ep && *ip >= 5) { + if (*ip == 5) { + unsigned char* jp = ip + 1; + for (; jp < ep; jp++) { + if (*jp != 0) + goto round; + } + if ((ip[-1] & 1) == 0) + return; + } + round: + __dorounddecup(result, result->sig.length); + } +} + +void __str2dec(decimal* d, const char* s, short exp) { + int i; + + d->exp = exp; + d->sign = 0; + + for (i = 0; i < SIGDIGLEN && *s;) { + d->sig.text[i++] = *s++ - '0'; + } + d->sig.length = i; + + if (*s != 0) { + if (*s < 5) + return; + if (*s > 5) + goto round; + + { + const char* p = s + 1; + + for (; *p != 0; p++) { + if (*p != '0') + goto round; + } + + if ((d->sig.text[i - 1] & 1) == 0) + return; + } + round: + __dorounddecup(d, d->sig.length); + } +} + +static const char* const unused = "179769313486231580793729011405303420"; + +/* 8036367C-80364E00 35DFBC 1784+00 2/1 0/0 0/0 .text __two_exp */ +void __two_exp(decimal* result, long exp) { + switch (exp) { + case -64: + __str2dec(result, "542101086242752217003726400434970855712890625", -20); + return; + case -53: + __str2dec(result, "11102230246251565404236316680908203125", -16); + return; + case -32: + __str2dec(result, "23283064365386962890625", -10); + return; + case -16: + __str2dec(result, "152587890625", -5); + return; + case -8: + __str2dec(result, "390625", -3); + return; + case -7: + __str2dec(result, "78125", -3); + return; + case -6: + __str2dec(result, "15625", -2); + return; + case -5: + __str2dec(result, "3125", -2); + return; + case -4: + __str2dec(result, "625", -2); + return; + case -3: + __str2dec(result, "125", -1); + return; + case -2: + __str2dec(result, "25", -1); + return; + case -1: + __str2dec(result, "5", -1); + return; + case 0: + __str2dec(result, "1", 0); + return; + case 1: + __str2dec(result, "2", 0); + return; + case 2: + __str2dec(result, "4", 0); + return; + case 3: + __str2dec(result, "8", 0); + return; + case 4: + __str2dec(result, "16", 1); + return; + case 5: + __str2dec(result, "32", 1); + return; + case 6: + __str2dec(result, "64", 1); + return; + case 7: + __str2dec(result, "128", 2); + return; + case 8: + __str2dec(result, "256", 2); + return; + } + + { + decimal x2, temp; + + __two_exp(&x2, exp / 2); + __timesdec(result, &x2, &x2); + + if (exp & 1) { + temp = *result; + if (exp > 0) { + __str2dec(&x2, "2", 0); + } else { + __str2dec(&x2, "5", -1); + } + __timesdec(result, &temp, &x2); + } + } +} + +int __equals_dec(const decimal* x, const decimal* y) { + if (x->sig.text[0] == 0) { + if (y->sig.text[0] == 0) + return 1; + return 0; + } + if (y->sig.text[0] == 0) { + if (x->sig.text[0] == 0) + return 1; + return 0; + } + + if (x->exp == y->exp) { + int i; + int l = x->sig.length; + + if (l > y->sig.length) { + l = y->sig.length; + } + + for (i = 0; i < l; i++) { + if (x->sig.text[i] != y->sig.text[i]) { + return 0; + } + } + + if (l == x->sig.length) { + for (; i < y->sig.length; ++i) { + if (y->sig.text[i] != 0) { + return 0; + } + } + } else { + for (; i < x->sig.length; ++i) { + if (x->sig.text[i] != 0) { + return 0; + } + } + } + + return 1; + } + return 0; +} + +int __less_dec(const decimal* x, const decimal* y) { + if (x->sig.text[0] == 0) { + if (y->sig.text[0] != 0) + return 1; + return 0; + } + + if (y->sig.text[0] == 0) { + return 0; + } + + if (x->exp == y->exp) { + int i; + int l = x->sig.length; + + if (l > y->sig.length) { + l = y->sig.length; + } + + for (i = 0; i < l; i++) { + if (x->sig.text[i] < y->sig.text[i]) { + return 1; + } else if (y->sig.text[i] < x->sig.text[i]) { + return 0; + } + } + + if (l == x->sig.length) { + for (; i < y->sig.length; i++) { + if (y->sig.text[i] != 0) { + return 1; + } + } + } + return 0; + } + + return x->exp < y->exp; +} + +void __minus_dec(decimal* z, const decimal* x, const decimal* y) { + int zlen, dexp; + unsigned char *ib, *i, *ie; + unsigned char const *jb, *j, *jn; + + *z = *x; + + if (y->sig.text[0] == 0) + return; + + zlen = z->sig.length; + if (zlen < y->sig.length) + zlen = y->sig.length; + + dexp = z->exp - y->exp; + zlen += dexp; + + if (zlen > SIGDIGLEN) + zlen = SIGDIGLEN; + + while (z->sig.length < zlen) { + z->sig.text[z->sig.length++] = 0; + } + + ib = z->sig.text; + i = ib + zlen; + + if (y->sig.length + dexp < zlen) { + i = ib + (y->sig.length + dexp); + } + + jb = y->sig.text; + j = jb + (i - ib - dexp); + jn = j; + + while (i > ib && j > jb) { + i--; + j--; + if (*i < *j) { + unsigned char* k = i - 1; + while (*k == 0) + k--; + while (k != i) { + --*k; + *++k += 10; + } + } + *i -= *j; + } + + if (jn - jb < y->sig.length) { + int round_down = 0; + if (*jn < 5) + round_down = 1; + else if (*jn == 5) { + unsigned char const* ibPtr = y->sig.text + y->sig.length; + + for (j = jn + 1; j < ibPtr; j++) { + if (*j != 0) + goto done; + } + i = ib + (jn - jb) + dexp - 1; + if (*i & 1) + round_down = 1; + } + if (round_down) { + if (*i < 1) { + unsigned char* k = i - 1; + while (*k == 0) + k--; + while (k != i) { + --*k; + *++k += 10; + } + } + *i -= 1; + } + } +done: + for (i = ib; *i == 0; ++i) { + } + + if (i > ib) { + unsigned char dl = (unsigned char)(i - ib); + z->exp -= dl; + ie = ib + z->sig.length; + for (; i < ie; ++i, ++ib) + *ib = *i; + z->sig.length -= dl; + } + + ib = z->sig.text; + for (i = ib + z->sig.length; i > ib;) { + i--; + if (*i != 0) + break; + } + z->sig.length = (unsigned char)(i - ib + 1); +} + +/* 803632C8-8036367C 35DC08 03B4+00 1/1 0/0 0/0 .text __num2dec_internal */ +void __num2dec_internal(decimal* d, double x) { + signed char sign = (signed char)(signbit(x) != 0); + + if (x == 0) { + d->sign = sign; + d->exp = 0; + d->sig.length = 1; + d->sig.text[0] = 0; + return; + } + + if (!isfinite(x)) { + d->sign = sign; + d->exp = 0; + d->sig.length = 1; + d->sig.text[0] = fpclassify(x) == 1 ? 'N' : 'I'; + return; + } + + if (sign != 0) { + x = -x; + } + + { + int exp; + double frac = frexp(x, &exp); + long num_bits_extract = DBL_MANT_DIG - __count_trailing_zero(frac); + double integer; + decimal int_d, pow2_d; + + __two_exp(&pow2_d, exp - num_bits_extract); + frac = modf(ldexp(frac, num_bits_extract), &integer); + __ull2dec(&int_d, (unsigned long long)integer); + __timesdec(d, &int_d, &pow2_d); + d->sign = sign; + } +} + +/* 80363124-803632C8 35DA64 01A4+00 0/0 2/2 0/0 .text __num2dec */ +void __num2dec(const decform* form, double x, decimal* d) { + short digits = form->digits; + int i; + __num2dec_internal(d, x); + + if (d->sig.text[0] > 9) { + return; + } + + if (digits > SIGDIGLEN) { + digits = SIGDIGLEN; + } + + __rounddec(d, digits); + + while (d->sig.length < digits) { + d->sig.text[d->sig.length++] = 0; + } + + d->exp -= d->sig.length - 1; + + for (i = 0; i < d->sig.length; i++) { + d->sig.text[i] += '0'; + } +} \ No newline at end of file diff --git a/include/MSL_C/PPC_EABI/Src/critical_regions.gamecube.h b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h similarity index 64% rename from include/MSL_C/PPC_EABI/Src/critical_regions.gamecube.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h index 71e111ef..92173289 100644 --- a/include/MSL_C/PPC_EABI/Src/critical_regions.gamecube.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/critical_regions.gamecube.h @@ -1,4 +1,6 @@ #ifndef PPC_EABI_SRC_CRITICAL_REGIONSGAMECUBE_H #define PPC_EABI_SRC_CRITICAL_REGIONSGAMECUBE_H -#endif /* PPC_EABI_SRC_CRITICAL_REGIONSGAMECUBE_H */ + + +#endif /* PPC_EABI_SRC_CRITICAL_REGIONSGAMECUBE_H */ \ No newline at end of file diff --git a/include/MSL_C/PPC_EABI/Src/math_ppc.h b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h similarity index 63% rename from include/MSL_C/PPC_EABI/Src/math_ppc.h rename to src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h index 0458cd89..70adcd7e 100644 --- a/include/MSL_C/PPC_EABI/Src/math_ppc.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/math_ppc.h @@ -1,4 +1,6 @@ #ifndef PPC_EABI_SRC_MATH_PPC_H #define PPC_EABI_SRC_MATH_PPC_H -#endif /* PPC_EABI_SRC_MATH_PPC_H */ + + +#endif /* PPC_EABI_SRC_MATH_PPC_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h new file mode 100644 index 00000000..219fcbe7 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Include/uart_console_io_gcn.h @@ -0,0 +1,6 @@ +#ifndef PPC_EABI_SRC_UART_CONSOLE_IO_GCN_H +#define PPC_EABI_SRC_UART_CONSOLE_IO_GCN_H + +#include "ansi_files.h" + +#endif /* PPC_EABI_SRC_UART_CONSOLE_IO_GCN_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c new file mode 100644 index 00000000..bb9b68f1 --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/critical_regions.gamecube.c @@ -0,0 +1,10 @@ +#include "critical_regions.gamecube.h" + +/* 8036546C-80365470 35FDAC 0004+00 0/0 2/2 0/0 .text __kill_critical_regions */ +void __kill_critical_regions() {} + +/* 80365468-8036546C 35FDA8 0004+00 0/0 12/12 0/0 .text __begin_critical_region */ +void __begin_critical_region() {} + +/* 80365464-80365468 35FDA4 0004+00 0/0 12/12 0/0 .text __end_critical_region */ +void __end_critical_region() {} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c new file mode 100644 index 00000000..db002e0a --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/math_ppc.c @@ -0,0 +1,22 @@ +#include "math_ppc.h" +#include "fdlibm.h" + +/* 8036CA30-8036CA54 367370 0024+00 0/0 1/1 0/0 .text acosf */ +__declspec(weak) float acosf(float x) { + return acos(x); +} + +/* 8036CA0C-8036CA30 36734C 0024+00 0/0 4/4 0/0 .text cosf */ +__declspec(weak) float cosf(float x) { + return cos(x); +} + +/* 8036C9E8-8036CA0C 367328 0024+00 0/0 4/4 0/0 .text sinf */ +__declspec(weak) float sinf(float x) { + return sin(x); +} + +/* 8036C9C4-8036C9E8 367304 0024+00 0/0 2/2 0/0 .text tanf */ +__declspec(weak) float tanf(float x) { + return tan(x); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c new file mode 100644 index 00000000..b727148c --- /dev/null +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c @@ -0,0 +1,41 @@ +#include "uart_console_io_gcn.h" +#include "dolphin/os.h" + +int InitializeUART(size_t); +int WriteUARTN(unsigned char*, size_t); +int __TRK_write_console(__file_handle handle, unsigned char* buffer, size_t* count, + __idle_proc idle_fn); + +/* 803691A4-80369274 363AE4 00D0+00 0/0 1/0 0/0 .text __write_console */ +int __write_console(__file_handle handle, unsigned char* buffer, size_t* count, + __idle_proc idle_fn) { + static int initialized; + + if ((OSGetConsoleType() & 0x20000000) == 0) { + int uart_init = 0; + if (initialized == FALSE) { + uart_init = InitializeUART(0xE100); + + if (uart_init == 0) { + initialized = 1; + } + } + + if (uart_init != 0) { + return 1; + } + + if (WriteUARTN(buffer, *count) != 0) { + *count = 0; + return 1; + } + } + + __TRK_write_console(handle, buffer, count, idle_fn); + return 0; +} + +/* 8036919C-803691A4 363ADC 0008+00 0/0 1/0 0/0 .text __close_console */ +int __close_console(__file_handle handle) { + return 0; +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MetroTRK/trk.h b/src/PowerPC_EABI_Support/MetroTRK/trk.h new file mode 100644 index 00000000..d8fb5bc7 --- /dev/null +++ b/src/PowerPC_EABI_Support/MetroTRK/trk.h @@ -0,0 +1,378 @@ +#ifndef __METROTRK_TRK_H__ +#define __METROTRK_TRK_H__ + +#include "dolphin/types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +//////////// TRK ENUMS ///////////// +// Hardware types. +typedef enum { + HARDWARE_AMC_DDH = 0, + HARDWARE_GDEV = 1, + HARDWARE_BBA = 2, +} HardwareType; + +// DS Error returns. +typedef enum { + DS_NoError = 0x0, + DS_StepError = 0x1, + DS_ParameterError = 0x2, + + DS_EventQueueFull = 0x100, + + DS_NoMessageBufferAvailable = 0x300, + DS_MessageBufferOverflow = 0x301, + DS_MessageBufferReadError = 0x302, + + DS_DispatchError = 0x500, + + DS_InvalidMemory = 0x700, + DS_InvalidRegister = 0x701, + DS_CWDSException = 0x702, + DS_UnsupportedError = 0x703, + DS_InvalidProcessID = 0x704, + DS_InvalidThreadID = 0x705, + DS_OSError = 0x706, + + DS_Error800 = 0x800, +} DSError; + +// Where to read/write. +typedef enum { + DS_Stdin = 0, + DS_Stdout = 1, + DS_Stderr = 2, +} DSFileHandle; + +// IO returns. +typedef enum { + DS_IONoError = 0, + DS_IOError = 1, + DS_IOEOF = 2, +} DSIOResult; + +// Message command IDs +typedef enum { + DSMSG_Ping = 0x0, + DSMSG_Connect = 0x1, + DSMSG_Disconnect = 0x2, + DSMSG_Reset = 0x3, + DSMSG_Versions = 0x4, + DSMSG_SupportMask = 0x5, + DSMSG_Override = 0x7, + + DSMSG_ReadMemory = 0x10, + DSMSG_WriteMemory = 0x11, + DSMSG_ReadRegisters = 0x12, + DSMSG_WriteRegisters = 0x13, + DSMSG_SetOption = 0x17, + DSMSG_Continue = 0x18, + DSMSG_Step = 0x19, + DSMSG_Stop = 0x1A, + + DSMSG_ReplyACK = 0x80, + + DSMSG_NotifyStopped = 0x90, + DSMSG_NotifyException = 0x91, + + DSMSG_WriteFile = 0xD0, + DSMSG_ReadFile = 0xD1, + DSMSG_OpenFile = 0xD2, + DSMSG_CloseFile = 0xD3, + DSMSG_PositionFile = 0xD4, + + DSMSG_ReplyNAK = 0xFF, +} MessageCommandID; + +// Register commands. +typedef enum { + DSREG_Default = 0, + DSREG_FP = 1, + DSREG_Extended1 = 2, + DSREG_Extended2 = 3, +} DSMessageRegisterOptions; + +// Step commands. +typedef enum { + DSSTEP_IntoCount = 0x0, + DSSTEP_IntoRange = 0x1, + DSSTEP_OverCount = 0x10, + DSSTEP_OverRange = 0x11, +} DSMessageStepOptions; + +typedef enum { + DSREPLY_NoError = 0x0, + DSREPLY_Error = 0x1, + DSREPLY_PacketSizeError = 0x2, + DSREPLY_CWDSError = 0x3, + DSREPLY_EscapeError = 0x4, + DSREPLY_BadFCS = 0x5, + DSREPLY_Overflow = 0x6, + DSREPLY_SequenceMissing = 0x7, + + DSREPLY_UnsupportedCommandError = 0x10, + DSREPLY_ParameterError = 0x11, + DSREPLY_UnsupportedOptionError = 0x12, + DSREPLY_InvalidMemoryRange = 0x13, + DSREPLY_InvalidRegisterRange = 0x14, + DSREPLY_CWDSException = 0x15, + DSREPLY_NotStopped = 0x16, + DSREPLY_BreakpointsFull = 0x17, + DSREPLY_BreakpointConflict = 0x18, + + DSREPLY_OSError = 0x20, + DSREPLY_InvalidProcessID = 0x21, + DSREPLY_InvalidThreadID = 0x22, + DSREPLY_DebugSecurityError = 0x23, +} DSReplyError; + +typedef enum { + DSRECV_Wait = 0, + DSRECV_Found = 1, + DSRECV_InFrame = 2, + DSRECV_FrameOverflow = 3, +} ReceiverState; + +typedef enum { + DSMSGMEMORY_Segmented = 0x01, /* non-flat addr space */ + DSMSGMEMORY_Extended = 0x02, /* > 32-bit data addr */ + DSMSGMEMORY_Protected = 0x04, /* non-user memory */ + DSMSGMEMORY_Userview = 0x08, /* breakpoints are invisible */ + DSMSGMEMORY_Space_program = 0x00, + DSMSGMEMORY_Space_data = 0x40, + DSMSGMEMORY_Space_io = 0x80 +}; + +typedef enum { + NUBEVENT_Null = 0, + NUBEVENT_Shutdown = 1, + NUBEVENT_Request = 2, + NUBEVENT_Breakpoint = 3, + NUBEVENT_Exception = 4, + NUBEVENT_Support = 5, +} NubEventType; + +typedef enum { + VALIDMEM_Readable = 0, + VALIDMEM_Writeable = 1, +} ValidMemoryOptions; + +typedef enum { + MEMACCESS_UserMemory = 0, + MEMACCESS_DebuggerMemory = 1, +} MemoryAccessOptions; + +typedef int UARTError; + +typedef enum { + UART_NoError = 0, + UART_UnknownBaudRate = 1, + UART_ConfigurationError = 2, + UART_BufferOverflow = 3, // specified buffer was too small + UART_NoData = 4, // no data available from polling +} UARTErrorOptions; + +typedef enum { + kBaudHWSet = -1, // use HW settings such as DIP switches + kBaud300 = 300, // valid baud rates + kBaud600 = 600, + kBaud1200 = 1200, + kBaud1800 = 1800, + kBaud2000 = 2000, + kBaud2400 = 2400, + kBaud3600 = 3600, + kBaud4800 = 4800, + kBaud7200 = 7200, + kBaud9600 = 9600, + kBaud19200 = 19200, + kBaud38400 = 38400, + kBaud57600 = 57600, + kBaud115200 = 115200, + kBaud230400 = 230400 +} UARTBaudRate; + +//////////////////////////////////// + +typedef int MessageBufferID; + +#define TRKMSGBUF_SIZE (0x800 + 0x80) + +typedef struct TRKBuffer { + /* 0x00 */ u32 _00; + /* 0x04 */ BOOL isInUse; + /* 0x08 */ u32 length; + /* 0x0C */ u32 position; + /* 0x10 */ u8 data[TRKMSGBUF_SIZE]; +} TRKBuffer; + +typedef struct TRKFramingState { + MessageBufferID msgBufID; // _00 + TRKBuffer* buffer; // _04 + ReceiverState receiveState; // _08 + BOOL isEscape; // _0C + u8 fcsType; // _10 +} TRKFramingState; + +typedef struct TRKState_PPC { + u32 GPR[32]; // 0x0 + u32 LR; // 0x80 + u32 CTR; // 0x84 + u32 XER; // 0x88 + u32 MSR; // 0x8c + u32 DAR; // 0x90 + u32 DSISR; // 0x94 + BOOL stopped; // 0x98 + BOOL inputActivated; // 0x9c + u8* inputPendingPtr; // 0xA0 +} TRKState_PPC; + +typedef struct CommandReply { + u32 _00; // _00 + union { + u8 b; + MessageCommandID m; + } commandID; // _04, use MessageCommandID enum + union { + u8 b; + DSReplyError r; + } replyError; // _08, use DSReplyError enum - should be enum type? check size. + u32 _0C; // _0C + u8 _10[0x30]; // _10, unknown +} CommandReply; + +typedef struct ProcessorRestoreFlags_PPC { + u8 TBR; + u8 DEC; + u8 linker_padding[0x9 - 0x2]; +} ProcessorRestoreFlags_PPC; + +void TRKSaveExtended1Block(); + +#define SPR_XER 1 +#define SPR_LR 8 +#define SPR_CTR 9 +#define SPR_DSISR 18 +#define SPR_DAR 19 +#define SPR_DEC 22 +#define SPR_SDR1 25 +#define SPR_SRR0 26 +#define SPR_SRR1 27 +#define SPR_SPRG0 272 +#define SPR_SPRG1 273 +#define SPR_SPRG2 274 +#define SPR_SPRG3 275 +#define SPR_EAR 282 +#define SPR_TBL 284 +#define SPR_TBU 285 +#define SPR_PVR 287 +#define SPR_IBAT0U 528 +#define SPR_IBAT0L 529 +#define SPR_IBAT1U 530 +#define SPR_IBAT1L 531 +#define SPR_IBAT2U 532 +#define SPR_IBAT2L 533 +#define SPR_IBAT3U 534 +#define SPR_IBAT3L 535 +#define SPR_IBAT4U 560 +#define SPR_IBAT4L 561 +#define SPR_IBAT5U 562 +#define SPR_IBAT5L 563 +#define SPR_IBAT6U 564 +#define SPR_IBAT6L 565 +#define SPR_IBAT7U 566 +#define SPR_IBAT7L 567 +#define SPR_DBAT0U 536 +#define SPR_DBAT0L 537 +#define SPR_DBAT1U 538 +#define SPR_DBAT1L 539 +#define SPR_DBAT2U 540 +#define SPR_DBAT2L 541 +#define SPR_DBAT3U 542 +#define SPR_DBAT3L 543 +#define SPR_DBAT4U 568 +#define SPR_DBAT4L 569 +#define SPR_DBAT5U 570 +#define SPR_DBAT5L 571 +#define SPR_DBAT6U 572 +#define SPR_DBAT6L 573 +#define SPR_DBAT7U 574 +#define SPR_DBAT7L 575 +#define SPR_GQR0 912 +#define SPR_GQR1 913 +#define SPR_GQR2 914 +#define SPR_GQR3 915 +#define SPR_GQR4 916 +#define SPR_GQR5 917 +#define SPR_GQR6 918 +#define SPR_GQR7 919 +#define SPR_HID2 920 +#define SPR_WPAR 921 +#define SPR_DMA_U 922 +#define SPR_DMA_L 923 +#define SPR_UMMCR0 936 +#define SPR_UPMC1 937 +#define SPR_UPMC2 938 +#define SPR_USIA 939 +#define SPR_UMMCR1 940 +#define SPR_UPMC3 941 +#define SPR_UPMC4 942 +#define SPR_USDA 943 +#define SPR_MMCR0 952 +#define SPR_PMC1 953 +#define SPR_PMC2 954 +#define SPR_SIA 955 +#define SPR_MMCR1 956 +#define SPR_PMC3 957 +#define SPR_PMC4 958 +#define SPR_SDA 959 +#define SPR_HID0 1008 +#define SPR_HID1 1009 +#define SPR_IABR 1010 +#define SPR_HID4 1011 +#define SPR_DABR 1013 +#define SPR_L2CR 1017 +#define SPR_ICTC 1019 +#define SPR_THRM1 1020 +#define SPR_THRM2 1021 +#define SPR_FPECR 1022 + +// PPC exceptions +// 0x000 is reserved +#define PPC_SystemReset 0x100 +#define PPC_MachineCheck 0x200 +#define PPC_DataStorage 0x300 +#define PPC_InstructionStorage 0x400 +#define PPC_ExternalInterrupt 0x500 +#define PPC_Alignment 0x600 +#define PPC_Program 0x700 +#define PPC_FloatingPointUnavaiable 0x800 +#define PPC_Decrementer 0x900 +// 0xA00-0xB00 are reserved +#define PPC_SystemCall 0xC00 +#define PPC_Trace 0xD00 +#define PPC_FloatingPointAssist 0xE00 // unimplemented in 750CL +#define PPC_PerformanceMonitor 0xF00 // Dolphin/Broadway specific +// 0x1000-0x1200 are unimplemented in 750CL +#define PPC_InstructionAddressBreakpoint 0x1300 // Dolphin/Broadway specific +// 0x1400-0x2F00 are reserved, but TRK uses some +#define PPC_SystemManagementInterrupt 0x1400 +// 0x1500-0x1600 are unimplemented in 750CL +#define PPC_ThermalManagementInterrupt 0x1700 +#define PPC_1800Exception 0x1800 +#define PPC_1900Exception 0x1900 +#define PPC_1A00Exception 0x1A00 +#define PPC_1B00Exception 0x1B00 +#define PPC_1C00Exception 0x1C00 // Data breakpoint? +#define PPC_1D00Exception 0x1D00 // Instruction breakpoint? +#define PPC_1E00Exception 0x1E00 // Peripheral breakpoint? +#define PPC_1F00Exception 0x1F00 // Non maskable development port? +#define PPC_2000Exception 0x2000 + +#ifdef __cplusplus +} +#endif + +#endif /* __METROTRK_TRK_H__ */ \ No newline at end of file diff --git a/include/Runtime.PPCEABI.H/CPlusLibPPC.h b/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h similarity index 78% rename from include/Runtime.PPCEABI.H/CPlusLibPPC.h rename to src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h index 16065292..a4d189fe 100644 --- a/include/Runtime.PPCEABI.H/CPlusLibPPC.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h @@ -1,6 +1,6 @@ #ifndef CPLUSLIBPPC_H #define CPLUSLIBPPC_H -#include +#include "common.h" #endif /* CPLUSLIBPPC_H */ diff --git a/include/Runtime.PPCEABI.H/GCN_mem_alloc.h b/src/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h similarity index 62% rename from include/Runtime.PPCEABI.H/GCN_mem_alloc.h rename to src/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h index 0b880b91..790b3fd4 100644 --- a/include/Runtime.PPCEABI.H/GCN_mem_alloc.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/GCN_mem_alloc.h @@ -1,4 +1,5 @@ #ifndef GCN_MEM_ALLOC_H #define GCN_MEM_ALLOC_H -#endif /* GCN_MEM_ALLOC_H */ + +#endif /* GCN_MEM_ALLOC_H */ \ No newline at end of file diff --git a/include/Runtime.PPCEABI.H/Gecko_ExceptionPPC.h b/src/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h similarity index 63% rename from include/Runtime.PPCEABI.H/Gecko_ExceptionPPC.h rename to src/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h index d4ba9ec8..327765ea 100644 --- a/include/Runtime.PPCEABI.H/Gecko_ExceptionPPC.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/Gecko_ExceptionPPC.h @@ -1,4 +1,5 @@ #ifndef GECKO_EXCEPTIONPPC_H #define GECKO_EXCEPTIONPPC_H -#endif /* GECKO_EXCEPTIONPPC_H */ + +#endif /* GECKO_EXCEPTIONPPC_H */ \ No newline at end of file diff --git a/include/Runtime.PPCEABI.H/NMWException.h b/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h similarity index 78% rename from include/Runtime.PPCEABI.H/NMWException.h rename to src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h index f5c04a3a..8f85b527 100644 --- a/include/Runtime.PPCEABI.H/NMWException.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/NMWException.h @@ -1,9 +1,7 @@ -#ifndef _NMWEXCEPTION -#define _NMWEXCEPTION - -#include "Runtime.PPCEABI.H/__ppc_eabi_linker.h" -#include +#ifndef NMWEXCEPTION_H +#define NMWEXCEPTION_H +#include "__ppc_eabi_linker.h" #ifdef __cplusplus extern "C" { @@ -26,4 +24,4 @@ void __destroy_global_chain(void); } #endif -#endif // _NMWEXCEPTION +#endif /* NMWEXCEPTION_H */ diff --git a/include/Runtime.PPCEABI.H/__init_cpp_exceptions.h b/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h similarity index 83% rename from include/Runtime.PPCEABI.H/__init_cpp_exceptions.h rename to src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h index 525612aa..1bab0125 100644 --- a/include/Runtime.PPCEABI.H/__init_cpp_exceptions.h +++ b/src/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 "common.h" #endif /* __INIT_CPP_EXCEPTIONS_H */ diff --git a/include/Runtime.PPCEABI.H/__mem.h b/src/PowerPC_EABI_Support/Runtime/Inc/__mem.h similarity index 100% rename from include/Runtime.PPCEABI.H/__mem.h rename to src/PowerPC_EABI_Support/Runtime/Inc/__mem.h diff --git a/include/Runtime.PPCEABI.H/__ppc_eabi_linker.h b/src/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h similarity index 98% rename from include/Runtime.PPCEABI.H/__ppc_eabi_linker.h rename to src/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h index 068488e0..49991a90 100644 --- a/include/Runtime.PPCEABI.H/__ppc_eabi_linker.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/__ppc_eabi_linker.h @@ -68,4 +68,4 @@ extern char _e_PPC_EMB_sdata0[]; extern char _f_PPC_EMB_sbss0[]; extern char _e_PPC_EMB_sbss0[]; -#endif // __PPC_EABI_LINKER +#endif // __PPC_EABI_LINKER \ No newline at end of file diff --git a/include/Runtime.PPCEABI.H/__va_arg.h b/src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h similarity index 86% rename from include/Runtime.PPCEABI.H/__va_arg.h rename to src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h index 445bb985..4b8666c4 100644 --- a/include/Runtime.PPCEABI.H/__va_arg.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h @@ -1,8 +1,6 @@ #ifndef __VA_ARG_H #define __VA_ARG_H -#include - typedef struct __va_list_struct { char gpr; char fpr; @@ -19,7 +17,7 @@ extern "C" void *__va_arg(_va_list_struct *, int); void *__va_arg(_va_list_struct *, int); #endif -#if __INTELLISENSE__ +#ifndef __MWERKS__ #define __builtin_va_info(...) #define _var_arg_typeof(...) #endif @@ -28,9 +26,9 @@ void *__va_arg(_va_list_struct *, int); // __builtin_va_info: initialize the __va_list_struct // _var_arg_typeof: convert type to integer for __va_arg #define __va_start(list, fmt) __builtin_va_info(&list) -// #define __va_arg(list, type) (*((type*)__va_arg(ap, _var_arg_typeof(type)))) +#define __va_arg(list, type) (*((type *)__va_arg(list, _var_arg_typeof(type)))) #define va_start __va_start -// #define va_arg __va_arg +#define va_arg __va_arg #define va_end __va_end #define va_list __va_list #define __va_end(list) ((void)0) diff --git a/include/Runtime.PPCEABI.H/global_destructor_chain.h b/src/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h similarity index 63% rename from include/Runtime.PPCEABI.H/global_destructor_chain.h rename to src/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h index 1f568e35..5e221260 100644 --- a/include/Runtime.PPCEABI.H/global_destructor_chain.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/global_destructor_chain.h @@ -1,4 +1,5 @@ #ifndef GLOBAL_DESTRUCTOR_CHAIN_H #define GLOBAL_DESTRUCTOR_CHAIN_H -#endif /* GLOBAL_DESTRUCTOR_CHAIN_H */ + +#endif /* GLOBAL_DESTRUCTOR_CHAIN_H */ \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h b/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h new file mode 100644 index 00000000..a11aea38 --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Inc/ptmf.h @@ -0,0 +1,17 @@ +#ifndef PTMF_H +#define PTMF_H + +typedef struct __ptmf { + long this_delta; // self-explanatory + long v_offset; // vtable offset + union { + void *f_addr; // function address + long ve_offset; // virtual function entry offset (of vtable) + } f_data; +} __ptmf; + +const __ptmf __ptmf_null; +long __ptmf_test(__ptmf *ptmf); +void __ptmf_cmpr(register __ptmf *this, register __ptmf *other); +void __ptmf_scall(...); +#endif /* PTMF_H */ diff --git a/include/Runtime.PPCEABI.H/runtime.h b/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h similarity index 75% rename from include/Runtime.PPCEABI.H/runtime.h rename to src/PowerPC_EABI_Support/Runtime/Inc/runtime.h index be485275..de5b358e 100644 --- a/include/Runtime.PPCEABI.H/runtime.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h @@ -1,6 +1,6 @@ #ifndef RUNTIME_H #define RUNTIME_H -#include +#include "common.h" #endif /* RUNTIME_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp b/src/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp new file mode 100644 index 00000000..0b98e496 --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/CPlusLibPPC.cp @@ -0,0 +1,18 @@ +#include "CPlusLibPPC.h" + +/* 80361C3C-80361C6C 35C57C 0030+00 0/0 0/0 4/4 .text __copy */ +extern "C" void* __copy(char *dest, char *src, size_t size) { + char *p; + + if (dest && size) { + p = dest; + do { + *p = *src; + ++p; + ++src; + --size; + } while (size); + } + + return(dest); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c b/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c new file mode 100644 index 00000000..269cbef9 --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c @@ -0,0 +1,35 @@ +/** + * GCN_Mem_Alloc.c + * Description: + */ + +#include "dolphin/os.h" + +inline static void InitDefaultHeap(void) { + void* arenaLo; + void* arenaHi; + + OSReport("GCN_Mem_Alloc.c : InitDefaultHeap. No Heap Available\n"); + OSReport("Metrowerks CW runtime library initializing default heap\n"); + + arenaLo = OSGetArenaLo(); + arenaHi = OSGetArenaHi(); + + arenaLo = OSInitAlloc(arenaLo, arenaHi, 1); + OSSetArenaLo(arenaLo); + + arenaLo = OSRoundUpPtr(arenaLo, 0x20); + arenaHi = OSRoundDownPtr(arenaHi, 0x20); + + OSSetCurrentHeap(OSCreateHeap(arenaLo, arenaHi)); + OSSetArenaLo(arenaLo = arenaHi); +} + +/* 80362914-803629CC 35D254 00B8+00 0/0 1/1 0/0 .text __sys_free */ +void __sys_free(void* p) { + if (__OSCurrHeap == -1) { + InitDefaultHeap(); + } + + OSFreeToHeap(__OSCurrHeap, p); +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp b/src/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp new file mode 100644 index 00000000..5e535efe --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/Gecko_ExceptionPPC.cp @@ -0,0 +1,43 @@ +#include "NMWException.h" +#include "__ppc_eabi_linker.h" + +#if __MWERKS__ +#pragma exceptions on +#endif + +typedef struct ProcessInfo { + __eti_init_info* exception_info; + char* TOC; + int active; +} ProcessInfo; + +/* 8044D430-8044D440 07A150 000C+04 2/2 0/0 0/0 .bss fragmentinfo */ +static ProcessInfo fragmentinfo[1]; + +/* 803628E0-80362914 35D220 0034+00 0/0 1/1 0/0 .text __register_fragment */ +int __register_fragment(struct __eti_init_info* info, char* TOC) { + ProcessInfo* f; + int i; + + for (i = 0, f = fragmentinfo; i < 1; ++i, ++f) { + if (f->active == 0) { + f->exception_info = info; + f->TOC = TOC; + f->active = 1; + return i; + } + } + + return -1; +} + +/* 803628AC-803628E0 35D1EC 0034+00 0/0 1/1 0/0 .text __unregister_fragment */ +void __unregister_fragment(int fragmentId) { + ProcessInfo* f; + if (fragmentId >= 0 && fragmentId < 1) { + f = &fragmentinfo[fragmentId]; + f->exception_info = 0; + f->TOC = 0; + f->active = 0; + } +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp b/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp new file mode 100644 index 00000000..f665dbbf --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/NMWException.cp @@ -0,0 +1,121 @@ +// +// Generated By: dol2asm +// Translation Unit: NMWException +// + +#include "NMWException.h" +#include "stddef.h" +#include "dol2asm.h" + +// +// Types: +// + +struct __partial_array_destructor { + /* 80361E5C */ ~__partial_array_destructor(); +}; + +// +// Forward References: +// + +#pragma section "extabindex_" +extern void* const data_8000569C[8]; +extern "C" void __destroy_new_array(); +extern "C" void __destroy_arr(); +extern "C" void __construct_array(); +extern "C" void __dt__26__partial_array_destructorFv(); +extern "C" void __construct_new_array(); + +// +// External References: +// + +#pragma section "extab_" +extern "C" extern void* const _section_symbol_extab[18]; +extern "C" void __dl__FPv(); +extern "C" void __dla__FPv(); + +// +// Declarations: +// + +/* 80361C6C-80361CE8 35C5AC 007C+00 2/0 11/11 3/3 .text __destroy_new_array */ +void __destroy_new_array() { + // NONMATCHING +} + +/* 80361CE8-80361D60 35C628 0078+00 1/0 58/58 350/350 .text __destroy_arr */ +void __destroy_arr() { + // NONMATCHING +} + +/* 80361D60-80361E5C 35C6A0 00FC+00 1/0 98/98 461/461 .text __construct_array */ +void __construct_array() { + // NONMATCHING +} + +/* 80361E5C-80361F14 35C79C 00B8+00 1/0 1/0 0/0 .text __dt__26__partial_array_destructorFv */ +__partial_array_destructor::~__partial_array_destructor() { + // NONMATCHING +} + +/* 80361F14-80362018 35C854 0104+00 1/0 28/28 13/13 .text __construct_new_array */ +void __construct_new_array() { + // NONMATCHING +} + +/* ############################################################################################## */ +/* 80005660-8000566C -00001 000C+00 1/0 0/0 0/0 .extabindex @206 */ +SECTION_EXTABINDEX static void* const lit_206[3] = { + (void*)__destroy_new_array, + (void*)0x0000007C, + (void*)&_section_symbol_extab, +}; + +/* 8000566C-80005678 -00001 000C+00 0/0 0/0 0/0 .extabindex @211 */ +#pragma push +#pragma force_active on +SECTION_EXTABINDEX static void* const lit_211[3] = { + (void*)__destroy_arr, + (void*)0x00000078, + (void*)(((char*)&_section_symbol_extab) + 0x8), +}; +#pragma pop + +/* 80005678-80005684 -00001 000C+00 0/0 0/0 0/0 .extabindex @232 */ +#pragma push +#pragma force_active on +SECTION_EXTABINDEX static void* const lit_232[3] = { + (void*)__construct_array, + (void*)0x000000FC, + (void*)(((char*)&_section_symbol_extab) + 0x10), +}; +#pragma pop + +/* 80005684-80005690 -00001 000C+00 0/0 0/0 0/0 .extabindex @240 */ +#pragma push +#pragma force_active on +SECTION_EXTABINDEX static void* const lit_240[3] = { + (void*)__dt__26__partial_array_destructorFv, + (void*)0x000000B8, + (void*)(((char*)&_section_symbol_extab) + 0x28), +}; +#pragma pop + +/* 80005690-8000569C -00001 000C+00 0/0 0/0 0/0 .extabindex @263 */ +#pragma push +#pragma force_active on +SECTION_EXTABINDEX static void* const lit_263[3] = { + (void*)__construct_new_array, + (void*)0x00000104, + (void*)(((char*)&_section_symbol_extab) + 0x30), +}; +#pragma pop + +/* 8000569C-800056BC -00001 0020+00 1/0 1/1 0/0 .extabindex None */ +SECTION_EXTABINDEX extern void* const data_8000569C[8] = { + (void*)&lit_206, (void*)&data_8000569C, (void*)__destroy_new_array, + (void*)0x000003AC, (void*)NULL, (void*)NULL, + (void*)NULL, (void*)NULL, +}; \ No newline at end of file diff --git a/src/Runtime.PPCEABI.H/__init_cpp_exceptions.cpp b/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp similarity index 62% rename from src/Runtime.PPCEABI.H/__init_cpp_exceptions.cpp rename to src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp index a9fb5f72..ab338f87 100644 --- a/src/Runtime.PPCEABI.H/__init_cpp_exceptions.cpp +++ b/src/PowerPC_EABI_Support/Runtime/Src/__init_cpp_exceptions.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "__init_cpp_exceptions.h" + +#include "NMWException.h" +#include "__ppc_eabi_linker.h" + #if __MWERKS__ #pragma exceptions off @@ -21,7 +23,7 @@ extern void __fini_cpp_exceptions(void); static int fragmentID = -2; void __init_cpp_exceptions(void) { - register char* R2; + register char *R2; if (fragmentID == -2) { __asm { mr R2, r2 @@ -43,13 +45,10 @@ void __fini_cpp_exceptions(void) { #pragma force_active on #pragma section ".ctors$10" -__declspec(section ".ctors$10") - extern void * const __init_cpp_exceptions_reference = __init_cpp_exceptions; +__declspec(section ".ctors$10") extern void *const __init_cpp_exceptions_reference = __init_cpp_exceptions; #pragma section ".dtors$10" -__declspec(section ".dtors$10") - extern void * const __destroy_global_chain_reference = __destroy_global_chain; +__declspec(section ".dtors$10") extern void *const __destroy_global_chain_reference = __destroy_global_chain; #pragma section ".dtors$15" -__declspec(section ".dtors$15") - extern void * const __fini_cpp_exceptions_reference = __fini_cpp_exceptions; +__declspec(section ".dtors$15") extern void *const __fini_cpp_exceptions_reference = __fini_cpp_exceptions; #pragma pop diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__mem.c b/src/PowerPC_EABI_Support/Runtime/Src/__mem.c new file mode 100644 index 00000000..082bdc1f --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/__mem.c @@ -0,0 +1,112 @@ +#include "dol2asm.h" +#include "dolphin.h" + +/* 800035C0-800035E4 0004C0 0024+00 0/0 12/12 0/0 .init TRK_memcpy */ +SECTION_INIT void *TRK_memcpy(void *dst, const void *src, size_t n) { + const unsigned char *s = (const unsigned char *)src - 1; + unsigned char *d = (unsigned char *)dst - 1; + + n++; + while (--n != 0) { + *++d = *++s; + } + return dst; +} + +/* 80003590-800035C0 000490 0030+00 0/0 1/1 0/0 .init TRK_memset */ +SECTION_INIT void *TRK_memset(void *dst, int val, size_t n) { + TRK_fill_mem(dst, val, n); + + return dst; +} + +/* 80003540-80003590 000440 0050+00 1/1 63/63 6/6 .init memcpy */ +SECTION_INIT void *memcpy(void *dst, const void *src, size_t n) { + const unsigned char *s; + unsigned char *d; + + if ((unsigned long)src >= (unsigned long)dst) { + s = (const unsigned char *)src - 1; + d = (unsigned char *)dst - 1; + n++; + while (--n != 0) { + *++d = *++s; + } + } else { + s = (const unsigned char *)src + n; + d = (unsigned char *)dst + n; + n++; + while (--n != 0) { + *--d = *--s; + } + } + return dst; +} + +/* 80003488-80003540 000388 00B8+00 1/1 0/0 0/0 .init __fill_mem */ +SECTION_INIT void __fill_mem(void *dst, int val, size_t n) { + unsigned long v = (unsigned char)val; + unsigned long i; + + ((unsigned char *)dst) = ((unsigned char *)dst) - 1; + + if (n >= 32) { + i = (~(unsigned long)dst) & 3; + + if (i) { + n -= i; + + do { + *++(((unsigned char *)dst)) = v; + } while (--i); + } + + if (v) { + v |= v << 24 | v << 16 | v << 8; + } + + ((unsigned long *)dst) = ((unsigned long *)(((unsigned char *)dst) + 1)) - 1; + + i = n >> 5; + + if (i) { + do { + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + *++((unsigned long *)dst) = v; + } while (--i); + } + + i = (n & 31) >> 2; + + if (i) { + do { + *++((unsigned long *)dst) = v; + } while (--i); + } + + ((unsigned char *)dst) = ((unsigned char *)(((unsigned long *)dst) + 1)) - 1; + + n &= 3; + } + + if (n) { + do { + *++((unsigned char *)dst) = v; + } while (--n); + } + + return; +} + +/* 80003458-80003488 000358 0030+00 1/1 55/55 137/137 .init memset */ +SECTION_INIT void *memset(void *dst, int val, size_t n) { + __fill_mem(dst, val, n); + + return dst; +} diff --git a/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c b/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c new file mode 100644 index 00000000..e5f6449b --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/__va_arg.c @@ -0,0 +1,50 @@ +#include "__va_arg.h" + +#undef __va_arg + +/* 80361B14-80361BDC 35C454 00C8+00 0/0 3/3 0/0 .text __va_arg */ +void* __va_arg(_va_list_struct* list, int type) { + char* addr; + char* reg = &(list->gpr); + int g_reg = list->gpr; + int maxsize = 8; + int size = 4; + int increment = 1; + int even = 0; + int fpr_offset = 0; + int regsize = 4; + + if (type == 3) { + reg = &(list->fpr); + g_reg = list->fpr; + size = 8; + fpr_offset = 32; + regsize = 8; + } + + if (type == 2) { + size = 8; + maxsize--; + if (g_reg & 1) { + even = 1; + } + increment = 2; + } + + if (g_reg < maxsize) { + g_reg += even; + addr = list->reg_save_area + fpr_offset + (g_reg * regsize); + *reg = g_reg + increment; + } else { + *reg = 8; + addr = list->input_arg_area; + addr = (char*)(((u32)(addr) + ((size)-1)) & ~((size)-1)); + list->input_arg_area = addr + size; + } + + if (type == 0) { + addr = *((char**)addr); + } + + return addr; +} \ No newline at end of file diff --git a/src/Runtime.PPCEABI.H/global_destructor_chain.c b/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c similarity index 50% rename from src/Runtime.PPCEABI.H/global_destructor_chain.c rename to src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c index c09d1706..45e5115d 100644 --- a/src/Runtime.PPCEABI.H/global_destructor_chain.c +++ b/src/PowerPC_EABI_Support/Runtime/Src/global_destructor_chain.c @@ -1,17 +1,17 @@ -#include +#include "NMWException.h" -DestructorChain* __global_destructor_chain; +DestructorChain *__global_destructor_chain; -void* __register_global_object(void* object, void* destructor, void* regmem) { - ((DestructorChain*)regmem)->next = __global_destructor_chain; - ((DestructorChain*)regmem)->destructor = destructor; - ((DestructorChain*)regmem)->object = object; - __global_destructor_chain = (DestructorChain*)regmem; +void *__register_global_object(void *object, void *destructor, void *regmem) { + ((DestructorChain *)regmem)->next = __global_destructor_chain; + ((DestructorChain *)regmem)->destructor = destructor; + ((DestructorChain *)regmem)->object = object; + __global_destructor_chain = (DestructorChain *)regmem; return object; } void __destroy_global_chain(void) { - DestructorChain* iter; + DestructorChain *iter; while ((iter = __global_destructor_chain) != 0) { __global_destructor_chain = iter->next; DTORCALL(iter->destructor, iter->object); diff --git a/src/PowerPC_EABI_Support/Runtime/Src/ptmf.c b/src/PowerPC_EABI_Support/Runtime/Src/ptmf.c new file mode 100644 index 00000000..11d05929 --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/ptmf.c @@ -0,0 +1,73 @@ +#include "ptmf.h" + +/* ############################################################################################## */ +/* 803A2180-803A2190 02E7E0 000C+04 0/0 23/23 249/249 .rodata __ptmf_null */ +__ptmf const __ptmf_null = { + 0, + 0, + 0, +}; + +/* 80362018-80362048 35C958 0030+00 0/0 10/10 345/345 .text __ptmf_test */ +asm long __ptmf_test(register __ptmf* ptmf) { + // clang-format off + nofralloc + + lwz r5, __ptmf.this_delta(r3) + lwz r6, __ptmf.v_offset(r3) + lwz r7, __ptmf.f_data(r3) + li r3, 1 + cmpwi r5, 0 + cmpwi cr6, r6, 0 + cmpwi cr7, r7, 0 + bnelr + bnelr cr6 + bnelr cr7 + li r3, 0 + blr + // clang-format on +} + +/* 80362048-80362084 35C988 003C+00 0/0 0/0 217/217 .text __ptmf_cmpr */ +asm long __ptmf_cmpr(void) { + // clang-format off + nofralloc + + lwz r5, 0(r3) + lwz r6, 0(r4) + lwz r7, 4(r3) + lwz r8, 4(r4) + lwz r9, 8(r3) + lwz r10, 8(r4) + li r3, 1 + cmpw r5, r6 + cmpw cr6, r7, r8 + cmpw cr7, r9, r10 + bnelr + bnelr cr6 + bnelr cr7 + li r3, 0 + blr + // clang-format on +} + +/* 80362084-803620AC 35C9C4 0028+00 0/0 125/125 741/741 .text __ptmf_scall */ +asm void __ptmf_scall(...) { + // clang-format off + nofralloc + + lwz r0, 0(r12) + lwz r11, 4(r12) + lwz r12, 8(r12) + add r3, r3, r0 + cmpwi r11, 0 + blt lbl_803620A4 + + lwzx r12, r3, r12 + lwzx r12, r12, r11 + +lbl_803620A4: + mtctr r12 + bctr + // clang-format on +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/Runtime/Src/runtime.c b/src/PowerPC_EABI_Support/Runtime/Src/runtime.c new file mode 100644 index 00000000..6b0aad3f --- /dev/null +++ b/src/PowerPC_EABI_Support/Runtime/Src/runtime.c @@ -0,0 +1,824 @@ +#include "dolphin.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* macros for GPR/FPR resting and saving */ +#define SAVE_FPR(reg) _savefpr_##reg +#define RESTORE_FPR(reg) _restfpr_##reg +#define SAVE_GPR(reg) _savegpr_##reg +#define RESTORE_GPR(reg) _restgpr_##reg + +#define ENTRY_SAVE_FPR(reg) entry SAVE_FPR(reg) +#define ENTRY_RESTORE_FPR(reg) entry RESTORE_FPR(reg) +#define ENTRY_SAVE_GPR(reg) entry SAVE_GPR(reg) +#define ENTRY_RESTORE_GPR(reg) entry RESTORE_GPR(reg) + +#define save_restore_reg r11 + +asm void __div2u(void); +asm void __div2i(void); +asm void __mod2u(void); +asm void __mod2i(void); +asm void __shl2i(void); +asm void __shr2u(void); +asm void __shr2i(void); +asm void __cvt_dbl_usll(void); + +void SAVE_FPR(14)(void); +void SAVE_FPR(15)(void); +void SAVE_FPR(16)(void); +void SAVE_FPR(17)(void); +void SAVE_FPR(18)(void); +void SAVE_FPR(19)(void); +void SAVE_FPR(20)(void); +void SAVE_FPR(21)(void); +void SAVE_FPR(22)(void); +void SAVE_FPR(23)(void); +void SAVE_FPR(24)(void); +void SAVE_FPR(25)(void); +void SAVE_FPR(26)(void); +void SAVE_FPR(27)(void); +void SAVE_FPR(28)(void); +void SAVE_FPR(29)(void); +void SAVE_FPR(30)(void); +void SAVE_FPR(31)(void); + +void RESTORE_FPR(14)(void); +void RESTORE_FPR(15)(void); +void RESTORE_FPR(16)(void); +void RESTORE_FPR(17)(void); +void RESTORE_FPR(18)(void); +void RESTORE_FPR(19)(void); +void RESTORE_FPR(20)(void); +void RESTORE_FPR(21)(void); +void RESTORE_FPR(22)(void); +void RESTORE_FPR(23)(void); +void RESTORE_FPR(24)(void); +void RESTORE_FPR(25)(void); +void RESTORE_FPR(26)(void); +void RESTORE_FPR(27)(void); +void RESTORE_FPR(28)(void); +void RESTORE_FPR(29)(void); +void RESTORE_FPR(30)(void); +void RESTORE_FPR(31)(void); + +void SAVE_GPR(14)(void); +void SAVE_GPR(15)(void); +void SAVE_GPR(16)(void); +void SAVE_GPR(17)(void); +void SAVE_GPR(18)(void); +void SAVE_GPR(19)(void); +void SAVE_GPR(20)(void); +void SAVE_GPR(21)(void); +void SAVE_GPR(22)(void); +void SAVE_GPR(23)(void); +void SAVE_GPR(24)(void); +void SAVE_GPR(25)(void); +void SAVE_GPR(26)(void); +void SAVE_GPR(27)(void); +void SAVE_GPR(28)(void); +void SAVE_GPR(29)(void); +void SAVE_GPR(30)(void); +void SAVE_GPR(31)(void); + +void RESTORE_GPR(14)(void); +void RESTORE_GPR(15)(void); +void RESTORE_GPR(16)(void); +void RESTORE_GPR(17)(void); +void RESTORE_GPR(18)(void); +void RESTORE_GPR(19)(void); +void RESTORE_GPR(20)(void); +void RESTORE_GPR(21)(void); +void RESTORE_GPR(22)(void); +void RESTORE_GPR(23)(void); +void RESTORE_GPR(24)(void); +void RESTORE_GPR(25)(void); +void RESTORE_GPR(26)(void); +void RESTORE_GPR(27)(void); +void RESTORE_GPR(28)(void); +void RESTORE_GPR(29)(void); +void RESTORE_GPR(30)(void); +void RESTORE_GPR(31)(void); + +static const u32 __constants[] = { + 0x00000000, 0x00000000, 0x41F00000, 0x00000000, 0x41E00000, 0x00000000, +}; + +/* 803620AC-80362108 35C9EC 005C+00 0/0 42/42 89/89 .text __cvt_fp2unsigned */ +asm u32 __cvt_fp2unsigned(register f64 d) { +#ifdef __MWERKS__ // clang-format off + nofralloc + stwu r1,-16(r1) + lis r4, __constants@h + ori r4, r4, __constants@l + li r3,0 + lfd fp0,0(r4) + lfd fp3,8(r4) + lfd fp4,16(r4) + fcmpu cr0,fp1,fp0 + fcmpu cr6,fp1,fp3 + blt cr0, @exit + addi r3,r3,-1 + bge cr6,@exit + fcmpu cr7,fp1,fp4 + fmr fp2,fp1 + blt cr7,@1 + fsub fp2,fp1,fp4 +@1 fctiwz fp2,fp2 + stfd fp2,8(r1) + lwz r3,12(r1) + blt cr7,@exit + addis r3,r3,-0x8000 +@exit: + addi r1,r1,16 + blr +#endif // clang-format on +} + +/* 80362108-80362134 35CA48 002C+00 0/0 0/0 0/0 .text __save_fpr */ +asm static void __save_fpr(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + ENTRY_SAVE_FPR(14) + stfd fp14,-144(save_restore_reg) + ENTRY_SAVE_FPR(15) + stfd fp15,-136(save_restore_reg) + ENTRY_SAVE_FPR(16) + stfd fp16,-128(save_restore_reg) + ENTRY_SAVE_FPR(17) + stfd fp17,-120(save_restore_reg) + ENTRY_SAVE_FPR(18) + stfd fp18,-112(save_restore_reg) + ENTRY_SAVE_FPR(19) + stfd fp19,-104(save_restore_reg) + ENTRY_SAVE_FPR(20) + stfd fp20,-96(save_restore_reg) + ENTRY_SAVE_FPR(21) + stfd fp21,-88(save_restore_reg) + ENTRY_SAVE_FPR(22) + stfd fp22,-80(save_restore_reg) + ENTRY_SAVE_FPR(23) + stfd fp23,-72(save_restore_reg) + ENTRY_SAVE_FPR(24) + stfd fp24,-64(save_restore_reg) + ENTRY_SAVE_FPR(25) + stfd fp25,-56(save_restore_reg) + ENTRY_SAVE_FPR(26) + stfd fp26,-48(save_restore_reg) + ENTRY_SAVE_FPR(27) + stfd fp27,-40(save_restore_reg) + ENTRY_SAVE_FPR(28) + stfd fp28,-32(save_restore_reg) + ENTRY_SAVE_FPR(29) + stfd fp29,-24(save_restore_reg) + ENTRY_SAVE_FPR(30) + stfd fp30,-16(save_restore_reg) + ENTRY_SAVE_FPR(31) + stfd fp31,-8(save_restore_reg) + blr +#endif // clang-format on +} + +/* 80362154-80362180 35CA94 002C+00 0/0 0/0 0/0 .text __restore_fpr */ +asm static void __restore_fpr(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + ENTRY_RESTORE_FPR(14) + lfd fp14,-144(save_restore_reg) + ENTRY_RESTORE_FPR(15) + lfd fp15,-136(save_restore_reg) + ENTRY_RESTORE_FPR(16) + lfd fp16,-128(save_restore_reg) + ENTRY_RESTORE_FPR(17) + lfd fp17,-120(save_restore_reg) + ENTRY_RESTORE_FPR(18) + lfd fp18,-112(save_restore_reg) + ENTRY_RESTORE_FPR(19) + lfd fp19,-104(save_restore_reg) + ENTRY_RESTORE_FPR(20) + lfd fp20,-96(save_restore_reg) + ENTRY_RESTORE_FPR(21) + lfd fp21,-88(save_restore_reg) + ENTRY_RESTORE_FPR(22) + lfd fp22,-80(save_restore_reg) + ENTRY_RESTORE_FPR(23) + lfd fp23,-72(save_restore_reg) + ENTRY_RESTORE_FPR(24) + lfd fp24,-64(save_restore_reg) + ENTRY_RESTORE_FPR(25) + lfd fp25,-56(save_restore_reg) + ENTRY_RESTORE_FPR(26) + lfd fp26,-48(save_restore_reg) + ENTRY_RESTORE_FPR(27) + lfd fp27,-40(save_restore_reg) + ENTRY_RESTORE_FPR(28) + lfd fp28,-32(save_restore_reg) + ENTRY_RESTORE_FPR(29) + lfd fp29,-24(save_restore_reg) + ENTRY_RESTORE_FPR(30) + lfd fp30,-16(save_restore_reg) + ENTRY_RESTORE_FPR(31) + lfd fp31,-8(save_restore_reg) + blr +#endif // clang-format on +} + +/* 803621A0-803621A4 35CAE0 0004+00 0/0 22/22 13/13 .text _savegpr_14 */ +asm static void __save_gpr(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + ENTRY_SAVE_GPR(14) + stw r14,-72(save_restore_reg) + ENTRY_SAVE_GPR(15) + stw r15,-68(save_restore_reg) + ENTRY_SAVE_GPR(16) + stw r16,-64(save_restore_reg) + ENTRY_SAVE_GPR(17) + stw r17,-60(save_restore_reg) + ENTRY_SAVE_GPR(18) + stw r18,-56(save_restore_reg) + ENTRY_SAVE_GPR(19) + stw r19,-52(save_restore_reg) + ENTRY_SAVE_GPR(20) + stw r20,-48(save_restore_reg) + ENTRY_SAVE_GPR(21) + stw r21,-44(save_restore_reg) + ENTRY_SAVE_GPR(22) + stw r22,-40(save_restore_reg) + ENTRY_SAVE_GPR(23) + stw r23,-36(save_restore_reg) + ENTRY_SAVE_GPR(24) + stw r24,-32(save_restore_reg) + ENTRY_SAVE_GPR(25) + stw r25,-28(save_restore_reg) + ENTRY_SAVE_GPR(26) + stw r26,-24(save_restore_reg) + ENTRY_SAVE_GPR(27) + stw r27,-20(save_restore_reg) + ENTRY_SAVE_GPR(28) + stw r28,-16(save_restore_reg) + ENTRY_SAVE_GPR(29) + stw r29,-12(save_restore_reg) + ENTRY_SAVE_GPR(30) + stw r30,-8(save_restore_reg) + ENTRY_SAVE_GPR(31) + stw r31,-4(save_restore_reg) + blr +#endif // clang-format on +} + +/* 803621EC-803621F0 35CB2C 0004+00 0/0 22/22 13/13 .text _restgpr_14 */ +asm static void __restore_gpr(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + ENTRY_RESTORE_GPR(14) + lwz r14,-72(save_restore_reg) + ENTRY_RESTORE_GPR(15) + lwz r15,-68(save_restore_reg) + ENTRY_RESTORE_GPR(16) + lwz r16,-64(save_restore_reg) + ENTRY_RESTORE_GPR(17) + lwz r17,-60(save_restore_reg) + ENTRY_RESTORE_GPR(18) + lwz r18,-56(save_restore_reg) + ENTRY_RESTORE_GPR(19) + lwz r19,-52(save_restore_reg) + ENTRY_RESTORE_GPR(20) + lwz r20,-48(save_restore_reg) + ENTRY_RESTORE_GPR(21) + lwz r21,-44(save_restore_reg) + ENTRY_RESTORE_GPR(22) + lwz r22,-40(save_restore_reg) + ENTRY_RESTORE_GPR(23) + lwz r23,-36(save_restore_reg) + ENTRY_RESTORE_GPR(24) + lwz r24,-32(save_restore_reg) + ENTRY_RESTORE_GPR(25) + lwz r25,-28(save_restore_reg) + ENTRY_RESTORE_GPR(26) + lwz r26,-24(save_restore_reg) + ENTRY_RESTORE_GPR(27) + lwz r27,-20(save_restore_reg) + ENTRY_RESTORE_GPR(28) + lwz r28,-16(save_restore_reg) + ENTRY_RESTORE_GPR(29) + lwz r29,-12(save_restore_reg) + ENTRY_RESTORE_GPR(30) + lwz r30,-8(save_restore_reg) + ENTRY_RESTORE_GPR(31) + lwz r31,-4(save_restore_reg) + blr +#endif // clang-format on +} + +/* 80362238-80362324 35CB78 00EC+00 0/0 2/2 0/0 .text __div2u */ +asm void __div2u(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + cmpwi cr0,r3,0 + cntlzw r0,r3 + cntlzw r9,r4 + bne cr0,lab1 + addi r0,r9,32 +lab1: + cmpwi cr0,r5,0 + cntlzw r9,r5 + cntlzw r10,r6 + bne cr0,lab2 + addi r9,r10,32 +lab2: + cmpw cr0,r0,r9 + subfic r10,r0,64 + bgt cr0,lab9 + addi r9,r9,1 + subfic r9,r9,64 + add r0,r0,r9 + subf r9,r9,r10 + mtctr r9 + cmpwi cr0,r9,32 + addi r7,r9,-32 + blt cr0,lab3 + srw r8,r3,r7 + li r7,0 + b lab4 +lab3: + srw r8,r4,r9 + subfic r7,r9,32 + slw r7,r3,r7 + or r8,r8,r7 + srw r7,r3,r9 +lab4: + cmpwi cr0,r0,32 + addic r9,r0,-32 + blt cr0,lab5 + slw r3,r4,r9 + li r4,0 + b lab6 +lab5: + slw r3,r3,r0 + subfic r9,r0,32 + srw r9,r4,r9 + or r3,r3,r9 + slw r4,r4,r0 +lab6: + li r10,-1 + addic r7,r7,0 +lab7: + adde r4,r4,r4 + adde r3,r3,r3 + adde r8,r8,r8 + adde r7,r7,r7 + subfc r0,r6,r8 + subfe. r9,r5,r7 + blt cr0,lab8 + mr r8,r0 + mr r7,r9 + addic r0,r10,1 +lab8: + bdnz lab7 + adde r4,r4,r4 + adde r3,r3,r3 + blr +lab9: + li r4,0 + li r3,0 + blr +#endif // clang-format on +} + +/* 80362324-8036245C 35CC64 0138+00 0/0 16/16 1/1 .text __div2i */ +asm void __div2i(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + stwu r1,-16(r1) + rlwinm. r9,r3,0,0,0 + beq cr0,positive1 + subfic r4,r4,0 + subfze r3,r3 +positive1: + stw r9,8(r1) + rlwinm. r10,r5,0,0,0 + beq cr0,positive2 + subfic r6,r6,0 + subfze r5,r5 +positive2: + stw r10,12(r1) + cmpwi cr0,r3,0 + cntlzw r0,r3 + cntlzw r9,r4 + bne cr0,lab1 + addi r0,r9,32 +lab1: + cmpwi cr0,r5,0 + cntlzw r9,r5 + cntlzw r10,r6 + bne cr0,lab2 + addi r9,r10,32 +lab2: + cmpw cr0,r0,r9 + subfic r10,r0,64 + bgt cr0,lab9 + addi r9,r9,1 + subfic r9,r9,64 + add r0,r0,r9 + subf r9,r9,r10 + mtctr r9 + cmpwi cr0,r9,32 + addi r7,r9,-32 + blt cr0,lab3 + srw r8,r3,r7 + li r7,0 + b lab4 +lab3: + srw r8,r4,r9 + subfic r7,r9,32 + slw r7,r3,r7 + or r8,r8,r7 + srw r7,r3,r9 +lab4: + cmpwi cr0,r0,32 + addic r9,r0,-32 + blt cr0,lab5 + slw r3,r4,r9 + li r4,0 + b lab6 +lab5: + slw r3,r3,r0 + subfic r9,r0,32 + srw r9,r4,r9 + or r3,r3,r9 + slw r4,r4,r0 +lab6: + li r10,-1 + addic r7,r7,0 +lab7: + adde r4,r4,r4 + adde r3,r3,r3 + adde r8,r8,r8 + adde r7,r7,r7 + subfc r0,r6,r8 + subfe. r9,r5,r7 + blt cr0,lab8 + mr r8,r0 + mr r7,r9 + addic r0,r10,1 +lab8: + bdnz lab7 + adde r4,r4,r4 + adde r3,r3,r3 + lwz r9,8(r1) + lwz r10,12(r1) + xor. r7,r9,r10 + beq cr0,no_adjust + cmpwi cr0,r9,0 + subfic r4,r4,0 + subfze r3,r3 + +no_adjust: + b func_end + +lab9: + li r4,0 + li r3,0 +func_end: + addi r1,r1,16 + blr +#endif // clang-format on +} + +/* 8036245C-80362540 35CD9C 00E4+00 0/0 2/2 0/0 .text __mod2u */ +asm void __mod2u(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + cmpwi cr0,r3,0 + cntlzw r0,r3 + cntlzw r9,r4 + bne cr0,lab1 + addi r0,r9,32 +lab1: + cmpwi cr0,r5,0 + cntlzw r9,r5 + cntlzw r10,r6 + bne cr0,lab2 + addi r9,r10,32 +lab2: + cmpw cr0,r0,r9 + subfic r10,r0,64 + bgt cr0,lab9 + addi r9,r9,1 + subfic r9,r9,64 + add r0,r0,r9 + subf r9,r9,r10 + mtctr r9 + cmpwi cr0,r9,32 + addi r7,r9,-32 + blt cr0,lab3 + srw r8,r3,r7 + li r7,0 + b lab4 +lab3: + srw r8,r4,r9 + subfic r7,r9,32 + slw r7,r3,r7 + or r8,r8,r7 + srw r7,r3,r9 +lab4: + cmpwi cr0,r0,32 + addic r9,r0,-32 + blt cr0,lab5 + slw r3,r4,r9 + li r4,0 + b lab6 +lab5: + slw r3,r3,r0 + subfic r9,r0,32 + srw r9,r4,r9 + or r3,r3,r9 + slw r4,r4,r0 +lab6: + li r10,-1 + addic r7,r7,0 +lab7: + adde r4,r4,r4 + adde r3,r3,r3 + adde r8,r8,r8 + adde r7,r7,r7 + subfc r0,r6,r8 + subfe. r9,r5,r7 + blt cr0,lab8 + mr r8,r0 + mr r7,r9 + addic r0,r10,1 +lab8: + bdnz lab7 + mr r4,r8 + mr r3,r7 + blr +lab9: + blr +#endif // clang-format on +} + +/* 80362540-8036264C 35CE80 010C+00 0/0 2/2 0/0 .text __mod2i */ +asm void __mod2i(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + + cmpwi cr7,r3,0 + bge cr7,positive1 + subfic r4,r4,0 + subfze r3,r3 +positive1: + cmpwi cr0,r5,0 + bge cr0,positive2 + subfic r6,r6,0 + subfze r5,r5 +positive2: + cmpwi cr0,r3,0 + cntlzw r0,r3 + cntlzw r9,r4 + bne cr0,lab1 + addi r0,r9,32 +lab1: + cmpwi cr0,r5,0 + cntlzw r9,r5 + cntlzw r10,r6 + bne cr0,lab2 + addi r9,r10,32 +lab2: + cmpw cr0,r0,r9 + subfic r10,r0,64 + bgt cr0,lab9 + addi r9,r9,1 + subfic r9,r9,64 + add r0,r0,r9 + subf r9,r9,r10 + mtctr r9 + cmpwi cr0,r9,32 + addi r7,r9,-32 + blt cr0,lab3 + srw r8,r3,r7 + li r7,0 + b lab4 +lab3: + srw r8,r4,r9 + subfic r7,r9,32 + slw r7,r3,r7 + or r8,r8,r7 + srw r7,r3,r9 +lab4: + cmpwi cr0,r0,32 + addic r9,r0,-32 + blt cr0,lab5 + slw r3,r4,r9 + li r4,0 + b lab6 +lab5: + slw r3,r3,r0 + subfic r9,r0,32 + srw r9,r4,r9 + or r3,r3,r9 + slw r4,r4,r0 +lab6: + li r10,-1 + addic r7,r7,0 +lab7: + adde r4,r4,r4 + adde r3,r3,r3 + adde r8,r8,r8 + adde r7,r7,r7 + subfc r0,r6,r8 + subfe. r9,r5,r7 + blt cr0,lab8 + mr r8,r0 + mr r7,r9 + addic r0,r10,1 +lab8: + bdnz lab7 + mr r4,r8 + mr r3,r7 +lab9: + bge cr7,no_adjust + subfic r4,r4,0 + subfze r3,r3 +no_adjust: + blr +#endif // clang-format on +} + +/* 8036264C-80362670 35CF8C 0024+00 0/0 2/2 0/0 .text __shl2i */ +asm void __shl2i(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + subfic r8,r5,32 + subic r9,r5,32 + slw r3,r3,r5 + srw r10,r4,r8 + or r3,r3,r10 + slw r10,r4,r9 + or r3,r3,r10 + slw r4,r4,r5 + blr +#endif // clang-format on +} + +/* 80362670-80362694 35CFB0 0024+00 0/0 2/2 0/0 .text __shr2u */ +asm void __shr2u(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + subfic r8,r5,32 + subic r9,r5,32 + srw r4,r4,r5 + slw r10,r3,r8 + or r4,r4,r10 + srw r10,r3,r9 + or r4,r4,r10 + srw r3,r3,r5 + blr +#endif // clang-format on +} + +/* 80362694-803626BC 35CFD4 0028+00 0/0 3/3 0/0 .text __shr2i */ +asm void __shr2i(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + subfic r8, r5, 0x20 + addic. r9, r5, -0x20 + srw r4, r4, r5 + slw r10, r3, r8 + or r4, r4, r10 + sraw r10, r3, r9 + ble around + or r4, r4, r10 +around: + sraw r3, r3, r5 + blr +#endif // clang-format on +} + +/* 803626BC-80362770 35CFFC 00B4+00 0/0 1/1 0/0 .text __cvt_sll_flt */ +asm void __cvt_sll_flt(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + stwu r1, -0x10(r1) + rlwinm. r5, r3, 0, 0, 0 + beq lbl_803626D0 + subfic r4, r4, 0 + subfze r3, r3 +lbl_803626D0: + or. r7, r3, r4 + li r6, 0 + beq lbl_80362758 + cntlzw r7, r3 + cntlzw r8, r4 + rlwinm r9, r7, 0x1a, 0, 4 + srawi r9, r9, 0x1f + and r9, r9, r8 + add r7, r7, r9 + subfic r8, r7, 0x20 + addic r9, r7, -32 + slw r3, r3, r7 + srw r10, r4, r8 + or r3, r3, r10 + slw r10, r4, r9 + or r3, r3, r10 + slw r4, r4, r7 + subf r6, r7, r6 + clrlwi r7, r4, 0x15 + cmpwi r7, 0x400 + addi r6, r6, 0x43e + blt lbl_80362740 + bgt lbl_80362734 + rlwinm. r7, r4, 0, 0x14, 0x14 + beq lbl_80362740 +lbl_80362734: + addic r4, r4, 0x800 + addze r3, r3 + addze r6, r6 +lbl_80362740: + rotlwi r4, r4, 0x15 + rlwimi r4, r3, 0x15, 0, 0xa + rlwinm r3, r3, 0x15, 0xc, 0x1f + slwi r6, r6, 0x14 + or r3, r6, r3 + or r3, r5, r3 +lbl_80362758: + stw r3, 8(r1) + stw r4, 0xc(r1) + lfd f1, 8(r1) + frsp f1, f1 + addi r1, r1, 0x10 + blr +#endif // clang-format on +} + +/* 80362770-8036283C 35D0B0 00CC+00 0/0 2/2 0/0 .text __cvt_dbl_usll */ +asm void __cvt_dbl_usll(void) { +#ifdef __MWERKS__ // clang-format off + nofralloc + stwu r1,-16(r1) + stfd f1,8(r1) + lwz r3,8(r1) + lwz r4,12(r1) + rlwinm r5,r3,12,21,31 + cmpli cr0,0,r5,1023 + bge cr0,not_fraction + li r3,0 + li r4,0 + b func_end +not_fraction: + mr r6,r3 + rlwinm r3,r3,0,12,31 + oris r3,r3,0x0010 + addi r5,r5,-1075 + cmpwi cr0,r5,0 + bge cr0,left + neg r5,r5 + subfic r8,r5,32 + subic r9,r5,32 + srw r4,r4,r5 + slw r10,r3,r8 + or r4,r4,r10 + srw r10,r3,r9 + or r4,r4,r10 + srw r3,r3,r5 + b around +left: + cmpwi cr0,r5,10 + ble+ no_overflow + rlwinm. r6,r6,0,0,0 + beq cr0,max_positive + lis r3,0x8000 + li r4,0 + b func_end +max_positive: + lis r3,0x7FFF + ori r3,r3,0xFFFF + li r4,-1 + b func_end +no_overflow: + subfic r8,r5,32 + subic r9,r5,32 + slw r3,r3,r5 + srw r10,r4,r8 + or r3,r3,r10 + slw r10,r4,r9 + or r3,r3,r10 + slw r4,r4,r5 +around: + rlwinm. r6,r6,0,0,0 + beq cr0,positive + subfic r4,r4,0 + subfze r3,r3 +positive: +func_end: + addi r1,r1,16 + blr +#endif // clang-format on +} + +#ifdef __cplusplus +} +#endif diff --git a/src/REL/d/a/b/d_a_b_asura.cpp b/src/REL/d/a/b/d_a_b_asura.cpp index a6d06da6..c0156db3 100644 --- a/src/REL/d/a/b/d_a_b_asura.cpp +++ b/src/REL/d/a/b/d_a_b_asura.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_asura.h" SPECIAL_ACTOR_PROFILE(B_ASURA, dAcBAsura_c, fProfile::B_ASURA, 0x117, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_asura_arm.cpp b/src/REL/d/a/b/d_a_b_asura_arm.cpp index 7c0aa390..eb121eec 100644 --- a/src/REL/d/a/b/d_a_b_asura_arm.cpp +++ b/src/REL/d/a/b/d_a_b_asura_arm.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_asura_arm.h" SPECIAL_ACTOR_PROFILE(ASURA_ARM, dAcAsuraArm_c, fProfile::ASURA_ARM, 0x118, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_asura_foot.cpp b/src/REL/d/a/b/d_a_b_asura_foot.cpp index 97b87ff3..d5bc5a2d 100644 --- a/src/REL/d/a/b/d_a_b_asura_foot.cpp +++ b/src/REL/d/a/b/d_a_b_asura_foot.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_asura_foot.h" SPECIAL_ACTOR_PROFILE(ASURA_FOOT, dAcAsuraFoot_c, fProfile::ASURA_FOOT, 0x119, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_bbshockwave.cpp b/src/REL/d/a/b/d_a_b_bbshockwave.cpp index 4c2e20ff..fa979163 100644 --- a/src/REL/d/a/b/d_a_b_bbshockwave.cpp +++ b/src/REL/d/a/b/d_a_b_bbshockwave.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_bbshockwave.h" SPECIAL_ACTOR_PROFILE(B_BBSHWV, dAcBBbshockwave_c, fProfile::B_BBSHWV, 0xA3, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_bigboss.cpp b/src/REL/d/a/b/d_a_b_bigboss.cpp index eedc9ece..6e65461c 100644 --- a/src/REL/d/a/b/d_a_b_bigboss.cpp +++ b/src/REL/d/a/b/d_a_b_bigboss.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_bigboss.h" SPECIAL_ACTOR_PROFILE(B_BIGBOSS, dAcBBigBoss_c, fProfile::B_BIGBOSS, 0xA0, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_bigboss2.cpp b/src/REL/d/a/b/d_a_b_bigboss2.cpp index a9ff180b..45ebb611 100644 --- a/src/REL/d/a/b/d_a_b_bigboss2.cpp +++ b/src/REL/d/a/b/d_a_b_bigboss2.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_bigboss2.h" SPECIAL_ACTOR_PROFILE(B_BIGBOSS2, dAcBBigBoss2_c, fProfile::B_BIGBOSS2, 0xA1, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_bigboss3.cpp b/src/REL/d/a/b/d_a_b_bigboss3.cpp index 5bbac1a3..329ab0e1 100644 --- a/src/REL/d/a/b/d_a_b_bigboss3.cpp +++ b/src/REL/d/a/b/d_a_b_bigboss3.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_bigboss3.h" SPECIAL_ACTOR_PROFILE(B_BIGBOSS3, dAcBBigBoss3_c, fProfile::B_BIGBOSS3, 0xA2, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_bigbossbase.cpp b/src/REL/d/a/b/d_a_b_bigbossbase.cpp index 893e7e7e..8c20cc25 100644 --- a/src/REL/d/a/b/d_a_b_bigbossbase.cpp +++ b/src/REL/d/a/b/d_a_b_bigbossbase.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_bigbossbase.h" SPECIAL_ACTOR_PROFILE(B_BIGBOSS_BASE, dAcBBigbossbase_c, fProfile::B_BIGBOSS_BASE, 0x9F, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu.cpp b/src/REL/d/a/b/d_a_b_girahimu.cpp index 7fc83626..2103812a 100644 --- a/src/REL/d/a/b/d_a_b_girahimu.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_girahimu.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU, dAcGirahimu_c, fProfile::B_GIRAHIMU, 0x10E, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu2.cpp b/src/REL/d/a/b/d_a_b_girahimu2.cpp index ce015582..260d84c9 100644 --- a/src/REL/d/a/b/d_a_b_girahimu2.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu2.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_girahimu2.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU2, dAcGirahimu2_c, fProfile::B_GIRAHIMU2, 0x10F, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu3_base.cpp b/src/REL/d/a/b/d_a_b_girahimu3_base.cpp index 24d6589e..7d433475 100644 --- a/src/REL/d/a/b/d_a_b_girahimu3_base.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu3_base.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_girahimu3_base.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU3_BASE, dAcGirahimu3Base_c, fProfile::B_GIRAHIMU3_BASE, 0x110, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu3_first.cpp b/src/REL/d/a/b/d_a_b_girahimu3_first.cpp index 9fd1eec9..b0f25d90 100644 --- a/src/REL/d/a/b/d_a_b_girahimu3_first.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu3_first.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_girahimu3_first.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU3_FIRST, dAcGirahimu3First_c, fProfile::B_GIRAHIMU3_FIRST, 0x111, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu3_second.cpp b/src/REL/d/a/b/d_a_b_girahimu3_second.cpp index 6e323f50..ab4165db 100644 --- a/src/REL/d/a/b/d_a_b_girahimu3_second.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu3_second.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_girahimu3_second.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU3_SECOND, dAcGirahimu3Second_c, fProfile::B_GIRAHIMU3_SECOND, 0x112, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu3_third.cpp b/src/REL/d/a/b/d_a_b_girahimu3_third.cpp index 06937bcc..ccae2477 100644 --- a/src/REL/d/a/b/d_a_b_girahimu3_third.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu3_third.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_girahimu3_third.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU3_THIRD, dAcGirahimu3Third_c, fProfile::B_GIRAHIMU3_THIRD, 0x113, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_girahimu_base.cpp b/src/REL/d/a/b/d_a_b_girahimu_base.cpp index 724e2806..ba8a3b2c 100644 --- a/src/REL/d/a/b/d_a_b_girahimu_base.cpp +++ b/src/REL/d/a/b/d_a_b_girahimu_base.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_girahimu_base.h" SPECIAL_ACTOR_PROFILE(B_GIRAHIMU_BASE, dAcGirahimuBase_c, fProfile::B_GIRAHIMU_BASE, 0x10D, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_kr.cpp b/src/REL/d/a/b/d_a_b_kr.cpp index 4e7b7cbb..538ad8be 100644 --- a/src/REL/d/a/b/d_a_b_kr.cpp +++ b/src/REL/d/a/b/d_a_b_kr.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_kr.h" SPECIAL_ACTOR_PROFILE(B_KR, dAcBkr_c, fProfile::B_KR, 0xB7, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_kr_arm.cpp b/src/REL/d/a/b/d_a_b_kr_arm.cpp index a1e7a296..9546406d 100644 --- a/src/REL/d/a/b/d_a_b_kr_arm.cpp +++ b/src/REL/d/a/b/d_a_b_kr_arm.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_kr_arm.h" SPECIAL_ACTOR_PROFILE(B_KRA, dAcBkra_c, fProfile::B_KRA, 0xB9, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_kr_hair.cpp b/src/REL/d/a/b/d_a_b_kr_hair.cpp index 070ef896..9d9a12f7 100644 --- a/src/REL/d/a/b/d_a_b_kr_hair.cpp +++ b/src/REL/d/a/b/d_a_b_kr_hair.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_kr_hair.h" SPECIAL_ACTOR_PROFILE(B_KRH, dAcBkrh_c, fProfile::B_KRH, 0xB8, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_lastboss.cpp b/src/REL/d/a/b/d_a_b_lastboss.cpp index 7349be7c..af5d73b5 100644 --- a/src/REL/d/a/b/d_a_b_lastboss.cpp +++ b/src/REL/d/a/b/d_a_b_lastboss.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_lastboss.h" SPECIAL_ACTOR_PROFILE(B_LASTBOSS, dAcBlastboss_c, fProfile::B_LASTBOSS, 0xBA, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_mg.cpp b/src/REL/d/a/b/d_a_b_mg.cpp index 54941044..7bcc79b6 100644 --- a/src/REL/d/a/b/d_a_b_mg.cpp +++ b/src/REL/d/a/b/d_a_b_mg.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_mg.h" SPECIAL_ACTOR_PROFILE(B_MG, dAcBmg_c, fProfile::B_MG, 0xB6, 0, 2); diff --git a/src/REL/d/a/b/d_a_b_nusi.cpp b/src/REL/d/a/b/d_a_b_nusi.cpp index 6facde8a..2fb0a0fa 100644 --- a/src/REL/d/a/b/d_a_b_nusi.cpp +++ b/src/REL/d/a/b/d_a_b_nusi.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/b/d_a_b_nusi.h" SPECIAL_ACTOR_PROFILE(B_NUSI, dAcNusi_c, fProfile::B_NUSI, 0xB3, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_nusi_bullet.cpp b/src/REL/d/a/b/d_a_b_nusi_bullet.cpp index 0f6ac1fe..ee5b8bf6 100644 --- a/src/REL/d/a/b/d_a_b_nusi_bullet.cpp +++ b/src/REL/d/a/b/d_a_b_nusi_bullet.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_nusi_bullet.h" SPECIAL_ACTOR_PROFILE(B_NUSI_BULLET, dAcNusi_Bullet_c, fProfile::B_NUSI_BULLET, 0xB5, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_nusi_tentakle.cpp b/src/REL/d/a/b/d_a_b_nusi_tentakle.cpp index 61a75701..0e578d37 100644 --- a/src/REL/d/a/b/d_a_b_nusi_tentakle.cpp +++ b/src/REL/d/a/b/d_a_b_nusi_tentakle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_nusi_tentakle.h" SPECIAL_ACTOR_PROFILE(B_NUSI_TENTAKLE, dAcNusiTentakle_c, fProfile::B_NUSI_TENTAKLE, 0xB4, 0, 0); diff --git a/src/REL/d/a/b/d_a_b_vd.cpp b/src/REL/d/a/b/d_a_b_vd.cpp index 260c90b6..01cd9037 100644 --- a/src/REL/d/a/b/d_a_b_vd.cpp +++ b/src/REL/d/a/b/d_a_b_vd.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/b/d_a_b_vd.h" SPECIAL_ACTOR_PROFILE(B_VD, dAcBvd_c, fProfile::B_VD, 0xBC, 0, 32); diff --git a/src/REL/d/a/d_a_asura_bullet.cpp b/src/REL/d/a/d_a_asura_bullet.cpp index d30d01b4..4160934a 100644 --- a/src/REL/d/a/d_a_asura_bullet.cpp +++ b/src/REL/d/a/d_a_asura_bullet.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_asura_bullet.h" SPECIAL_ACTOR_PROFILE(ASURA_BULLET, dAcAsuraBullet_c, fProfile::ASURA_BULLET, 0x11A, 0, 0); diff --git a/src/REL/d/a/d_a_avater_bullet.cpp b/src/REL/d/a/d_a_avater_bullet.cpp index fbc2d0df..5db95893 100644 --- a/src/REL/d/a/d_a_avater_bullet.cpp +++ b/src/REL/d/a/d_a_avater_bullet.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_avater_bullet.h" SPECIAL_ACTOR_PROFILE(AVATER_BULLET, dAcAvater_Bullet_c, fProfile::AVATER_BULLET, 0xB0, 0, 0); diff --git a/src/REL/d/a/d_a_avater_race_mng.cpp b/src/REL/d/a/d_a_avater_race_mng.cpp index ba37dd30..7ca2c005 100644 --- a/src/REL/d/a/d_a_avater_race_mng.cpp +++ b/src/REL/d/a/d_a_avater_race_mng.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_avater_race_mng.h" SPECIAL_ACTOR_PROFILE(AVATER_RACE_MNG, dAvater_Race_Mng_c, fProfile::AVATER_RACE_MNG, 0xAF, 0, 2); diff --git a/src/REL/d/a/d_a_bird.cpp b/src/REL/d/a/d_a_bird.cpp index 0d8c1403..2700bfcb 100644 --- a/src/REL/d/a/d_a_bird.cpp +++ b/src/REL/d/a/d_a_bird.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird.h" SPECIAL_ACTOR_PROFILE(BIRD, dBird_c, fProfile::BIRD, 0xA8, 0, 2); diff --git a/src/REL/d/a/d_a_bird_kobunA.cpp b/src/REL/d/a/d_a_bird_kobunA.cpp index 18772e76..175625cf 100644 --- a/src/REL/d/a/d_a_bird_kobunA.cpp +++ b/src/REL/d/a/d_a_bird_kobunA.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_kobunA.h" SPECIAL_ACTOR_PROFILE(BIRD_KOBUNA, dBird_KobunA_c, fProfile::BIRD_KOBUNA, 0xAB, 0, 2); diff --git a/src/REL/d/a/d_a_bird_kobunB.cpp b/src/REL/d/a/d_a_bird_kobunB.cpp index fcacd9cc..7ba2c08a 100644 --- a/src/REL/d/a/d_a_bird_kobunB.cpp +++ b/src/REL/d/a/d_a_bird_kobunB.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_kobunB.h" SPECIAL_ACTOR_PROFILE(BIRD_KOBUNB, dBird_KobunB_c, fProfile::BIRD_KOBUNB, 0xAC, 0, 2); diff --git a/src/REL/d/a/d_a_bird_mob.cpp b/src/REL/d/a/d_a_bird_mob.cpp index 2dc7aff5..13097198 100644 --- a/src/REL/d/a/d_a_bird_mob.cpp +++ b/src/REL/d/a/d_a_bird_mob.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_mob.h" SPECIAL_ACTOR_PROFILE(BIRD_MOB, dAcBirdMob_c, fProfile::BIRD_MOB, 0x24F, 0, 7); diff --git a/src/REL/d/a/d_a_bird_npc.cpp b/src/REL/d/a/d_a_bird_npc.cpp index 2d72331f..ef66174b 100644 --- a/src/REL/d/a/d_a_bird_npc.cpp +++ b/src/REL/d/a/d_a_bird_npc.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_npc.h" SPECIAL_ACTOR_PROFILE(BIRD_NPC, dBird_Npc_c, fProfile::BIRD_NPC, 0xA9, 0, 2); diff --git a/src/REL/d/a/d_a_bird_rival.cpp b/src/REL/d/a/d_a_bird_rival.cpp index 8d355259..460589f0 100644 --- a/src/REL/d/a/d_a_bird_rival.cpp +++ b/src/REL/d/a/d_a_bird_rival.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_rival.h" SPECIAL_ACTOR_PROFILE(BIRD_RIVAL, dBird_Rival_c, fProfile::BIRD_RIVAL, 0xAA, 0, 2); diff --git a/src/REL/d/a/d_a_bird_target.cpp b/src/REL/d/a/d_a_bird_target.cpp index c2144ace..30f8414a 100644 --- a/src/REL/d/a/d_a_bird_target.cpp +++ b/src/REL/d/a/d_a_bird_target.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_target.h" SPECIAL_ACTOR_PROFILE(BIRD_TARGET, dBird_Target_c, fProfile::BIRD_TARGET, 0xAD, 0, 0); diff --git a/src/REL/d/a/d_a_bird_zelda_training.cpp b/src/REL/d/a/d_a_bird_zelda_training.cpp index c188b81a..ee56df8c 100644 --- a/src/REL/d/a/d_a_bird_zelda_training.cpp +++ b/src/REL/d/a/d_a_bird_zelda_training.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bird_zelda_training.h" SPECIAL_ACTOR_PROFILE(BIRD_ZELDA_TRAINING, dBird_ZeldaTraining_c, fProfile::BIRD_ZELDA_TRAINING, 0xAE, 0, 2); diff --git a/src/REL/d/a/d_a_bombf.cpp b/src/REL/d/a/d_a_bombf.cpp index d9008c06..0f9ad7c4 100644 --- a/src/REL/d/a/d_a_bombf.cpp +++ b/src/REL/d/a/d_a_bombf.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bombf.h" SPECIAL_ACTOR_PROFILE(BOMBF, dAcBombf_c, fProfile::BOMBF, 0x129, 0, 4099); diff --git a/src/REL/d/a/d_a_bullet_gue.cpp b/src/REL/d/a/d_a_bullet_gue.cpp index 0883a373..bb0629b0 100644 --- a/src/REL/d/a/d_a_bullet_gue.cpp +++ b/src/REL/d/a/d_a_bullet_gue.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bullet_gue.h" SPECIAL_ACTOR_PROFILE(GUE_BULLET, dAcBulletGue_c, fProfile::GUE_BULLET, 0x105, 0, 2); diff --git a/src/REL/d/a/d_a_bullet_maguppo.cpp b/src/REL/d/a/d_a_bullet_maguppo.cpp index dc206fa8..5e1c8c1b 100644 --- a/src/REL/d/a/d_a_bullet_maguppo.cpp +++ b/src/REL/d/a/d_a_bullet_maguppo.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_bullet_maguppo.h" SPECIAL_ACTOR_PROFILE(MAGUPPO_BULLET, dAcBulletMaguppo_c, fProfile::MAGUPPO_BULLET, 0xFC, 0, 0); diff --git a/src/REL/d/a/d_a_co_test.cpp b/src/REL/d/a/d_a_co_test.cpp index 87530bf6..029eb477 100644 --- a/src/REL/d/a/d_a_co_test.cpp +++ b/src/REL/d/a/d_a_co_test.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_co_test.h" SPECIAL_ACTOR_PROFILE(CO_TEST, dAcCoTest, fProfile::CO_TEST, 0x1B4, 0, 1); diff --git a/src/REL/d/a/d_a_col_stp.cpp b/src/REL/d/a/d_a_col_stp.cpp index 88f9f94d..06c67233 100644 --- a/src/REL/d/a/d_a_col_stp.cpp +++ b/src/REL/d/a/d_a_col_stp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_col_stp.h" SPECIAL_ACTOR_PROFILE(COL_STP, dAcColStp_c, fProfile::COL_STP, 0x258, 0, 0); diff --git a/src/REL/d/a/d_a_control.cpp b/src/REL/d/a/d_a_control.cpp index a4a5ba51..581f2d86 100644 --- a/src/REL/d/a/d_a_control.cpp +++ b/src/REL/d/a/d_a_control.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_control.h" SPECIAL_ACTOR_PROFILE(ENEMY_CONTROL, dAcEnCl_c, fProfile::ENEMY_CONTROL, 0xE0, 0, 0); diff --git a/src/REL/d/a/d_a_demo_npc_bird.cpp b/src/REL/d/a/d_a_demo_npc_bird.cpp index a537a81c..058631db 100644 --- a/src/REL/d/a/d_a_demo_npc_bird.cpp +++ b/src/REL/d/a/d_a_demo_npc_bird.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_demo_npc_bird.h" SPECIAL_ACTOR_PROFILE(DEMO_NPC_BIRD, dAcDemoNpcBird_c, fProfile::DEMO_NPC_BIRD, 0x2F, 0, 2); diff --git a/src/REL/d/a/d_a_eel.cpp b/src/REL/d/a/d_a_eel.cpp index 7480dc24..1abab053 100644 --- a/src/REL/d/a/d_a_eel.cpp +++ b/src/REL/d/a/d_a_eel.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_eel.h" SPECIAL_ACTOR_PROFILE(EEL, dAcEel_c, fProfile::EEL, 0x9C, 0, 3); diff --git a/src/REL/d/a/d_a_fish.cpp b/src/REL/d/a/d_a_fish.cpp index ebd43999..00759601 100644 --- a/src/REL/d/a/d_a_fish.cpp +++ b/src/REL/d/a/d_a_fish.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_fish.h" SPECIAL_ACTOR_PROFILE(FISH, dAcFish_c, fProfile::FISH, 0x9B, 0, 3); diff --git a/src/REL/d/a/d_a_fish_mgr.cpp b/src/REL/d/a/d_a_fish_mgr.cpp index 6353ca70..f6409605 100644 --- a/src/REL/d/a/d_a_fish_mgr.cpp +++ b/src/REL/d/a/d_a_fish_mgr.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_fish_mgr.h" SPECIAL_ACTOR_PROFILE(FISH_MGR, dAcFishMgr_c, fProfile::FISH_MGR, 0x9A, 0, 3); diff --git a/src/REL/d/a/d_a_fly_slb.cpp b/src/REL/d/a/d_a_fly_slb.cpp index 919a5bf9..1adf7949 100644 --- a/src/REL/d/a/d_a_fly_slb.cpp +++ b/src/REL/d/a/d_a_fly_slb.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_fly_slb.h" SPECIAL_ACTOR_PROFILE(FLY_SLB, dAcFlySlb_c, fProfile::FLY_SLB, 0x95, 0, 387); diff --git a/src/REL/d/a/d_a_girahimu_sword_beam.cpp b/src/REL/d/a/d_a_girahimu_sword_beam.cpp index f72f8b3d..e0fecd1b 100644 --- a/src/REL/d/a/d_a_girahimu_sword_beam.cpp +++ b/src/REL/d/a/d_a_girahimu_sword_beam.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_girahimu_sword_beam.h" SPECIAL_ACTOR_PROFILE(GH_SWORD_BEAM, dAcGirahimuSwordBeam_c, fProfile::GH_SWORD_BEAM, 0x116, 0, 0); diff --git a/src/REL/d/a/d_a_heartf.cpp b/src/REL/d/a/d_a_heartf.cpp index 38b06857..cdd1beee 100644 --- a/src/REL/d/a/d_a_heartf.cpp +++ b/src/REL/d/a/d_a_heartf.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_heartf.h" SPECIAL_ACTOR_PROFILE(HEART_FLOWER, dAcHeartf_c, fProfile::HEART_FLOWER, 0x127, 0, 7); diff --git a/src/REL/d/a/d_a_hidory_fire.cpp b/src/REL/d/a/d_a_hidory_fire.cpp index 9b665d21..0531d778 100644 --- a/src/REL/d/a/d_a_hidory_fire.cpp +++ b/src/REL/d/a/d_a_hidory_fire.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_hidory_fire.h" SPECIAL_ACTOR_PROFILE(HIDORY_FIRE, dAcHidoryFire_c, fProfile::HIDORY_FIRE, 0x10B, 0, 0); diff --git a/src/REL/d/a/d_a_insect_ant.cpp b/src/REL/d/a/d_a_insect_ant.cpp index 59e9b24d..3bc1f276 100644 --- a/src/REL/d/a/d_a_insect_ant.cpp +++ b/src/REL/d/a/d_a_insect_ant.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_ant.h" SPECIAL_ACTOR_PROFILE(INSECT_ANT, dAcInsectAnt_c, fProfile::INSECT_ANT, 0x16D, 0, 3); diff --git a/src/REL/d/a/d_a_insect_beetle.cpp b/src/REL/d/a/d_a_insect_beetle.cpp index 022b5fc3..0e92de6c 100644 --- a/src/REL/d/a/d_a_insect_beetle.cpp +++ b/src/REL/d/a/d_a_insect_beetle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_beetle.h" SPECIAL_ACTOR_PROFILE(INSECT_BEETLE, dAcInsectBeetle_c, fProfile::INSECT_BEETLE, 0x16A, 0, 3); diff --git a/src/REL/d/a/d_a_insect_butterfly.cpp b/src/REL/d/a/d_a_insect_butterfly.cpp index 9a6c1194..41013c59 100644 --- a/src/REL/d/a/d_a_insect_butterfly.cpp +++ b/src/REL/d/a/d_a_insect_butterfly.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_butterfly.h" SPECIAL_ACTOR_PROFILE(INSECT_BUTTERFLY, dAcInsectButterfly_c, fProfile::INSECT_BUTTERFLY, 0x16E, 0, 3); diff --git a/src/REL/d/a/d_a_insect_cicada.cpp b/src/REL/d/a/d_a_insect_cicada.cpp index 650ec4ef..05ca6df1 100644 --- a/src/REL/d/a/d_a_insect_cicada.cpp +++ b/src/REL/d/a/d_a_insect_cicada.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_cicada.h" SPECIAL_ACTOR_PROFILE(INSECT_CICADA, dAcInsectCicada_c, fProfile::INSECT_CICADA, 0x16C, 0, 2); diff --git a/src/REL/d/a/d_a_insect_dragonfly.cpp b/src/REL/d/a/d_a_insect_dragonfly.cpp index 7992b01b..1cdc0db7 100644 --- a/src/REL/d/a/d_a_insect_dragonfly.cpp +++ b/src/REL/d/a/d_a_insect_dragonfly.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_dragonfly.h" SPECIAL_ACTOR_PROFILE(INSECT_DRAGONFLY, dAcInsectDragonfly_c, fProfile::INSECT_DRAGONFLY, 0x169, 0, 3); diff --git a/src/REL/d/a/d_a_insect_firefly.cpp b/src/REL/d/a/d_a_insect_firefly.cpp index 2d437216..02c89051 100644 --- a/src/REL/d/a/d_a_insect_firefly.cpp +++ b/src/REL/d/a/d_a_insect_firefly.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_firefly.h" SPECIAL_ACTOR_PROFILE(INSECT_FIREFLY, dAcInsectFirefly_c, fProfile::INSECT_FIREFLY, 0x170, 0, 3); diff --git a/src/REL/d/a/d_a_insect_grasshopper.cpp b/src/REL/d/a/d_a_insect_grasshopper.cpp index 2f071cee..c9ab903f 100644 --- a/src/REL/d/a/d_a_insect_grasshopper.cpp +++ b/src/REL/d/a/d_a_insect_grasshopper.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_grasshopper.h" SPECIAL_ACTOR_PROFILE(INSECT_GRASSHOPPER, dAcInsectGrasshopper_c, fProfile::INSECT_GRASSHOPPER, 0x16B, 0, 3); diff --git a/src/REL/d/a/d_a_insect_ladybug.cpp b/src/REL/d/a/d_a_insect_ladybug.cpp index e04d3781..9ec8d6de 100644 --- a/src/REL/d/a/d_a_insect_ladybug.cpp +++ b/src/REL/d/a/d_a_insect_ladybug.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_ladybug.h" SPECIAL_ACTOR_PROFILE(INSECT_LADYBUG, dAcInsectLadybug_c, fProfile::INSECT_LADYBUG, 0x168, 0, 3); diff --git a/src/REL/d/a/d_a_insect_scarab.cpp b/src/REL/d/a/d_a_insect_scarab.cpp index cadaa467..6df90dc0 100644 --- a/src/REL/d/a/d_a_insect_scarab.cpp +++ b/src/REL/d/a/d_a_insect_scarab.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_insect_scarab.h" SPECIAL_ACTOR_PROFILE(INSECT_SCARAB, dAcInsectScarab_c, fProfile::INSECT_SCARAB, 0x16F, 0, 3); diff --git a/src/REL/d/a/d_a_invisible.cpp b/src/REL/d/a/d_a_invisible.cpp index 31b37f89..8aa5e0cf 100644 --- a/src/REL/d/a/d_a_invisible.cpp +++ b/src/REL/d/a/d_a_invisible.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_invisible.h" SPECIAL_ACTOR_PROFILE(INVISIBLE, dAcInvisible, fProfile::INVISIBLE, 0x11D, 0, 0); diff --git a/src/REL/d/a/d_a_kanban.cpp b/src/REL/d/a/d_a_kanban.cpp index c1242128..8364d6c3 100644 --- a/src/REL/d/a/d_a_kanban.cpp +++ b/src/REL/d/a/d_a_kanban.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_kanban.h" SPECIAL_ACTOR_PROFILE(KANBAN, dAcKanban_c, fProfile::KANBAN, 0x181, 0, 3); diff --git a/src/REL/d/a/d_a_knight_leader_bird.cpp b/src/REL/d/a/d_a_knight_leader_bird.cpp index 6a98975e..62f14bf2 100644 --- a/src/REL/d/a/d_a_knight_leader_bird.cpp +++ b/src/REL/d/a/d_a_knight_leader_bird.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_knight_leader_bird.h" SPECIAL_ACTOR_PROFILE(KNIGHT_LEADER_BIRD, dAcKnightLeaderBird_c, fProfile::KNIGHT_LEADER_BIRD, 0x8E, 0, 2); diff --git a/src/REL/d/a/d_a_little_bird.cpp b/src/REL/d/a/d_a_little_bird.cpp index 2db08f9d..e05739b8 100644 --- a/src/REL/d/a/d_a_little_bird.cpp +++ b/src/REL/d/a/d_a_little_bird.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_little_bird.h" SPECIAL_ACTOR_PROFILE(LITTLE_BIRD, dAcLittleBird_c, fProfile::LITTLE_BIRD, 0x99, 0, 391); diff --git a/src/REL/d/a/d_a_little_bird_mgr.cpp b/src/REL/d/a/d_a_little_bird_mgr.cpp index 1efe68c4..4fb33586 100644 --- a/src/REL/d/a/d_a_little_bird_mgr.cpp +++ b/src/REL/d/a/d_a_little_bird_mgr.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_little_bird_mgr.h" SPECIAL_ACTOR_PROFILE(LITTLE_BIRD_MGR, dAcLittleBirdMgr_c, fProfile::LITTLE_BIRD_MGR, 0x98, 0, 3); diff --git a/src/REL/d/a/d_a_message.cpp b/src/REL/d/a/d_a_message.cpp index 87e1ae7b..c31da470 100644 --- a/src/REL/d/a/d_a_message.cpp +++ b/src/REL/d/a/d_a_message.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_message.h" SPECIAL_ACTOR_PROFILE(MESSAGE_ACTOR, dAcMessage_c, fProfile::MESSAGE_ACTOR, 0x289, 0, 0); diff --git a/src/REL/d/a/d_a_morita_test.cpp b/src/REL/d/a/d_a_morita_test.cpp index 7fe4b63a..50ebb1d8 100644 --- a/src/REL/d/a/d_a_morita_test.cpp +++ b/src/REL/d/a/d_a_morita_test.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_morita_test.h" SPECIAL_ACTOR_PROFILE(J_TEST, dAcJtest_c, fProfile::J_TEST, 0xBB, 0, 2); diff --git a/src/REL/d/a/d_a_nusi_base.cpp b/src/REL/d/a/d_a_nusi_base.cpp index 2571c93a..f61cb832 100644 --- a/src/REL/d/a/d_a_nusi_base.cpp +++ b/src/REL/d/a/d_a_nusi_base.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_nusi_base.h" SPECIAL_ACTOR_PROFILE(NUSI_BASE, dAcNusiBase_c, fProfile::NUSI_BASE, 0xB1, 0, 0); diff --git a/src/REL/d/a/d_a_nusi_npc.cpp b/src/REL/d/a/d_a_nusi_npc.cpp index 4888229d..89d27e61 100644 --- a/src/REL/d/a/d_a_nusi_npc.cpp +++ b/src/REL/d/a/d_a_nusi_npc.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_nusi_npc.h" SPECIAL_ACTOR_PROFILE(NUSI_NPC, dAcNusiNpc_c, fProfile::NUSI_NPC, 0xB2, 0, 2); diff --git a/src/REL/d/a/d_a_or_cannon_bullet.cpp b/src/REL/d/a/d_a_or_cannon_bullet.cpp index d2637525..213be3db 100644 --- a/src/REL/d/a/d_a_or_cannon_bullet.cpp +++ b/src/REL/d/a/d_a_or_cannon_bullet.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_or_cannon_bullet.h" SPECIAL_ACTOR_PROFILE(OR_CANN_BULLET, dAcOrCannBullet_c, fProfile::OR_CANN_BULLET, 0xF5, 0, 2); diff --git a/src/REL/d/a/d_a_pumpkin.cpp b/src/REL/d/a/d_a_pumpkin.cpp index 45b3857f..f83e5ae9 100644 --- a/src/REL/d/a/d_a_pumpkin.cpp +++ b/src/REL/d/a/d_a_pumpkin.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_pumpkin.h" SPECIAL_ACTOR_PROFILE(PUMPKIN, dAcPumpkin_c, fProfile::PUMPKIN, 0x134, 0, 3); diff --git a/src/REL/d/a/d_a_shop_sample.cpp b/src/REL/d/a/d_a_shop_sample.cpp index 8be1964f..6d8b2a48 100644 --- a/src/REL/d/a/d_a_shop_sample.cpp +++ b/src/REL/d/a/d_a_shop_sample.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_shop_sample.h" SPECIAL_ACTOR_PROFILE(SHOP_SAMPLE, dAcShopSample_c, fProfile::SHOP_SAMPLE, 0x276, 0, 3); diff --git a/src/REL/d/a/d_a_t_wood_area.cpp b/src/REL/d/a/d_a_t_wood_area.cpp index 06972cc5..ee4d8c02 100644 --- a/src/REL/d/a/d_a_t_wood_area.cpp +++ b/src/REL/d/a/d_a_t_wood_area.cpp @@ -1,6 +1,6 @@ -#include -#include +#include "d/a/d_a_t_wood_area.h" +#include "d/a/d_a_player.h" const f32 dAcTWoodArea_c::scaleX = 100.0f; const f32 dAcTWoodArea_c::scaleY = 100.0f; diff --git a/src/REL/d/a/e/d_a_e_am.cpp b/src/REL/d/a/e/d_a_e_am.cpp index f5f5b597..02cfed7b 100644 --- a/src/REL/d/a/e/d_a_e_am.cpp +++ b/src/REL/d/a/e/d_a_e_am.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_am.h" SPECIAL_ACTOR_PROFILE(E_AM, dAcEAm_c, fProfile::E_AM, 0xC1, 0, 4131); diff --git a/src/REL/d/a/e/d_a_e_battleshipfish.cpp b/src/REL/d/a/e/d_a_e_battleshipfish.cpp index 1541af40..99fc1003 100644 --- a/src/REL/d/a/e/d_a_e_battleshipfish.cpp +++ b/src/REL/d/a/e/d_a_e_battleshipfish.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_battleshipfish.h" SPECIAL_ACTOR_PROFILE(E_BFISH, dAcEbfish_c, fProfile::E_BFISH, 0xE9, 0, 4098); diff --git a/src/REL/d/a/e/d_a_e_bc.cpp b/src/REL/d/a/e/d_a_e_bc.cpp index 3dad4b97..360dc2ad 100644 --- a/src/REL/d/a/e/d_a_e_bc.cpp +++ b/src/REL/d/a/e/d_a_e_bc.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bc.h" SPECIAL_ACTOR_PROFILE(E_BC, dAcEbc_c, fProfile::E_BC, 0xD0, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_bc_arrow.cpp b/src/REL/d/a/e/d_a_e_bc_arrow.cpp index a80c2fc6..8f75871d 100644 --- a/src/REL/d/a/e/d_a_e_bc_arrow.cpp +++ b/src/REL/d/a/e/d_a_e_bc_arrow.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bc_arrow.h" SPECIAL_ACTOR_PROFILE(E_BCARROW, dAcEbcarrow_c, fProfile::E_BCARROW, 0xD3, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_bcal.cpp b/src/REL/d/a/e/d_a_e_bcal.cpp index 94cc86c1..991715f7 100644 --- a/src/REL/d/a/e/d_a_e_bcal.cpp +++ b/src/REL/d/a/e/d_a_e_bcal.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bcal.h" SPECIAL_ACTOR_PROFILE(E_BCAL, dAcEbcaL_c, fProfile::E_BCAL, 0xD2, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_bcal_arrow.cpp b/src/REL/d/a/e/d_a_e_bcal_arrow.cpp index a5bb13ef..ffc1e7fa 100644 --- a/src/REL/d/a/e/d_a_e_bcal_arrow.cpp +++ b/src/REL/d/a/e/d_a_e_bcal_arrow.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bcal_arrow.h" SPECIAL_ACTOR_PROFILE(E_BCALARROW, dAcEbcalarrow_c, fProfile::E_BCALARROW, 0xD4, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_bce.cpp b/src/REL/d/a/e/d_a_e_bce.cpp index 5a633ff7..7c3526e3 100644 --- a/src/REL/d/a/e/d_a_e_bce.cpp +++ b/src/REL/d/a/e/d_a_e_bce.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bce.h" SPECIAL_ACTOR_PROFILE(E_BCE, dAcEbce_c, fProfile::E_BCE, 0xD1, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_bcz.cpp b/src/REL/d/a/e/d_a_e_bcz.cpp index 678eb17d..7281b4c9 100644 --- a/src/REL/d/a/e/d_a_e_bcz.cpp +++ b/src/REL/d/a/e/d_a_e_bcz.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bcz.h" SPECIAL_ACTOR_PROFILE(E_BCZ, dAcEBcZ_c, fProfile::E_BCZ, 0xD6, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_beamos.cpp b/src/REL/d/a/e/d_a_e_beamos.cpp index ee134fb1..a4993387 100644 --- a/src/REL/d/a/e/d_a_e_beamos.cpp +++ b/src/REL/d/a/e/d_a_e_beamos.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_beamos.h" SPECIAL_ACTOR_PROFILE(E_BEAMOS, dAcEbeamos, fProfile::E_BEAMOS, 0xEC, 0, 4098); diff --git a/src/REL/d/a/e/d_a_e_bs.cpp b/src/REL/d/a/e/d_a_e_bs.cpp index 74896fb2..bb46a4d6 100644 --- a/src/REL/d/a/e/d_a_e_bs.cpp +++ b/src/REL/d/a/e/d_a_e_bs.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_bs.h" SPECIAL_ACTOR_PROFILE(E_BS, dAcEbs_c, fProfile::E_BS, 0xC7, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_cactus.cpp b/src/REL/d/a/e/d_a_e_cactus.cpp index f864785a..7b3216ee 100644 --- a/src/REL/d/a/e/d_a_e_cactus.cpp +++ b/src/REL/d/a/e/d_a_e_cactus.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/e/d_a_e_cactus.h" SPECIAL_ACTOR_PROFILE(E_CACTUS, dAcEcactus_c, fProfile::E_CACTUS, 0xEA, 0, 4359); diff --git a/src/REL/d/a/e/d_a_e_captain.cpp b/src/REL/d/a/e/d_a_e_captain.cpp index 33f811f9..ff5c4a54 100644 --- a/src/REL/d/a/e/d_a_e_captain.cpp +++ b/src/REL/d/a/e/d_a_e_captain.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_captain.h" SPECIAL_ACTOR_PROFILE(E_CAPTAIN, dAcEcaptain_c, fProfile::E_CAPTAIN, 0xBE, 0, 32); diff --git a/src/REL/d/a/e/d_a_e_chaser_b.cpp b/src/REL/d/a/e/d_a_e_chaser_b.cpp index 54631b28..c54a348b 100644 --- a/src/REL/d/a/e/d_a_e_chaser_b.cpp +++ b/src/REL/d/a/e/d_a_e_chaser_b.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_chaser_b.h" SPECIAL_ACTOR_PROFILE(E_CHB, dAcEChb_c, fProfile::E_CHB, 0x103, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_eye.cpp b/src/REL/d/a/e/d_a_e_eye.cpp index 9d4f9f09..0f06db55 100644 --- a/src/REL/d/a/e/d_a_e_eye.cpp +++ b/src/REL/d/a/e/d_a_e_eye.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_eye.h" SPECIAL_ACTOR_PROFILE(E_EYE, dAcEEye_c, fProfile::E_EYE, 0xF6, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_ge.cpp b/src/REL/d/a/e/d_a_e_ge.cpp index 48fa6c30..9917ba81 100644 --- a/src/REL/d/a/e/d_a_e_ge.cpp +++ b/src/REL/d/a/e/d_a_e_ge.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_ge.h" SPECIAL_ACTOR_PROFILE(E_GE, dAcEge_c, fProfile::E_GE, 0x106, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_geko.cpp b/src/REL/d/a/e/d_a_e_geko.cpp index 932de514..4819c06e 100644 --- a/src/REL/d/a/e/d_a_e_geko.cpp +++ b/src/REL/d/a/e/d_a_e_geko.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_geko.h" SPECIAL_ACTOR_PROFILE(E_GEKO, dAcEgeko_c, fProfile::E_GEKO, 0xED, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_gerock.cpp b/src/REL/d/a/e/d_a_e_gerock.cpp index dffd88cb..562370d2 100644 --- a/src/REL/d/a/e/d_a_e_gerock.cpp +++ b/src/REL/d/a/e/d_a_e_gerock.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_gerock.h" SPECIAL_ACTOR_PROFILE(E_GEROCK, dAcEgerock_c, fProfile::E_GEROCK, 0x108, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_gue.cpp b/src/REL/d/a/e/d_a_e_gue.cpp index 596c756a..3a44876c 100644 --- a/src/REL/d/a/e/d_a_e_gue.cpp +++ b/src/REL/d/a/e/d_a_e_gue.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_gue.h" SPECIAL_ACTOR_PROFILE(E_GUE, dAcEgue_c, fProfile::E_GUE, 0x104, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_gumarm.cpp b/src/REL/d/a/e/d_a_e_gumarm.cpp index 33ef6697..f5b03fe9 100644 --- a/src/REL/d/a/e/d_a_e_gumarm.cpp +++ b/src/REL/d/a/e/d_a_e_gumarm.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_gumarm.h" SPECIAL_ACTOR_PROFILE(E_GUMARM, dAcGumarm_c, fProfile::E_GUMARM, 0x11F, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_gunho.cpp b/src/REL/d/a/e/d_a_e_gunho.cpp index 19c9d1e6..0cebf9c0 100644 --- a/src/REL/d/a/e/d_a_e_gunho.cpp +++ b/src/REL/d/a/e/d_a_e_gunho.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_gunho.h" SPECIAL_ACTOR_PROFILE(E_GUNHO, dAcEgunho_c, fProfile::E_GUNHO, 0xE7, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_gunhob.cpp b/src/REL/d/a/e/d_a_e_gunhob.cpp index 7cdb685b..68e10939 100644 --- a/src/REL/d/a/e/d_a_e_gunhob.cpp +++ b/src/REL/d/a/e/d_a_e_gunhob.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_gunhob.h" SPECIAL_ACTOR_PROFILE(E_GUNHOB, dAcEgunhob_c, fProfile::E_GUNHOB, 0xE8, 0, 4130); diff --git a/src/REL/d/a/e/d_a_e_hb.cpp b/src/REL/d/a/e/d_a_e_hb.cpp index f5ba45d7..6728efaf 100644 --- a/src/REL/d/a/e/d_a_e_hb.cpp +++ b/src/REL/d/a/e/d_a_e_hb.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hb.h" SPECIAL_ACTOR_PROFILE(E_HB, dAcEhb_c, fProfile::E_HB, 0xFF, 0, 4096); diff --git a/src/REL/d/a/e/d_a_e_hb_leaf.cpp b/src/REL/d/a/e/d_a_e_hb_leaf.cpp index 27200886..5c9440c2 100644 --- a/src/REL/d/a/e/d_a_e_hb_leaf.cpp +++ b/src/REL/d/a/e/d_a_e_hb_leaf.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hb_leaf.h" const f32 dAcEhb_leaf_c::unkFloat0 = 0.0f; const f32 dAcEhb_leaf_c::unkFloat1 = -0.0f; diff --git a/src/REL/d/a/e/d_a_e_hidokari.cpp b/src/REL/d/a/e/d_a_e_hidokari.cpp index 5170687d..b2d274f5 100644 --- a/src/REL/d/a/e/d_a_e_hidokari.cpp +++ b/src/REL/d/a/e/d_a_e_hidokari.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hidokari.h" SPECIAL_ACTOR_PROFILE(E_HIDOKARI, dAcEhidokari_c, fProfile::E_HIDOKARI, 0xE5, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_hidokaris.cpp b/src/REL/d/a/e/d_a_e_hidokaris.cpp index 0461c897..6cd6d81f 100644 --- a/src/REL/d/a/e/d_a_e_hidokaris.cpp +++ b/src/REL/d/a/e/d_a_e_hidokaris.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hidokaris.h" SPECIAL_ACTOR_PROFILE(E_HIDOKARIS, dAcEhidokaris_c, fProfile::E_HIDOKARIS, 0xE4, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_hidory.cpp b/src/REL/d/a/e/d_a_e_hidory.cpp index de1204e9..11424012 100644 --- a/src/REL/d/a/e/d_a_e_hidory.cpp +++ b/src/REL/d/a/e/d_a_e_hidory.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hidory.h" SPECIAL_ACTOR_PROFILE(E_HIDORY, dAcEHidory_c, fProfile::E_HIDORY, 0x10A, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_hoc.cpp b/src/REL/d/a/e/d_a_e_hoc.cpp index c174fd28..c86c94fa 100644 --- a/src/REL/d/a/e/d_a_e_hoc.cpp +++ b/src/REL/d/a/e/d_a_e_hoc.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hoc.h" SPECIAL_ACTOR_PROFILE(E_HOC, dAcEhoc_c, fProfile::E_HOC, 0xCC, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_hp.cpp b/src/REL/d/a/e/d_a_e_hp.cpp index 4c6481ca..46154dd1 100644 --- a/src/REL/d/a/e/d_a_e_hp.cpp +++ b/src/REL/d/a/e/d_a_e_hp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hp.h" SPECIAL_ACTOR_PROFILE(E_HP, dAcEHp_c, fProfile::E_HP, 0x102, 0, 18); diff --git a/src/REL/d/a/e/d_a_e_hydra.cpp b/src/REL/d/a/e/d_a_e_hydra.cpp index 1b54cc10..74093ed9 100644 --- a/src/REL/d/a/e/d_a_e_hydra.cpp +++ b/src/REL/d/a/e/d_a_e_hydra.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_hydra.h" SPECIAL_ACTOR_PROFILE(E_HYDRA, dAcEhydra_c, fProfile::E_HYDRA, 0xE6, 0, 4131); diff --git a/src/REL/d/a/e/d_a_e_kg.cpp b/src/REL/d/a/e/d_a_e_kg.cpp index 7ef08570..9d568c87 100644 --- a/src/REL/d/a/e/d_a_e_kg.cpp +++ b/src/REL/d/a/e/d_a_e_kg.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_kg.h" SPECIAL_ACTOR_PROFILE(E_KG, dAcEkg_c, fProfile::E_KG, 0x122, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_ks.cpp b/src/REL/d/a/e/d_a_e_ks.cpp index c8938427..b9f2d8d1 100644 --- a/src/REL/d/a/e/d_a_e_ks.cpp +++ b/src/REL/d/a/e/d_a_e_ks.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_ks.h" SPECIAL_ACTOR_PROFILE(E_KS, dAcEKs_c, fProfile::E_KS, 0xFE, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_kumite_gira.cpp b/src/REL/d/a/e/d_a_e_kumite_gira.cpp index 1b0fe66f..972cd1d8 100644 --- a/src/REL/d/a/e/d_a_e_kumite_gira.cpp +++ b/src/REL/d/a/e/d_a_e_kumite_gira.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_kumite_gira.h" SPECIAL_ACTOR_PROFILE(E_KGIRA, dAcEKumiteGira_c, fProfile::E_KGIRA, 0xCE, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_liza_tail.cpp b/src/REL/d/a/e/d_a_e_liza_tail.cpp index b6c75e41..e0e20dff 100644 --- a/src/REL/d/a/e/d_a_e_liza_tail.cpp +++ b/src/REL/d/a/e/d_a_e_liza_tail.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_liza_tail.h" SPECIAL_ACTOR_PROFILE(E_LIZA_TAIL, dAcEliza_tail_c, fProfile::E_LIZA_TAIL, 0xE3, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_lizarufos.cpp b/src/REL/d/a/e/d_a_e_lizarufos.cpp index 5630badb..420ca04b 100644 --- a/src/REL/d/a/e/d_a_e_lizarufos.cpp +++ b/src/REL/d/a/e/d_a_e_lizarufos.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_lizarufos.h" SPECIAL_ACTOR_PROFILE(E_LIZARUFOS, dAcELizarufos_c, fProfile::E_LIZARUFOS, 0xE2, 0, 34); diff --git a/src/REL/d/a/e/d_a_e_magma.cpp b/src/REL/d/a/e/d_a_e_magma.cpp index d98e451e..9abd611d 100644 --- a/src/REL/d/a/e/d_a_e_magma.cpp +++ b/src/REL/d/a/e/d_a_e_magma.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_magma.h" SPECIAL_ACTOR_PROFILE(E_MAGMA, dAcEmagma_c, fProfile::E_MAGMA, 0xFA, 0, 0); diff --git a/src/REL/d/a/e/d_a_e_maguppo.cpp b/src/REL/d/a/e/d_a_e_maguppo.cpp index c848f9c9..1a9dd6e0 100644 --- a/src/REL/d/a/e/d_a_e_maguppo.cpp +++ b/src/REL/d/a/e/d_a_e_maguppo.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_maguppo.h" SPECIAL_ACTOR_PROFILE(E_MAGUPPO, dAcEmaguppo_c, fProfile::E_MAGUPPO, 0xFB, 0, 4098); diff --git a/src/REL/d/a/e/d_a_e_mr.cpp b/src/REL/d/a/e/d_a_e_mr.cpp index c11d93bd..af9dabd0 100644 --- a/src/REL/d/a/e/d_a_e_mr.cpp +++ b/src/REL/d/a/e/d_a_e_mr.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_mr.h" SPECIAL_ACTOR_PROFILE(E_MR, dAcEmr_c, fProfile::E_MR, 0x11E, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_mr_shield.cpp b/src/REL/d/a/e/d_a_e_mr_shield.cpp index 6225d9c2..07323a82 100644 --- a/src/REL/d/a/e/d_a_e_mr_shield.cpp +++ b/src/REL/d/a/e/d_a_e_mr_shield.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_mr_shield.h" SPECIAL_ACTOR_PROFILE(E_MR_SHIELD, dAcE_Mr_Shield_c, fProfile::E_MR_SHIELD, 0x121, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_oc.cpp b/src/REL/d/a/e/d_a_e_oc.cpp index 77d658aa..d59b03e8 100644 --- a/src/REL/d/a/e/d_a_e_oc.cpp +++ b/src/REL/d/a/e/d_a_e_oc.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_oc.h" SPECIAL_ACTOR_PROFILE(E_OC, dAcEoc_c, fProfile::E_OC, 0xCD, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_or.cpp b/src/REL/d/a/e/d_a_e_or.cpp index 65b83843..2c13a6d1 100644 --- a/src/REL/d/a/e/d_a_e_or.cpp +++ b/src/REL/d/a/e/d_a_e_or.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_or.h" SPECIAL_ACTOR_PROFILE(E_OR, dAcEor_c, fProfile::E_OR, 0xF3, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_or_cannon.cpp b/src/REL/d/a/e/d_a_e_or_cannon.cpp index 12ca8078..e31669c8 100644 --- a/src/REL/d/a/e/d_a_e_or_cannon.cpp +++ b/src/REL/d/a/e/d_a_e_or_cannon.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_or_cannon.h" SPECIAL_ACTOR_PROFILE(E_OR_CANNON, dAcEorCannon_c, fProfile::E_OR_CANNON, 0xF4, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_ph.cpp b/src/REL/d/a/e/d_a_e_ph.cpp index 97a84eb5..5c9b7f18 100644 --- a/src/REL/d/a/e/d_a_e_ph.cpp +++ b/src/REL/d/a/e/d_a_e_ph.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_ph.h" SPECIAL_ACTOR_PROFILE(E_PH, dAcEPh_c, fProfile::E_PH, 0xF1, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_po.cpp b/src/REL/d/a/e/d_a_e_po.cpp index 91103079..3e7e4ec7 100644 --- a/src/REL/d/a/e/d_a_e_po.cpp +++ b/src/REL/d/a/e/d_a_e_po.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_po.h" SPECIAL_ACTOR_PROFILE(E_PO, dAcEPo_c, fProfile::E_PO, 0xF0, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_remly.cpp b/src/REL/d/a/e/d_a_e_remly.cpp index b5d6deab..85034734 100644 --- a/src/REL/d/a/e/d_a_e_remly.cpp +++ b/src/REL/d/a/e/d_a_e_remly.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_remly.h" SPECIAL_ACTOR_PROFILE(E_REMLY, dAcEremly_c, fProfile::E_REMLY, 0xE1, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_rupee_gue.cpp b/src/REL/d/a/e/d_a_e_rupee_gue.cpp index 83ca64f2..f758904a 100644 --- a/src/REL/d/a/e/d_a_e_rupee_gue.cpp +++ b/src/REL/d/a/e/d_a_e_rupee_gue.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_rupee_gue.h" SPECIAL_ACTOR_PROFILE(E_RUPEE_GUE, dAcErupeeGue_c, fProfile::E_RUPEE_GUE, 0x107, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_sf.cpp b/src/REL/d/a/e/d_a_e_sf.cpp index cbbff629..535bc2de 100644 --- a/src/REL/d/a/e/d_a_e_sf.cpp +++ b/src/REL/d/a/e/d_a_e_sf.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_sf.h" SPECIAL_ACTOR_PROFILE(E_SF, dAcEsf_c, fProfile::E_SF, 0xC8, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_sf4.cpp b/src/REL/d/a/e/d_a_e_sf4.cpp index f39c34a9..fb98a39e 100644 --- a/src/REL/d/a/e/d_a_e_sf4.cpp +++ b/src/REL/d/a/e/d_a_e_sf4.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_sf4.h" SPECIAL_ACTOR_PROFILE(E_SF4, dAcEsf4_c, fProfile::E_SF4, 0xC9, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_siren.cpp b/src/REL/d/a/e/d_a_e_siren.cpp index 93817684..c0c32e35 100644 --- a/src/REL/d/a/e/d_a_e_siren.cpp +++ b/src/REL/d/a/e/d_a_e_siren.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_siren.h" SPECIAL_ACTOR_PROFILE(E_SIREN, dAcESiren_c, fProfile::E_SIREN, 0xEF, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_skytail.cpp b/src/REL/d/a/e/d_a_e_skytail.cpp index b56b739a..fb1e61b4 100644 --- a/src/REL/d/a/e/d_a_e_skytail.cpp +++ b/src/REL/d/a/e/d_a_e_skytail.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_skytail.h" SPECIAL_ACTOR_PROFILE(E_SKYTAIL, dAcESkytail_c, fProfile::E_SKYTAIL, 0xD7, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_sm.cpp b/src/REL/d/a/e/d_a_e_sm.cpp index 53f2cc0f..ebfb4beb 100644 --- a/src/REL/d/a/e/d_a_e_sm.cpp +++ b/src/REL/d/a/e/d_a_e_sm.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_sm.h" SPECIAL_ACTOR_PROFILE(E_SM, dAcEsm_c, fProfile::E_SM, 0xEB, 0, 4098); diff --git a/src/REL/d/a/e/d_a_e_spark.cpp b/src/REL/d/a/e/d_a_e_spark.cpp index 56895e2c..a63d38d2 100644 --- a/src/REL/d/a/e/d_a_e_spark.cpp +++ b/src/REL/d/a/e/d_a_e_spark.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_spark.h" SPECIAL_ACTOR_PROFILE(E_SPARK, dAcEspark_c, fProfile::E_SPARK, 0xF9, 0, 0); diff --git a/src/REL/d/a/e/d_a_e_st.cpp b/src/REL/d/a/e/d_a_e_st.cpp index 2b42716f..76c0f748 100644 --- a/src/REL/d/a/e/d_a_e_st.cpp +++ b/src/REL/d/a/e/d_a_e_st.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_st.h" SPECIAL_ACTOR_PROFILE(E_ST, dAcEst_c, fProfile::E_ST, 0xCA, 0, 2); diff --git a/src/REL/d/a/e/d_a_e_st_wire.cpp b/src/REL/d/a/e/d_a_e_st_wire.cpp index 10818fbb..f2416cd8 100644 --- a/src/REL/d/a/e/d_a_e_st_wire.cpp +++ b/src/REL/d/a/e/d_a_e_st_wire.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_st_wire.h" SPECIAL_ACTOR_PROFILE(E_ST_WIRE, dAcEstwire_c, fProfile::E_ST_WIRE, 0xCB, 0, 0); diff --git a/src/REL/d/a/e/d_a_e_syakomaito.cpp b/src/REL/d/a/e/d_a_e_syakomaito.cpp index cd0b1148..4dac29e0 100644 --- a/src/REL/d/a/e/d_a_e_syakomaito.cpp +++ b/src/REL/d/a/e/d_a_e_syakomaito.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_syakomaito.h" SPECIAL_ACTOR_PROFILE(E_SYAKOMAITO, dAcESyakomaito_c, fProfile::E_SYAKOMAITO, 0xC0, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_tn2.cpp b/src/REL/d/a/e/d_a_e_tn2.cpp index b75d5443..6ba027cd 100644 --- a/src/REL/d/a/e/d_a_e_tn2.cpp +++ b/src/REL/d/a/e/d_a_e_tn2.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_tn2.h" SPECIAL_ACTOR_PROFILE(E_TN2, dAcEtn2_c, fProfile::E_TN2, 0x109, 0, 3); diff --git a/src/REL/d/a/e/d_a_e_ws.cpp b/src/REL/d/a/e/d_a_e_ws.cpp index ed1d8262..8d02275a 100644 --- a/src/REL/d/a/e/d_a_e_ws.cpp +++ b/src/REL/d/a/e/d_a_e_ws.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/e/d_a_e_ws.h" SPECIAL_ACTOR_PROFILE(E_WS, dAcEws_c, fProfile::E_WS, 0x10C, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_aku_human.cpp b/src/REL/d/a/npc/d_a_npc_aku_human.cpp index bdc44431..d6d543c7 100644 --- a/src/REL/d/a/npc/d_a_npc_aku_human.cpp +++ b/src/REL/d/a/npc/d_a_npc_aku_human.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_aku_human.h" SPECIAL_ACTOR_PROFILE(NPC_AKU_HUMAN, dAcNpcAkuHuman_c, fProfile::NPC_AKU_HUMAN, 0x79, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_akumakun.cpp b/src/REL/d/a/npc/d_a_npc_akumakun.cpp index f4aa7e35..3478ef8b 100644 --- a/src/REL/d/a/npc/d_a_npc_akumakun.cpp +++ b/src/REL/d/a/npc/d_a_npc_akumakun.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_akumakun.h" SPECIAL_ACTOR_PROFILE(NPC_AKUMAKUN, dAcNpcAkumakun_c, fProfile::NPC_AKUMAKUN, 0x78, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_aqua_dragon.cpp b/src/REL/d/a/npc/d_a_npc_aqua_dragon.cpp index df527dcd..26b50a6d 100644 --- a/src/REL/d/a/npc/d_a_npc_aqua_dragon.cpp +++ b/src/REL/d/a/npc/d_a_npc_aqua_dragon.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_aqua_dragon.h" SPECIAL_ACTOR_PROFILE(NPC_ADR, dAcNpcAdr_c, fProfile::NPC_ADR, 0x71, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_azukariya_father.cpp b/src/REL/d/a/npc/d_a_npc_azukariya_father.cpp index 73997579..6f8deb06 100644 --- a/src/REL/d/a/npc/d_a_npc_azukariya_father.cpp +++ b/src/REL/d/a/npc/d_a_npc_azukariya_father.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_azukariya_father.h" SPECIAL_ACTOR_PROFILE(NPC_AZUKARIYA_FATHER, dAcNpcAzukariyaFather_c, fProfile::NPC_AZUKARIYA_FATHER, 0x58, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_azukariya_night.cpp b/src/REL/d/a/npc/d_a_npc_azukariya_night.cpp index aa49d80f..ee31091c 100644 --- a/src/REL/d/a/npc/d_a_npc_azukariya_night.cpp +++ b/src/REL/d/a/npc/d_a_npc_azukariya_night.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_azukariya_night.h" SPECIAL_ACTOR_PROFILE(NPC_AZUKARIYA_NIGHT, dAcNpcAzukariyaNight_c, fProfile::NPC_AZUKARIYA_NIGHT, 0x4F, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_bamboo_goron.cpp b/src/REL/d/a/npc/d_a_npc_bamboo_goron.cpp index 217b69cc..b81059bd 100644 --- a/src/REL/d/a/npc/d_a_npc_bamboo_goron.cpp +++ b/src/REL/d/a/npc/d_a_npc_bamboo_goron.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_bamboo_goron.h" SPECIAL_ACTOR_PROFILE(NPC_BGR, dAcNpcBgr_c, fProfile::NPC_BGR, 0x62, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_bbrvl.cpp b/src/REL/d/a/npc/d_a_npc_bbrvl.cpp index b395e6c7..e68fb6a6 100644 --- a/src/REL/d/a/npc/d_a_npc_bbrvl.cpp +++ b/src/REL/d/a/npc/d_a_npc_bbrvl.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_bbrvl.h" SPECIAL_ACTOR_PROFILE(NPC_BBRVL, dAcNpcBBRvl_c, fProfile::NPC_BBRVL, 0xA4, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_bee.cpp b/src/REL/d/a/npc/d_a_npc_bee.cpp index b3a5c110..3b859974 100644 --- a/src/REL/d/a/npc/d_a_npc_bee.cpp +++ b/src/REL/d/a/npc/d_a_npc_bee.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_bee.h" SPECIAL_ACTOR_PROFILE(NPC_BEE, dAcNpcBee_c, fProfile::NPC_BEE, 0x123, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_bird.cpp b/src/REL/d/a/npc/d_a_npc_bird.cpp index 755bb18d..3dbcfbef 100644 --- a/src/REL/d/a/npc/d_a_npc_bird.cpp +++ b/src/REL/d/a/npc/d_a_npc_bird.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_bird.h" SPECIAL_ACTOR_PROFILE(NPC_BIRD, dNpc_Bird_c, fProfile::NPC_BIRD, 0x120, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_bird_sowoman.cpp b/src/REL/d/a/npc/d_a_npc_bird_sowoman.cpp index 8182b240..6d28814d 100644 --- a/src/REL/d/a/npc/d_a_npc_bird_sowoman.cpp +++ b/src/REL/d/a/npc/d_a_npc_bird_sowoman.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_bird_sowoman.h" SPECIAL_ACTOR_PROFILE(NPC_BDSW, dAcNpcBdsw_c, fProfile::NPC_BDSW, 0x5F, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_bird_zelda.cpp b/src/REL/d/a/npc/d_a_npc_bird_zelda.cpp index 30be7f18..8af42974 100644 --- a/src/REL/d/a/npc/d_a_npc_bird_zelda.cpp +++ b/src/REL/d/a/npc/d_a_npc_bird_zelda.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_bird_zelda.h" SPECIAL_ACTOR_PROFILE(NPC_BDZ, dAcNpcBdz_c, fProfile::NPC_BDZ, 0x5E, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_ce_friend.cpp b/src/REL/d/a/npc/d_a_npc_ce_friend.cpp index 91f73607..2722f11c 100644 --- a/src/REL/d/a/npc/d_a_npc_ce_friend.cpp +++ b/src/REL/d/a/npc/d_a_npc_ce_friend.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_ce_friend.h" SPECIAL_ACTOR_PROFILE(NPC_CE_FRIEND, dAcNpcCeFriend_c, fProfile::NPC_CE_FRIEND, 0x3D, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_ce_lady.cpp b/src/REL/d/a/npc/d_a_npc_ce_lady.cpp index 7456daf0..b8224d07 100644 --- a/src/REL/d/a/npc/d_a_npc_ce_lady.cpp +++ b/src/REL/d/a/npc/d_a_npc_ce_lady.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_ce_lady.h" SPECIAL_ACTOR_PROFILE(NPC_CE_LADY, dAcNpcCeLady_c, fProfile::NPC_CE_LADY, 0x3E, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_chef.cpp b/src/REL/d/a/npc/d_a_npc_chef.cpp index 3f83ec7e..e2ec0a82 100644 --- a/src/REL/d/a/npc/d_a_npc_chef.cpp +++ b/src/REL/d/a/npc/d_a_npc_chef.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_chef.h" SPECIAL_ACTOR_PROFILE(NPC_CHEF, dAcNpcChef_c, fProfile::NPC_CHEF, 0x87, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_daishinkan.cpp b/src/REL/d/a/npc/d_a_npc_daishinkan.cpp index 5b396de4..400d9339 100644 --- a/src/REL/d/a/npc/d_a_npc_daishinkan.cpp +++ b/src/REL/d/a/npc/d_a_npc_daishinkan.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_daishinkan.h" SPECIAL_ACTOR_PROFILE(NPC_DSK, dAcNpcDsk_c, fProfile::NPC_DSK, 0x3A, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_daishinkan_n.cpp b/src/REL/d/a/npc/d_a_npc_daishinkan_n.cpp index 320c5fc3..e190b2fe 100644 --- a/src/REL/d/a/npc/d_a_npc_daishinkan_n.cpp +++ b/src/REL/d/a/npc/d_a_npc_daishinkan_n.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_daishinkan_n.h" SPECIAL_ACTOR_PROFILE(NPC_DAISHINKAN_N, dAcNpcDaishinkanN_c, fProfile::NPC_DAISHINKAN_N, 0x59, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_desertrobot.cpp b/src/REL/d/a/npc/d_a_npc_desertrobot.cpp index 83b3efc9..5f7c3b63 100644 --- a/src/REL/d/a/npc/d_a_npc_desertrobot.cpp +++ b/src/REL/d/a/npc/d_a_npc_desertrobot.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_desertrobot.h" SPECIAL_ACTOR_PROFILE(NPC_DRB, dAcNpcDrb_c, fProfile::NPC_DRB, 0x3B, 0, 4103); diff --git a/src/REL/d/a/npc/d_a_npc_desertrobot_captain.cpp b/src/REL/d/a/npc/d_a_npc_desertrobot_captain.cpp index f698eae1..0928f218 100644 --- a/src/REL/d/a/npc/d_a_npc_desertrobot_captain.cpp +++ b/src/REL/d/a/npc/d_a_npc_desertrobot_captain.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_desertrobot_captain.h" SPECIAL_ACTOR_PROFILE(NPC_DRBC, dAcNpcDrbC_c, fProfile::NPC_DRBC, 0x3C, 0, 4099); diff --git a/src/REL/d/a/npc/d_a_npc_dive_game_judge.cpp b/src/REL/d/a/npc/d_a_npc_dive_game_judge.cpp index eecac1c9..bcea940c 100644 --- a/src/REL/d/a/npc/d_a_npc_dive_game_judge.cpp +++ b/src/REL/d/a/npc/d_a_npc_dive_game_judge.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_dive_game_judge.h" SPECIAL_ACTOR_PROFILE(NPC_DIVE_GAME_JUDGE, dAcNpcDiveGameJudge_c, fProfile::NPC_DIVE_GAME_JUDGE, 0x8D, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_douguya_mother.cpp b/src/REL/d/a/npc/d_a_npc_douguya_mother.cpp index 93c46b98..792b2494 100644 --- a/src/REL/d/a/npc/d_a_npc_douguya_mother.cpp +++ b/src/REL/d/a/npc/d_a_npc_douguya_mother.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_douguya_mother.h" SPECIAL_ACTOR_PROFILE(NPC_DOUGUYA_MOTHER, dAcNpcDouguyaMother_c, fProfile::NPC_DOUGUYA_MOTHER, 0x50, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_douguya_mother_lod.cpp b/src/REL/d/a/npc/d_a_npc_douguya_mother_lod.cpp index cb446652..8f3d31d3 100644 --- a/src/REL/d/a/npc/d_a_npc_douguya_mother_lod.cpp +++ b/src/REL/d/a/npc/d_a_npc_douguya_mother_lod.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_douguya_mother_lod.h" SPECIAL_ACTOR_PROFILE(NPC_DOUGUYA_MOTHER_LOD, dAcNpcDouguyaMotherLOD_c, fProfile::NPC_DOUGUYA_MOTHER_LOD, 0x51, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_douguyanight.cpp b/src/REL/d/a/npc/d_a_npc_douguyanight.cpp index 464741d2..6bca7747 100644 --- a/src/REL/d/a/npc/d_a_npc_douguyanight.cpp +++ b/src/REL/d/a/npc/d_a_npc_douguyanight.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_douguyanight.h" SPECIAL_ACTOR_PROFILE(NPC_DOUGUYA_NIGHT, dAcNpcDouguyaNight_c, fProfile::NPC_DOUGUYA_NIGHT, 0x4B, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_fire_dragon.cpp b/src/REL/d/a/npc/d_a_npc_fire_dragon.cpp index 75ba22df..74d6d798 100644 --- a/src/REL/d/a/npc/d_a_npc_fire_dragon.cpp +++ b/src/REL/d/a/npc/d_a_npc_fire_dragon.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_fire_dragon.h" SPECIAL_ACTOR_PROFILE(NPC_FDR, dAcNpcFdr_c, fProfile::NPC_FDR, 0x6B, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_girahim.cpp b/src/REL/d/a/npc/d_a_npc_girahim.cpp index 0b7f4e68..4e790977 100644 --- a/src/REL/d/a/npc/d_a_npc_girahim.cpp +++ b/src/REL/d/a/npc/d_a_npc_girahim.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_girahim.h" SPECIAL_ACTOR_PROFILE(NPC_GHM, dAcNpcGhm_c, fProfile::NPC_GHM, 0x72, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_goddess_zelda.cpp b/src/REL/d/a/npc/d_a_npc_goddess_zelda.cpp index cd7370a4..4ffa088f 100644 --- a/src/REL/d/a/npc/d_a_npc_goddess_zelda.cpp +++ b/src/REL/d/a/npc/d_a_npc_goddess_zelda.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_goddess_zelda.h" SPECIAL_ACTOR_PROFILE(NPC_GZL, dAcNpcGzl_c, fProfile::NPC_GZL, 0x38, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_gra.cpp b/src/REL/d/a/npc/d_a_npc_gra.cpp index ae0408a6..7c07bc7a 100644 --- a/src/REL/d/a/npc/d_a_npc_gra.cpp +++ b/src/REL/d/a/npc/d_a_npc_gra.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_gra.h" SPECIAL_ACTOR_PROFILE(NPC_GRA, dAcNpcGra_c, fProfile::NPC_GRA, 0x74, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_grc.cpp b/src/REL/d/a/npc/d_a_npc_grc.cpp index d8d666b5..3f943716 100644 --- a/src/REL/d/a/npc/d_a_npc_grc.cpp +++ b/src/REL/d/a/npc/d_a_npc_grc.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_grc.h" SPECIAL_ACTOR_PROFILE(NPC_GRC, dAcNpcGrc_c, fProfile::NPC_GRC, 0x75, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_grd.cpp b/src/REL/d/a/npc/d_a_npc_grd.cpp index 0e48f001..1c48ca52 100644 --- a/src/REL/d/a/npc/d_a_npc_grd.cpp +++ b/src/REL/d/a/npc/d_a_npc_grd.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_grd.h" SPECIAL_ACTOR_PROFILE(NPC_GRD, dAcNpcGrd_c, fProfile::NPC_GRD, 0x76, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_honeycomb.cpp b/src/REL/d/a/npc/d_a_npc_honeycomb.cpp index a5103fae..2ac3be3f 100644 --- a/src/REL/d/a/npc/d_a_npc_honeycomb.cpp +++ b/src/REL/d/a/npc/d_a_npc_honeycomb.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_honeycomb.h" SPECIAL_ACTOR_PROFILE(NPC_HONEYCOMB, dAcNpcHc_c, fProfile::NPC_HONEYCOMB, 0x124, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_insect_capture_game_kobun.cpp b/src/REL/d/a/npc/d_a_npc_insect_capture_game_kobun.cpp index 19bf82f1..db380815 100644 --- a/src/REL/d/a/npc/d_a_npc_insect_capture_game_kobun.cpp +++ b/src/REL/d/a/npc/d_a_npc_insect_capture_game_kobun.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_insect_capture_game_kobun.h" SPECIAL_ACTOR_PROFILE(NPC_ICGK, dAcNpcIcgKobun_c, fProfile::NPC_ICGK, 0x69, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_junk_mother.cpp b/src/REL/d/a/npc/d_a_npc_junk_mother.cpp index 9fd344e4..15ae8c61 100644 --- a/src/REL/d/a/npc/d_a_npc_junk_mother.cpp +++ b/src/REL/d/a/npc/d_a_npc_junk_mother.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_junk_mother.h" SPECIAL_ACTOR_PROFILE(NPC_JUNK_MOTHER, dAcNpcJunkMother_c, fProfile::NPC_JUNK_MOTHER, 0x52, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_junk_mother_lod.cpp b/src/REL/d/a/npc/d_a_npc_junk_mother_lod.cpp index 68b89ced..c4d1c7d0 100644 --- a/src/REL/d/a/npc/d_a_npc_junk_mother_lod.cpp +++ b/src/REL/d/a/npc/d_a_npc_junk_mother_lod.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_junk_mother_lod.h" SPECIAL_ACTOR_PROFILE(NPC_JUNK_MOTHER_LOD, dAcNpcJunkMotherLOD_c, fProfile::NPC_JUNK_MOTHER_LOD, 0x53, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_junk_night.cpp b/src/REL/d/a/npc/d_a_npc_junk_night.cpp index 9579f975..5d6ea961 100644 --- a/src/REL/d/a/npc/d_a_npc_junk_night.cpp +++ b/src/REL/d/a/npc/d_a_npc_junk_night.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_junk_night.h" SPECIAL_ACTOR_PROFILE(NPC_JUNK_NIGHT, dAcNpcJunkNight_c, fProfile::NPC_JUNK_NIGHT, 0x4E, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_kensei.cpp b/src/REL/d/a/npc/d_a_npc_kensei.cpp index 9b889591..66a423c9 100644 --- a/src/REL/d/a/npc/d_a_npc_kensei.cpp +++ b/src/REL/d/a/npc/d_a_npc_kensei.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_kensei.h" SPECIAL_ACTOR_PROFILE(NPC_KENSEI, dAcNpcKensei_c, fProfile::NPC_KENSEI, 0x5C, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_knight_leader.cpp b/src/REL/d/a/npc/d_a_npc_knight_leader.cpp index c3890ece..5a8c46b7 100644 --- a/src/REL/d/a/npc/d_a_npc_knight_leader.cpp +++ b/src/REL/d/a/npc/d_a_npc_knight_leader.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_knight_leader.h" SPECIAL_ACTOR_PROFILE(NPC_KNIGHT_LEADER, dAcNpcKnightLeader_c, fProfile::NPC_KNIGHT_LEADER, 0x8F, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_kobun.cpp b/src/REL/d/a/npc/d_a_npc_kobun.cpp index 18f101f7..8b0f4dfe 100644 --- a/src/REL/d/a/npc/d_a_npc_kobun.cpp +++ b/src/REL/d/a/npc/d_a_npc_kobun.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_kobun.h" SPECIAL_ACTOR_PROFILE(NPC_KBN, dAcNpcKbn_c, fProfile::NPC_KBN, 0x33, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_kobun2.cpp b/src/REL/d/a/npc/d_a_npc_kobun2.cpp index 354e4a10..3d40387e 100644 --- a/src/REL/d/a/npc/d_a_npc_kobun2.cpp +++ b/src/REL/d/a/npc/d_a_npc_kobun2.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_kobun2.h" SPECIAL_ACTOR_PROFILE(NPC_KBN2, dAcNpcKbn2_c, fProfile::NPC_KBN2, 0x34, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_kobun_b_night.cpp b/src/REL/d/a/npc/d_a_npc_kobun_b_night.cpp index 04c716ee..1ff21ba1 100644 --- a/src/REL/d/a/npc/d_a_npc_kobun_b_night.cpp +++ b/src/REL/d/a/npc/d_a_npc_kobun_b_night.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_kobun_b_night.h" SPECIAL_ACTOR_PROFILE(NPC_KOBUN_B_NIGHT, dAcNpcKobunBNight_c, fProfile::NPC_KOBUN_B_NIGHT, 0x35, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_kyui4.cpp b/src/REL/d/a/npc/d_a_npc_kyui4.cpp index c958e605..1b06153c 100644 --- a/src/REL/d/a/npc/d_a_npc_kyui4.cpp +++ b/src/REL/d/a/npc/d_a_npc_kyui4.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_kyui4.h" SPECIAL_ACTOR_PROFILE(NPC_KYUI4, dAcNpcKyui4_c, fProfile::NPC_KYUI4, 0x47, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_kyui_elder.cpp b/src/REL/d/a/npc/d_a_npc_kyui_elder.cpp index ab57ad80..01623892 100644 --- a/src/REL/d/a/npc/d_a_npc_kyui_elder.cpp +++ b/src/REL/d/a/npc/d_a_npc_kyui_elder.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_kyui_elder.h" SPECIAL_ACTOR_PROFILE(NPC_KYUI_ELDER, dAcNpcKyuiElder_c, fProfile::NPC_KYUI_ELDER, 0x45, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_kyui_first.cpp b/src/REL/d/a/npc/d_a_npc_kyui_first.cpp index e57f8673..b815eacf 100644 --- a/src/REL/d/a/npc/d_a_npc_kyui_first.cpp +++ b/src/REL/d/a/npc/d_a_npc_kyui_first.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_kyui_first.h" SPECIAL_ACTOR_PROFILE(NPC_KYUI_FIRST, dAcNpcKyuiFirst_c, fProfile::NPC_KYUI_FIRST, 0x43, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_kyui_third.cpp b/src/REL/d/a/npc/d_a_npc_kyui_third.cpp index 532329ff..5d5d62fe 100644 --- a/src/REL/d/a/npc/d_a_npc_kyui_third.cpp +++ b/src/REL/d/a/npc/d_a_npc_kyui_third.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_kyui_third.h" SPECIAL_ACTOR_PROFILE(NPC_KYUI_THIRD, dAcNpcKyuiThird_c, fProfile::NPC_KYUI_THIRD, 0x46, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_kyui_wizard.cpp b/src/REL/d/a/npc/d_a_npc_kyui_wizard.cpp index e50af74d..4e38240e 100644 --- a/src/REL/d/a/npc/d_a_npc_kyui_wizard.cpp +++ b/src/REL/d/a/npc/d_a_npc_kyui_wizard.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_kyui_wizard.h" SPECIAL_ACTOR_PROFILE(NPC_KYUI_WIZARD, dAcNpcKyuiWizard_c, fProfile::NPC_KYUI_WIZARD, 0x42, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_medicine_husband_night.cpp b/src/REL/d/a/npc/d_a_npc_medicine_husband_night.cpp index 666197e5..e7a2ba76 100644 --- a/src/REL/d/a/npc/d_a_npc_medicine_husband_night.cpp +++ b/src/REL/d/a/npc/d_a_npc_medicine_husband_night.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_medicine_husband_night.h" SPECIAL_ACTOR_PROFILE(NPC_MED_HUS_NIGHT, dAcNpcMedicineHusbandNight_c, fProfile::NPC_MED_HUS_NIGHT, 0x4D, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_medicinewifenight.cpp b/src/REL/d/a/npc/d_a_npc_medicinewifenight.cpp index 281ff5c1..26decf98 100644 --- a/src/REL/d/a/npc/d_a_npc_medicinewifenight.cpp +++ b/src/REL/d/a/npc/d_a_npc_medicinewifenight.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_medicinewifenight.h" SPECIAL_ACTOR_PROFILE(NPC_MED_WIFE_NIGHT, dAcNpcMedicineWifeNight_c, fProfile::NPC_MED_WIFE_NIGHT, 0x4C, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_mole.cpp b/src/REL/d/a/npc/d_a_npc_mole.cpp index 31d234dc..dceb0bc7 100644 --- a/src/REL/d/a/npc/d_a_npc_mole.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE, dAcNpcMole_c, fProfile::NPC_MOLE, 0x7E, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_mole_elder.cpp b/src/REL/d/a/npc/d_a_npc_mole_elder.cpp index 4a25f9df..a85a236d 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_elder.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_elder.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_elder.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_ELDER, dAcNpcMoleElder_c, fProfile::NPC_MOLE_ELDER, 0x84, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_mole_es_nml.cpp b/src/REL/d/a/npc/d_a_npc_mole_es_nml.cpp index 58da9e8b..8e3b6ff1 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_es_nml.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_es_nml.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_es_nml.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_ES_NML, dAcNpcMoleEsNml_c, fProfile::NPC_MOLE_ES_NML, 0x81, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_mole_mg.cpp b/src/REL/d/a/npc/d_a_npc_mole_mg.cpp index 51c6c65f..61480d0b 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_mg.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_mg.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_mole_mg.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_MG, dAcNpcMoleMg_c, fProfile::NPC_MOLE_MG, 0x7D, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_mole_normal.cpp b/src/REL/d/a/npc/d_a_npc_mole_normal.cpp index 52ac1dba..2874e992 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_normal.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_normal.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_normal.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_NORMAL, NPC_MOLE_NML_CLASS, fProfile::NPC_MOLE_NORMAL, 0x7F, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_mole_normal2.cpp b/src/REL/d/a/npc/d_a_npc_mole_normal2.cpp index 63088b4e..ed5d40a7 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_normal2.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_normal2.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_normal2.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_NORMAL2, NPC_MOLE_NML_CLASS, fProfile::NPC_MOLE_NORMAL2, 0x80, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_mole_sal.cpp b/src/REL/d/a/npc/d_a_npc_mole_sal.cpp index c0bbf0c5..262d3532 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_sal.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_sal.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_sal.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_SAL, dAcNpcMoleSal_c, fProfile::NPC_MOLE_SAL, 0x85, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_mole_tackle.cpp b/src/REL/d/a/npc/d_a_npc_mole_tackle.cpp index 8deb517c..f4cf2429 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_tackle.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_tackle.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_tackle.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_TACKLE, dAcNpcMoleTackle_c, fProfile::NPC_MOLE_TACKLE, 0x82, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_mole_tackle2.cpp b/src/REL/d/a/npc/d_a_npc_mole_tackle2.cpp index 39beba4c..5a6a226b 100644 --- a/src/REL/d/a/npc/d_a_npc_mole_tackle2.cpp +++ b/src/REL/d/a/npc/d_a_npc_mole_tackle2.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_mole_tackle2.h" SPECIAL_ACTOR_PROFILE(NPC_MOLE_TACKLE2, dAcNpcMoleTackle2_c, fProfile::NPC_MOLE_TACKLE2, 0x83, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_old_impa.cpp b/src/REL/d/a/npc/d_a_npc_old_impa.cpp index 83b2de56..e576607e 100644 --- a/src/REL/d/a/npc/d_a_npc_old_impa.cpp +++ b/src/REL/d/a/npc/d_a_npc_old_impa.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_old_impa.h" SPECIAL_ACTOR_PROFILE(NPC_OIM, dAcNpcOim_c, fProfile::NPC_OIM, 0x60, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_ord_kyui.cpp b/src/REL/d/a/npc/d_a_npc_ord_kyui.cpp index 14e3fd4c..ae446b42 100644 --- a/src/REL/d/a/npc/d_a_npc_ord_kyui.cpp +++ b/src/REL/d/a/npc/d_a_npc_ord_kyui.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_ord_kyui.h" SPECIAL_ACTOR_PROFILE(NPC_ORD_KYUI, dAcNpcOrdKyui_c, fProfile::NPC_ORD_KYUI, 0x44, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_pumpkin_clay_shooting.cpp b/src/REL/d/a/npc/d_a_npc_pumpkin_clay_shooting.cpp index d708de66..294c0c81 100644 --- a/src/REL/d/a/npc/d_a_npc_pumpkin_clay_shooting.cpp +++ b/src/REL/d/a/npc/d_a_npc_pumpkin_clay_shooting.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_pumpkin_clay_shooting.h" SPECIAL_ACTOR_PROFILE(NPC_PCS, dAcNpcPcs_c, fProfile::NPC_PCS, 0x6A, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_pumpkin_daughter.cpp b/src/REL/d/a/npc/d_a_npc_pumpkin_daughter.cpp index 3b40c8df..026fcd4f 100644 --- a/src/REL/d/a/npc/d_a_npc_pumpkin_daughter.cpp +++ b/src/REL/d/a/npc/d_a_npc_pumpkin_daughter.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_pumpkin_daughter.h" SPECIAL_ACTOR_PROFILE(NPC_PDU, dAcNpcPdu_c, fProfile::NPC_PDU, 0x68, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_pumpkin_master.cpp b/src/REL/d/a/npc/d_a_npc_pumpkin_master.cpp index 5f72a5b1..46967576 100644 --- a/src/REL/d/a/npc/d_a_npc_pumpkin_master.cpp +++ b/src/REL/d/a/npc/d_a_npc_pumpkin_master.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_pumpkin_master.h" SPECIAL_ACTOR_PROFILE(NPC_PMA, dAcNpcPma_c, fProfile::NPC_PMA, 0x67, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_regret_rival.cpp b/src/REL/d/a/npc/d_a_npc_regret_rival.cpp index 25bd7a7d..29dc2f29 100644 --- a/src/REL/d/a/npc/d_a_npc_regret_rival.cpp +++ b/src/REL/d/a/npc/d_a_npc_regret_rival.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_regret_rival.h" SPECIAL_ACTOR_PROFILE(NPC_REGRET_RIVAL, dAcNpcRegretRvl_c, fProfile::NPC_REGRET_RIVAL, 0x92, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_rescue.cpp b/src/REL/d/a/npc/d_a_npc_rescue.cpp index e9d68aa0..88c2db71 100644 --- a/src/REL/d/a/npc/d_a_npc_rescue.cpp +++ b/src/REL/d/a/npc/d_a_npc_rescue.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_rescue.h" SPECIAL_ACTOR_PROFILE(NPC_RESCUE, dAcNpcRescue_c, fProfile::NPC_RESCUE, 0x93, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_rival.cpp b/src/REL/d/a/npc/d_a_npc_rival.cpp index bf91b781..c985f2f7 100644 --- a/src/REL/d/a/npc/d_a_npc_rival.cpp +++ b/src/REL/d/a/npc/d_a_npc_rival.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_rival.h" SPECIAL_ACTOR_PROFILE(NPC_RVL, dAcNpcRvl_c, fProfile::NPC_RVL, 0x31, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_rival_lod.cpp b/src/REL/d/a/npc/d_a_npc_rival_lod.cpp index 7b15a542..2fe0b142 100644 --- a/src/REL/d/a/npc/d_a_npc_rival_lod.cpp +++ b/src/REL/d/a/npc/d_a_npc_rival_lod.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_rival_lod.h" SPECIAL_ACTOR_PROFILE(NPC_RIVAL_LOD, dAcNpcRivalLOD_c, fProfile::NPC_RIVAL_LOD, 0x32, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_salbage_morry.cpp b/src/REL/d/a/npc/d_a_npc_salbage_morry.cpp index 6c696be0..f68f24dc 100644 --- a/src/REL/d/a/npc/d_a_npc_salbage_morry.cpp +++ b/src/REL/d/a/npc/d_a_npc_salbage_morry.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_salbage_morry.h" SPECIAL_ACTOR_PROFILE(NPC_SALBAGE_MORRY, dAcNpcSalbageMorry_c, fProfile::NPC_SALBAGE_MORRY, 0x48, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_salbage_robot.cpp b/src/REL/d/a/npc/d_a_npc_salbage_robot.cpp index f5579edf..0bfd74fc 100644 --- a/src/REL/d/a/npc/d_a_npc_salbage_robot.cpp +++ b/src/REL/d/a/npc/d_a_npc_salbage_robot.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_salbage_robot.h" SPECIAL_ACTOR_PROFILE(NPC_SLB, dAcNpcSlb_c, fProfile::NPC_SLB, 0x94, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_salbage_robot_fly.cpp b/src/REL/d/a/npc/d_a_npc_salbage_robot_fly.cpp index 47f293df..65b6cb65 100644 --- a/src/REL/d/a/npc/d_a_npc_salbage_robot_fly.cpp +++ b/src/REL/d/a/npc/d_a_npc_salbage_robot_fly.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_salbage_robot_fly.h" SPECIAL_ACTOR_PROFILE(NPC_SLFL, dAcNpcSalbageRobotFly_c, fProfile::NPC_SLFL, 0x8A, 0, 4); diff --git a/src/REL/d/a/npc/d_a_npc_salbage_robot_fly_base.cpp b/src/REL/d/a/npc/d_a_npc_salbage_robot_fly_base.cpp index 25852131..5d0a1fdc 100644 --- a/src/REL/d/a/npc/d_a_npc_salbage_robot_fly_base.cpp +++ b/src/REL/d/a/npc/d_a_npc_salbage_robot_fly_base.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_salbage_robot_fly_base.h" SPECIAL_ACTOR_PROFILE(NPC_SLFB, dAcNpcSalbageRobotFlyBase_c, fProfile::NPC_SLFB, 0x88, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp b/src/REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp index d1628b48..54dea9d7 100644 --- a/src/REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp +++ b/src/REL/d/a/npc/d_a_npc_salbage_robot_repair.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_salbage_robot_repair.h" SPECIAL_ACTOR_PROFILE(NPC_SLRP, dAcNpcSalbageRobotRepair_c, fProfile::NPC_SLRP, 0x89, 0, 7); diff --git a/src/REL/d/a/npc/d_a_npc_salesman_s.cpp b/src/REL/d/a/npc/d_a_npc_salesman_s.cpp index 0d04d598..c95f5379 100644 --- a/src/REL/d/a/npc/d_a_npc_salesman_s.cpp +++ b/src/REL/d/a/npc/d_a_npc_salesman_s.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_salesman_s.h" SPECIAL_ACTOR_PROFILE(NPC_SALESMAN_S, dAcNpcSalesmanS_c, fProfile::NPC_SALESMAN_S, 0x4A, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_saltalk.cpp b/src/REL/d/a/npc/d_a_npc_saltalk.cpp index 28461ed0..f7180b30 100644 --- a/src/REL/d/a/npc/d_a_npc_saltalk.cpp +++ b/src/REL/d/a/npc/d_a_npc_saltalk.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_saltalk.h" SPECIAL_ACTOR_PROFILE(NPC_SLTK, dAcNpcSltk_c, fProfile::NPC_SLTK, 0x63, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_senpai.cpp b/src/REL/d/a/npc/d_a_npc_senpai.cpp index 56510851..da117c66 100644 --- a/src/REL/d/a/npc/d_a_npc_senpai.cpp +++ b/src/REL/d/a/npc/d_a_npc_senpai.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_senpai.h" SPECIAL_ACTOR_PROFILE(NPC_SENPAI, dAcNpcSenpai_c, fProfile::NPC_SENPAI, 0x90, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_senpai_b.cpp b/src/REL/d/a/npc/d_a_npc_senpai_b.cpp index 676cdc70..4373ad47 100644 --- a/src/REL/d/a/npc/d_a_npc_senpai_b.cpp +++ b/src/REL/d/a/npc/d_a_npc_senpai_b.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_senpai_b.h" SPECIAL_ACTOR_PROFILE(NPC_SENPAI_B, dAcNpcSenpaiB_c, fProfile::NPC_SENPAI_B, 0x91, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_senpaia_mother.cpp b/src/REL/d/a/npc/d_a_npc_senpaia_mother.cpp index ed682998..f577b3e8 100644 --- a/src/REL/d/a/npc/d_a_npc_senpaia_mother.cpp +++ b/src/REL/d/a/npc/d_a_npc_senpaia_mother.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_senpaia_mother.h" SPECIAL_ACTOR_PROFILE(NPC_SENPAIA_MOTHER, dAcNpcSenpaiAMother_c, fProfile::NPC_SENPAIA_MOTHER, 0x54, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_senpaia_mother_lod.cpp b/src/REL/d/a/npc/d_a_npc_senpaia_mother_lod.cpp index 8a0a40d2..36a01e2d 100644 --- a/src/REL/d/a/npc/d_a_npc_senpaia_mother_lod.cpp +++ b/src/REL/d/a/npc/d_a_npc_senpaia_mother_lod.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_senpaia_mother_lod.h" SPECIAL_ACTOR_PROFILE(NPC_SENPAIA_MOTHER_LOD, dAcNpcSenpaiAMotherLOD_c, fProfile::NPC_SENPAIA_MOTHER_LOD, 0x55, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_shinkan.cpp b/src/REL/d/a/npc/d_a_npc_shinkan.cpp index ab5739e2..b8d7c47b 100644 --- a/src/REL/d/a/npc/d_a_npc_shinkan.cpp +++ b/src/REL/d/a/npc/d_a_npc_shinkan.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_shinkan.h" SPECIAL_ACTOR_PROFILE(NPC_SKN, dAcNpcSkn_c, fProfile::NPC_SKN, 0x36, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_shinkan2.cpp b/src/REL/d/a/npc/d_a_npc_shinkan2.cpp index ae5cd8ce..26e55b8c 100644 --- a/src/REL/d/a/npc/d_a_npc_shinkan2.cpp +++ b/src/REL/d/a/npc/d_a_npc_shinkan2.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_shinkan2.h" SPECIAL_ACTOR_PROFILE(NPC_SKN2, dAcNpcSkn2_c, fProfile::NPC_SKN2, 0x37, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_boy.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_boy.cpp index d7474c3a..39a127ae 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_boy.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_boy.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_boy.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_BOY, dAcNpcSorajimaBoy_c, fProfile::NPC_SORAJIMA_BOY, 0x77, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_father.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_father.cpp index ec3db5f1..5d8e10a9 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_father.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_father.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_father.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_FATHER, dAcNpcSorajimaFather_c, fProfile::NPC_SORAJIMA_FATHER, 0x3F, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_female.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_female.cpp index b0eec9a5..0c868303 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_female.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_female.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_female.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_FEMALE, dAcNpcSorajimaFemale_c, fProfile::NPC_SORAJIMA_FEMALE, 0x5B, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_girl.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_girl.cpp index bd5df586..4801db1f 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_girl.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_girl.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_girl.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_GIRL, dAcNpcSorajimaGirl_c, fProfile::NPC_SORAJIMA_GIRL, 0x41, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_male.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_male.cpp index ffca2bb2..4040faeb 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_male.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_male.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_male.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_MALE, dAcNpcSorajimaMale_c, fProfile::NPC_SORAJIMA_MALE, 0x5A, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_male2.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_male2.cpp index c42af1e7..29e9f863 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_male2.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_male2.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_male2.h" SPECIAL_ACTOR_PROFILE(NPC_SMA2, dAcNpcSma2_c, fProfile::NPC_SMA2, 0x66, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_male3.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_male3.cpp index fd7fd5ff..f52b0981 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_male3.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_male3.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_male3.h" SPECIAL_ACTOR_PROFILE(NPC_SMA3, dAcNpcSma3_c, fProfile::NPC_SMA3, 0x65, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_man_d.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_man_d.cpp index 37957f9f..ebf421dc 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_man_d.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_man_d.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_man_d.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_MAN_D, dAcNpcSoManD_c, fProfile::NPC_SORAJIMA_MAN_D, 0x57, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_man_e.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_man_e.cpp index aed4be4a..709c0698 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_man_e.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_man_e.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_man_e.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_MAN_E, dAcNpcSoManE_c, fProfile::NPC_SORAJIMA_MAN_E, 0x56, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_sorajima_mother.cpp b/src/REL/d/a/npc/d_a_npc_sorajima_mother.cpp index 1c28f944..144e851d 100644 --- a/src/REL/d/a/npc/d_a_npc_sorajima_mother.cpp +++ b/src/REL/d/a/npc/d_a_npc_sorajima_mother.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_sorajima_mother.h" SPECIAL_ACTOR_PROFILE(NPC_SORAJIMA_MOTHER, dAcNpcSorajimaMother_c, fProfile::NPC_SORAJIMA_MOTHER, 0x40, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_suisei.cpp b/src/REL/d/a/npc/d_a_npc_suisei.cpp index b47cd656..cd0f296d 100644 --- a/src/REL/d/a/npc/d_a_npc_suisei.cpp +++ b/src/REL/d/a/npc/d_a_npc_suisei.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_suisei.h" SPECIAL_ACTOR_PROFILE(NPC_SUISEI, dAcNpcSuisei_c, fProfile::NPC_SUISEI, 0x7A, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_suisei_normal.cpp b/src/REL/d/a/npc/d_a_npc_suisei_normal.cpp index 40361a78..ec4b4c37 100644 --- a/src/REL/d/a/npc/d_a_npc_suisei_normal.cpp +++ b/src/REL/d/a/npc/d_a_npc_suisei_normal.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_suisei_normal.h" SPECIAL_ACTOR_PROFILE(NPC_SUISEI_NORMAL, dAcNpcSuiseiNml_c, fProfile::NPC_SUISEI_NORMAL, 0x7C, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_suisei_sub.cpp b/src/REL/d/a/npc/d_a_npc_suisei_sub.cpp index d9f70344..b2311108 100644 --- a/src/REL/d/a/npc/d_a_npc_suisei_sub.cpp +++ b/src/REL/d/a/npc/d_a_npc_suisei_sub.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_suisei_sub.h" SPECIAL_ACTOR_PROFILE(NPC_SUISEI_SUB, dAcNpcSuiseiSub_c, fProfile::NPC_SUISEI_SUB, 0x7B, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_terry.cpp b/src/REL/d/a/npc/d_a_npc_terry.cpp index fa31b01c..8d6cd3eb 100644 --- a/src/REL/d/a/npc/d_a_npc_terry.cpp +++ b/src/REL/d/a/npc/d_a_npc_terry.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_terry.h" SPECIAL_ACTOR_PROFILE(NPC_TERRY, dAcNpcTerry_c, fProfile::NPC_TERRY, 0x8C, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_testman.cpp b/src/REL/d/a/npc/d_a_npc_testman.cpp index 582e8af7..0f2a08b2 100644 --- a/src/REL/d/a/npc/d_a_npc_testman.cpp +++ b/src/REL/d/a/npc/d_a_npc_testman.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_testman.h" SPECIAL_ACTOR_PROFILE(NPC_TMN, dAcNpcTmn_c, fProfile::NPC_TMN, 0x49, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_thunder_dragon.cpp b/src/REL/d/a/npc/d_a_npc_thunder_dragon.cpp index e96b5292..8a283d3f 100644 --- a/src/REL/d/a/npc/d_a_npc_thunder_dragon.cpp +++ b/src/REL/d/a/npc/d_a_npc_thunder_dragon.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_thunder_dragon.h" SPECIAL_ACTOR_PROFILE(NPC_TDR, dAcNpcTdr_c, fProfile::NPC_TDR, 0x6C, 0, 4099); diff --git a/src/REL/d/a/npc/d_a_npc_thunder_dragon_bone.cpp b/src/REL/d/a/npc/d_a_npc_thunder_dragon_bone.cpp index 79627c98..5f99c502 100644 --- a/src/REL/d/a/npc/d_a_npc_thunder_dragon_bone.cpp +++ b/src/REL/d/a/npc/d_a_npc_thunder_dragon_bone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/npc/d_a_npc_thunder_dragon_bone.h" SPECIAL_ACTOR_PROFILE(NPC_TDRB, dAcNpcTdrB_c, fProfile::NPC_TDRB, 0x6E, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_thunder_dragon_skull.cpp b/src/REL/d/a/npc/d_a_npc_thunder_dragon_skull.cpp index 40d0f7b0..deddb350 100644 --- a/src/REL/d/a/npc/d_a_npc_thunder_dragon_skull.cpp +++ b/src/REL/d/a/npc/d_a_npc_thunder_dragon_skull.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_thunder_dragon_skull.h" SPECIAL_ACTOR_PROFILE(NPC_TDS, dAcNpcTds_c, fProfile::NPC_TDS, 0x6D, 0, 0); diff --git a/src/REL/d/a/npc/d_a_npc_toilet_ghost.cpp b/src/REL/d/a/npc/d_a_npc_toilet_ghost.cpp index e5253d8e..ecba66b6 100644 --- a/src/REL/d/a/npc/d_a_npc_toilet_ghost.cpp +++ b/src/REL/d/a/npc/d_a_npc_toilet_ghost.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_toilet_ghost.h" SPECIAL_ACTOR_PROFILE(NPC_TOILET_GHOST, dAcNpcToiletGhost_c, fProfile::NPC_TOILET_GHOST, 0x30, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_uranaiya.cpp b/src/REL/d/a/npc/d_a_npc_uranaiya.cpp index 42225ff9..28b1eab7 100644 --- a/src/REL/d/a/npc/d_a_npc_uranaiya.cpp +++ b/src/REL/d/a/npc/d_a_npc_uranaiya.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_uranaiya.h" SPECIAL_ACTOR_PROFILE(NPC_SHA, dAcNpcSha_c, fProfile::NPC_SHA, 0x73, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_volcano_f2_salbo.cpp b/src/REL/d/a/npc/d_a_npc_volcano_f2_salbo.cpp index e9c5fa99..9496a103 100644 --- a/src/REL/d/a/npc/d_a_npc_volcano_f2_salbo.cpp +++ b/src/REL/d/a/npc/d_a_npc_volcano_f2_salbo.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_volcano_f2_salbo.h" SPECIAL_ACTOR_PROFILE(NPC_SLB2, dAcNpcSlb2_c, fProfile::NPC_SLB2, 0x64, 0, 2); diff --git a/src/REL/d/a/npc/d_a_npc_young_impa.cpp b/src/REL/d/a/npc/d_a_npc_young_impa.cpp index ccae15e6..64cfb06c 100644 --- a/src/REL/d/a/npc/d_a_npc_young_impa.cpp +++ b/src/REL/d/a/npc/d_a_npc_young_impa.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_young_impa.h" SPECIAL_ACTOR_PROFILE(NPC_YIM, dAcNpcYim_c, fProfile::NPC_YIM, 0x61, 0, 3); diff --git a/src/REL/d/a/npc/d_a_npc_zelda.cpp b/src/REL/d/a/npc/d_a_npc_zelda.cpp index 9968c5f9..46f83f4c 100644 --- a/src/REL/d/a/npc/d_a_npc_zelda.cpp +++ b/src/REL/d/a/npc/d_a_npc_zelda.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/npc/d_a_npc_zelda.h" SPECIAL_ACTOR_PROFILE(NPC_ZLD, dAcNpcZld_c, fProfile::NPC_ZLD, 0x39, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_B300_sand.cpp b/src/REL/d/a/obj/d_a_obj_B300_sand.cpp index 39138c39..9ca9c5b0 100644 --- a/src/REL/d/a/obj/d_a_obj_B300_sand.cpp +++ b/src/REL/d/a/obj/d_a_obj_B300_sand.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_B300_sand.h" SPECIAL_ACTOR_PROFILE(OBJ_B300_SAND, dAcOB300Sand_c, fProfile::OBJ_B300_SAND, 0x1AF, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_D300.cpp b/src/REL/d/a/obj/d_a_obj_D300.cpp index 836ea427..eba50cd4 100644 --- a/src/REL/d/a/obj/d_a_obj_D300.cpp +++ b/src/REL/d/a/obj/d_a_obj_D300.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_D300.h" SPECIAL_ACTOR_PROFILE(OBJ_D300, dAcOD300_c, fProfile::OBJ_D300, 0x248, 0, 5); diff --git a/src/REL/d/a/obj/d_a_obj_D3_dummy.cpp b/src/REL/d/a/obj/d_a_obj_D3_dummy.cpp index d2e64b16..fe42fcca 100644 --- a/src/REL/d/a/obj/d_a_obj_D3_dummy.cpp +++ b/src/REL/d/a/obj/d_a_obj_D3_dummy.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_D3_dummy.h" SPECIAL_ACTOR_PROFILE(OBJ_D3_DUMMY, dAcOD3Dummy_c, fProfile::OBJ_D3_DUMMY, 0x15E, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_F302_light.cpp b/src/REL/d/a/obj/d_a_obj_F302_light.cpp index b60043b3..3673707f 100644 --- a/src/REL/d/a/obj/d_a_obj_F302_light.cpp +++ b/src/REL/d/a/obj/d_a_obj_F302_light.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_F302_light.h" SPECIAL_ACTOR_PROFILE(OBJ_F302_LIGHT, dAcOF302Light_c, fProfile::OBJ_F302_LIGHT, 0x1B2, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp b/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp index 9dc84cc0..e8f0ee98 100644 --- a/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp +++ b/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_F400_gate_leaf.h" SPECIAL_ACTOR_PROFILE(OBJ_F400_GATE_LEAF, dAcOF400GateLeaf_c, fProfile::OBJ_F400_GATE_LEAF, 0x286, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp b/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp index 68401b72..d6898bde 100644 --- a/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp +++ b/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_F400_gate_seal.h" SPECIAL_ACTOR_PROFILE(OBJ_F400_GATE_SEAL, dAcOF400GateSeal_c, fProfile::OBJ_F400_GATE_SEAL, 0x287, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_amber.cpp b/src/REL/d/a/obj/d_a_obj_amber.cpp index 1b3fd95e..35d50977 100644 --- a/src/REL/d/a/obj/d_a_obj_amber.cpp +++ b/src/REL/d/a/obj/d_a_obj_amber.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_amber.h" SPECIAL_ACTOR_PROFILE(OBJ_AMBER, dAcOAmber_c, fProfile::OBJ_AMBER, 0x284, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_ancient_jewels.cpp b/src/REL/d/a/obj/d_a_obj_ancient_jewels.cpp index 5e7817d0..9c25404f 100644 --- a/src/REL/d/a/obj/d_a_obj_ancient_jewels.cpp +++ b/src/REL/d/a/obj/d_a_obj_ancient_jewels.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ancient_jewels.h" SPECIAL_ACTOR_PROFILE(OBJ_ANCIENT_JEWELS, dAcOAncientJewels_c, fProfile::OBJ_ANCIENT_JEWELS, 0x14C, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_appear_bridge.cpp b/src/REL/d/a/obj/d_a_obj_appear_bridge.cpp index ba87702b..04ea7ed6 100644 --- a/src/REL/d/a/obj/d_a_obj_appear_bridge.cpp +++ b/src/REL/d/a/obj/d_a_obj_appear_bridge.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_appear_bridge.h" + +#include "d/a/d_a_player.h" +#include "d/col/bg/d_bg_s.h" +#include "toBeSorted/area_utils.h" +#include "toBeSorted/room_manager.h" SPECIAL_ACTOR_PROFILE(OBJ_APPEAR_BRIDGE, dAcOappearBridge_c, fProfile::OBJ_APPEAR_BRIDGE, 0x01FC, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_arrow_switch.cpp b/src/REL/d/a/obj/d_a_obj_arrow_switch.cpp index dacb4836..168121b4 100644 --- a/src/REL/d/a/obj/d_a_obj_arrow_switch.cpp +++ b/src/REL/d/a/obj/d_a_obj_arrow_switch.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_arrow_switch.h" SPECIAL_ACTOR_PROFILE(OBJ_ARROW_SWITCH, dAcOarrowSwitch_c, fProfile::OBJ_ARROW_SWITCH, 0x1B5, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_asura_pillar.cpp b/src/REL/d/a/obj/d_a_obj_asura_pillar.cpp index 3bcc44c0..2fd8465c 100644 --- a/src/REL/d/a/obj/d_a_obj_asura_pillar.cpp +++ b/src/REL/d/a/obj/d_a_obj_asura_pillar.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_asura_pillar.h" SPECIAL_ACTOR_PROFILE(ASURA_PILLAR, dAcAsuraPillar_c, fProfile::ASURA_PILLAR, 0x11C, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_asura_sword.cpp b/src/REL/d/a/obj/d_a_obj_asura_sword.cpp index 3890bffc..8fe79571 100644 --- a/src/REL/d/a/obj/d_a_obj_asura_sword.cpp +++ b/src/REL/d/a/obj/d_a_obj_asura_sword.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_asura_sword.h" SPECIAL_ACTOR_PROFILE(ASURA_SWORD, dAcAsuraSword_c, fProfile::ASURA_SWORD, 0x11B, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_ballista.cpp b/src/REL/d/a/obj/d_a_obj_ballista.cpp index b4550efb..50123fb5 100644 --- a/src/REL/d/a/obj/d_a_obj_ballista.cpp +++ b/src/REL/d/a/obj/d_a_obj_ballista.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ballista.h" SPECIAL_ACTOR_PROFILE(OBJ_BALLISTA, dAcOBallista_c, fProfile::OBJ_BALLISTA, 0x23C, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_ballista_f3.cpp b/src/REL/d/a/obj/d_a_obj_ballista_f3.cpp index 2822bdc1..233c8209 100644 --- a/src/REL/d/a/obj/d_a_obj_ballista_f3.cpp +++ b/src/REL/d/a/obj/d_a_obj_ballista_f3.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ballista_f3.h" SPECIAL_ACTOR_PROFILE(OBJ_BALLISTA_F3, dAcOBallistaF3_c, fProfile::OBJ_BALLISTA_F3, 0x23E, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_ballista_handle.cpp b/src/REL/d/a/obj/d_a_obj_ballista_handle.cpp index 6b97f164..98427af4 100644 --- a/src/REL/d/a/obj/d_a_obj_ballista_handle.cpp +++ b/src/REL/d/a/obj/d_a_obj_ballista_handle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ballista_handle.h" SPECIAL_ACTOR_PROFILE(OBJ_BALLISTA_HANDLE, dAcOBallistaHandle_c, fProfile::OBJ_BALLISTA_HANDLE, 0x23D, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_bamboo.cpp b/src/REL/d/a/obj/d_a_obj_bamboo.cpp index 77f79b40..59b8402f 100644 --- a/src/REL/d/a/obj/d_a_obj_bamboo.cpp +++ b/src/REL/d/a/obj/d_a_obj_bamboo.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bamboo.h" SPECIAL_ACTOR_PROFILE(OBJ_BAMBOO, dAcObamboo_c, fProfile::OBJ_BAMBOO, 0x131, 0, 35); diff --git a/src/REL/d/a/obj/d_a_obj_bamboo_island.cpp b/src/REL/d/a/obj/d_a_obj_bamboo_island.cpp index ac12ff8b..cf4be45c 100644 --- a/src/REL/d/a/obj/d_a_obj_bamboo_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_bamboo_island.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/a/obj/d_a_obj_bamboo_island.h" + +#include "d/col/bg/d_bg_s.h" +#include "toBeSorted/item_story_flag_manager.h" +#include "toBeSorted/room_manager.h" const f32 dAcObambooIsland_c::unusedFloat1 = 100000.0f; const f32 dAcObambooIsland_c::unusedFloat2 = 0.0f; diff --git a/src/REL/d/a/obj/d_a_obj_barrel.cpp b/src/REL/d/a/obj/d_a_obj_barrel.cpp index 7b617644..ce38fbff 100644 --- a/src/REL/d/a/obj/d_a_obj_barrel.cpp +++ b/src/REL/d/a/obj/d_a_obj_barrel.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_barrel.h" SPECIAL_ACTOR_PROFILE(OBJ_BARREL, dAcOBarrel_c, fProfile::OBJ_BARREL, 0x239, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bb_bridge.cpp b/src/REL/d/a/obj/d_a_obj_bb_bridge.cpp index 4481b305..c95fb4dd 100644 --- a/src/REL/d/a/obj/d_a_obj_bb_bridge.cpp +++ b/src/REL/d/a/obj/d_a_obj_bb_bridge.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bb_bridge.h" SPECIAL_ACTOR_PROFILE(OBJ_BB_BRIDGE, dAcObbBridge_c, fProfile::OBJ_BB_BRIDGE, 0x1A1, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_bb_broken_parts.cpp b/src/REL/d/a/obj/d_a_obj_bb_broken_parts.cpp index 9a4697fe..a8e9402b 100644 --- a/src/REL/d/a/obj/d_a_obj_bb_broken_parts.cpp +++ b/src/REL/d/a/obj/d_a_obj_bb_broken_parts.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bb_broken_parts.h" SPECIAL_ACTOR_PROFILE(OBJ_BB_BROKEN_PARTS, dAcObbBrokenParts_c, fProfile::OBJ_BB_BROKEN_PARTS, 0x215, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bb_objects.cpp b/src/REL/d/a/obj/d_a_obj_bb_objects.cpp index b103be8c..204adf9a 100644 --- a/src/REL/d/a/obj/d_a_obj_bb_objects.cpp +++ b/src/REL/d/a/obj/d_a_obj_bb_objects.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bb_objects.h" SPECIAL_ACTOR_PROFILE(OBJ_BB_OBJECTS, dAcObbObjects_c, fProfile::OBJ_BB_OBJECTS, 0x1C7, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bblargebomb.cpp b/src/REL/d/a/obj/d_a_obj_bblargebomb.cpp index 51b970cd..65b89416 100644 --- a/src/REL/d/a/obj/d_a_obj_bblargebomb.cpp +++ b/src/REL/d/a/obj/d_a_obj_bblargebomb.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bblargebomb.h" SPECIAL_ACTOR_PROFILE(OBJ_BBLARGEBOMB, dAcOBblargebomb_c, fProfile::OBJ_BBLARGEBOMB, 0xA7, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bbstone.cpp b/src/REL/d/a/obj/d_a_obj_bbstone.cpp index 6bb0141e..be7d7efc 100644 --- a/src/REL/d/a/obj/d_a_obj_bbstone.cpp +++ b/src/REL/d/a/obj/d_a_obj_bbstone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bbstone.h" SPECIAL_ACTOR_PROFILE(OBJ_BSTN, dAcOBBStone, fProfile::OBJ_BSTN, 0xA5, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bell.cpp b/src/REL/d/a/obj/d_a_obj_bell.cpp index 503b3b34..a23ab54e 100644 --- a/src/REL/d/a/obj/d_a_obj_bell.cpp +++ b/src/REL/d/a/obj/d_a_obj_bell.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bell.h" SPECIAL_ACTOR_PROFILE(OBJ_BELL, dAcObell_c, fProfile::OBJ_BELL, 0x208, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_belt_cvr.cpp b/src/REL/d/a/obj/d_a_obj_belt_cvr.cpp index 75657138..e48b9f7f 100644 --- a/src/REL/d/a/obj/d_a_obj_belt_cvr.cpp +++ b/src/REL/d/a/obj/d_a_obj_belt_cvr.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_belt_cvr.h" SPECIAL_ACTOR_PROFILE(OBJ_BELT_CVR, dAcObeltCvr_c, fProfile::OBJ_BELT_CVR, 0x271, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_belt_obstacle.cpp b/src/REL/d/a/obj/d_a_obj_belt_obstacle.cpp index 7bce929b..109a7ee4 100644 --- a/src/REL/d/a/obj/d_a_obj_belt_obstacle.cpp +++ b/src/REL/d/a/obj/d_a_obj_belt_obstacle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_belt_obstacle.h" SPECIAL_ACTOR_PROFILE(OBJ_BELT_OBSTACLE, dAcObeltObstacle_c, fProfile::OBJ_BELT_OBSTACLE, 0x270, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_bg.cpp b/src/REL/d/a/obj/d_a_obj_bg.cpp index e4435856..f8504d5b 100644 --- a/src/REL/d/a/obj/d_a_obj_bg.cpp +++ b/src/REL/d/a/obj/d_a_obj_bg.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_bg.h" SPECIAL_ACTOR_PROFILE(OBJ_BG, dAcObg_c, fProfile::OBJ_BG, 0x18C, 0, 148); diff --git a/src/REL/d/a/obj/d_a_obj_bigbomb_flower.cpp b/src/REL/d/a/obj/d_a_obj_bigbomb_flower.cpp index 49d3df17..ea7bdd13 100644 --- a/src/REL/d/a/obj/d_a_obj_bigbomb_flower.cpp +++ b/src/REL/d/a/obj/d_a_obj_bigbomb_flower.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bigbomb_flower.h" SPECIAL_ACTOR_PROFILE(OBJ_BIGBOMB_FLOWER, dAcOBBombFlower_c, fProfile::OBJ_BIGBOMB_FLOWER, 0xA6, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bird_sp.cpp b/src/REL/d/a/obj/d_a_obj_bird_sp.cpp index 40f2b574..f188f860 100644 --- a/src/REL/d/a/obj/d_a_obj_bird_sp.cpp +++ b/src/REL/d/a/obj/d_a_obj_bird_sp.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_bird_sp.h" SPECIAL_ACTOR_PROFILE(OBJ_BIRD_SP_UP, dAcObjBirdSp_c, fProfile::OBJ_BIRD_SP_UP, 0x260, 0, 1); diff --git a/src/REL/d/a/obj/d_a_obj_bird_statue.cpp b/src/REL/d/a/obj/d_a_obj_bird_statue.cpp index 1243f87d..5d98fe9f 100644 --- a/src/REL/d/a/obj/d_a_obj_bird_statue.cpp +++ b/src/REL/d/a/obj/d_a_obj_bird_statue.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_bird_statue.h" SPECIAL_ACTOR_PROFILE(OBJ_BIRD_STATUE, dAcOBirdStatue_c, fProfile::OBJ_BIRD_STATUE, 0x285, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_blade.cpp b/src/REL/d/a/obj/d_a_obj_blade.cpp index e3f17985..7ac3a94b 100644 --- a/src/REL/d/a/obj/d_a_obj_blade.cpp +++ b/src/REL/d/a/obj/d_a_obj_blade.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_blade.h" SPECIAL_ACTOR_PROFILE(OBJ_BLADE, dAcOblade_c, fProfile::OBJ_BLADE, 0x1E4, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_blast_rock.cpp b/src/REL/d/a/obj/d_a_obj_blast_rock.cpp index d011e6a2..51277bb8 100644 --- a/src/REL/d/a/obj/d_a_obj_blast_rock.cpp +++ b/src/REL/d/a/obj/d_a_obj_blast_rock.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_blast_rock.h" SPECIAL_ACTOR_PROFILE(OBJ_BLAST_ROCK, dAcOBlastRock_c, fProfile::OBJ_BLAST_ROCK, 0x199, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_block_rope.cpp b/src/REL/d/a/obj/d_a_obj_block_rope.cpp index aa43f487..e9e6b46a 100644 --- a/src/REL/d/a/obj/d_a_obj_block_rope.cpp +++ b/src/REL/d/a/obj/d_a_obj_block_rope.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_block_rope.h" SPECIAL_ACTOR_PROFILE(OBJ_BLOCK_ROPE, dAcOblockRope_c, fProfile::OBJ_BLOCK_ROPE, 0x264, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_block_underground.cpp b/src/REL/d/a/obj/d_a_obj_block_underground.cpp index 387da73f..d458a862 100644 --- a/src/REL/d/a/obj/d_a_obj_block_underground.cpp +++ b/src/REL/d/a/obj/d_a_obj_block_underground.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_block_underground.h" SPECIAL_ACTOR_PROFILE(OBJ_BLOCK_UNDERGROUND, dAcOBlockUnderground, fProfile::OBJ_BLOCK_UNDERGROUND, 0x13F, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_blow_coal.cpp b/src/REL/d/a/obj/d_a_obj_blow_coal.cpp index 1b025d3a..786ee1ac 100644 --- a/src/REL/d/a/obj/d_a_obj_blow_coal.cpp +++ b/src/REL/d/a/obj/d_a_obj_blow_coal.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_blow_coal.h" SPECIAL_ACTOR_PROFILE(OBJ_BLOW_COAL, dAcOblowCoal_c, fProfile::OBJ_BLOW_COAL, 0x1CD, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_boat.cpp b/src/REL/d/a/obj/d_a_obj_boat.cpp index bd6e911c..b338abd5 100644 --- a/src/REL/d/a/obj/d_a_obj_boat.cpp +++ b/src/REL/d/a/obj/d_a_obj_boat.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_boat.h" SPECIAL_ACTOR_PROFILE(OBJ_BOAT, dAcOBoat_c, fProfile::OBJ_BOAT, 0x23A, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_boxcage_F300.cpp b/src/REL/d/a/obj/d_a_obj_boxcage_F300.cpp index 203b256e..90170e7b 100644 --- a/src/REL/d/a/obj/d_a_obj_boxcage_F300.cpp +++ b/src/REL/d/a/obj/d_a_obj_boxcage_F300.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_boxcage_F300.h" SPECIAL_ACTOR_PROFILE(OBJ_BOXCAGE_F300, dAcOBoxCageF300_c, fProfile::OBJ_BOXCAGE_F300, 0x179, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bridge_bone.cpp b/src/REL/d/a/obj/d_a_obj_bridge_bone.cpp index cd5c1660..0eaf1f63 100644 --- a/src/REL/d/a/obj/d_a_obj_bridge_bone.cpp +++ b/src/REL/d/a/obj/d_a_obj_bridge_bone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bridge_bone.h" SPECIAL_ACTOR_PROFILE(OBJ_BRIDGE_BONE, dAcOBridgeBone_c, fProfile::OBJ_BRIDGE_BONE, 0x1A0, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_bridge_building.cpp b/src/REL/d/a/obj/d_a_obj_bridge_building.cpp index 56b67e00..2db1bb44 100644 --- a/src/REL/d/a/obj/d_a_obj_bridge_building.cpp +++ b/src/REL/d/a/obj/d_a_obj_bridge_building.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bridge_building.h" SPECIAL_ACTOR_PROFILE(OBJ_BRIDGE_BUILDING, dAcObridgeBuilding_c, fProfile::OBJ_BRIDGE_BUILDING, 0x1C8, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_bridge_fall.cpp b/src/REL/d/a/obj/d_a_obj_bridge_fall.cpp index c782e016..46af7083 100644 --- a/src/REL/d/a/obj/d_a_obj_bridge_fall.cpp +++ b/src/REL/d/a/obj/d_a_obj_bridge_fall.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bridge_fall.h" SPECIAL_ACTOR_PROFILE(OBJ_BRIDGE_FALL, dAcOBridgeFall_c, fProfile::OBJ_BRIDGE_FALL, 0x230, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_bridge_step.cpp b/src/REL/d/a/obj/d_a_obj_bridge_step.cpp index 97110d78..9c478e17 100644 --- a/src/REL/d/a/obj/d_a_obj_bridge_step.cpp +++ b/src/REL/d/a/obj/d_a_obj_bridge_step.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bridge_step.h" SPECIAL_ACTOR_PROFILE(OBJ_BRIDGE_STEP, dAcOBridgeStep_c, fProfile::OBJ_BRIDGE_STEP, 0x231, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_bridge_stretch.cpp b/src/REL/d/a/obj/d_a_obj_bridge_stretch.cpp index 71836da2..1e882cc1 100644 --- a/src/REL/d/a/obj/d_a_obj_bridge_stretch.cpp +++ b/src/REL/d/a/obj/d_a_obj_bridge_stretch.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bridge_stretch.h" SPECIAL_ACTOR_PROFILE(OBJ_BRIDGE_STRETCH, dAcObridgeStretch_c, fProfile::OBJ_BRIDGE_STRETCH, 0x1CC, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_bridge_time.cpp b/src/REL/d/a/obj/d_a_obj_bridge_time.cpp index df46afc2..b94d4398 100644 --- a/src/REL/d/a/obj/d_a_obj_bridge_time.cpp +++ b/src/REL/d/a/obj/d_a_obj_bridge_time.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bridge_time.h" SPECIAL_ACTOR_PROFILE(OBJ_BRIDGE_TIME, dAcOBridgeTime_c, fProfile::OBJ_BRIDGE_TIME, 0x232, 0, 4102); diff --git a/src/REL/d/a/obj/d_a_obj_bstone.cpp b/src/REL/d/a/obj/d_a_obj_bstone.cpp index 811b58be..2f2ba1b2 100644 --- a/src/REL/d/a/obj/d_a_obj_bstone.cpp +++ b/src/REL/d/a/obj/d_a_obj_bstone.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_bstone.h" SPECIAL_ACTOR_PROFILE(OBJ_BSTONE, dAcObstonec, fProfile::OBJ_BSTONE, 0x130, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_bubble.cpp b/src/REL/d/a/obj/d_a_obj_bubble.cpp index d3a0775f..9900b2a4 100644 --- a/src/REL/d/a/obj/d_a_obj_bubble.cpp +++ b/src/REL/d/a/obj/d_a_obj_bubble.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_bubble.h" SPECIAL_ACTOR_PROFILE(OBJ_BUBBLE, dAcObubble_c, fProfile::OBJ_BUBBLE, 0x18E, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_building.cpp b/src/REL/d/a/obj/d_a_obj_building.cpp index 52a5e194..6cd70eec 100644 --- a/src/REL/d/a/obj/d_a_obj_building.cpp +++ b/src/REL/d/a/obj/d_a_obj_building.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_building.h" SPECIAL_ACTOR_PROFILE(OBJ_BUILDING, dAcOBuilding_c, fProfile::OBJ_BUILDING, 0x25A, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_bulb_switch.cpp b/src/REL/d/a/obj/d_a_obj_bulb_switch.cpp index 054ce80c..bd8720ed 100644 --- a/src/REL/d/a/obj/d_a_obj_bulb_switch.cpp +++ b/src/REL/d/a/obj/d_a_obj_bulb_switch.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_bulb_switch.h" SPECIAL_ACTOR_PROFILE(OBJ_BULB_SWITCH, dAcObulbSwitch_c, fProfile::OBJ_BULB_SWITCH, 0x1BC, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_cannon.cpp b/src/REL/d/a/obj/d_a_obj_cannon.cpp index 657652e0..02d3c1c7 100644 --- a/src/REL/d/a/obj/d_a_obj_cannon.cpp +++ b/src/REL/d/a/obj/d_a_obj_cannon.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_cannon.h" SPECIAL_ACTOR_PROFILE(OBJ_CANNON, dAcOcannon_c, fProfile::OBJ_CANNON, 0x1C9, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_cannon_cover.cpp b/src/REL/d/a/obj/d_a_obj_cannon_cover.cpp index 996cd27e..f29207ff 100644 --- a/src/REL/d/a/obj/d_a_obj_cannon_cover.cpp +++ b/src/REL/d/a/obj/d_a_obj_cannon_cover.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_cannon_cover.h" SPECIAL_ACTOR_PROFILE(OBJ_CANNON_COVER, dAcOcannonCover_c, fProfile::OBJ_CANNON_COVER, 0x1D3, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_carry_stone.cpp b/src/REL/d/a/obj/d_a_obj_carry_stone.cpp index 523f8f02..4e211088 100644 --- a/src/REL/d/a/obj/d_a_obj_carry_stone.cpp +++ b/src/REL/d/a/obj/d_a_obj_carry_stone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_carry_stone.h" SPECIAL_ACTOR_PROFILE(OBJ_CARRY_STONE, dAcOcarryStone_c, fProfile::OBJ_CARRY_STONE, 0x12A, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_chair.cpp b/src/REL/d/a/obj/d_a_obj_chair.cpp index 6957ab4b..a516b43e 100644 --- a/src/REL/d/a/obj/d_a_obj_chair.cpp +++ b/src/REL/d/a/obj/d_a_obj_chair.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_chair.h" SPECIAL_ACTOR_PROFILE(OBJ_CHAIR, dAcOChair_c, fProfile::OBJ_CHAIR, 0x196, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_chandelier.cpp b/src/REL/d/a/obj/d_a_obj_chandelier.cpp index 51d26262..b197748a 100644 --- a/src/REL/d/a/obj/d_a_obj_chandelier.cpp +++ b/src/REL/d/a/obj/d_a_obj_chandelier.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_chandelier.h" SPECIAL_ACTOR_PROFILE(OBJ_CHANDELIER, dAcOChandelier_c, fProfile::OBJ_CHANDELIER, 0x14F, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_chest.cpp b/src/REL/d/a/obj/d_a_obj_chest.cpp index 86ed1327..38ad9d16 100644 --- a/src/REL/d/a/obj/d_a_obj_chest.cpp +++ b/src/REL/d/a/obj/d_a_obj_chest.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_chest.h" SPECIAL_ACTOR_PROFILE(OBJ_CHEST, dAcOChest_c, fProfile::OBJ_CHEST, 0x13E, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_city.cpp b/src/REL/d/a/obj/d_a_obj_city.cpp index 8e76928c..66d6c2ac 100644 --- a/src/REL/d/a/obj/d_a_obj_city.cpp +++ b/src/REL/d/a/obj/d_a_obj_city.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_city.h" SPECIAL_ACTOR_PROFILE(OBJ_CITY, dAcOcity_c, fProfile::OBJ_CITY, 0x1F7, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_city_water.cpp b/src/REL/d/a/obj/d_a_obj_city_water.cpp index fb766fb4..d81be977 100644 --- a/src/REL/d/a/obj/d_a_obj_city_water.cpp +++ b/src/REL/d/a/obj/d_a_obj_city_water.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_city_water.h" SPECIAL_ACTOR_PROFILE(OBJ_CITY_WATER, dAcOcityWater_c, fProfile::OBJ_CITY_WATER, 0x20E, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_claw_shot_tg.cpp b/src/REL/d/a/obj/d_a_obj_claw_shot_tg.cpp index c3ccee17..ed9dc94f 100644 --- a/src/REL/d/a/obj/d_a_obj_claw_shot_tg.cpp +++ b/src/REL/d/a/obj/d_a_obj_claw_shot_tg.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_claw_shot_tg.h" SPECIAL_ACTOR_PROFILE(OBJ_CLAW_SHOT_TG, dAcOclawShotTg_c, fProfile::OBJ_CLAW_SHOT_TG, 0x1BB, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_clearness_wall.cpp b/src/REL/d/a/obj/d_a_obj_clearness_wall.cpp index b100db14..3d074d69 100644 --- a/src/REL/d/a/obj/d_a_obj_clearness_wall.cpp +++ b/src/REL/d/a/obj/d_a_obj_clearness_wall.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_clearness_wall.h" SPECIAL_ACTOR_PROFILE(OBJ_CLEARNESS_WALL, dAcOclearnessWall_c, fProfile::OBJ_CLEARNESS_WALL, 0x15B, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_clef.cpp b/src/REL/d/a/obj/d_a_obj_clef.cpp index 6d09c04d..b2cfb03f 100644 --- a/src/REL/d/a/obj/d_a_obj_clef.cpp +++ b/src/REL/d/a/obj/d_a_obj_clef.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_clef.h" SPECIAL_ACTOR_PROFILE(OBJ_CLEF, dAcOClef_c, fProfile::OBJ_CLEF, 0x2D, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_cloud_dive.cpp b/src/REL/d/a/obj/d_a_obj_cloud_dive.cpp index bdd6cd94..df3e3ac6 100644 --- a/src/REL/d/a/obj/d_a_obj_cloud_dive.cpp +++ b/src/REL/d/a/obj/d_a_obj_cloud_dive.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_cloud_dive.h" SPECIAL_ACTOR_PROFILE(OBJ_CLOUD_DIVE, dAcOcloudDive_c, fProfile::OBJ_CLOUD_DIVE, 0x1C2, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_col.cpp b/src/REL/d/a/obj/d_a_obj_col.cpp index 5322917b..a823fffe 100644 --- a/src/REL/d/a/obj/d_a_obj_col.cpp +++ b/src/REL/d/a/obj/d_a_obj_col.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_col.h" SPECIAL_ACTOR_PROFILE(OBJ_COL, dAcOCol_c, fProfile::OBJ_COL, 0x257, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_control_panel.cpp b/src/REL/d/a/obj/d_a_obj_control_panel.cpp index 7a0e044a..9e16c8bc 100644 --- a/src/REL/d/a/obj/d_a_obj_control_panel.cpp +++ b/src/REL/d/a/obj/d_a_obj_control_panel.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_control_panel.h" SPECIAL_ACTOR_PROFILE(OBJ_CONTROL_PANEL, dAcOCtrlPnl_c, fProfile::OBJ_CONTROL_PANEL, 0x159, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_cumul_cloud.cpp b/src/REL/d/a/obj/d_a_obj_cumul_cloud.cpp index 591f037f..2505d351 100644 --- a/src/REL/d/a/obj/d_a_obj_cumul_cloud.cpp +++ b/src/REL/d/a/obj/d_a_obj_cumul_cloud.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_cumul_cloud.h" SPECIAL_ACTOR_PROFILE(OBJ_CUMUL_CLOUD, dAcOcumulCloud_c, fProfile::OBJ_CUMUL_CLOUD, 0x201, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_daynight.cpp b/src/REL/d/a/obj/d_a_obj_daynight.cpp index dfc8a26e..55e1e15c 100644 --- a/src/REL/d/a/obj/d_a_obj_daynight.cpp +++ b/src/REL/d/a/obj/d_a_obj_daynight.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_daynight.h" SPECIAL_ACTOR_PROFILE(OBJ_DAYNIGHT, dAcODayNight_c, fProfile::OBJ_DAYNIGHT, 0x259, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_decoA.cpp b/src/REL/d/a/obj/d_a_obj_decoA.cpp index 2f77c9d6..c0dc72f8 100644 --- a/src/REL/d/a/obj/d_a_obj_decoA.cpp +++ b/src/REL/d/a/obj/d_a_obj_decoA.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_decoA.h" SPECIAL_ACTOR_PROFILE(OBJ_DECOA, dAcODecoA_c, fProfile::OBJ_DECOA, 0x160, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_decoB.cpp b/src/REL/d/a/obj/d_a_obj_decoB.cpp index c6e8e8f1..2fb170c0 100644 --- a/src/REL/d/a/obj/d_a_obj_decoB.cpp +++ b/src/REL/d/a/obj/d_a_obj_decoB.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_decoB.h" SPECIAL_ACTOR_PROFILE(OBJ_DECOB, dAcODecoB_c, fProfile::OBJ_DECOB, 0x161, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_desert.cpp b/src/REL/d/a/obj/d_a_obj_desert.cpp index 354e2ceb..a9cd13e4 100644 --- a/src/REL/d/a/obj/d_a_obj_desert.cpp +++ b/src/REL/d/a/obj/d_a_obj_desert.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_desert.h" SPECIAL_ACTOR_PROFILE(OBJ_DESERT, dAcODesert, fProfile::OBJ_DESERT, 0x274, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_desert_ago.cpp b/src/REL/d/a/obj/d_a_obj_desert_ago.cpp index af8b222c..43ecdb72 100644 --- a/src/REL/d/a/obj/d_a_obj_desert_ago.cpp +++ b/src/REL/d/a/obj/d_a_obj_desert_ago.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_desert_ago.h" SPECIAL_ACTOR_PROFILE(OBJ_DESERT_AGO, dAcODesertAgo_c, fProfile::OBJ_DESERT_AGO, 0x1A9, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_desert_debris.cpp b/src/REL/d/a/obj/d_a_obj_desert_debris.cpp index 0b58b5fa..9994a5ee 100644 --- a/src/REL/d/a/obj/d_a_obj_desert_debris.cpp +++ b/src/REL/d/a/obj/d_a_obj_desert_debris.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_desert_debris.h" SPECIAL_ACTOR_PROFILE(OBJ_DESERT_DEBRIS, dAcOdesertDebris_c, fProfile::OBJ_DESERT_DEBRIS, 0x213, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_desert_meter.cpp b/src/REL/d/a/obj/d_a_obj_desert_meter.cpp index 85b17d3b..c6115196 100644 --- a/src/REL/d/a/obj/d_a_obj_desert_meter.cpp +++ b/src/REL/d/a/obj/d_a_obj_desert_meter.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_desert_meter.h" SPECIAL_ACTOR_PROFILE(OBJ_DESERT_METER, dAcODesertMeter_c, fProfile::OBJ_DESERT_METER, 0x1B0, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_display_only_nbs.cpp b/src/REL/d/a/obj/d_a_obj_display_only_nbs.cpp index fb9672e3..57f1a23e 100644 --- a/src/REL/d/a/obj/d_a_obj_display_only_nbs.cpp +++ b/src/REL/d/a/obj/d_a_obj_display_only_nbs.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_display_only_nbs.h" SPECIAL_ACTOR_PROFILE(OBJ_DISPLAY_ONLY_NBS, dAcOdisplayOnlyNbs_c, fProfile::OBJ_DISPLAY_ONLY_NBS, 0x21B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_distant_ship.cpp b/src/REL/d/a/obj/d_a_obj_distant_ship.cpp index 3b5d9653..af5666b7 100644 --- a/src/REL/d/a/obj/d_a_obj_distant_ship.cpp +++ b/src/REL/d/a/obj/d_a_obj_distant_ship.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_distant_ship.h" SPECIAL_ACTOR_PROFILE(OBJ_DIS_SHIP, dAcOdistantShip_c, fProfile::OBJ_DIS_SHIP, 0x143, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_diviner_crystal.cpp b/src/REL/d/a/obj/d_a_obj_diviner_crystal.cpp index 852be483..5f3a6050 100644 --- a/src/REL/d/a/obj/d_a_obj_diviner_crystal.cpp +++ b/src/REL/d/a/obj/d_a_obj_diviner_crystal.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_diviner_crystal.h" SPECIAL_ACTOR_PROFILE(OBJ_DIVINER_CRYSTAL, dAcODivinerCrystal_c, fProfile::OBJ_DIVINER_CRYSTAL, 0x157, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_door.cpp b/src/REL/d/a/obj/d_a_obj_door.cpp index ebf00320..3f172d1f 100644 --- a/src/REL/d/a/obj/d_a_obj_door.cpp +++ b/src/REL/d/a/obj/d_a_obj_door.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_door.h" SPECIAL_ACTOR_PROFILE(OBJ_DOOR, dAcOdoor_c, fProfile::OBJ_DOOR, 0x188, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_door_boss.cpp b/src/REL/d/a/obj/d_a_obj_door_boss.cpp index ad634841..3331f488 100644 --- a/src/REL/d/a/obj/d_a_obj_door_boss.cpp +++ b/src/REL/d/a/obj/d_a_obj_door_boss.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_door_boss.h" SPECIAL_ACTOR_PROFILE(OBJ_DOOR_BOSS, dAcOdoorBoss_c, fProfile::OBJ_DOOR_BOSS, 0x189, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_door_bossD101.cpp b/src/REL/d/a/obj/d_a_obj_door_bossD101.cpp index 6855d92d..0ef0d242 100644 --- a/src/REL/d/a/obj/d_a_obj_door_bossD101.cpp +++ b/src/REL/d/a/obj/d_a_obj_door_bossD101.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_door_bossD101.h" SPECIAL_ACTOR_PROFILE(OBJ_DOOR_BOSSD101, dAcODoorBossD101_c, fProfile::OBJ_DOOR_BOSSD101, 0x17D, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_door_dungeon.cpp b/src/REL/d/a/obj/d_a_obj_door_dungeon.cpp index 3a69a8db..4dba1cf6 100644 --- a/src/REL/d/a/obj/d_a_obj_door_dungeon.cpp +++ b/src/REL/d/a/obj/d_a_obj_door_dungeon.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_door_dungeon.h" SPECIAL_ACTOR_PROFILE(OBJ_DOOR_DUNGEON, dAcObjDoorDungeon_c, fProfile::OBJ_DOOR_DUNGEON, 0x185, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_door_dungeonD200.cpp b/src/REL/d/a/obj/d_a_obj_door_dungeonD200.cpp index 332cfe20..aefedf03 100644 --- a/src/REL/d/a/obj/d_a_obj_door_dungeonD200.cpp +++ b/src/REL/d/a/obj/d_a_obj_door_dungeonD200.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_door_dungeonD200.h" SPECIAL_ACTOR_PROFILE(OBJ_DOOR_DUNGEON_D200, dAcObjDoorDungeonD200_c, fProfile::OBJ_DOOR_DUNGEON_D200, 0x184, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_dormitory_gate.cpp b/src/REL/d/a/obj/d_a_obj_dormitory_gate.cpp index ec3fb954..702214c1 100644 --- a/src/REL/d/a/obj/d_a_obj_dormitory_gate.cpp +++ b/src/REL/d/a/obj/d_a_obj_dormitory_gate.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_dormitory_gate.h" SPECIAL_ACTOR_PROFILE(OBJ_DORMITORY_GATE, dAcODormitoryGate_c, fProfile::OBJ_DORMITORY_GATE, 0x17A, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_down_lava.cpp b/src/REL/d/a/obj/d_a_obj_down_lava.cpp index 91b3413a..2df018ed 100644 --- a/src/REL/d/a/obj/d_a_obj_down_lava.cpp +++ b/src/REL/d/a/obj/d_a_obj_down_lava.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_down_lava.h" SPECIAL_ACTOR_PROFILE(OBJ_DOWN_LAVA, dAcOdownLava_c, fProfile::OBJ_DOWN_LAVA, 0x1FB, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_drum.cpp b/src/REL/d/a/obj/d_a_obj_drum.cpp index 84983ec3..72b6f46d 100644 --- a/src/REL/d/a/obj/d_a_obj_drum.cpp +++ b/src/REL/d/a/obj/d_a_obj_drum.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_drum.h" SPECIAL_ACTOR_PROFILE(OBJ_DRUM, dAcOdrum_c, fProfile::OBJ_DRUM, 0x26F, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_dungeon_ship.cpp b/src/REL/d/a/obj/d_a_obj_dungeon_ship.cpp index d538c991..b88b3bb7 100644 --- a/src/REL/d/a/obj/d_a_obj_dungeon_ship.cpp +++ b/src/REL/d/a/obj/d_a_obj_dungeon_ship.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_dungeon_ship.h" SPECIAL_ACTOR_PROFILE(OBJ_DUNGEON_SHIP, dAcODungeonShip_c, fProfile::OBJ_DUNGEON_SHIP, 0x17B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_electric_light.cpp b/src/REL/d/a/obj/d_a_obj_electric_light.cpp index b5e0cf69..3a708270 100644 --- a/src/REL/d/a/obj/d_a_obj_electric_light.cpp +++ b/src/REL/d/a/obj/d_a_obj_electric_light.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_electric_light.h" SPECIAL_ACTOR_PROFILE(OBJ_ELECTRIC_LIGHT, dAcOelectricLight_c, fProfile::OBJ_ELECTRIC_LIGHT, 0x1B8, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_evil_field.cpp b/src/REL/d/a/obj/d_a_obj_evil_field.cpp index 0c94e848..36f3fa38 100644 --- a/src/REL/d/a/obj/d_a_obj_evil_field.cpp +++ b/src/REL/d/a/obj/d_a_obj_evil_field.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_evil_field.h" SPECIAL_ACTOR_PROFILE(OBJ_EVIL_FIELD, dAcOevilField_c, fProfile::OBJ_EVIL_FIELD, 0x1F2, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_farmland.cpp b/src/REL/d/a/obj/d_a_obj_farmland.cpp index e04d737a..f3289441 100644 --- a/src/REL/d/a/obj/d_a_obj_farmland.cpp +++ b/src/REL/d/a/obj/d_a_obj_farmland.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_farmland.h" SPECIAL_ACTOR_PROFILE(OBJ_FARMLAND, dAcOFarmLand_c, fProfile::OBJ_FARMLAND, 0x155, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fence.cpp b/src/REL/d/a/obj/d_a_obj_fence.cpp index aefd6a92..b9079439 100644 --- a/src/REL/d/a/obj/d_a_obj_fence.cpp +++ b/src/REL/d/a/obj/d_a_obj_fence.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fence.h" SPECIAL_ACTOR_PROFILE(OBJ_FENCE, dAcOFence_c, fProfile::OBJ_FENCE, 0x18B, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_fence_boko.cpp b/src/REL/d/a/obj/d_a_obj_fence_boko.cpp index 6d9911aa..d0f40eac 100644 --- a/src/REL/d/a/obj/d_a_obj_fence_boko.cpp +++ b/src/REL/d/a/obj/d_a_obj_fence_boko.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_fence_boko.h" SPECIAL_ACTOR_PROFILE(OBJ_FENCE_BOKO, dAcOfenceBoko_c, fProfile::OBJ_FENCE_BOKO, 0x1D7, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fence_boko2.cpp b/src/REL/d/a/obj/d_a_obj_fence_boko2.cpp index 1f35d1ca..572874f1 100644 --- a/src/REL/d/a/obj/d_a_obj_fence_boko2.cpp +++ b/src/REL/d/a/obj/d_a_obj_fence_boko2.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_fence_boko2.h" SPECIAL_ACTOR_PROFILE(OBJ_FENCE_BOKO2, dAcOfenceBoko2_c, fProfile::OBJ_FENCE_BOKO2, 0x1D8, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fence_iron.cpp b/src/REL/d/a/obj/d_a_obj_fence_iron.cpp index 9bb2c51c..88ace7cd 100644 --- a/src/REL/d/a/obj/d_a_obj_fence_iron.cpp +++ b/src/REL/d/a/obj/d_a_obj_fence_iron.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fence_iron.h" SPECIAL_ACTOR_PROFILE(OBJ_FENCE_IRON, dAcOfenceIron_c, fProfile::OBJ_FENCE_IRON, 0x1C4, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_fence_konsai.cpp b/src/REL/d/a/obj/d_a_obj_fence_konsai.cpp index ae30f599..02f93daa 100644 --- a/src/REL/d/a/obj/d_a_obj_fence_konsai.cpp +++ b/src/REL/d/a/obj/d_a_obj_fence_konsai.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_fence_konsai.h" SPECIAL_ACTOR_PROFILE(OBJ_FENCE_KONSAI, dAcOfenceKonsai_c, fProfile::OBJ_FENCE_KONSAI, 0x1E3, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fire.cpp b/src/REL/d/a/obj/d_a_obj_fire.cpp index 8d29cf7f..cf317eae 100644 --- a/src/REL/d/a/obj/d_a_obj_fire.cpp +++ b/src/REL/d/a/obj/d_a_obj_fire.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fire.h" SPECIAL_ACTOR_PROFILE(OBJ_FIRE, dAcOfire_c, fProfile::OBJ_FIRE, 0x26D, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_fire_obstacle.cpp b/src/REL/d/a/obj/d_a_obj_fire_obstacle.cpp index 2dce3f15..896c89a4 100644 --- a/src/REL/d/a/obj/d_a_obj_fire_obstacle.cpp +++ b/src/REL/d/a/obj/d_a_obj_fire_obstacle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fire_obstacle.h" SPECIAL_ACTOR_PROFILE(OBJ_FIRE_OBSTACLE, dAcOfireObstacle_c, fProfile::OBJ_FIRE_OBSTACLE, 0x1EF, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_fire_pillar.cpp b/src/REL/d/a/obj/d_a_obj_fire_pillar.cpp index 6efd0ecc..7af5604f 100644 --- a/src/REL/d/a/obj/d_a_obj_fire_pillar.cpp +++ b/src/REL/d/a/obj/d_a_obj_fire_pillar.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fire_pillar.h" SPECIAL_ACTOR_PROFILE(OBJ_FIRE_PILLAR, dAcOfirePillar_c, fProfile::OBJ_FIRE_PILLAR, 0x1F0, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_firewall.cpp b/src/REL/d/a/obj/d_a_obj_firewall.cpp index 4b1676ff..32f55e89 100644 --- a/src/REL/d/a/obj/d_a_obj_firewall.cpp +++ b/src/REL/d/a/obj/d_a_obj_firewall.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_firewall.h" SPECIAL_ACTOR_PROFILE(OBJ_FIREWALL, dAcOFireWall_c, fProfile::OBJ_FIREWALL, 0x24E, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_flag.cpp b/src/REL/d/a/obj/d_a_obj_flag.cpp index d65a8dfc..ad08d1c6 100644 --- a/src/REL/d/a/obj/d_a_obj_flag.cpp +++ b/src/REL/d/a/obj/d_a_obj_flag.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_flag.h" SPECIAL_ACTOR_PROFILE(OBJ_FLAG, dAcOFlag_c, fProfile::OBJ_FLAG, 0x14E, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_flower_ancient.cpp b/src/REL/d/a/obj/d_a_obj_flower_ancient.cpp index d132d0dc..7895c904 100644 --- a/src/REL/d/a/obj/d_a_obj_flower_ancient.cpp +++ b/src/REL/d/a/obj/d_a_obj_flower_ancient.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_flower_ancient.h" SPECIAL_ACTOR_PROFILE(OBJ_FLOWER_ANCIENT, dAcOFlowerAncient_c, fProfile::OBJ_FLOWER_ANCIENT, 0x245, 0, 4098); diff --git a/src/REL/d/a/obj/d_a_obj_flying_clawshot_target.cpp b/src/REL/d/a/obj/d_a_obj_flying_clawshot_target.cpp index 979c88f5..9bfd5a8a 100644 --- a/src/REL/d/a/obj/d_a_obj_flying_clawshot_target.cpp +++ b/src/REL/d/a/obj/d_a_obj_flying_clawshot_target.cpp @@ -1,3 +1,5 @@ -#include +#include "d/a/obj/d_a_obj_flying_clawshot_target.h" -SPECIAL_ACTOR_PROFILE(OBJ_FLYING_CLAWSHOT_TARGET, dAcOFlyingClawshotTarget_c, fProfile::OBJ_FLYING_CLAWSHOT_TARGET, 0x142, 0, 2); +SPECIAL_ACTOR_PROFILE( + OBJ_FLYING_CLAWSHOT_TARGET, dAcOFlyingClawshotTarget_c, fProfile::OBJ_FLYING_CLAWSHOT_TARGET, 0x142, 0, 2 +); diff --git a/src/REL/d/a/obj/d_a_obj_fortune_ring.cpp b/src/REL/d/a/obj/d_a_obj_fortune_ring.cpp index ec2e640d..86f45b11 100644 --- a/src/REL/d/a/obj/d_a_obj_fortune_ring.cpp +++ b/src/REL/d/a/obj/d_a_obj_fortune_ring.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fortune_ring.h" SPECIAL_ACTOR_PROFILE(OBJ_FORTUNE_RING, dAcOfortuneRing_c, fProfile::OBJ_FORTUNE_RING, 0x1C6, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_fruit.cpp b/src/REL/d/a/obj/d_a_obj_fruit.cpp index ff197bd6..d922e427 100644 --- a/src/REL/d/a/obj/d_a_obj_fruit.cpp +++ b/src/REL/d/a/obj/d_a_obj_fruit.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fruit.h" SPECIAL_ACTOR_PROFILE(OBJ_FRUIT, dAcOFruit_c, fProfile::OBJ_FRUIT, 0x164, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fruitB.cpp b/src/REL/d/a/obj/d_a_obj_fruitB.cpp index 93da11f4..621d4d31 100644 --- a/src/REL/d/a/obj/d_a_obj_fruitB.cpp +++ b/src/REL/d/a/obj/d_a_obj_fruitB.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fruitB.h" SPECIAL_ACTOR_PROFILE(OBJ_FRUIT_B, dAcOFruitB_c, fProfile::OBJ_FRUIT_B, 0x153, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fruit_guts_leaf.cpp b/src/REL/d/a/obj/d_a_obj_fruit_guts_leaf.cpp index df3a24c8..7c0006b3 100644 --- a/src/REL/d/a/obj/d_a_obj_fruit_guts_leaf.cpp +++ b/src/REL/d/a/obj/d_a_obj_fruit_guts_leaf.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_fruit_guts_leaf.h" SPECIAL_ACTOR_PROFILE(OBJ_FRUIT_GUTS_LEAF, dAcOFruitGutsLeaf_c, fProfile::OBJ_FRUIT_GUTS_LEAF, 0x2E, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_fruit_tree.cpp b/src/REL/d/a/obj/d_a_obj_fruit_tree.cpp index c1ecbf7a..544cab18 100644 --- a/src/REL/d/a/obj/d_a_obj_fruit_tree.cpp +++ b/src/REL/d/a/obj/d_a_obj_fruit_tree.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_fruit_tree.h" SPECIAL_ACTOR_PROFILE(OBJ_FRUIT_TREE, dAcOFruitTree_c, fProfile::OBJ_FRUIT_TREE, 0x154, 0, 4099); diff --git a/src/REL/d/a/obj/d_a_obj_gear.cpp b/src/REL/d/a/obj/d_a_obj_gear.cpp index 1afae6fd..4efcee2b 100644 --- a/src/REL/d/a/obj/d_a_obj_gear.cpp +++ b/src/REL/d/a/obj/d_a_obj_gear.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_gear.h" SPECIAL_ACTOR_PROFILE(OBJ_GEAR, dAcOGear_c, fProfile::OBJ_GEAR, 0x233, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp b/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp index cafa552f..c873f90a 100644 --- a/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp +++ b/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_girahim_foot.h" SPECIAL_ACTOR_PROFILE(OBJ_GIRAHIM_FOOT, dAcOgirahimFoot_c, fProfile::OBJ_GIRAHIM_FOOT, 0x210, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_girahimu_floor.cpp b/src/REL/d/a/obj/d_a_obj_girahimu_floor.cpp index 0f3fb0f6..4f9dce53 100644 --- a/src/REL/d/a/obj/d_a_obj_girahimu_floor.cpp +++ b/src/REL/d/a/obj/d_a_obj_girahimu_floor.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_girahimu_floor.h" SPECIAL_ACTOR_PROFILE(OBJ_GIRAHIMU_FLOOR, dAcOGirahimuFloor_c, fProfile::OBJ_GIRAHIMU_FLOOR, 0x25F, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_girahimu_knife.cpp b/src/REL/d/a/obj/d_a_obj_girahimu_knife.cpp index 76af8725..f3e930e4 100644 --- a/src/REL/d/a/obj/d_a_obj_girahimu_knife.cpp +++ b/src/REL/d/a/obj/d_a_obj_girahimu_knife.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_girahimu_knife.h" SPECIAL_ACTOR_PROFILE(OBJ_GH_KNIFE, dAcObjGirahimuKnife_c, fProfile::OBJ_GH_KNIFE, 0x115, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_girahimu_sword_link.cpp b/src/REL/d/a/obj/d_a_obj_girahimu_sword_link.cpp index d331ab48..dddc4cb6 100644 --- a/src/REL/d/a/obj/d_a_obj_girahimu_sword_link.cpp +++ b/src/REL/d/a/obj/d_a_obj_girahimu_sword_link.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_girahimu_sword_link.h" SPECIAL_ACTOR_PROFILE(OBJ_GH_SW_L, dAcObjGirahimuSwordLink_c, fProfile::OBJ_GH_SW_L, 0x114, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_god_mark.cpp b/src/REL/d/a/obj/d_a_obj_god_mark.cpp index 5b51cebc..c011cf11 100644 --- a/src/REL/d/a/obj/d_a_obj_god_mark.cpp +++ b/src/REL/d/a/obj/d_a_obj_god_mark.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_god_mark.h" SPECIAL_ACTOR_PROFILE(OBJ_GOD_MARK, dAcOgodMark_c, fProfile::OBJ_GOD_MARK, 0x20A, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_goddess_cube.cpp b/src/REL/d/a/obj/d_a_obj_goddess_cube.cpp index 0322aedb..cf348223 100644 --- a/src/REL/d/a/obj/d_a_obj_goddess_cube.cpp +++ b/src/REL/d/a/obj/d_a_obj_goddess_cube.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_goddess_cube.h" SPECIAL_ACTOR_PROFILE(OBJ_GODDESS_CUBE, dAcOGoddessCube_c, fProfile::OBJ_GODDESS_CUBE, 0x1A6, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_goddess_statue.cpp b/src/REL/d/a/obj/d_a_obj_goddess_statue.cpp index 0bcd071f..9ff91bd2 100644 --- a/src/REL/d/a/obj/d_a_obj_goddess_statue.cpp +++ b/src/REL/d/a/obj/d_a_obj_goddess_statue.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_goddess_statue.h" SPECIAL_ACTOR_PROFILE(OBJ_GODDESS_STATUE, dAcOGoddessStatue_c, fProfile::OBJ_GODDESS_STATUE, 0x24A, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_grass_coil.cpp b/src/REL/d/a/obj/d_a_obj_grass_coil.cpp index 9f772ebf..18a2aba4 100644 --- a/src/REL/d/a/obj/d_a_obj_grass_coil.cpp +++ b/src/REL/d/a/obj/d_a_obj_grass_coil.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_grass_coil.h" SPECIAL_ACTOR_PROFILE(OBJ_GRASS_COIL, dAcOgrassCoil_c, fProfile::OBJ_GRASS_COIL, 0x263, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_grave.cpp b/src/REL/d/a/obj/d_a_obj_grave.cpp index 8fc7101c..d4dd4e8a 100644 --- a/src/REL/d/a/obj/d_a_obj_grave.cpp +++ b/src/REL/d/a/obj/d_a_obj_grave.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_grave.h" SPECIAL_ACTOR_PROFILE(OBJ_GRAVE, dAcOGrave_c, fProfile::OBJ_GRAVE, 0x255, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_ground_cover.cpp b/src/REL/d/a/obj/d_a_obj_ground_cover.cpp index e59440c2..d60ef0df 100644 --- a/src/REL/d/a/obj/d_a_obj_ground_cover.cpp +++ b/src/REL/d/a/obj/d_a_obj_ground_cover.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ground_cover.h" SPECIAL_ACTOR_PROFILE(OBJ_GROUND_COVER, dAcOgroundCover_c, fProfile::OBJ_GROUND_COVER, 0x1FD, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_guard_log.cpp b/src/REL/d/a/obj/d_a_obj_guard_log.cpp index 7e42282c..0680bc40 100644 --- a/src/REL/d/a/obj/d_a_obj_guard_log.cpp +++ b/src/REL/d/a/obj/d_a_obj_guard_log.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_guard_log.h" SPECIAL_ACTOR_PROFILE(OBJ_GUARD_LOG, dAcOguardLog_c, fProfile::OBJ_GUARD_LOG, 0x1F4, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_harp_hint.cpp b/src/REL/d/a/obj/d_a_obj_harp_hint.cpp index bcb31b0b..be19909d 100644 --- a/src/REL/d/a/obj/d_a_obj_harp_hint.cpp +++ b/src/REL/d/a/obj/d_a_obj_harp_hint.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_harp_hint.h" SPECIAL_ACTOR_PROFILE(OBJ_HARP_HINT, dAcOHarpHint_c, fProfile::OBJ_HARP_HINT, 0x1B1, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_himo.cpp b/src/REL/d/a/obj/d_a_obj_himo.cpp index 63327f87..93f3c473 100644 --- a/src/REL/d/a/obj/d_a_obj_himo.cpp +++ b/src/REL/d/a/obj/d_a_obj_himo.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_himo.h" SPECIAL_ACTOR_PROFILE(OBJ_HIMO, dAcOhimo_c, fProfile::OBJ_HIMO, 0xD9, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_hit_lever_sw.cpp b/src/REL/d/a/obj/d_a_obj_hit_lever_sw.cpp index 5e9ca917..ec54b48a 100644 --- a/src/REL/d/a/obj/d_a_obj_hit_lever_sw.cpp +++ b/src/REL/d/a/obj/d_a_obj_hit_lever_sw.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_hit_lever_sw.h" SPECIAL_ACTOR_PROFILE(OBJ_HIT_LEVER_SW, dAcOhitLeverSw_c, fProfile::OBJ_HIT_LEVER_SW, 0x1C0, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_hole.cpp b/src/REL/d/a/obj/d_a_obj_hole.cpp index a7daf77b..0d3a1452 100644 --- a/src/REL/d/a/obj/d_a_obj_hole.cpp +++ b/src/REL/d/a/obj/d_a_obj_hole.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_hole.h" SPECIAL_ACTOR_PROFILE(OBJ_HOLE, dAcOhole_c, fProfile::OBJ_HOLE, 0xF7, 0, 258); diff --git a/src/REL/d/a/obj/d_a_obj_hole_minigame.cpp b/src/REL/d/a/obj/d_a_obj_hole_minigame.cpp index 4a86c90c..0d36293d 100644 --- a/src/REL/d/a/obj/d_a_obj_hole_minigame.cpp +++ b/src/REL/d/a/obj/d_a_obj_hole_minigame.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_hole_minigame.h" SPECIAL_ACTOR_PROFILE(OBJ_HOLE_MINIGAME, dAcOholeMinigame_c, fProfile::OBJ_HOLE_MINIGAME, 0x1C1, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_impa_door.cpp b/src/REL/d/a/obj/d_a_obj_impa_door.cpp index 26728a29..ce75d5fd 100644 --- a/src/REL/d/a/obj/d_a_obj_impa_door.cpp +++ b/src/REL/d/a/obj/d_a_obj_impa_door.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_impa_door.h" SPECIAL_ACTOR_PROFILE(OBJ_IMPA_DOOR, dAcOimpaDoor_c, fProfile::OBJ_IMPA_DOOR, 0x20C, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_insect_island.cpp b/src/REL/d/a/obj/d_a_obj_insect_island.cpp index ed22d2ba..9d425b9a 100644 --- a/src/REL/d/a/obj/d_a_obj_insect_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_insect_island.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_insect_island.h" SPECIAL_ACTOR_PROFILE(OBJ_INSECT_ISLAND, dAcOinsectIsland_c, fProfile::OBJ_INSECT_ISLAND, 0x1E8, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_into_hole.cpp b/src/REL/d/a/obj/d_a_obj_into_hole.cpp index a2fcc6ef..94e33041 100644 --- a/src/REL/d/a/obj/d_a_obj_into_hole.cpp +++ b/src/REL/d/a/obj/d_a_obj_into_hole.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_into_hole.h" SPECIAL_ACTOR_PROFILE(OBJ_INTO_HOLE, dAcArrow_c, fProfile::OBJ_INTO_HOLE, 0xF8, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_iron_stage.cpp b/src/REL/d/a/obj/d_a_obj_iron_stage.cpp index 2b5a6d94..37f0bc7e 100644 --- a/src/REL/d/a/obj/d_a_obj_iron_stage.cpp +++ b/src/REL/d/a/obj/d_a_obj_iron_stage.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_iron_stage.h" SPECIAL_ACTOR_PROFILE(OBJ_IRON_STAGE, dAcOironStage_c, fProfile::OBJ_IRON_STAGE, 0x1CE, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_island_LOD.cpp b/src/REL/d/a/obj/d_a_obj_island_LOD.cpp index 1f198ce0..56fe0d7b 100644 --- a/src/REL/d/a/obj/d_a_obj_island_LOD.cpp +++ b/src/REL/d/a/obj/d_a_obj_island_LOD.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_island_LOD.h" SPECIAL_ACTOR_PROFILE(OBJ_ISLAND_LOD, dAcOislandLOD_c, fProfile::OBJ_ISLAND_LOD, 0x211, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_island_nusi.cpp b/src/REL/d/a/obj/d_a_obj_island_nusi.cpp index 292c7f94..bef28fa4 100644 --- a/src/REL/d/a/obj/d_a_obj_island_nusi.cpp +++ b/src/REL/d/a/obj/d_a_obj_island_nusi.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_island_nusi.h" SPECIAL_ACTOR_PROFILE(OBJ_ISLAND_NUSI, dAcOislandNusi_c, fProfile::OBJ_ISLAND_NUSI, 0x204, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_item_heart_container.cpp b/src/REL/d/a/obj/d_a_obj_item_heart_container.cpp index 39915285..ba6e9803 100644 --- a/src/REL/d/a/obj/d_a_obj_item_heart_container.cpp +++ b/src/REL/d/a/obj/d_a_obj_item_heart_container.cpp @@ -1,6 +1,8 @@ -#include +#include "d/a/obj/d_a_obj_item_heart_container.h" -SPECIAL_ACTOR_PROFILE(OBJ_ITEM_HEART_CONTAINER, dAcOItemHeartContainer_c, fProfile::OBJ_ITEM_HEART_CONTAINER, 0x2C, 0, 3); +SPECIAL_ACTOR_PROFILE( + OBJ_ITEM_HEART_CONTAINER, dAcOItemHeartContainer_c, fProfile::OBJ_ITEM_HEART_CONTAINER, 0x2C, 0, 3 +); STATE_DEFINE(dAcOItemHeartContainer_c, Hide); STATE_DEFINE(dAcOItemHeartContainer_c, RequestAppearEvent); diff --git a/src/REL/d/a/obj/d_a_obj_ivy_rope.cpp b/src/REL/d/a/obj/d_a_obj_ivy_rope.cpp index dbeeb324..8018c050 100644 --- a/src/REL/d/a/obj/d_a_obj_ivy_rope.cpp +++ b/src/REL/d/a/obj/d_a_obj_ivy_rope.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ivy_rope.h" SPECIAL_ACTOR_PROFILE(OBJ_IVY_ROPE, dAcOivyRope_c, fProfile::OBJ_IVY_ROPE, 0x262, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_junk_repairing.cpp b/src/REL/d/a/obj/d_a_obj_junk_repairing.cpp index afc9d45c..fb856d7c 100644 --- a/src/REL/d/a/obj/d_a_obj_junk_repairing.cpp +++ b/src/REL/d/a/obj/d_a_obj_junk_repairing.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_junk_repairing.h" + +#include "toBeSorted/item_story_flag_manager.h" + SPECIAL_ACTOR_PROFILE(OBJ_JUNK_REPAIR, dAcOJunkRep_c, fProfile::OBJ_JUNK_REPAIR, 0x027B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_junk_repairing_data.cpp b/src/REL/d/a/obj/d_a_obj_junk_repairing_data.cpp index 82ce9489..0aff15f1 100644 --- a/src/REL/d/a/obj/d_a_obj_junk_repairing_data.cpp +++ b/src/REL/d/a/obj/d_a_obj_junk_repairing_data.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_junk_repairing.h" char dAcOJunkRep_c::sMdlName1[] = "JunkRepairobject"; char dAcOJunkRep_c::sMdlName2[] = "JunkRepairobjectB"; diff --git a/src/REL/d/a/obj/d_a_obj_kanban_stone.cpp b/src/REL/d/a/obj/d_a_obj_kanban_stone.cpp index 47e986b2..2c111eee 100644 --- a/src/REL/d/a/obj/d_a_obj_kanban_stone.cpp +++ b/src/REL/d/a/obj/d_a_obj_kanban_stone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_kanban_stone.h" SPECIAL_ACTOR_PROFILE(OBJ_KANBAN_STONE, dAcOKanbanStone_c, fProfile::OBJ_KANBAN_STONE, 0x182, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_kibako.cpp b/src/REL/d/a/obj/d_a_obj_kibako.cpp index 97e25fae..73c4f8b4 100644 --- a/src/REL/d/a/obj/d_a_obj_kibako.cpp +++ b/src/REL/d/a/obj/d_a_obj_kibako.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_kibako.h" SPECIAL_ACTOR_PROFILE(OBJ_KIBAKO, dAcOkibako_c, fProfile::OBJ_KIBAKO, 0x12C, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_kumite_wall.cpp b/src/REL/d/a/obj/d_a_obj_kumite_wall.cpp index 19001678..aa0991fa 100644 --- a/src/REL/d/a/obj/d_a_obj_kumite_wall.cpp +++ b/src/REL/d/a/obj/d_a_obj_kumite_wall.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_kumite_wall.h" SPECIAL_ACTOR_PROFILE(OBJ_KUMITE_WALL, dAcOkumiteWall_c, fProfile::OBJ_KUMITE_WALL, 0x217, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_lamp.cpp b/src/REL/d/a/obj/d_a_obj_lamp.cpp index d3a1fafd..8a506df8 100644 --- a/src/REL/d/a/obj/d_a_obj_lamp.cpp +++ b/src/REL/d/a/obj/d_a_obj_lamp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lamp.h" SPECIAL_ACTOR_PROFILE(OBJ_LAMP, dAcOLamp_c, fProfile::OBJ_LAMP, 0x14B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_lava_F200.cpp b/src/REL/d/a/obj/d_a_obj_lava_F200.cpp index 7cf1f3ed..b1cad107 100644 --- a/src/REL/d/a/obj/d_a_obj_lava_F200.cpp +++ b/src/REL/d/a/obj/d_a_obj_lava_F200.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_lava_F200.h" + +#include "toBeSorted/room_manager.h" + SPECIAL_ACTOR_PROFILE(OBJ_LAVA_F200, dAcOlavaF200_c, fProfile::OBJ_LAVA_F200, 0x0214, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_lava_d201.cpp b/src/REL/d/a/obj/d_a_obj_lava_d201.cpp index 14b421d0..bf538ca5 100644 --- a/src/REL/d/a/obj/d_a_obj_lava_d201.cpp +++ b/src/REL/d/a/obj/d_a_obj_lava_d201.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lava_d201.h" SPECIAL_ACTOR_PROFILE(OBJ_LAVA_D201, dAcOLavaD201_c, fProfile::OBJ_LAVA_D201, 0x254, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_lava_plate.cpp b/src/REL/d/a/obj/d_a_obj_lava_plate.cpp index fdc52292..9e16763d 100644 --- a/src/REL/d/a/obj/d_a_obj_lava_plate.cpp +++ b/src/REL/d/a/obj/d_a_obj_lava_plate.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lava_plate.h" SPECIAL_ACTOR_PROFILE(OBJ_LAVA_PLATE, dAcOLavaPlate_c, fProfile::OBJ_LAVA_PLATE, 0x242, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_leaf_swing.cpp b/src/REL/d/a/obj/d_a_obj_leaf_swing.cpp index e0263434..c2cc4030 100644 --- a/src/REL/d/a/obj/d_a_obj_leaf_swing.cpp +++ b/src/REL/d/a/obj/d_a_obj_leaf_swing.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_leaf_swing.h" SPECIAL_ACTOR_PROFILE(OBJ_LEAF_SWING, dAcOleafSwing_c, fProfile::OBJ_LEAF_SWING, 0x192, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_light_line.cpp b/src/REL/d/a/obj/d_a_obj_light_line.cpp index 67375a51..38616922 100644 --- a/src/REL/d/a/obj/d_a_obj_light_line.cpp +++ b/src/REL/d/a/obj/d_a_obj_light_line.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_light_line.h" SPECIAL_ACTOR_PROFILE(OBJ_LIGHT_LINE, dAcOlightLine_c, fProfile::OBJ_LIGHT_LINE, 0x197, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_light_shaft_small.cpp b/src/REL/d/a/obj/d_a_obj_light_shaft_small.cpp index c8b43eaf..fe91db0f 100644 --- a/src/REL/d/a/obj/d_a_obj_light_shaft_small.cpp +++ b/src/REL/d/a/obj/d_a_obj_light_shaft_small.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_light_shaft_small.h" SPECIAL_ACTOR_PROFILE(OBJ_LIGHT_SHAFT_SMALL, dAcOLightShaftSmall_c, fProfile::OBJ_LIGHT_SHAFT_SMALL, 0x198, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_lighthouse_harp.cpp b/src/REL/d/a/obj/d_a_obj_lighthouse_harp.cpp index 8c62d742..58236869 100644 --- a/src/REL/d/a/obj/d_a_obj_lighthouse_harp.cpp +++ b/src/REL/d/a/obj/d_a_obj_lighthouse_harp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lighthouse_harp.h" SPECIAL_ACTOR_PROFILE(OBJ_LIGHTHOUSE_HARP, dAcOlighthouseHarp_c, fProfile::OBJ_LIGHTHOUSE_HARP, 0x1DF, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_lighthouse_light.cpp b/src/REL/d/a/obj/d_a_obj_lighthouse_light.cpp index 44a14582..7a9f7ca7 100644 --- a/src/REL/d/a/obj/d_a_obj_lighthouse_light.cpp +++ b/src/REL/d/a/obj/d_a_obj_lighthouse_light.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lighthouse_light.h" SPECIAL_ACTOR_PROFILE(OBJ_LIGHTHOUSE_LIGHT, dAcOlighthouseLight_c, fProfile::OBJ_LIGHTHOUSE_LIGHT, 0x1DE, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_lock.cpp b/src/REL/d/a/obj/d_a_obj_lock.cpp index 3cead006..42bcf384 100644 --- a/src/REL/d/a/obj/d_a_obj_lock.cpp +++ b/src/REL/d/a/obj/d_a_obj_lock.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lock.h" SPECIAL_ACTOR_PROFILE(OBJ_SHUTTER_LOCK, dAcOLock_c, fProfile::OBJ_SHUTTER_LOCK, 0x149, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_log.cpp b/src/REL/d/a/obj/d_a_obj_log.cpp index 724df065..02e34acd 100644 --- a/src/REL/d/a/obj/d_a_obj_log.cpp +++ b/src/REL/d/a/obj/d_a_obj_log.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_log.h" SPECIAL_ACTOR_PROFILE(OBJ_LOG, dAcOlog_c, fProfile::OBJ_LOG, 0x12E, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_log_water.cpp b/src/REL/d/a/obj/d_a_obj_log_water.cpp index b9073f2a..574f41a0 100644 --- a/src/REL/d/a/obj/d_a_obj_log_water.cpp +++ b/src/REL/d/a/obj/d_a_obj_log_water.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_log_water.h" SPECIAL_ACTOR_PROFILE(OBJ_LOG_WATER, dAcOlogWater_c, fProfile::OBJ_LOG_WATER, 0x12F, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_lotus.cpp b/src/REL/d/a/obj/d_a_obj_lotus.cpp index 09274d25..2d819cbb 100644 --- a/src/REL/d/a/obj/d_a_obj_lotus.cpp +++ b/src/REL/d/a/obj/d_a_obj_lotus.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lotus.h" SPECIAL_ACTOR_PROFILE(OBJ_LOTUS, dAcOLotus_c, fProfile::OBJ_LOTUS, 0x234, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_lotus_flower.cpp b/src/REL/d/a/obj/d_a_obj_lotus_flower.cpp index 33fbd4ed..391d10f6 100644 --- a/src/REL/d/a/obj/d_a_obj_lotus_flower.cpp +++ b/src/REL/d/a/obj/d_a_obj_lotus_flower.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lotus_flower.h" SPECIAL_ACTOR_PROFILE(OBJ_LOTUS_FLOWER, dAcOLotusFlower_c, fProfile::OBJ_LOTUS_FLOWER, 0x174, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_lotus_seed.cpp b/src/REL/d/a/obj/d_a_obj_lotus_seed.cpp index a961670d..a8aed79a 100644 --- a/src/REL/d/a/obj/d_a_obj_lotus_seed.cpp +++ b/src/REL/d/a/obj/d_a_obj_lotus_seed.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_lotus_seed.h" SPECIAL_ACTOR_PROFILE(OBJ_LOTUS_SEED, dAcOLotusSeed_c, fProfile::OBJ_LOTUS_SEED, 0x175, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_mapparts.cpp b/src/REL/d/a/obj/d_a_obj_mapparts.cpp index bcc9faa6..274c280b 100644 --- a/src/REL/d/a/obj/d_a_obj_mapparts.cpp +++ b/src/REL/d/a/obj/d_a_obj_mapparts.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_mapparts.h" SPECIAL_ACTOR_PROFILE(OBJ_MAPPARTS, dAcOMapparts_c, fProfile::OBJ_MAPPARTS, 0x288, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_megami_island.cpp b/src/REL/d/a/obj/d_a_obj_megami_island.cpp index acc2c681..92e34933 100644 --- a/src/REL/d/a/obj/d_a_obj_megami_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_megami_island.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_megami_island.h" SPECIAL_ACTOR_PROFILE(OBJ_MEGAMI_ISLAND, dAcOmegamiIsland_c, fProfile::OBJ_MEGAMI_ISLAND, 0x1F3, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_mg_pumpkin.cpp b/src/REL/d/a/obj/d_a_obj_mg_pumpkin.cpp index 30713862..95c536bf 100644 --- a/src/REL/d/a/obj/d_a_obj_mg_pumpkin.cpp +++ b/src/REL/d/a/obj/d_a_obj_mg_pumpkin.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_mg_pumpkin.h" SPECIAL_ACTOR_PROFILE(OBJ_MG_PUMPKIN, dAcOMgPumpkin_c, fProfile::OBJ_MG_PUMPKIN, 0x14D, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_mole_cover.cpp b/src/REL/d/a/obj/d_a_obj_mole_cover.cpp index 09cc4190..6baa0ca1 100644 --- a/src/REL/d/a/obj/d_a_obj_mole_cover.cpp +++ b/src/REL/d/a/obj/d_a_obj_mole_cover.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_mole_cover.h" SPECIAL_ACTOR_PROFILE(OBJ_MOLE_COVER, dAcOmoleCover_c, fProfile::OBJ_MOLE_COVER, 0x20F, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_mole_soil.cpp b/src/REL/d/a/obj/d_a_obj_mole_soil.cpp index f3da21eb..c4079824 100644 --- a/src/REL/d/a/obj/d_a_obj_mole_soil.cpp +++ b/src/REL/d/a/obj/d_a_obj_mole_soil.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_mole_soil.h" + +#include "s/s_Math.h" + SPECIAL_ACTOR_PROFILE(OBJ_MOLE_SOIL, dAcOmoleSoil_c, fProfile::OBJ_MOLE_SOIL, 0x008B, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_move_elec.cpp b/src/REL/d/a/obj/d_a_obj_move_elec.cpp index 796500e4..3f6db76a 100644 --- a/src/REL/d/a/obj/d_a_obj_move_elec.cpp +++ b/src/REL/d/a/obj/d_a_obj_move_elec.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_move_elec.h" SPECIAL_ACTOR_PROFILE(OBJ_MOVE_ELEC, dAcOMoveElec_c, fProfile::OBJ_MOVE_ELEC, 0x1A8, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_move_lift_vol.cpp b/src/REL/d/a/obj/d_a_obj_move_lift_vol.cpp index 930a6c4c..20c292d2 100644 --- a/src/REL/d/a/obj/d_a_obj_move_lift_vol.cpp +++ b/src/REL/d/a/obj/d_a_obj_move_lift_vol.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_move_lift_vol.h" SPECIAL_ACTOR_PROFILE(OBJ_MOVE_LIFT_VOL, dAcOmoveLiftVol_c, fProfile::OBJ_MOVE_LIFT_VOL, 0x269, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_musasabi.cpp b/src/REL/d/a/obj/d_a_obj_musasabi.cpp index 45142d76..4bc70739 100644 --- a/src/REL/d/a/obj/d_a_obj_musasabi.cpp +++ b/src/REL/d/a/obj/d_a_obj_musasabi.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_musasabi.h" SPECIAL_ACTOR_PROFILE(OBJ_MUSASABI, dAcOmusasabi_c, fProfile::OBJ_MUSASABI, 0x1C3, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_mushroom.cpp b/src/REL/d/a/obj/d_a_obj_mushroom.cpp index 3650f438..f5900665 100644 --- a/src/REL/d/a/obj/d_a_obj_mushroom.cpp +++ b/src/REL/d/a/obj/d_a_obj_mushroom.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_mushroom.h" SPECIAL_ACTOR_PROFILE(OBJ_MUSHROOM, dAcOMushRoom_c, fProfile::OBJ_MUSHROOM, 0x141, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_needle_desert.cpp b/src/REL/d/a/obj/d_a_obj_needle_desert.cpp index 7ddc4f28..946e8f8a 100644 --- a/src/REL/d/a/obj/d_a_obj_needle_desert.cpp +++ b/src/REL/d/a/obj/d_a_obj_needle_desert.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_needle_desert.h" SPECIAL_ACTOR_PROFILE(OBJ_NEEDLE_DESERT, dAcONeedleDesert_c, fProfile::OBJ_NEEDLE_DESERT, 0x1AA, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_needle_underground.cpp b/src/REL/d/a/obj/d_a_obj_needle_underground.cpp index 764bbbac..c6593978 100644 --- a/src/REL/d/a/obj/d_a_obj_needle_underground.cpp +++ b/src/REL/d/a/obj/d_a_obj_needle_underground.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_needle_underground.h" SPECIAL_ACTOR_PROFILE(OBJ_NEEDLE_UNDERGROUND, dAcONeedleUnderground_c, fProfile::OBJ_NEEDLE_UNDERGROUND, 0x27C, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_oct_grass.cpp b/src/REL/d/a/obj/d_a_obj_oct_grass.cpp index ddf7be0b..c36f043a 100644 --- a/src/REL/d/a/obj/d_a_obj_oct_grass.cpp +++ b/src/REL/d/a/obj/d_a_obj_oct_grass.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_oct_grass.h" SPECIAL_ACTOR_PROFILE(OBJ_OCT_GRASS, dAcOOctGrass_c, fProfile::OBJ_OCT_GRASS, 0x236, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_oct_grass_leaf.cpp b/src/REL/d/a/obj/d_a_obj_oct_grass_leaf.cpp index d675355a..7474fcd5 100644 --- a/src/REL/d/a/obj/d_a_obj_oct_grass_leaf.cpp +++ b/src/REL/d/a/obj/d_a_obj_oct_grass_leaf.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_oct_grass_leaf.h" SPECIAL_ACTOR_PROFILE(OBJ_OCT_GRASS_LEAF, dAcOOctGrassLeaf_c, fProfile::OBJ_OCT_GRASS_LEAF, 0x237, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_paint.cpp b/src/REL/d/a/obj/d_a_obj_paint.cpp index c730695e..9b74a0db 100644 --- a/src/REL/d/a/obj/d_a_obj_paint.cpp +++ b/src/REL/d/a/obj/d_a_obj_paint.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_paint.h" SPECIAL_ACTOR_PROFILE(OBJ_PAINT, dAcOpaint_c, fProfile::OBJ_PAINT, 0x163, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_pinwheel.cpp b/src/REL/d/a/obj/d_a_obj_pinwheel.cpp index 3cf50ed1..c6339409 100644 --- a/src/REL/d/a/obj/d_a_obj_pinwheel.cpp +++ b/src/REL/d/a/obj/d_a_obj_pinwheel.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_pinwheel.h" SPECIAL_ACTOR_PROFILE(OBJ_PINWHEEL, dAcOpinwheel_c, fProfile::OBJ_PINWHEEL, 0x1DD, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_pipe.cpp b/src/REL/d/a/obj/d_a_obj_pipe.cpp index 906a05ef..d8f97530 100644 --- a/src/REL/d/a/obj/d_a_obj_pipe.cpp +++ b/src/REL/d/a/obj/d_a_obj_pipe.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_pipe.h" SPECIAL_ACTOR_PROFILE(OBJ_PIPE, dAcOPipe_c, fProfile::OBJ_PIPE, 0xCF, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_piston.cpp b/src/REL/d/a/obj/d_a_obj_piston.cpp index 0229862e..56355bf9 100644 --- a/src/REL/d/a/obj/d_a_obj_piston.cpp +++ b/src/REL/d/a/obj/d_a_obj_piston.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_piston.h" SPECIAL_ACTOR_PROFILE(OBJ_PISTON, dAcOPiston_c, fProfile::OBJ_PISTON, 0x172, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_pole_stony.cpp b/src/REL/d/a/obj/d_a_obj_pole_stony.cpp index 286a2a15..34e78b08 100644 --- a/src/REL/d/a/obj/d_a_obj_pole_stony.cpp +++ b/src/REL/d/a/obj/d_a_obj_pole_stony.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_pole_stony.h" SPECIAL_ACTOR_PROFILE(OBJ_POLE_STONY, dAcOPoleStony_c, fProfile::OBJ_POLE_STONY, 0x272, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_pool_cock.cpp b/src/REL/d/a/obj/d_a_obj_pool_cock.cpp index c71dff6f..400350a0 100644 --- a/src/REL/d/a/obj/d_a_obj_pool_cock.cpp +++ b/src/REL/d/a/obj/d_a_obj_pool_cock.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_pool_cock.h" + +#include "d/a/obj/d_a_obj_vortex.h" +#include "s/s_Math.h" +#include "toBeSorted/room_manager.h" +#include "toBeSorted/sceneflag_manager.h" SPECIAL_ACTOR_PROFILE(OBJ_POOL_COCK, dAcOPoolCock_c, fProfile::OBJ_POOL_COCK, 0x024D, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_pot_sal.cpp b/src/REL/d/a/obj/d_a_obj_pot_sal.cpp index 1fba41d0..65cecfa3 100644 --- a/src/REL/d/a/obj/d_a_obj_pot_sal.cpp +++ b/src/REL/d/a/obj/d_a_obj_pot_sal.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_pot_sal.h" SPECIAL_ACTOR_PROFILE(OBJ_POT_SAL, dAcOpotSal_c, fProfile::OBJ_POT_SAL, 0x86, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_propeller_lift.cpp b/src/REL/d/a/obj/d_a_obj_propeller_lift.cpp index 5a958195..c65ab963 100644 --- a/src/REL/d/a/obj/d_a_obj_propeller_lift.cpp +++ b/src/REL/d/a/obj/d_a_obj_propeller_lift.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_propeller_lift.h" SPECIAL_ACTOR_PROFILE(OBJ_PROPELLER_LIFT, dAcOPropellerLift_c, fProfile::OBJ_PROPELLER_LIFT, 0x156, 0, 4099); diff --git a/src/REL/d/a/obj/d_a_obj_propera.cpp b/src/REL/d/a/obj/d_a_obj_propera.cpp index 32b0a00d..ccac39e4 100644 --- a/src/REL/d/a/obj/d_a_obj_propera.cpp +++ b/src/REL/d/a/obj/d_a_obj_propera.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_propera.h" SPECIAL_ACTOR_PROFILE(OBJ_PROPERA, dAcObjPropera_c, fProfile::OBJ_PROPERA, 0x96, 0, 386); diff --git a/src/REL/d/a/obj/d_a_obj_pumpkin_bar.cpp b/src/REL/d/a/obj/d_a_obj_pumpkin_bar.cpp index 233cf2c4..8dbecdbb 100644 --- a/src/REL/d/a/obj/d_a_obj_pumpkin_bar.cpp +++ b/src/REL/d/a/obj/d_a_obj_pumpkin_bar.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_pumpkin_bar.h" SPECIAL_ACTOR_PROFILE(OBJ_PUMPKIN_BAR, dAcOpumpkinBar_c, fProfile::OBJ_PUMPKIN_BAR, 0x1ED, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_pumpkin_leaf.cpp b/src/REL/d/a/obj/d_a_obj_pumpkin_leaf.cpp index ec1210dc..9c132c64 100644 --- a/src/REL/d/a/obj/d_a_obj_pumpkin_leaf.cpp +++ b/src/REL/d/a/obj/d_a_obj_pumpkin_leaf.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_pumpkin_leaf.h" + +#include "s/s_Math.h" + SPECIAL_ACTOR_PROFILE(OBJ_PUMPKIN_LEAF, dAcOPumpkinLeaf_c, fProfile::OBJ_PUMPKIN_LEAF, 0x0135, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_push_block.cpp b/src/REL/d/a/obj/d_a_obj_push_block.cpp index 6613f2b1..4d18c9b0 100644 --- a/src/REL/d/a/obj/d_a_obj_push_block.cpp +++ b/src/REL/d/a/obj/d_a_obj_push_block.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_push_block.h" SPECIAL_ACTOR_PROFILE(OBJ_PUSH_BLOCK, dAcOpushBlk_c, fProfile::OBJ_PUSH_BLOCK, 0x12D, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp b/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp index 77d9fc8d..c823a141 100644 --- a/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_puzzle_island.h" SPECIAL_ACTOR_PROFILE(OBJ_PUZZLE_ISLAND, dAcOpuzzleIsland_c, fProfile::OBJ_PUZZLE_ISLAND, 0x1D6, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_rail_end.cpp b/src/REL/d/a/obj/d_a_obj_rail_end.cpp index 50d14f98..8aeb53f7 100644 --- a/src/REL/d/a/obj/d_a_obj_rail_end.cpp +++ b/src/REL/d/a/obj/d_a_obj_rail_end.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_rail_end.h" SPECIAL_ACTOR_PROFILE(OBJ_RAIL_END, dAcORailEnd_c, fProfile::OBJ_RAIL_END, 0x281, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_rail_post.cpp b/src/REL/d/a/obj/d_a_obj_rail_post.cpp index 8cb387ad..6498a094 100644 --- a/src/REL/d/a/obj/d_a_obj_rail_post.cpp +++ b/src/REL/d/a/obj/d_a_obj_rail_post.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_rail_post.h" SPECIAL_ACTOR_PROFILE(OBJ_RAIL_POST, dAcORailPost, fProfile::OBJ_RAIL_POST, 0x280, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_ride_rock.cpp b/src/REL/d/a/obj/d_a_obj_ride_rock.cpp index cebad506..4581acbc 100644 --- a/src/REL/d/a/obj/d_a_obj_ride_rock.cpp +++ b/src/REL/d/a/obj/d_a_obj_ride_rock.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ride_rock.h" SPECIAL_ACTOR_PROFILE(OBJ_RIDE_ROCK, dAcOrideRock_c, fProfile::OBJ_RIDE_ROCK, 0x267, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_ring.cpp b/src/REL/d/a/obj/d_a_obj_ring.cpp index d35c7cb7..b2fca86a 100644 --- a/src/REL/d/a/obj/d_a_obj_ring.cpp +++ b/src/REL/d/a/obj/d_a_obj_ring.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_ring.h" + +#include "d/a/d_a_player.h" +#include "nw4r/g3d/g3d_resfile.h" SPECIAL_ACTOR_PROFILE(OBJ_RING, dAcOring_c, fProfile::OBJ_RING, 0x00f2, 0, 0x103); diff --git a/src/REL/d/a/obj/d_a_obj_ro_at_target.cpp b/src/REL/d/a/obj/d_a_obj_ro_at_target.cpp index 39350cc4..38873296 100644 --- a/src/REL/d/a/obj/d_a_obj_ro_at_target.cpp +++ b/src/REL/d/a/obj/d_a_obj_ro_at_target.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ro_at_target.h" SPECIAL_ACTOR_PROFILE(OBJ_RO_AT_TARGET, dAcOroAtTarget_c, fProfile::OBJ_RO_AT_TARGET, 0x1FE, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_rock_boat.cpp b/src/REL/d/a/obj/d_a_obj_rock_boat.cpp index f633d679..0d50012d 100644 --- a/src/REL/d/a/obj/d_a_obj_rock_boat.cpp +++ b/src/REL/d/a/obj/d_a_obj_rock_boat.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_rock_boat.h" SPECIAL_ACTOR_PROFILE(OBJ_ROCK_BOAT, dAcORockBoat_c, fProfile::OBJ_ROCK_BOAT, 0x148, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_rock_dragon.cpp b/src/REL/d/a/obj/d_a_obj_rock_dragon.cpp index 9f9ef9dd..cfc59920 100644 --- a/src/REL/d/a/obj/d_a_obj_rock_dragon.cpp +++ b/src/REL/d/a/obj/d_a_obj_rock_dragon.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_rock_dragon.h" SPECIAL_ACTOR_PROFILE(OBJ_ROCK_DRAGON, dAcORockDragon_c, fProfile::OBJ_ROCK_DRAGON, 0x147, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_rock_sky.cpp b/src/REL/d/a/obj/d_a_obj_rock_sky.cpp index 89abf923..7c7ed4f8 100644 --- a/src/REL/d/a/obj/d_a_obj_rock_sky.cpp +++ b/src/REL/d/a/obj/d_a_obj_rock_sky.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_rock_sky.h" SPECIAL_ACTOR_PROFILE(OBJ_ROCK_SKY, dAcOrockSky_c, fProfile::OBJ_ROCK_SKY, 0x205, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_roll_pillar.cpp b/src/REL/d/a/obj/d_a_obj_roll_pillar.cpp index 1b1b228a..056736dd 100644 --- a/src/REL/d/a/obj/d_a_obj_roll_pillar.cpp +++ b/src/REL/d/a/obj/d_a_obj_roll_pillar.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_roll_pillar.h" SPECIAL_ACTOR_PROFILE(OBJ_ROLL_PILLAR, dAcORollPillar_c, fProfile::OBJ_ROLL_PILLAR, 0x13C, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_roll_rock.cpp b/src/REL/d/a/obj/d_a_obj_roll_rock.cpp index 858682d1..642b9056 100644 --- a/src/REL/d/a/obj/d_a_obj_roll_rock.cpp +++ b/src/REL/d/a/obj/d_a_obj_roll_rock.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_roll_rock.h" SPECIAL_ACTOR_PROFILE(OBJ_ROLL_ROCK, dAcOrollRock_c, fProfile::OBJ_ROLL_ROCK, 0x266, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_rope_base.cpp b/src/REL/d/a/obj/d_a_obj_rope_base.cpp index 2a1427b3..9431e1cf 100644 --- a/src/REL/d/a/obj/d_a_obj_rope_base.cpp +++ b/src/REL/d/a/obj/d_a_obj_rope_base.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_rope_base.h" SPECIAL_ACTOR_PROFILE(OBJ_ROPE_BASE, dAcOropeBase_c, fProfile::OBJ_ROPE_BASE, 0x216, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_rope_igaiga.cpp b/src/REL/d/a/obj/d_a_obj_rope_igaiga.cpp index 1a8d97a2..1d80fc4a 100644 --- a/src/REL/d/a/obj/d_a_obj_rope_igaiga.cpp +++ b/src/REL/d/a/obj/d_a_obj_rope_igaiga.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_rope_igaiga.h" SPECIAL_ACTOR_PROFILE(OBJ_ROPE_IGAIGA, dAcOropeIgaiga_c, fProfile::OBJ_ROPE_IGAIGA, 0x265, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_rotation_light.cpp b/src/REL/d/a/obj/d_a_obj_rotation_light.cpp index 7f81640e..23c00182 100644 --- a/src/REL/d/a/obj/d_a_obj_rotation_light.cpp +++ b/src/REL/d/a/obj/d_a_obj_rotation_light.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_rotation_light.h" SPECIAL_ACTOR_PROFILE(OBJ_ROTATION_LIGHT, dAcOrotationLight_c, fProfile::OBJ_ROTATION_LIGHT, 0x1BA, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_roulette.cpp b/src/REL/d/a/obj/d_a_obj_roulette.cpp index 3f177e4f..e6143327 100644 --- a/src/REL/d/a/obj/d_a_obj_roulette.cpp +++ b/src/REL/d/a/obj/d_a_obj_roulette.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_roulette.h" SPECIAL_ACTOR_PROFILE(OBJ_ROULETTE, dAcObjRoulette_c, fProfile::OBJ_ROULETTE, 0x97, 0, 384); diff --git a/src/REL/d/a/obj/d_a_obj_roulette_island_c.cpp b/src/REL/d/a/obj/d_a_obj_roulette_island_c.cpp index 04a0ee43..ec2412c0 100644 --- a/src/REL/d/a/obj/d_a_obj_roulette_island_c.cpp +++ b/src/REL/d/a/obj/d_a_obj_roulette_island_c.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_roulette_island_c.h" SPECIAL_ACTOR_PROFILE(OBJ_ROULETTE_ISLAND_C, dAcOrouletteIslandC_c, fProfile::OBJ_ROULETTE_ISLAND_C, 0x1CA, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_roulette_island_r.cpp b/src/REL/d/a/obj/d_a_obj_roulette_island_r.cpp index 2f0eac03..c95691ab 100644 --- a/src/REL/d/a/obj/d_a_obj_roulette_island_r.cpp +++ b/src/REL/d/a/obj/d_a_obj_roulette_island_r.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_roulette_island_r.h" SPECIAL_ACTOR_PROFILE(OBJ_ROULETTE_ISLAND_R, dAcOrouletteIslandR_c, fProfile::OBJ_ROULETTE_ISLAND_R, 0x1CB, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_ruined_save.cpp b/src/REL/d/a/obj/d_a_obj_ruined_save.cpp index cecdb27b..1dbc35ad 100644 --- a/src/REL/d/a/obj/d_a_obj_ruined_save.cpp +++ b/src/REL/d/a/obj/d_a_obj_ruined_save.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ruined_save.h" SPECIAL_ACTOR_PROFILE(OBJ_RUINED_SAVE, dAcOruinedSave_c, fProfile::OBJ_RUINED_SAVE, 0x15C, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_sail.cpp b/src/REL/d/a/obj/d_a_obj_sail.cpp index 6e83d5e4..b9d88a32 100644 --- a/src/REL/d/a/obj/d_a_obj_sail.cpp +++ b/src/REL/d/a/obj/d_a_obj_sail.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sail.h" SPECIAL_ACTOR_PROFILE(OBJ_SAIL, dAcOSail_c, fProfile::OBJ_SAIL, 0x171, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_sand_D301.cpp b/src/REL/d/a/obj/d_a_obj_sand_D301.cpp index 301bdcfc..7d228c2b 100644 --- a/src/REL/d/a/obj/d_a_obj_sand_D301.cpp +++ b/src/REL/d/a/obj/d_a_obj_sand_D301.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sand_D301.h" SPECIAL_ACTOR_PROFILE(OBJ_SAND_D301, dAcOSandD301_c, fProfile::OBJ_SAND_D301, 0x1AB, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_sand_floor.cpp b/src/REL/d/a/obj/d_a_obj_sand_floor.cpp index d2d9775f..88bf0353 100644 --- a/src/REL/d/a/obj/d_a_obj_sand_floor.cpp +++ b/src/REL/d/a/obj/d_a_obj_sand_floor.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sand_floor.h" SPECIAL_ACTOR_PROFILE(OBJ_SAND_FLOOR, dAcOSandFloor_c, fProfile::OBJ_SAND_FLOOR, 0x176, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_sandbag.cpp b/src/REL/d/a/obj/d_a_obj_sandbag.cpp index da7e03d2..0c7f4a3a 100644 --- a/src/REL/d/a/obj/d_a_obj_sandbag.cpp +++ b/src/REL/d/a/obj/d_a_obj_sandbag.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sandbag.h" SPECIAL_ACTOR_PROFILE(OBJ_SANDBAG, dAcOSandbag_c, fProfile::OBJ_SANDBAG, 0x162, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_save.cpp b/src/REL/d/a/obj/d_a_obj_save.cpp index 89d667e0..2b0787cd 100644 --- a/src/REL/d/a/obj/d_a_obj_save.cpp +++ b/src/REL/d/a/obj/d_a_obj_save.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_save.h" SPECIAL_ACTOR_PROFILE(OBJ_SAVE, dAcOSave_c, fProfile::OBJ_SAVE, 0x273, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_scattersand.cpp b/src/REL/d/a/obj/d_a_obj_scattersand.cpp index 19c38179..0ce29d2e 100644 --- a/src/REL/d/a/obj/d_a_obj_scattersand.cpp +++ b/src/REL/d/a/obj/d_a_obj_scattersand.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_scattersand.h" SPECIAL_ACTOR_PROFILE(OBJ_VSD, dAcOScatterSand, fProfile::OBJ_VSD, 0xD8, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_sea_F301.cpp b/src/REL/d/a/obj/d_a_obj_sea_F301.cpp index af28320e..552fa530 100644 --- a/src/REL/d/a/obj/d_a_obj_sea_F301.cpp +++ b/src/REL/d/a/obj/d_a_obj_sea_F301.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sea_F301.h" SPECIAL_ACTOR_PROFILE(OBJ_SEA_F301, dAcOSeaF301_c, fProfile::OBJ_SEA_F301, 0x253, 0, 5); diff --git a/src/REL/d/a/obj/d_a_obj_sealed_door.cpp b/src/REL/d/a/obj/d_a_obj_sealed_door.cpp index f7d10eeb..a56a6cef 100644 --- a/src/REL/d/a/obj/d_a_obj_sealed_door.cpp +++ b/src/REL/d/a/obj/d_a_obj_sealed_door.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sealed_door.h" SPECIAL_ACTOR_PROFILE(OBJ_SEALED_DOOR, dAcOsealedDoor_c, fProfile::OBJ_SEALED_DOOR, 0x1F1, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_seat_sword.cpp b/src/REL/d/a/obj/d_a_obj_seat_sword.cpp index 5230de5b..c4d65b96 100644 --- a/src/REL/d/a/obj/d_a_obj_seat_sword.cpp +++ b/src/REL/d/a/obj/d_a_obj_seat_sword.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_seat_sword.h" SPECIAL_ACTOR_PROFILE(OBJ_SEAT_SWORD, dAcOSeatSword_c, fProfile::OBJ_SEAT_SWORD, 0x249, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_shed.cpp b/src/REL/d/a/obj/d_a_obj_shed.cpp index a58450fe..bb941e8d 100644 --- a/src/REL/d/a/obj/d_a_obj_shed.cpp +++ b/src/REL/d/a/obj/d_a_obj_shed.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_shed.h" SPECIAL_ACTOR_PROFILE(OBJ_SHED, dAcOShed_c, fProfile::OBJ_SHED, 0x256, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_ship_window.cpp b/src/REL/d/a/obj/d_a_obj_ship_window.cpp index 838eb6f2..ad016e99 100644 --- a/src/REL/d/a/obj/d_a_obj_ship_window.cpp +++ b/src/REL/d/a/obj/d_a_obj_ship_window.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_ship_window.h" SPECIAL_ACTOR_PROFILE(OBJ_SHIP_WINDOW, dAcOshipWindow_c, fProfile::OBJ_SHIP_WINDOW, 0x1EB, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_shrine_after.cpp b/src/REL/d/a/obj/d_a_obj_shrine_after.cpp index 21dfd936..4eba6d77 100644 --- a/src/REL/d/a/obj/d_a_obj_shrine_after.cpp +++ b/src/REL/d/a/obj/d_a_obj_shrine_after.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_shrine_after.h" SPECIAL_ACTOR_PROFILE(OBJ_SHRINE_AFTER, dAcOshrineAfter_c, fProfile::OBJ_SHRINE_AFTER, 0x1E9, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_shrine_bef_inside.cpp b/src/REL/d/a/obj/d_a_obj_shrine_bef_inside.cpp index 3effa14f..49da5371 100644 --- a/src/REL/d/a/obj/d_a_obj_shrine_bef_inside.cpp +++ b/src/REL/d/a/obj/d_a_obj_shrine_bef_inside.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_shrine_bef_inside.h" SPECIAL_ACTOR_PROFILE(OBJ_SHRINE_BEF_INSIDE, dAcOshrineBefInside_c, fProfile::OBJ_SHRINE_BEF_INSIDE, 0x209, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_shrine_before.cpp b/src/REL/d/a/obj/d_a_obj_shrine_before.cpp index 94f61497..ab07cfdd 100644 --- a/src/REL/d/a/obj/d_a_obj_shrine_before.cpp +++ b/src/REL/d/a/obj/d_a_obj_shrine_before.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_shrine_before.h" SPECIAL_ACTOR_PROFILE(OBJ_SHRINE_BEFORE, dAcOshrineBefore_c, fProfile::OBJ_SHRINE_BEFORE, 0x1EA, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_shutter.cpp b/src/REL/d/a/obj/d_a_obj_shutter.cpp index 95f90d7b..15280653 100644 --- a/src/REL/d/a/obj/d_a_obj_shutter.cpp +++ b/src/REL/d/a/obj/d_a_obj_shutter.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_shutter.h" SPECIAL_ACTOR_PROFILE(SHUTTER, dAcOShutter_c, fProfile::SHUTTER, 0x183, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_shutter_change_scene.cpp b/src/REL/d/a/obj/d_a_obj_shutter_change_scene.cpp index d0ffc865..998f6580 100644 --- a/src/REL/d/a/obj/d_a_obj_shutter_change_scene.cpp +++ b/src/REL/d/a/obj/d_a_obj_shutter_change_scene.cpp @@ -1,6 +1,8 @@ -#include +#include "d/a/obj/d_a_obj_shutter_change_scene.h" -SPECIAL_ACTOR_PROFILE(OBJ_SHUTTER_CHANGE_SCENE, dAcOShutterChangeScene_c, fProfile::OBJ_SHUTTER_CHANGE_SCENE, 0x18A, 0, 6); +SPECIAL_ACTOR_PROFILE( + OBJ_SHUTTER_CHANGE_SCENE, dAcOShutterChangeScene_c, fProfile::OBJ_SHUTTER_CHANGE_SCENE, 0x18A, 0, 6 +); STATE_DEFINE(dAcOShutterChangeScene_c, WaitOpenShutter); STATE_DEFINE(dAcOShutterChangeScene_c, WaitOpenShutterForEvent); diff --git a/src/REL/d/a/obj/d_a_obj_shutter_fence.cpp b/src/REL/d/a/obj/d_a_obj_shutter_fence.cpp index 7b80eb23..1d6e9e42 100644 --- a/src/REL/d/a/obj/d_a_obj_shutter_fence.cpp +++ b/src/REL/d/a/obj/d_a_obj_shutter_fence.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_shutter_fence.h" SPECIAL_ACTOR_PROFILE(OBJ_SHUTTER_FENCE, dAcOshutterfence_c, fProfile::OBJ_SHUTTER_FENCE, 0x19F, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_shutter_waterD101.cpp b/src/REL/d/a/obj/d_a_obj_shutter_waterD101.cpp index c04b44f2..ec9cca7a 100644 --- a/src/REL/d/a/obj/d_a_obj_shutter_waterD101.cpp +++ b/src/REL/d/a/obj/d_a_obj_shutter_waterD101.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_shutter_waterD101.h" SPECIAL_ACTOR_PROFILE(OBJ_SHUTTER_WATER_D101, dAcOShutterWaterD101_c, fProfile::OBJ_SHUTTER_WATER_D101, 0x17F, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_side_shutter.cpp b/src/REL/d/a/obj/d_a_obj_side_shutter.cpp index fe6339a6..55c0b06b 100644 --- a/src/REL/d/a/obj/d_a_obj_side_shutter.cpp +++ b/src/REL/d/a/obj/d_a_obj_side_shutter.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_side_shutter.h" SPECIAL_ACTOR_PROFILE(OBJ_SIDE_SHUTTER, dAcOsideShutter_c, fProfile::OBJ_SIDE_SHUTTER, 0x1BD, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_sink_floor_f.cpp b/src/REL/d/a/obj/d_a_obj_sink_floor_f.cpp index c321794a..96782585 100644 --- a/src/REL/d/a/obj/d_a_obj_sink_floor_f.cpp +++ b/src/REL/d/a/obj/d_a_obj_sink_floor_f.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sink_floor_f.h" SPECIAL_ACTOR_PROFILE(OBJ_SINK_FLOOR_F, dAcOSinkFloorF_c, fProfile::OBJ_SINK_FLOOR_F, 0x22E, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_siren_2dmap.cpp b/src/REL/d/a/obj/d_a_obj_siren_2dmap.cpp index dc5a2432..562cb7c7 100644 --- a/src/REL/d/a/obj/d_a_obj_siren_2dmap.cpp +++ b/src/REL/d/a/obj/d_a_obj_siren_2dmap.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_siren_2dmap.h" SPECIAL_ACTOR_PROFILE(OBJ_SIREN_2DMAP, dAcOsiren2dmap_c, fProfile::OBJ_SIREN_2DMAP, 0x21A, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_siren_barrier.cpp b/src/REL/d/a/obj/d_a_obj_siren_barrier.cpp index da952ec1..6dd61221 100644 --- a/src/REL/d/a/obj/d_a_obj_siren_barrier.cpp +++ b/src/REL/d/a/obj/d_a_obj_siren_barrier.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_siren_barrier.h" SPECIAL_ACTOR_PROFILE(OBJ_SIREN_BARRIER, dAcOSirenBarrier_c, fProfile::OBJ_SIREN_BARRIER, 0x1A5, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_skull.cpp b/src/REL/d/a/obj/d_a_obj_skull.cpp index ec627ff3..4dff3923 100644 --- a/src/REL/d/a/obj/d_a_obj_skull.cpp +++ b/src/REL/d/a/obj/d_a_obj_skull.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_skull.h" SPECIAL_ACTOR_PROFILE(OBJ_SKULL, dAcOSkull_c, fProfile::OBJ_SKULL, 0x165, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_slice_log.cpp b/src/REL/d/a/obj/d_a_obj_slice_log.cpp index b9f6ee78..0e5fa9c3 100644 --- a/src/REL/d/a/obj/d_a_obj_slice_log.cpp +++ b/src/REL/d/a/obj/d_a_obj_slice_log.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_slice_log.h" SPECIAL_ACTOR_PROFILE(OBJ_SLICE_LOG, dAcOsliceLog_c, fProfile::OBJ_SLICE_LOG, 0x1F5, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_slice_log_parts.cpp b/src/REL/d/a/obj/d_a_obj_slice_log_parts.cpp index 9b32a22a..aafe6abc 100644 --- a/src/REL/d/a/obj/d_a_obj_slice_log_parts.cpp +++ b/src/REL/d/a/obj/d_a_obj_slice_log_parts.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_slice_log_parts.h" SPECIAL_ACTOR_PROFILE(OBJ_SLICE_LOG_PARTS, dAcOsliceLogParts_c, fProfile::OBJ_SLICE_LOG_PARTS, 0x1F6, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_smoke.cpp b/src/REL/d/a/obj/d_a_obj_smoke.cpp index 90a16c4d..6f654b9b 100644 --- a/src/REL/d/a/obj/d_a_obj_smoke.cpp +++ b/src/REL/d/a/obj/d_a_obj_smoke.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_smoke.h" static const char *const sSmokeNames1[] = { "SmokeF200", diff --git a/src/REL/d/a/obj/d_a_obj_soil.cpp b/src/REL/d/a/obj/d_a_obj_soil.cpp index 87aadea7..e1d5fa86 100644 --- a/src/REL/d/a/obj/d_a_obj_soil.cpp +++ b/src/REL/d/a/obj/d_a_obj_soil.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_soil.h" SPECIAL_ACTOR_PROFILE(OBJ_SOIL, dAcOsoil_c, fProfile::OBJ_SOIL, 0x268, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_spider_line.cpp b/src/REL/d/a/obj/d_a_obj_spider_line.cpp index 1c2233f6..326b4fd5 100644 --- a/src/REL/d/a/obj/d_a_obj_spider_line.cpp +++ b/src/REL/d/a/obj/d_a_obj_spider_line.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_spider_line.h" SPECIAL_ACTOR_PROFILE(OBJ_SPIDER_LINE, dObjSpiderLine_c, fProfile::OBJ_SPIDER_LINE, 0xDA, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_spike.cpp b/src/REL/d/a/obj/d_a_obj_spike.cpp index 0031d51a..8c2e2b4d 100644 --- a/src/REL/d/a/obj/d_a_obj_spike.cpp +++ b/src/REL/d/a/obj/d_a_obj_spike.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_spike.h" + +#include "d/col/cc/d_cc_mgr.h" + SPECIAL_ACTOR_PROFILE(OBJ_SPIKE, dAcOspike_c, fProfile::OBJ_SPIKE, 0x1D9, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_stage_cover.cpp b/src/REL/d/a/obj/d_a_obj_stage_cover.cpp index c21bc94b..57de6496 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_cover.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_cover.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_stage_cover.h" + +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" + SPECIAL_ACTOR_PROFILE(OBJ_STAGE_COVER, dAcOstageCover_c, fProfile::OBJ_STAGE_COVER, 0x01E1, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_stage_crack.cpp b/src/REL/d/a/obj/d_a_obj_stage_crack.cpp index 52b2981e..bcb28c56 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_crack.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_crack.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stage_crack.h" SPECIAL_ACTOR_PROFILE(OBJ_STAGE_CRACK, dAcOstageCrack_c, fProfile::OBJ_STAGE_CRACK, 0x1E0, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_stage_debris.cpp b/src/REL/d/a/obj/d_a_obj_stage_debris.cpp index c20736a3..ed477a24 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_debris.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_debris.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stage_debris.h" SPECIAL_ACTOR_PROFILE(OBJ_STAGE_DEBRIS, dAcOstageDebris_c, fProfile::OBJ_STAGE_DEBRIS, 0x1F8, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_stage_kraken.cpp b/src/REL/d/a/obj/d_a_obj_stage_kraken.cpp index 054df9cf..2a083886 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_kraken.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_kraken.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stage_kraken.h" SPECIAL_ACTOR_PROFILE(OBJ_STAGE_KRAKEN, dAcOstageKraken_c, fProfile::OBJ_STAGE_KRAKEN, 0x1BE, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_stage_kraken_parts.cpp b/src/REL/d/a/obj/d_a_obj_stage_kraken_parts.cpp index 22ccb837..0b13feb9 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_kraken_parts.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_kraken_parts.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stage_kraken_parts.h" SPECIAL_ACTOR_PROFILE(OBJ_STAGE_KRAKEN_PARTS, dAcOstageKrakenParts_c, fProfile::OBJ_STAGE_KRAKEN_PARTS, 0x1BF, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_stage_sink.cpp b/src/REL/d/a/obj/d_a_obj_stage_sink.cpp index f97be0ce..d93508ba 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_sink.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_sink.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stage_sink.h" SPECIAL_ACTOR_PROFILE(OBJ_STAGE_SINK, dAcOstageSink_c, fProfile::OBJ_STAGE_SINK, 0x1E5, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_stage_water.cpp b/src/REL/d/a/obj/d_a_obj_stage_water.cpp index 030d27cd..6f9eb6cf 100644 --- a/src/REL/d/a/obj/d_a_obj_stage_water.cpp +++ b/src/REL/d/a/obj/d_a_obj_stage_water.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stage_water.h" SPECIAL_ACTOR_PROFILE(OBJ_STAGE_WATER, dAcOstageWater_c, fProfile::OBJ_STAGE_WATER, 0x1E6, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_step_gumarm.cpp b/src/REL/d/a/obj/d_a_obj_step_gumarm.cpp index b2466ec3..5cf20f34 100644 --- a/src/REL/d/a/obj/d_a_obj_step_gumarm.cpp +++ b/src/REL/d/a/obj/d_a_obj_step_gumarm.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_step_gumarm.h" SPECIAL_ACTOR_PROFILE(OBJ_STEP_GUMARM, dAcOStepGumarm_c, fProfile::OBJ_STEP_GUMARM, 0x22F, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_step_statue.cpp b/src/REL/d/a/obj/d_a_obj_step_statue.cpp index de93e093..faaba7b5 100644 --- a/src/REL/d/a/obj/d_a_obj_step_statue.cpp +++ b/src/REL/d/a/obj/d_a_obj_step_statue.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_step_statue.h" SPECIAL_ACTOR_PROFILE(OBJ_STEP_STATUE, dAcOStepStatue_c, fProfile::OBJ_STEP_STATUE, 0x17C, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_step_time_slip.cpp b/src/REL/d/a/obj/d_a_obj_step_time_slip.cpp index ef30f6e2..572bcec7 100644 --- a/src/REL/d/a/obj/d_a_obj_step_time_slip.cpp +++ b/src/REL/d/a/obj/d_a_obj_step_time_slip.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_step_time_slip.h" SPECIAL_ACTOR_PROFILE(OBJ_STEP_TIME_SLIP, dAcOStepTimeSlip_c, fProfile::OBJ_STEP_TIME_SLIP, 0x19D, 0, 4102); diff --git a/src/REL/d/a/obj/d_a_obj_stone_stand.cpp b/src/REL/d/a/obj/d_a_obj_stone_stand.cpp index f4582a28..9e074264 100644 --- a/src/REL/d/a/obj/d_a_obj_stone_stand.cpp +++ b/src/REL/d/a/obj/d_a_obj_stone_stand.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stone_stand.h" SPECIAL_ACTOR_PROFILE(OBJ_STONE_STAND, dAcOStoneStand_c, fProfile::OBJ_STONE_STAND, 0x24B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_stopper_rock.cpp b/src/REL/d/a/obj/d_a_obj_stopper_rock.cpp index 7f0c158f..5db80f08 100644 --- a/src/REL/d/a/obj/d_a_obj_stopper_rock.cpp +++ b/src/REL/d/a/obj/d_a_obj_stopper_rock.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stopper_rock.h" SPECIAL_ACTOR_PROFILE(OBJ_STOPPER_ROCK, dAcOstopperRock_c, fProfile::OBJ_STOPPER_ROCK, 0x26C, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_stopping_rope.cpp b/src/REL/d/a/obj/d_a_obj_stopping_rope.cpp index eb91870a..59b01e8a 100644 --- a/src/REL/d/a/obj/d_a_obj_stopping_rope.cpp +++ b/src/REL/d/a/obj/d_a_obj_stopping_rope.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stopping_rope.h" SPECIAL_ACTOR_PROFILE(OBJ_STOPPING_ROPE, dAcOStoppingRope_c, fProfile::OBJ_STOPPING_ROPE, 0x23B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_stream_lava.cpp b/src/REL/d/a/obj/d_a_obj_stream_lava.cpp index 39f5d8e2..0de85e82 100644 --- a/src/REL/d/a/obj/d_a_obj_stream_lava.cpp +++ b/src/REL/d/a/obj/d_a_obj_stream_lava.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_stream_lava.h" SPECIAL_ACTOR_PROFILE(OBJ_STREAM_LAVA, dAcOstreamLava_c, fProfile::OBJ_STREAM_LAVA, 0x1FA, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_sun_light.cpp b/src/REL/d/a/obj/d_a_obj_sun_light.cpp index 35201950..6d962698 100644 --- a/src/REL/d/a/obj/d_a_obj_sun_light.cpp +++ b/src/REL/d/a/obj/d_a_obj_sun_light.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_sun_light.h" + +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" +#include "toBeSorted/room_manager.h" +#include "toBeSorted/scgame.h" + SPECIAL_ACTOR_PROFILE(OBJ_SUN_LIGHT, dAcOsunLight_c, fProfile::OBJ_SUN_LIGHT, 0x0219, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_sw_bank.cpp b/src/REL/d/a/obj/d_a_obj_sw_bank.cpp index 23551b9b..b525ea04 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_bank.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_bank.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_bank.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_BANK, dAcOSwBank_c, fProfile::OBJ_SW_BANK, 0x22B, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_sw_bank_small.cpp b/src/REL/d/a/obj/d_a_obj_sw_bank_small.cpp index 21d31537..83dbacd5 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_bank_small.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_bank_small.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_bank_small.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_BANK_SMALL, dAcOSwBankSmall_c, fProfile::OBJ_SW_BANK_SMALL, 0x22C, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_sw_dir.cpp b/src/REL/d/a/obj/d_a_obj_sw_dir.cpp index 73159891..9337ef74 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_dir.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_dir.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_dir.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_DIR, dAcOSwDir_c, fProfile::OBJ_SW_DIR, 0x229, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_sw_dir_door.cpp b/src/REL/d/a/obj/d_a_obj_sw_dir_door.cpp index 6c58f3ca..bfa2cc1d 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_dir_door.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_dir_door.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_dir_door.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_DIR_DOOR, dAcOSwDirDoor_c, fProfile::OBJ_SW_DIR_DOOR, 0x22A, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_sw_harp.cpp b/src/REL/d/a/obj/d_a_obj_sw_harp.cpp index f3f19af7..dafb37f6 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_harp.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_harp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_harp.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_HARP, dAcOSwHarp_c, fProfile::OBJ_SW_HARP, 0x1A3, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_sw_sword_beam.cpp b/src/REL/d/a/obj/d_a_obj_sw_sword_beam.cpp index 0bd9f493..3ba730b1 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_sword_beam.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_sword_beam.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_sword_beam.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_SWORD_BEAM, dAcOSwSwordBeam_c, fProfile::OBJ_SW_SWORD_BEAM, 0x1A2, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_sw_syako.cpp b/src/REL/d/a/obj/d_a_obj_sw_syako.cpp index 6c3200f7..2a7d0612 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_syako.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_syako.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_syako.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_SYAKO, dAcOSwSyako_c, fProfile::OBJ_SW_SYAKO, 0x177, 0, 4099); diff --git a/src/REL/d/a/obj/d_a_obj_sw_whiplever.cpp b/src/REL/d/a/obj/d_a_obj_sw_whiplever.cpp index af62ab6d..cc70af4c 100644 --- a/src/REL/d/a/obj/d_a_obj_sw_whiplever.cpp +++ b/src/REL/d/a/obj/d_a_obj_sw_whiplever.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sw_whiplever.h" SPECIAL_ACTOR_PROFILE(OBJ_SW_WHIPLEVER, dAcOSwWhipLever_c, fProfile::OBJ_SW_WHIPLEVER, 0x139, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_swhit.cpp b/src/REL/d/a/obj/d_a_obj_swhit.cpp index ec343d21..fa6bc351 100644 --- a/src/REL/d/a/obj/d_a_obj_swhit.cpp +++ b/src/REL/d/a/obj/d_a_obj_swhit.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_swhit.h" SPECIAL_ACTOR_PROFILE(OBJ_SWHIT, dAcOswhit_c, fProfile::OBJ_SWHIT, 0x132, 0, 18); diff --git a/src/REL/d/a/obj/d_a_obj_switch_shutter.cpp b/src/REL/d/a/obj/d_a_obj_switch_shutter.cpp index 28d8ce7b..07d34705 100644 --- a/src/REL/d/a/obj/d_a_obj_switch_shutter.cpp +++ b/src/REL/d/a/obj/d_a_obj_switch_shutter.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_switch_shutter.h" SPECIAL_ACTOR_PROFILE(OBJ_SWITCH_SHUTTER, dAcOSwShutter_c, fProfile::OBJ_SWITCH_SHUTTER, 0x13A, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_switch_wall.cpp b/src/REL/d/a/obj/d_a_obj_switch_wall.cpp index d3411387..730c6e99 100644 --- a/src/REL/d/a/obj/d_a_obj_switch_wall.cpp +++ b/src/REL/d/a/obj/d_a_obj_switch_wall.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_switch_wall.h" SPECIAL_ACTOR_PROFILE(OBJ_SWITCH_WALL, dAcOswitchWall_c, fProfile::OBJ_SWITCH_WALL, 0x191, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_sword_candle.cpp b/src/REL/d/a/obj/d_a_obj_sword_candle.cpp index 56fb209a..23010420 100644 --- a/src/REL/d/a/obj/d_a_obj_sword_candle.cpp +++ b/src/REL/d/a/obj/d_a_obj_sword_candle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sword_candle.h" SPECIAL_ACTOR_PROFILE(OBJ_SWORD_CANDLE, dAcOSwordCandle_c, fProfile::OBJ_SWORD_CANDLE, 0x24C, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_sword_stab.cpp b/src/REL/d/a/obj/d_a_obj_sword_stab.cpp index 2bc6a5de..5e9bbe5e 100644 --- a/src/REL/d/a/obj/d_a_obj_sword_stab.cpp +++ b/src/REL/d/a/obj/d_a_obj_sword_stab.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_sword_stab.h" SPECIAL_ACTOR_PROFILE(OBJ_SWORD_STAB, dAcOSwordStab_c, fProfile::OBJ_SWORD_STAB, 0x25D, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_swrd_prj.cpp b/src/REL/d/a/obj/d_a_obj_swrd_prj.cpp index c9e777ec..0ddb4bf7 100644 --- a/src/REL/d/a/obj/d_a_obj_swrd_prj.cpp +++ b/src/REL/d/a/obj/d_a_obj_swrd_prj.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_swrd_prj.h" SPECIAL_ACTOR_PROFILE(OBJ_SWRD_PRJ, dAcOSwrdPrj, fProfile::OBJ_SWRD_PRJ, 0x27D, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_syako_shutter.cpp b/src/REL/d/a/obj/d_a_obj_syako_shutter.cpp index 2804c843..fbef7328 100644 --- a/src/REL/d/a/obj/d_a_obj_syako_shutter.cpp +++ b/src/REL/d/a/obj/d_a_obj_syako_shutter.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_syako_shutter.h" SPECIAL_ACTOR_PROFILE(OBJ_SYAKO_SHUTTER, dAcOSyakoShutter_c, fProfile::OBJ_SYAKO_SHUTTER, 0x178, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_tableware.cpp b/src/REL/d/a/obj/d_a_obj_tableware.cpp index fb8e44b2..a4170d0f 100644 --- a/src/REL/d/a/obj/d_a_obj_tableware.cpp +++ b/src/REL/d/a/obj/d_a_obj_tableware.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tableware.h" SPECIAL_ACTOR_PROFILE(OBJ_TABLEWARE, dAcOTableWare_c, fProfile::OBJ_TABLEWARE, 0x138, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_tackle.cpp b/src/REL/d/a/obj/d_a_obj_tackle.cpp index 22895013..68761c78 100644 --- a/src/REL/d/a/obj/d_a_obj_tackle.cpp +++ b/src/REL/d/a/obj/d_a_obj_tackle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tackle.h" SPECIAL_ACTOR_PROFILE(OBJ_TACKLE, dAcOTackle_c, fProfile::OBJ_TACKLE, 0x240, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp b/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp index 28a485dd..58868832 100644 --- a/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp +++ b/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_tarzan_pole.h" SPECIAL_ACTOR_PROFILE(OBJ_TARZAN_POLE, dAcOTarzanPole_c, fProfile::OBJ_TARZAN_POLE, 0x235, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_teni_rail.cpp b/src/REL/d/a/obj/d_a_obj_teni_rail.cpp index 8216f4f2..6146eefe 100644 --- a/src/REL/d/a/obj/d_a_obj_teni_rail.cpp +++ b/src/REL/d/a/obj/d_a_obj_teni_rail.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_teni_rail.h" SPECIAL_ACTOR_PROFILE(OBJ_TENI_RAIL, dAcOTeniRail, fProfile::OBJ_TENI_RAIL, 0x282, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_teni_rail_post.cpp b/src/REL/d/a/obj/d_a_obj_teni_rail_post.cpp index 6832d8dc..e34d463e 100644 --- a/src/REL/d/a/obj/d_a_obj_teni_rail_post.cpp +++ b/src/REL/d/a/obj/d_a_obj_teni_rail_post.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_teni_rail_post.h" SPECIAL_ACTOR_PROFILE(OBJ_TENI_RAIL_POST, dAcOTeniRailPost, fProfile::OBJ_TENI_RAIL_POST, 0x283, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_tenijima.cpp b/src/REL/d/a/obj/d_a_obj_tenijima.cpp index 8779cb20..d3cdd489 100644 --- a/src/REL/d/a/obj/d_a_obj_tenijima.cpp +++ b/src/REL/d/a/obj/d_a_obj_tenijima.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_tenijima.h" SPECIAL_ACTOR_PROFILE(OBJ_TENIJIMA, dAcOtenijima_c, fProfile::OBJ_TENIJIMA, 0x261, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_terry_bicycle.cpp b/src/REL/d/a/obj/d_a_obj_terry_bicycle.cpp index 1b7ee548..bbe51b1b 100644 --- a/src/REL/d/a/obj/d_a_obj_terry_bicycle.cpp +++ b/src/REL/d/a/obj/d_a_obj_terry_bicycle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_terry_bicycle.h" SPECIAL_ACTOR_PROFILE(OBJ_TERRY_BIKE, dAcOTerryBicycle_c, fProfile::OBJ_TERRY_BIKE, 0x27A, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_terry_gimmick.cpp b/src/REL/d/a/obj/d_a_obj_terry_gimmick.cpp index bf5a39b4..4a41b5d7 100644 --- a/src/REL/d/a/obj/d_a_obj_terry_gimmick.cpp +++ b/src/REL/d/a/obj/d_a_obj_terry_gimmick.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_terry_gimmick.h" SPECIAL_ACTOR_PROFILE(OBJ_TERRY_GIMMICK, dAcOTerryGimmick_c, fProfile::OBJ_TERRY_GIMMICK, 0x277, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_terry_hole.cpp b/src/REL/d/a/obj/d_a_obj_terry_hole.cpp index 880ae357..d336a406 100644 --- a/src/REL/d/a/obj/d_a_obj_terry_hole.cpp +++ b/src/REL/d/a/obj/d_a_obj_terry_hole.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_terry_hole.h" SPECIAL_ACTOR_PROFILE(OBJ_TERRY_HOLE, dAcOTerryHole_c, fProfile::OBJ_TERRY_HOLE, 0x279, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_terry_island.cpp b/src/REL/d/a/obj/d_a_obj_terry_island.cpp index efe2ea13..ba3c5491 100644 --- a/src/REL/d/a/obj/d_a_obj_terry_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_terry_island.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_terry_island.h" SPECIAL_ACTOR_PROFILE(OBJ_TERRY_ISLAND, dAcOterryIsland_c, fProfile::OBJ_TERRY_ISLAND, 0x1E7, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_terry_shop.cpp b/src/REL/d/a/obj/d_a_obj_terry_shop.cpp index 7cef0037..d8b96608 100644 --- a/src/REL/d/a/obj/d_a_obj_terry_shop.cpp +++ b/src/REL/d/a/obj/d_a_obj_terry_shop.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_terry_shop.h" SPECIAL_ACTOR_PROFILE(OBJ_TERRY_SHOP, dAcOterryShop_c, fProfile::OBJ_TERRY_SHOP, 0x26E, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_terry_switch.cpp b/src/REL/d/a/obj/d_a_obj_terry_switch.cpp index 0bcef2dd..f75e159f 100644 --- a/src/REL/d/a/obj/d_a_obj_terry_switch.cpp +++ b/src/REL/d/a/obj/d_a_obj_terry_switch.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_terry_switch.h" SPECIAL_ACTOR_PROFILE(OBJ_TERRY_SWITCH, dAcOTerrySwitch_c, fProfile::OBJ_TERRY_SWITCH, 0x278, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_time_base.cpp b/src/REL/d/a/obj/d_a_obj_time_base.cpp index 74453385..bbf8f88f 100644 --- a/src/REL/d/a/obj/d_a_obj_time_base.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_base.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_base.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_BASE, dAcOTimeBase_c, fProfile::OBJ_TIME_BASE, 0x19E, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_time_block.cpp b/src/REL/d/a/obj/d_a_obj_time_block.cpp index 3feaa779..f7e7d220 100644 --- a/src/REL/d/a/obj/d_a_obj_time_block.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_block.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_block.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_BLOCK, dAcOTimeBlock_c, fProfile::OBJ_TIME_BLOCK, 0x1A7, 0, 4103); diff --git a/src/REL/d/a/obj/d_a_obj_time_boat.cpp b/src/REL/d/a/obj/d_a_obj_time_boat.cpp index 6a2d9004..fb2e3daa 100644 --- a/src/REL/d/a/obj/d_a_obj_time_boat.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_boat.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_boat.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_BOAT, dAcOTimeBoat_c, fProfile::OBJ_TIME_BOAT, 0x19B, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_time_boat_bullet.cpp b/src/REL/d/a/obj/d_a_obj_time_boat_bullet.cpp index 037c3255..c18f2fb6 100644 --- a/src/REL/d/a/obj/d_a_obj_time_boat_bullet.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_boat_bullet.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_boat_bullet.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_BOAT_BULLET, dAcOTimeBoatBullet_c, fProfile::OBJ_TIME_BOAT_BULLET, 0x19C, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_time_door.cpp b/src/REL/d/a/obj/d_a_obj_time_door.cpp index 2cb72e0f..03af0389 100644 --- a/src/REL/d/a/obj/d_a_obj_time_door.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_door.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_door.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_DOOR, dAcOTimeDoor_c, fProfile::OBJ_TIME_DOOR, 0x250, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_time_door_before.cpp b/src/REL/d/a/obj/d_a_obj_time_door_before.cpp index 3312ea2a..b6d8e7e5 100644 --- a/src/REL/d/a/obj/d_a_obj_time_door_before.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_door_before.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_door_before.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_DOOR_BEFORE, dAcOTimeDoorBefore_c, fProfile::OBJ_TIME_DOOR_BEFORE, 0x251, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_time_stage_bg.cpp b/src/REL/d/a/obj/d_a_obj_time_stage_bg.cpp index 11bbafea..903e6f17 100644 --- a/src/REL/d/a/obj/d_a_obj_time_stage_bg.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_stage_bg.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_stage_bg.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_STAGE_BG, dAcOTimeStageBg_c, fProfile::OBJ_TIME_STAGE_BG, 0x25B, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_time_stone.cpp b/src/REL/d/a/obj/d_a_obj_time_stone.cpp index c7f7f55b..70f1b11a 100644 --- a/src/REL/d/a/obj/d_a_obj_time_stone.cpp +++ b/src/REL/d/a/obj/d_a_obj_time_stone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_time_stone.h" SPECIAL_ACTOR_PROFILE(OBJ_TIME_STONE, dAcOTimeStone_c, fProfile::OBJ_TIME_STONE, 0x19A, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp b/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp index 91c1b376..8d651565 100644 --- a/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp +++ b/src/REL/d/a/obj/d_a_obj_toD3_stone_figure.cpp @@ -1,10 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_toD3_stone_figure.h" + +#include "d/col/cc/d_cc_mgr.h" +#include "toBeSorted/attention.h" +#include "toBeSorted/event.h" +#include "toBeSorted/event_manager.h" +#include "toBeSorted/item_story_flag_manager.h" +#include "toBeSorted/scgame.h" + SPECIAL_ACTOR_PROFILE(OBJ_TOD3_STONE, dAcOtoD3StoneFigure_c, fProfile::OBJ_TOD3_STONE, 0x1B3, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_toge_trap.cpp b/src/REL/d/a/obj/d_a_obj_toge_trap.cpp index 6d385664..18e94f48 100644 --- a/src/REL/d/a/obj/d_a_obj_toge_trap.cpp +++ b/src/REL/d/a/obj/d_a_obj_toge_trap.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_toge_trap.h" SPECIAL_ACTOR_PROFILE(OBJ_TOGE_TRAP, dAcOtogeTrap_c, fProfile::OBJ_TOGE_TRAP, 0x133, 0, 4098); diff --git a/src/REL/d/a/obj/d_a_obj_tornado.cpp b/src/REL/d/a/obj/d_a_obj_tornado.cpp index 84de160c..29a6a14f 100644 --- a/src/REL/d/a/obj/d_a_obj_tornado.cpp +++ b/src/REL/d/a/obj/d_a_obj_tornado.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tornado.h" SPECIAL_ACTOR_PROFILE(OBJ_TORNADO, dAcOTornado_c, fProfile::OBJ_TORNADO, 0xDF, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_tower_D101.cpp b/src/REL/d/a/obj/d_a_obj_tower_D101.cpp index f63cdd81..0abc68dd 100644 --- a/src/REL/d/a/obj/d_a_obj_tower_D101.cpp +++ b/src/REL/d/a/obj/d_a_obj_tower_D101.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tower_D101.h" SPECIAL_ACTOR_PROFILE(OBJ_TOWER_D101, dAcOTowerD101_c, fProfile::OBJ_TOWER_D101, 0x13D, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_tower_bomb.cpp b/src/REL/d/a/obj/d_a_obj_tower_bomb.cpp index 786e0fea..529b0b37 100644 --- a/src/REL/d/a/obj/d_a_obj_tower_bomb.cpp +++ b/src/REL/d/a/obj/d_a_obj_tower_bomb.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tower_bomb.h" SPECIAL_ACTOR_PROFILE(OBJ_TOWER_BOMB, dAcOTowerBomb_c, fProfile::OBJ_TOWER_BOMB, 0x247, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp b/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp index 2e61738d..97a65b20 100644 --- a/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp +++ b/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tower_gearD101.h" SPECIAL_ACTOR_PROFILE(OBJ_TOWER_GEAR_D101, dAcOTowerGearD101_c, fProfile::OBJ_TOWER_GEAR_D101, 0x17E, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_tower_hand_D101.cpp b/src/REL/d/a/obj/d_a_obj_tower_hand_D101.cpp index 19568f0b..ae02bc07 100644 --- a/src/REL/d/a/obj/d_a_obj_tower_hand_D101.cpp +++ b/src/REL/d/a/obj/d_a_obj_tower_hand_D101.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tower_hand_D101.h" SPECIAL_ACTOR_PROFILE(OBJ_TOWER_HAND_D101, dAcOTowerHandD101_c, fProfile::OBJ_TOWER_HAND_D101, 0x180, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_tr_shutter_cs.cpp b/src/REL/d/a/obj/d_a_obj_tr_shutter_cs.cpp index d2636eb0..9cfaeb74 100644 --- a/src/REL/d/a/obj/d_a_obj_tr_shutter_cs.cpp +++ b/src/REL/d/a/obj/d_a_obj_tr_shutter_cs.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tr_shutter_cs.h" SPECIAL_ACTOR_PROFILE(OBJ_TR_SHUTTER_CS, dAcOTrlyShtrChgScn_c, fProfile::OBJ_TR_SHUTTER_CS, 0x187, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_trap_bird_wood.cpp b/src/REL/d/a/obj/d_a_obj_trap_bird_wood.cpp index 8da2c9ee..d46fa6eb 100644 --- a/src/REL/d/a/obj/d_a_obj_trap_bird_wood.cpp +++ b/src/REL/d/a/obj/d_a_obj_trap_bird_wood.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_trap_bird_wood.h" SPECIAL_ACTOR_PROFILE(OBJ_TRAP_BIRD_WOOD, dAcOTrapBirdWood_c, fProfile::OBJ_TRAP_BIRD_WOOD, 0x23F, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_trap_rock_1.cpp b/src/REL/d/a/obj/d_a_obj_trap_rock_1.cpp index a2d19789..cc314e45 100644 --- a/src/REL/d/a/obj/d_a_obj_trap_rock_1.cpp +++ b/src/REL/d/a/obj/d_a_obj_trap_rock_1.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_trap_rock_1.h" SPECIAL_ACTOR_PROFILE(OBJ_TRAP_ROCK_1, dAcOtrapRock1_c, fProfile::OBJ_TRAP_ROCK_1, 0x26B, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_treasure_island.cpp b/src/REL/d/a/obj/d_a_obj_treasure_island.cpp index dfda5ffb..b7a531c6 100644 --- a/src/REL/d/a/obj/d_a_obj_treasure_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_treasure_island.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_treasure_island.h" SPECIAL_ACTOR_PROFILE(OBJ_TREASURE_ISLAND, dAcOtreasureIsland_c, fProfile::OBJ_TREASURE_ISLAND, 0x1EE, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_treasure_island_b.cpp b/src/REL/d/a/obj/d_a_obj_treasure_island_b.cpp index ba61f387..7346bf25 100644 --- a/src/REL/d/a/obj/d_a_obj_treasure_island_b.cpp +++ b/src/REL/d/a/obj/d_a_obj_treasure_island_b.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_treasure_island_b.h" SPECIAL_ACTOR_PROFILE(OBJ_TREASURE_ISLAND_B, dAcOtreasureIslandB_c, fProfile::OBJ_TREASURE_ISLAND_B, 0x206, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_triforce.cpp b/src/REL/d/a/obj/d_a_obj_triforce.cpp index c79c143c..91a69637 100644 --- a/src/REL/d/a/obj/d_a_obj_triforce.cpp +++ b/src/REL/d/a/obj/d_a_obj_triforce.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_triforce.h" + +#include "c/c_math.h" +#include "d/col/cc/d_cc_mgr.h" +#include "m/m_vec.h" + SPECIAL_ACTOR_PROFILE(OBJ_TRIFORCE, dAcOtriforce_c, fProfile::OBJ_TRIFORCE, 0x15D, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_trolley.cpp b/src/REL/d/a/obj/d_a_obj_trolley.cpp index b14935ed..199e53ba 100644 --- a/src/REL/d/a/obj/d_a_obj_trolley.cpp +++ b/src/REL/d/a/obj/d_a_obj_trolley.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_trolley.h" SPECIAL_ACTOR_PROFILE(OBJ_TROLLEY, dAcOTrolley_c, fProfile::OBJ_TROLLEY, 0x14A, 0, 4099); diff --git a/src/REL/d/a/obj/d_a_obj_trolley_shutter.cpp b/src/REL/d/a/obj/d_a_obj_trolley_shutter.cpp index bf5dbcd0..d561937e 100644 --- a/src/REL/d/a/obj/d_a_obj_trolley_shutter.cpp +++ b/src/REL/d/a/obj/d_a_obj_trolley_shutter.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_trolley_shutter.h" SPECIAL_ACTOR_PROFILE(OBJ_TROLLEY_SHUTTER, dAcOTrolleyShutter_c, fProfile::OBJ_TROLLEY_SHUTTER, 0x186, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_truck.cpp b/src/REL/d/a/obj/d_a_obj_truck.cpp index b123b3d6..0f774422 100644 --- a/src/REL/d/a/obj/d_a_obj_truck.cpp +++ b/src/REL/d/a/obj/d_a_obj_truck.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_truck.h" SPECIAL_ACTOR_PROFILE(OBJ_TRUCK, dAcOtruck_c, fProfile::OBJ_TRUCK, 0x26A, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_truck_rail_col.cpp b/src/REL/d/a/obj/d_a_obj_truck_rail_col.cpp index ba7ab317..c9415cf7 100644 --- a/src/REL/d/a/obj/d_a_obj_truck_rail_col.cpp +++ b/src/REL/d/a/obj/d_a_obj_truck_rail_col.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_truck_rail_col.h" SPECIAL_ACTOR_PROFILE(OBJ_TRUCK_RAIL_COL, dAcOTruckRailCol_c, fProfile::OBJ_TRUCK_RAIL_COL, 0x29C, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_truck_stopper.cpp b/src/REL/d/a/obj/d_a_obj_truck_stopper.cpp index 40f73c15..d600438f 100644 --- a/src/REL/d/a/obj/d_a_obj_truck_stopper.cpp +++ b/src/REL/d/a/obj/d_a_obj_truck_stopper.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_truck_stopper.h" SPECIAL_ACTOR_PROFILE(OBJ_TRUCK_STOPPER, dAcOtruckStopper_c, fProfile::OBJ_TRUCK_STOPPER, 0x200, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_tubo.cpp b/src/REL/d/a/obj/d_a_obj_tubo.cpp index 214fe1eb..b2314433 100644 --- a/src/REL/d/a/obj/d_a_obj_tubo.cpp +++ b/src/REL/d/a/obj/d_a_obj_tubo.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tubo.h" SPECIAL_ACTOR_PROFILE(OBJ_TUBO, dAcOtubo_c, fProfile::OBJ_TUBO, 0x194, 0, 130); diff --git a/src/REL/d/a/obj/d_a_obj_tubo_big.cpp b/src/REL/d/a/obj/d_a_obj_tubo_big.cpp index 4eb7fa0d..2e74489b 100644 --- a/src/REL/d/a/obj/d_a_obj_tubo_big.cpp +++ b/src/REL/d/a/obj/d_a_obj_tubo_big.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tubo_big.h" SPECIAL_ACTOR_PROFILE(OBJ_TUBO_BIG, dAcOTuboBig_c, fProfile::OBJ_TUBO_BIG, 0x195, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp b/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp index 75969488..7b5d55f8 100644 --- a/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp +++ b/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_tumble_weed.h" SPECIAL_ACTOR_PROFILE(OBJ_TUMBLE_WEED, dAcOTumbleWeed_c, fProfile::OBJ_TUMBLE_WEED, 0x243, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_under_cloud.cpp b/src/REL/d/a/obj/d_a_obj_under_cloud.cpp index aa8d6608..a7a75d07 100644 --- a/src/REL/d/a/obj/d_a_obj_under_cloud.cpp +++ b/src/REL/d/a/obj/d_a_obj_under_cloud.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_under_cloud.h" SPECIAL_ACTOR_PROFILE(OBJ_UNDER_CLOUD, dAcOunderCloud_c, fProfile::OBJ_UNDER_CLOUD, 0x202, 0, 4); diff --git a/src/REL/d/a/obj/d_a_obj_underground.cpp b/src/REL/d/a/obj/d_a_obj_underground.cpp index 0185cc76..22119fa3 100644 --- a/src/REL/d/a/obj/d_a_obj_underground.cpp +++ b/src/REL/d/a/obj/d_a_obj_underground.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_underground.h" SPECIAL_ACTOR_PROFILE(OBJ_UNDERGROUND, dAcOUnderground_c, fProfile::OBJ_UNDERGROUND, 0x140, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_underground_switch.cpp b/src/REL/d/a/obj/d_a_obj_underground_switch.cpp index 69ec1a99..e2605124 100644 --- a/src/REL/d/a/obj/d_a_obj_underground_switch.cpp +++ b/src/REL/d/a/obj/d_a_obj_underground_switch.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_underground_switch.h" SPECIAL_ACTOR_PROFILE(OBJ_UG_SWITCH, dAcOUgSwitch_c, fProfile::OBJ_UG_SWITCH, 0x15A, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_updown_lava.cpp b/src/REL/d/a/obj/d_a_obj_updown_lava.cpp index 1a100680..e85a3acd 100644 --- a/src/REL/d/a/obj/d_a_obj_updown_lava.cpp +++ b/src/REL/d/a/obj/d_a_obj_updown_lava.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_updown_lava.h" SPECIAL_ACTOR_PROFILE(OBJ_UPDOWN_LAVA, dAcOupdownLava_c, fProfile::OBJ_UPDOWN_LAVA, 0x1C5, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_uta_demo_pedest.cpp b/src/REL/d/a/obj/d_a_obj_uta_demo_pedest.cpp index 0377d50c..39a49738 100644 --- a/src/REL/d/a/obj/d_a_obj_uta_demo_pedest.cpp +++ b/src/REL/d/a/obj/d_a_obj_uta_demo_pedest.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_uta_demo_pedest.h" SPECIAL_ACTOR_PROFILE(OBJ_UTA_DEMO_PEDEST, dAcOutaDemoPedest_c, fProfile::OBJ_UTA_DEMO_PEDEST, 0x212, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_utajima.cpp b/src/REL/d/a/obj/d_a_obj_utajima.cpp index f194ff37..0d59ed96 100644 --- a/src/REL/d/a/obj/d_a_obj_utajima.cpp +++ b/src/REL/d/a/obj/d_a_obj_utajima.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_utajima.h" SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA, dAcOutajima_c, fProfile::OBJ_UTAJIMA, 0x1D4, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_utajima_island.cpp b/src/REL/d/a/obj/d_a_obj_utajima_island.cpp index bcae802c..4cdf3eb8 100644 --- a/src/REL/d/a/obj/d_a_obj_utajima_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_utajima_island.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_utajima_island.h" SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA_ISLAND, dAcOutajimaIsland_c, fProfile::OBJ_UTAJIMA_ISLAND, 0x1D2, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_utajima_lv2.cpp b/src/REL/d/a/obj/d_a_obj_utajima_lv2.cpp index c42af917..97ff0a35 100644 --- a/src/REL/d/a/obj/d_a_obj_utajima_lv2.cpp +++ b/src/REL/d/a/obj/d_a_obj_utajima_lv2.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_utajima_lv2.h" SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA_LV2, dAcOutajimaLv2_c, fProfile::OBJ_UTAJIMA_LV2, 0x1D5, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_utajima_main_mecha.cpp b/src/REL/d/a/obj/d_a_obj_utajima_main_mecha.cpp index 8a4be192..87091406 100644 --- a/src/REL/d/a/obj/d_a_obj_utajima_main_mecha.cpp +++ b/src/REL/d/a/obj/d_a_obj_utajima_main_mecha.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_utajima_main_mecha.h" SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA_MAIN_MECHA, dAcOutajimaMainMecha_c, fProfile::OBJ_UTAJIMA_MAIN_MECHA, 0x1D0, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_utajima_pedestal.cpp b/src/REL/d/a/obj/d_a_obj_utajima_pedestal.cpp index 79f9098b..e64c8de0 100644 --- a/src/REL/d/a/obj/d_a_obj_utajima_pedestal.cpp +++ b/src/REL/d/a/obj/d_a_obj_utajima_pedestal.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_utajima_pedestal.h" SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA_PEDESTAL, dAcOutajimaPedestal_c, fProfile::OBJ_UTAJIMA_PEDESTAL, 0x1D1, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_utajima_stopper.cpp b/src/REL/d/a/obj/d_a_obj_utajima_stopper.cpp index afef394d..a3a59905 100644 --- a/src/REL/d/a/obj/d_a_obj_utajima_stopper.cpp +++ b/src/REL/d/a/obj/d_a_obj_utajima_stopper.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_utajima_stopper.h" SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA_STOPPER, dAcOutajimaStopper_c, fProfile::OBJ_UTAJIMA_STOPPER, 0x1CF, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_vacu_dust.cpp b/src/REL/d/a/obj/d_a_obj_vacu_dust.cpp index 6323def5..e6f282fb 100644 --- a/src/REL/d/a/obj/d_a_obj_vacu_dust.cpp +++ b/src/REL/d/a/obj/d_a_obj_vacu_dust.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_vacu_dust.h" SPECIAL_ACTOR_PROFILE(OBJ_VACU_DUST, dAcOVacuDust, fProfile::OBJ_VACU_DUST, 0x27F, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_vacu_dust_parts.cpp b/src/REL/d/a/obj/d_a_obj_vacu_dust_parts.cpp index a6dc045e..20d17dce 100644 --- a/src/REL/d/a/obj/d_a_obj_vacu_dust_parts.cpp +++ b/src/REL/d/a/obj/d_a_obj_vacu_dust_parts.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_vacu_dust_parts.h" SPECIAL_ACTOR_PROFILE(OBJ_VACU_DUST_PARTS, dAcOVacuDustParts_c, fProfile::OBJ_VACU_DUST_PARTS, 0x27E, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_vd_bullet.cpp b/src/REL/d/a/obj/d_a_obj_vd_bullet.cpp index b74e086b..f4e623cd 100644 --- a/src/REL/d/a/obj/d_a_obj_vd_bullet.cpp +++ b/src/REL/d/a/obj/d_a_obj_vd_bullet.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_vd_bullet.h" SPECIAL_ACTOR_PROFILE(OBJ_VDB, dAcObjVdb_c, fProfile::OBJ_VDB, 0xBD, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_vent_fan.cpp b/src/REL/d/a/obj/d_a_obj_vent_fan.cpp index ec5b4671..526e1909 100644 --- a/src/REL/d/a/obj/d_a_obj_vent_fan.cpp +++ b/src/REL/d/a/obj/d_a_obj_vent_fan.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_vent_fan.h" SPECIAL_ACTOR_PROFILE(OBJ_VENT_FAN, dAcOventFan_c, fProfile::OBJ_VENT_FAN, 0x1B6, 0, 2); diff --git a/src/REL/d/a/obj/d_a_obj_vortex.cpp b/src/REL/d/a/obj/d_a_obj_vortex.cpp index 7a9d7e05..d0a8bdbc 100644 --- a/src/REL/d/a/obj/d_a_obj_vortex.cpp +++ b/src/REL/d/a/obj/d_a_obj_vortex.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_vortex.h" SPECIAL_ACTOR_PROFILE(OBJ_VORTEX, dAcOVortex_c, fProfile::OBJ_VORTEX, 0x246, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_warp.cpp b/src/REL/d/a/obj/d_a_obj_warp.cpp index ba79f5de..23085eca 100644 --- a/src/REL/d/a/obj/d_a_obj_warp.cpp +++ b/src/REL/d/a/obj/d_a_obj_warp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_warp.h" SPECIAL_ACTOR_PROFILE(OBJ_WARP, dAcOWarp_c, fProfile::OBJ_WARP, 0x238, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_warp_hole.cpp b/src/REL/d/a/obj/d_a_obj_warp_hole.cpp index 5140128d..958f7d87 100644 --- a/src/REL/d/a/obj/d_a_obj_warp_hole.cpp +++ b/src/REL/d/a/obj/d_a_obj_warp_hole.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_warp_hole.h" SPECIAL_ACTOR_PROFILE(OBJ_WARP_HOLE, dAcOwarpHole_c, fProfile::OBJ_WARP_HOLE, 0x25C, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_water_F100.cpp b/src/REL/d/a/obj/d_a_obj_water_F100.cpp index b0d5099c..a04bdd1a 100644 --- a/src/REL/d/a/obj/d_a_obj_water_F100.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_F100.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_water_F100.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_F100, dAcOwaterF100_c, fProfile::OBJ_WATER_F100, 0x207, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_water_igaiga.cpp b/src/REL/d/a/obj/d_a_obj_water_igaiga.cpp index ebf24946..a480a945 100644 --- a/src/REL/d/a/obj/d_a_obj_water_igaiga.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_igaiga.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_water_igaiga.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_IGAIGA, dAcOwaterIgaiga_c, fProfile::OBJ_WATER_IGAIGA, 0x1E2, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_water_jar.cpp b/src/REL/d/a/obj/d_a_obj_water_jar.cpp index fbc716ce..1b9792e0 100644 --- a/src/REL/d/a/obj/d_a_obj_water_jar.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_jar.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_water_jar.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_JAR, dAcOWaterJar_c, fProfile::OBJ_WATER_JAR, 0x1AE, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_water_nut.cpp b/src/REL/d/a/obj/d_a_obj_water_nut.cpp index e785ce27..e6132a90 100644 --- a/src/REL/d/a/obj/d_a_obj_water_nut.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_nut.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_water_nut.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_NUT, dAcOWaterNut_c, fProfile::OBJ_WATER_NUT, 0x137, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_water_nut_leaf.cpp b/src/REL/d/a/obj/d_a_obj_water_nut_leaf.cpp index f6a1c556..4699c5cb 100644 --- a/src/REL/d/a/obj/d_a_obj_water_nut_leaf.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_nut_leaf.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_water_nut_leaf.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_NUT_LEAF, dAcOWaterNutLeaf_c, fProfile::OBJ_WATER_NUT_LEAF, 0x136, 0, 3); diff --git a/src/REL/d/a/obj/d_a_obj_water_shield.cpp b/src/REL/d/a/obj/d_a_obj_water_shield.cpp index 7664378b..0048e28e 100644 --- a/src/REL/d/a/obj/d_a_obj_water_shield.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_shield.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/obj/d_a_obj_water_shield.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_SHIELD, dAcOwaterShield_c, fProfile::OBJ_WATER_SHIELD, 0x218, 0, 0); diff --git a/src/REL/d/a/obj/d_a_obj_water_surface.cpp b/src/REL/d/a/obj/d_a_obj_water_surface.cpp index 5afb4018..5c955b88 100644 --- a/src/REL/d/a/obj/d_a_obj_water_surface.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_surface.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_water_surface.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_SURFACE, dAcOwaterSurface_c, fProfile::OBJ_WATER_SURFACE, 0x1EC, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_water_switch.cpp b/src/REL/d/a/obj/d_a_obj_water_switch.cpp index b7156024..f2b5c721 100644 --- a/src/REL/d/a/obj/d_a_obj_water_switch.cpp +++ b/src/REL/d/a/obj/d_a_obj_water_switch.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_water_switch.h" SPECIAL_ACTOR_PROFILE(OBJ_WATER_SWITCH, dAcOwaterSwitch_c, fProfile::OBJ_WATER_SWITCH, 0x1B9, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_waterfall_D100.cpp b/src/REL/d/a/obj/d_a_obj_waterfall_D100.cpp index d059a0ae..7d69bb66 100644 --- a/src/REL/d/a/obj/d_a_obj_waterfall_D100.cpp +++ b/src/REL/d/a/obj/d_a_obj_waterfall_D100.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_waterfall_D100.h" SPECIAL_ACTOR_PROFILE(OBJ_WATERFALL_D100, dAcOwaterfallD100_c, fProfile::OBJ_WATERFALL_D100, 0x20D, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_waterfall_D101.cpp b/src/REL/d/a/obj/d_a_obj_waterfall_D101.cpp index 8071e54a..c2fecc3c 100644 --- a/src/REL/d/a/obj/d_a_obj_waterfall_D101.cpp +++ b/src/REL/d/a/obj/d_a_obj_waterfall_D101.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_waterfall_D101.h" SPECIAL_ACTOR_PROFILE(OBJ_WATERFALL_D101, dAcOWaterFallD101_c, fProfile::OBJ_WATERFALL_D101, 0x13B, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_waterfall_F102.cpp b/src/REL/d/a/obj/d_a_obj_waterfall_F102.cpp index e172add9..7172390b 100644 --- a/src/REL/d/a/obj/d_a_obj_waterfall_F102.cpp +++ b/src/REL/d/a/obj/d_a_obj_waterfall_F102.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_waterfall_F102.h" SPECIAL_ACTOR_PROFILE(OBJ_WATERFALL_F102, dAcOwaterfallF102_c, fProfile::OBJ_WATERFALL_F102, 0x203, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_wind.cpp b/src/REL/d/a/obj/d_a_obj_wind.cpp index 18897642..791da205 100644 --- a/src/REL/d/a/obj/d_a_obj_wind.cpp +++ b/src/REL/d/a/obj/d_a_obj_wind.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_wind.h" SPECIAL_ACTOR_PROFILE(OBJ_WIND, dAcOwind_c, fProfile::OBJ_WIND, 0xDB, 0, 261); diff --git a/src/REL/d/a/obj/d_a_obj_wind02.cpp b/src/REL/d/a/obj/d_a_obj_wind02.cpp index c66e148e..9db311c2 100644 --- a/src/REL/d/a/obj/d_a_obj_wind02.cpp +++ b/src/REL/d/a/obj/d_a_obj_wind02.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_wind02.h" SPECIAL_ACTOR_PROFILE(OBJ_WIND02, dAcOwind02_c, fProfile::OBJ_WIND02, 0xDC, 0, 263); diff --git a/src/REL/d/a/obj/d_a_obj_wind03.cpp b/src/REL/d/a/obj/d_a_obj_wind03.cpp index 2ff9b0a0..7c06a947 100644 --- a/src/REL/d/a/obj/d_a_obj_wind03.cpp +++ b/src/REL/d/a/obj/d_a_obj_wind03.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_wind03.h" SPECIAL_ACTOR_PROFILE(OBJ_WIND03, dAcOwind03_c, fProfile::OBJ_WIND03, 0xDD, 0, 262); diff --git a/src/REL/d/a/obj/d_a_obj_wind04.cpp b/src/REL/d/a/obj/d_a_obj_wind04.cpp index 3a405029..8c4ec0d7 100644 --- a/src/REL/d/a/obj/d_a_obj_wind04.cpp +++ b/src/REL/d/a/obj/d_a_obj_wind04.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_wind04.h" SPECIAL_ACTOR_PROFILE(OBJ_WIND04, dAcOwind04_c, fProfile::OBJ_WIND04, 0xDE, 0, 263); diff --git a/src/REL/d/a/obj/d_a_obj_windmill.cpp b/src/REL/d/a/obj/d_a_obj_windmill.cpp index a6970fca..3f096726 100644 --- a/src/REL/d/a/obj/d_a_obj_windmill.cpp +++ b/src/REL/d/a/obj/d_a_obj_windmill.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_windmill.h" SPECIAL_ACTOR_PROFILE(OBJ_WINDMILL, dAcOwindmill_c, fProfile::OBJ_WINDMILL, 0x1DC, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_windmill_desert.cpp b/src/REL/d/a/obj/d_a_obj_windmill_desert.cpp index 2aa2f8ba..3c75eae5 100644 --- a/src/REL/d/a/obj/d_a_obj_windmill_desert.cpp +++ b/src/REL/d/a/obj/d_a_obj_windmill_desert.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_windmill_desert.h" SPECIAL_ACTOR_PROFILE(OBJ_WINDMILL_DESERT, dAcOwindmillDesert_c, fProfile::OBJ_WINDMILL_DESERT, 0x20B, 0, 6); diff --git a/src/REL/d/a/obj/d_a_obj_wood_board.cpp b/src/REL/d/a/obj/d_a_obj_wood_board.cpp index 89e0c088..78656ff6 100644 --- a/src/REL/d/a/obj/d_a_obj_wood_board.cpp +++ b/src/REL/d/a/obj/d_a_obj_wood_board.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/obj/d_a_obj_wood_board.h" SPECIAL_ACTOR_PROFILE(OBJ_WOOD_BOARD, dAcOwoodBoard_c, fProfile::OBJ_WOOD_BOARD, 0x1B7, 0, 2); diff --git a/src/REL/d/d_SoftwareKeyboard.cpp b/src/REL/d/d_SoftwareKeyboard.cpp index 2603612d..fc307303 100644 --- a/src/REL/d/d_SoftwareKeyboard.cpp +++ b/src/REL/d/d_SoftwareKeyboard.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_SoftwareKeyboard.h" SPECIAL_BASE_PROFILE(SKB, dSKB_c, fProfile::SKB, 0x2BE, 0); diff --git a/src/REL/d/d_lyt_file_select.cpp b/src/REL/d/d_lyt_file_select.cpp index 5190e944..4cd27e88 100644 --- a/src/REL/d/d_lyt_file_select.cpp +++ b/src/REL/d/d_lyt_file_select.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_lyt_file_select.h" SPECIAL_BASE_PROFILE(LYT_FILESELECT, dLytFileSelectMgr_c, fProfile::LYT_FILESELECT, 0x2BD, 1); diff --git a/src/REL/d/d_lyt_seeker_stone.cpp b/src/REL/d/d_lyt_seeker_stone.cpp index 3f94cb54..4fac6bce 100644 --- a/src/REL/d/d_lyt_seeker_stone.cpp +++ b/src/REL/d/d_lyt_seeker_stone.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_lyt_seeker_stone.h" SPECIAL_BASE_PROFILE(LYT_SEEKER_STONE, dLytSeekerStone_c, fProfile::LYT_SEEKER_STONE, 0x2BC, 1024); diff --git a/src/REL/d/d_lyt_title_BG.cpp b/src/REL/d/d_lyt_title_BG.cpp index 85e1d09e..5d4625e4 100644 --- a/src/REL/d/d_lyt_title_BG.cpp +++ b/src/REL/d/d_lyt_title_BG.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_lyt_title_BG.h" SPECIAL_ACTOR_PROFILE(LYT_TITLE_BG, dLytTitleBg_c, fProfile::LYT_TITLE_BG, 0x2AF, 0, 1416197228); diff --git a/src/REL/d/d_profile.cpp b/src/REL/d/d_profile.cpp index 8ba8e383..3e6cfeaf 100644 --- a/src/REL/d/d_profile.cpp +++ b/src/REL/d/d_profile.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_profile.h" // clang-format off fProfile::fBaseProfile_c *profileList[] = { diff --git a/src/REL/d/d_s_boot.cpp b/src/REL/d/d_s_boot.cpp index 098af933..f792a142 100644 --- a/src/REL/d/d_s_boot.cpp +++ b/src/REL/d/d_s_boot.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_s_boot.h" SPECIAL_ACTOR_PROFILE(BOOT, dScBoot_c, fProfile::BOOT, 0x2A7, 0, 1174405120); diff --git a/src/REL/d/d_title_manager.cpp b/src/REL/d/d_title_manager.cpp index bd0b7780..e811ac4b 100644 --- a/src/REL/d/d_title_manager.cpp +++ b/src/REL/d/d_title_manager.cpp @@ -1,4 +1,4 @@ -#include +#include "d/d_title_manager.h" SPECIAL_BASE_PROFILE(TITLE_MANAGER, dTitleMgr_c, fProfile::TITLE_MANAGER, 0x2AE, 0); diff --git a/src/REL/d/t/d_t_D3_scene_change.cpp b/src/REL/d/t/d_t_D3_scene_change.cpp index 2a8cbf35..d9a4e06e 100644 --- a/src/REL/d/t/d_t_D3_scene_change.cpp +++ b/src/REL/d/t/d_t_D3_scene_change.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_D3_scene_change.h" SPECIAL_ACTOR_PROFILE(TAG_D3_SCENE_CHANGE, dTgD3SceneChange_c, fProfile::TAG_D3_SCENE_CHANGE, 0x15F, 0, 4); diff --git a/src/REL/d/t/d_t_action.cpp b/src/REL/d/t/d_t_action.cpp index 51b417b0..5b459ac0 100644 --- a/src/REL/d/t/d_t_action.cpp +++ b/src/REL/d/t/d_t_action.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_action.h" SPECIAL_ACTOR_PROFILE(ACTION_TAG, dTgAction_c, fProfile::ACTION_TAG, 0x20, 0, 0); diff --git a/src/REL/d/t/d_t_at0.cpp b/src/REL/d/t/d_t_at0.cpp index bd06bb27..18621deb 100644 --- a/src/REL/d/t/d_t_at0.cpp +++ b/src/REL/d/t/d_t_at0.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_at0.h" SPECIAL_ACTOR_PROFILE(ATT_TAG, dTgAt0_c, fProfile::ATT_TAG, 0x28B, 0, 0); diff --git a/src/REL/d/t/d_t_auto_message.cpp b/src/REL/d/t/d_t_auto_message.cpp index 615bc108..86f3e688 100644 --- a/src/REL/d/t/d_t_auto_message.cpp +++ b/src/REL/d/t/d_t_auto_message.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_auto_message.h" SPECIAL_ACTOR_PROFILE(TAG_AUTO_MESSAGE, dTgAutoMessage_c, fProfile::TAG_AUTO_MESSAGE, 0x21E, 0, 0); diff --git a/src/REL/d/t/d_t_barrel.cpp b/src/REL/d/t/d_t_barrel.cpp index 3c18de61..40a232ef 100644 --- a/src/REL/d/t/d_t_barrel.cpp +++ b/src/REL/d/t/d_t_barrel.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_barrel.h" SPECIAL_ACTOR_PROFILE(TAG_BARREL, dTgBarrel_c, fProfile::TAG_BARREL, 0x221, 0, 0); diff --git a/src/REL/d/t/d_t_barrel_pos.cpp b/src/REL/d/t/d_t_barrel_pos.cpp index 1d2aca39..05b28f67 100644 --- a/src/REL/d/t/d_t_barrel_pos.cpp +++ b/src/REL/d/t/d_t_barrel_pos.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_barrel_pos.h" SPECIAL_ACTOR_PROFILE(TAG_BARREL_POS, dTgBarrelPos_c, fProfile::TAG_BARREL_POS, 0x222, 0, 0); diff --git a/src/REL/d/t/d_t_bb_quake.cpp b/src/REL/d/t/d_t_bb_quake.cpp index d12c35d2..48eea3bf 100644 --- a/src/REL/d/t/d_t_bb_quake.cpp +++ b/src/REL/d/t/d_t_bb_quake.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_bb_quake.h" SPECIAL_ACTOR_PROFILE(T_QUAKE, dTgBBQuake_c, fProfile::T_QUAKE, 0xC2, 0, 0); diff --git a/src/REL/d/t/d_t_bcal_tag.cpp b/src/REL/d/t/d_t_bcal_tag.cpp index d213b5f4..2575e5eb 100644 --- a/src/REL/d/t/d_t_bcal_tag.cpp +++ b/src/REL/d/t/d_t_bcal_tag.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_bcal_tag.h" SPECIAL_ACTOR_PROFILE(T_BCAL, dTgBcArL_c, fProfile::T_BCAL, 0xC6, 0, 0); diff --git a/src/REL/d/t/d_t_bcz.cpp b/src/REL/d/t/d_t_bcz.cpp index 80c8b62a..1b350a62 100644 --- a/src/REL/d/t/d_t_bcz.cpp +++ b/src/REL/d/t/d_t_bcz.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_bcz.h" SPECIAL_ACTOR_PROFILE(BCZ_TAG, dTgBcZ_c, fProfile::BCZ_TAG, 0xD5, 0, 0); diff --git a/src/REL/d/t/d_t_beetle.cpp b/src/REL/d/t/d_t_beetle.cpp index f7a563ba..390c6e6f 100644 --- a/src/REL/d/t/d_t_beetle.cpp +++ b/src/REL/d/t/d_t_beetle.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_beetle.h" SPECIAL_ACTOR_PROFILE(BEETLE_TAG, dTgBeetle_c, fProfile::BEETLE_TAG, 0x297, 0, 0); diff --git a/src/REL/d/t/d_t_belt_obstacle.cpp b/src/REL/d/t/d_t_belt_obstacle.cpp index 70679561..3a3f366e 100644 --- a/src/REL/d/t/d_t_belt_obstacle.cpp +++ b/src/REL/d/t/d_t_belt_obstacle.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_belt_obstacle.h" SPECIAL_ACTOR_PROFILE(TAG_BELT_OBSTACLE, dTgBeltObstacle_c, fProfile::TAG_BELT_OBSTACLE, 0x225, 0, 0); diff --git a/src/REL/d/t/d_t_clef_game.cpp b/src/REL/d/t/d_t_clef_game.cpp index 5f2ce643..a74ac633 100644 --- a/src/REL/d/t/d_t_clef_game.cpp +++ b/src/REL/d/t/d_t_clef_game.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_clef_game.h" SPECIAL_ACTOR_PROFILE(TAG_CLEF_GAME, dTgClefGame_c, fProfile::TAG_CLEF_GAME, 0x2A1, 0, 0); diff --git a/src/REL/d/t/d_t_clef_manager.cpp b/src/REL/d/t/d_t_clef_manager.cpp index 87fbeefc..44352fa3 100644 --- a/src/REL/d/t/d_t_clef_manager.cpp +++ b/src/REL/d/t/d_t_clef_manager.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_clef_manager.h" SPECIAL_ACTOR_PROFILE(TAG_CLEF_MANAGER, dTgClefManager_c, fProfile::TAG_CLEF_MANAGER, 0x2A0, 0, 0); diff --git a/src/REL/d/t/d_t_col_bomb_shield.cpp b/src/REL/d/t/d_t_col_bomb_shield.cpp index 42d3aa23..6c4887ed 100644 --- a/src/REL/d/t/d_t_col_bomb_shield.cpp +++ b/src/REL/d/t/d_t_col_bomb_shield.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_col_bomb_shield.h" SPECIAL_ACTOR_PROFILE(COL_BOMSLD, dTgColBombShield, fProfile::COL_BOMSLD, 0x12, 0, 0); diff --git a/src/REL/d/t/d_t_defeat_boss.cpp b/src/REL/d/t/d_t_defeat_boss.cpp index 9de1b99f..5e649112 100644 --- a/src/REL/d/t/d_t_defeat_boss.cpp +++ b/src/REL/d/t/d_t_defeat_boss.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_defeat_boss.h" SPECIAL_ACTOR_PROFILE(TAG_DEFEAT_BOSS, dTgDefeatBoss_c, fProfile::TAG_DEFEAT_BOSS, 0x29E, 0, 0); diff --git a/src/REL/d/t/d_t_dowsing.cpp b/src/REL/d/t/d_t_dowsing.cpp index 3c65c439..53679294 100644 --- a/src/REL/d/t/d_t_dowsing.cpp +++ b/src/REL/d/t/d_t_dowsing.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/t/d_t_dowsing.h" + +#include "toBeSorted/item_story_flag_manager.h" +#include "toBeSorted/room_manager.h" +#include "toBeSorted/sceneflag_manager.h" + SPECIAL_ACTOR_PROFILE(T_DOWSING, dTgDowsing_c, fProfile::T_DOWSING, 0x0293, 0, 0); @@ -28,9 +30,9 @@ int dTgDowsing_c::doDelete() { int dTgDowsing_c::actorExecute() { if (getTriggerSceneFlag() < 0xFF && SceneflagManager::sInstance->checkBoolFlag(roomid, getTriggerSceneFlag()) || - getUntriggerSceneFlag() < 0xFF && - !SceneflagManager::sInstance->checkBoolFlag(roomid, getUntriggerSceneFlag()) || - !checkDowsing()) { + getUntriggerSceneFlag() < 0xFF && + !SceneflagManager::sInstance->checkBoolFlag(roomid, getUntriggerSceneFlag()) || + !checkDowsing()) { mDowsingTarget.doUnregister(); mTargetActive = false; } else if (!mTargetActive && checkDowsing()) { @@ -46,36 +48,28 @@ int dTgDowsing_c::draw() { bool dTgDowsing_c::checkDowsing() const { if (!((mUntriggerStoryFlag == 0 || mUntriggerStoryFlag >= 0x7FF || - !StoryFlagManager::sInstance->getCounterOrFlag(mUntriggerStoryFlag)) && - (mTriggerStoryFlag == 0 || mTriggerStoryFlag >= 0x7FF || - StoryFlagManager::sInstance->getCounterOrFlag(mTriggerStoryFlag)))) { + !StoryFlagManager::sInstance->getCounterOrFlag(mUntriggerStoryFlag)) && + (mTriggerStoryFlag == 0 || mTriggerStoryFlag >= 0x7FF || + StoryFlagManager::sInstance->getCounterOrFlag(mTriggerStoryFlag)))) { return false; } switch (mDowsingOption) { - case TRIAL_0: - return ItemFlagManager::sInstance->getFlag(187) && !StoryFlagManager::sInstance->getCounterOrFlag(93); - case TRIAL_1: - return ItemFlagManager::sInstance->getFlag(188) && !StoryFlagManager::sInstance->getCounterOrFlag(97); - case TRIAL_2: - return ItemFlagManager::sInstance->getFlag(189) && !StoryFlagManager::sInstance->getCounterOrFlag(98); - case TRIAL_3: - return ItemFlagManager::sInstance->getFlag(193) && !StoryFlagManager::sInstance->getCounterOrFlag(99); - case PROPELLER: - return DowsingTarget::hasPropellerDowsing(); - case WATER_BASIN: - return DowsingTarget::hasWaterBasinDowsing(); - case CRYSTAL_BALL: - return DowsingTarget::hasCrystalBallDowsing(); - case PUMPKIN: - return DowsingTarget::hasPumpkinDowsing(); - case NEW_PLANT_SPECIES: - return DowsingTarget::hasNewPlantSpeciesDowsing(); - case PARTY_WHEEL: - return DowsingTarget::hasPartyWheelDowsing(); - case ZELDA: - return DowsingTarget::hasZeldaDowsing(); - default: - return true; + case TRIAL_0: + return ItemFlagManager::sInstance->getFlag(187) && !StoryFlagManager::sInstance->getCounterOrFlag(93); + case TRIAL_1: + return ItemFlagManager::sInstance->getFlag(188) && !StoryFlagManager::sInstance->getCounterOrFlag(97); + case TRIAL_2: + return ItemFlagManager::sInstance->getFlag(189) && !StoryFlagManager::sInstance->getCounterOrFlag(98); + case TRIAL_3: + return ItemFlagManager::sInstance->getFlag(193) && !StoryFlagManager::sInstance->getCounterOrFlag(99); + case PROPELLER: return DowsingTarget::hasPropellerDowsing(); + case WATER_BASIN: return DowsingTarget::hasWaterBasinDowsing(); + case CRYSTAL_BALL: return DowsingTarget::hasCrystalBallDowsing(); + case PUMPKIN: return DowsingTarget::hasPumpkinDowsing(); + case NEW_PLANT_SPECIES: return DowsingTarget::hasNewPlantSpeciesDowsing(); + case PARTY_WHEEL: return DowsingTarget::hasPartyWheelDowsing(); + case ZELDA: return DowsingTarget::hasZeldaDowsing(); + default: return true; } } diff --git a/src/REL/d/t/d_t_drum.cpp b/src/REL/d/t/d_t_drum.cpp index 4fc91a5d..4f9e3706 100644 --- a/src/REL/d/t/d_t_drum.cpp +++ b/src/REL/d/t/d_t_drum.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_drum.h" SPECIAL_ACTOR_PROFILE(TAG_DRUM, dTgDrum_c, fProfile::TAG_DRUM, 0x226, 0, 0); diff --git a/src/REL/d/t/d_t_dungeon_start.cpp b/src/REL/d/t/d_t_dungeon_start.cpp index d82dc0ac..3aef90af 100644 --- a/src/REL/d/t/d_t_dungeon_start.cpp +++ b/src/REL/d/t/d_t_dungeon_start.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_dungeon_start.h" SPECIAL_ACTOR_PROFILE(START_TAG, dAcDungeonStartTag_c, fProfile::START_TAG, 0x10, 0, 260); diff --git a/src/REL/d/t/d_t_effect_gen.cpp b/src/REL/d/t/d_t_effect_gen.cpp index 6371be95..e8fefd43 100644 --- a/src/REL/d/t/d_t_effect_gen.cpp +++ b/src/REL/d/t/d_t_effect_gen.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_effect_gen.h" SPECIAL_ACTOR_PROFILE(EFFECT_GEN_TAG, dTgEffectGen_c, fProfile::EFFECT_GEN_TAG, 0x298, 0, 4); diff --git a/src/REL/d/t/d_t_fairytag.cpp b/src/REL/d/t/d_t_fairytag.cpp index dc8a3a68..b2dce2aa 100644 --- a/src/REL/d/t/d_t_fairytag.cpp +++ b/src/REL/d/t/d_t_fairytag.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/t/d_t_fairytag.h" + +#include "c/c_math.h" + SPECIAL_ACTOR_PROFILE(T_FAIRY, dTgFairy_c, fProfile::T_FAIRY, 0x0296, 0, 0); diff --git a/src/REL/d/t/d_t_fence_synchronizer.cpp b/src/REL/d/t/d_t_fence_synchronizer.cpp index 12f34535..6f584007 100644 --- a/src/REL/d/t/d_t_fence_synchronizer.cpp +++ b/src/REL/d/t/d_t_fence_synchronizer.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_fence_synchronizer.h" SPECIAL_ACTOR_PROFILE(TAG_FENCE_SYNCHRONIZER, dTgFenceSynchronizer_c, fProfile::TAG_FENCE_SYNCHRONIZER, 0x2A2, 0, 0); diff --git a/src/REL/d/t/d_t_gate_to_ground.cpp b/src/REL/d/t/d_t_gate_to_ground.cpp index 6c99dd22..3be6d6da 100644 --- a/src/REL/d/t/d_t_gate_to_ground.cpp +++ b/src/REL/d/t/d_t_gate_to_ground.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_gate_to_ground.h" SPECIAL_ACTOR_PROFILE(GATE2GND_TAG, dTgGateToGround_c, fProfile::GATE2GND_TAG, 0x22, 0, 0); diff --git a/src/REL/d/t/d_t_gekotag.cpp b/src/REL/d/t/d_t_gekotag.cpp index 0c726fc6..fcaefbe0 100644 --- a/src/REL/d/t/d_t_gekotag.cpp +++ b/src/REL/d/t/d_t_gekotag.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_gekotag.h" SPECIAL_ACTOR_PROFILE(GEKO_TAG, dTgGekoTag, fProfile::GEKO_TAG, 0xEE, 0, 0); diff --git a/src/REL/d/t/d_t_genki_dws_tgt.cpp b/src/REL/d/t/d_t_genki_dws_tgt.cpp index 20fd7b76..0af8f704 100644 --- a/src/REL/d/t/d_t_genki_dws_tgt.cpp +++ b/src/REL/d/t/d_t_genki_dws_tgt.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "d/t/d_t_genki_dws_tgt.h" + +#include "toBeSorted/item_story_flag_manager.h" +#include "toBeSorted/room_manager.h" +#include "toBeSorted/sceneflag_manager.h" +#include "toBeSorted/scgame.h" + SPECIAL_ACTOR_PROFILE(TAG_GENKI_DOWSING_TARGET, dTgGenkiDwsTgt_c, fProfile::TAG_GENKI_DOWSING_TARGET, 0x02A5, 0, 0); diff --git a/src/REL/d/t/d_t_group_summon.cpp b/src/REL/d/t/d_t_group_summon.cpp index 516ee448..a56afcab 100644 --- a/src/REL/d/t/d_t_group_summon.cpp +++ b/src/REL/d/t/d_t_group_summon.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_group_summon.h" SPECIAL_ACTOR_PROFILE(GROUP_SUMMON, dTgGroupSummon_c, fProfile::GROUP_SUMMON, 0xC5, 0, 0); diff --git a/src/REL/d/t/d_t_group_test.cpp b/src/REL/d/t/d_t_group_test.cpp index 87e458cf..dcdd299a 100644 --- a/src/REL/d/t/d_t_group_test.cpp +++ b/src/REL/d/t/d_t_group_test.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_group_test.h" SPECIAL_ACTOR_PROFILE(GROUP_TEST, dTgGroupTest_c, fProfile::GROUP_TEST, 0xC4, 0, 0); diff --git a/src/REL/d/t/d_t_harp.cpp b/src/REL/d/t/d_t_harp.cpp index 269d69da..2f58558d 100644 --- a/src/REL/d/t/d_t_harp.cpp +++ b/src/REL/d/t/d_t_harp.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_harp.h" SPECIAL_ACTOR_PROFILE(HARP_TAG, dTgHarp_c, fProfile::HARP_TAG, 0x1A4, 0, 0); diff --git a/src/REL/d/t/d_t_heat_resist.cpp b/src/REL/d/t/d_t_heat_resist.cpp index d0cdd823..5938aea3 100644 --- a/src/REL/d/t/d_t_heat_resist.cpp +++ b/src/REL/d/t/d_t_heat_resist.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_heat_resist.h" SPECIAL_ACTOR_PROFILE(TAG_HEAT_RESIST, dTgHeatResist_c, fProfile::TAG_HEAT_RESIST, 0x223, 0, 4); diff --git a/src/REL/d/t/d_t_holy_water.cpp b/src/REL/d/t/d_t_holy_water.cpp index 6861abc2..bca20dcd 100644 --- a/src/REL/d/t/d_t_holy_water.cpp +++ b/src/REL/d/t/d_t_holy_water.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/t/d_t_holy_water.h" + +#include "d/a/d_a_player.h" + SPECIAL_ACTOR_PROFILE(TAG_HOLY_WATER, dTgHolyWater_c, fProfile::TAG_HOLY_WATER, 0x0224, 0, 4); diff --git a/src/REL/d/t/d_t_insect.cpp b/src/REL/d/t/d_t_insect.cpp index ca14c845..75e361de 100644 --- a/src/REL/d/t/d_t_insect.cpp +++ b/src/REL/d/t/d_t_insect.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_insect.h" SPECIAL_ACTOR_PROFILE(TAG_INSECT, dTgInsect_c, fProfile::TAG_INSECT, 0x167, 0, 0); diff --git a/src/REL/d/t/d_t_ks.cpp b/src/REL/d/t/d_t_ks.cpp index d2b7699d..694e9d3d 100644 --- a/src/REL/d/t/d_t_ks.cpp +++ b/src/REL/d/t/d_t_ks.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_ks.h" SPECIAL_ACTOR_PROFILE(KIESU_TAG, dTgKiesuTag_c, fProfile::KIESU_TAG, 0xFD, 0, 0); diff --git a/src/REL/d/t/d_t_kytag.cpp b/src/REL/d/t/d_t_kytag.cpp index e788461a..40a9cc60 100644 --- a/src/REL/d/t/d_t_kytag.cpp +++ b/src/REL/d/t/d_t_kytag.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_kytag.h" SPECIAL_ACTOR_PROFILE(KYTAG_TAG, dKytagTag_c, fProfile::KYTAG_TAG, 0x1B, 0, 388); diff --git a/src/REL/d/t/d_t_lb_thunder.cpp b/src/REL/d/t/d_t_lb_thunder.cpp index a121af46..7ef23a08 100644 --- a/src/REL/d/t/d_t_lb_thunder.cpp +++ b/src/REL/d/t/d_t_lb_thunder.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_lb_thunder.h" SPECIAL_ACTOR_PROFILE(LBTHUNDER_TAG, dTgLbThunder_c, fProfile::LBTHUNDER_TAG, 0x1C, 0, 388); diff --git a/src/REL/d/t/d_t_light_shaft_eff.cpp b/src/REL/d/t/d_t_light_shaft_eff.cpp index b3d82beb..95fe6fa6 100644 --- a/src/REL/d/t/d_t_light_shaft_eff.cpp +++ b/src/REL/d/t/d_t_light_shaft_eff.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_light_shaft_eff.h" SPECIAL_ACTOR_PROFILE(TAG_LIGHT_SHAFT_EFF, dTgLightShaftEff_c, fProfile::TAG_LIGHT_SHAFT_EFF, 0x025E, 0, 0); diff --git a/src/REL/d/t/d_t_map_inst.cpp b/src/REL/d/t/d_t_map_inst.cpp index f24024df..2136878d 100644 --- a/src/REL/d/t/d_t_map_inst.cpp +++ b/src/REL/d/t/d_t_map_inst.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_map_inst.h" SPECIAL_ACTOR_PROFILE(TAG_MAP_INST, dTgMapInst_c, fProfile::TAG_MAP_INST, 0x021d, 0, 0); diff --git a/src/REL/d/t/d_t_map_mark.cpp b/src/REL/d/t/d_t_map_mark.cpp index e5efdfcd..0a9be991 100644 --- a/src/REL/d/t/d_t_map_mark.cpp +++ b/src/REL/d/t/d_t_map_mark.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_map_mark.h" SPECIAL_ACTOR_PROFILE(T_MAP_MARK, dTgMapMark_c, fProfile::T_MAP_MARK, 0x294, 0, 4); diff --git a/src/REL/d/t/d_t_megami_diving.cpp b/src/REL/d/t/d_t_megami_diving.cpp index ecccb814..45c8ab1f 100644 --- a/src/REL/d/t/d_t_megami_diving.cpp +++ b/src/REL/d/t/d_t_megami_diving.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_megami_diving.h" SPECIAL_ACTOR_PROFILE(MEGAMI_DIVING_TAG, dTgMegamiDiving_c, fProfile::MEGAMI_DIVING_TAG, 0x299, 0, 0); diff --git a/src/REL/d/t/d_t_miechan.cpp b/src/REL/d/t/d_t_miechan.cpp index 9573a5de..26686ee2 100644 --- a/src/REL/d/t/d_t_miechan.cpp +++ b/src/REL/d/t/d_t_miechan.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_miechan.h" SPECIAL_ACTOR_PROFILE(TAG_MIECHAN, dTgMiechan_c, fProfile::TAG_MIECHAN, 0x2A, 0, 0); diff --git a/src/REL/d/t/d_t_minigame_insect_capture.cpp b/src/REL/d/t/d_t_minigame_insect_capture.cpp index 0e8509df..75d9a63d 100644 --- a/src/REL/d/t/d_t_minigame_insect_capture.cpp +++ b/src/REL/d/t/d_t_minigame_insect_capture.cpp @@ -1,6 +1,8 @@ -#include +#include "d/t/d_t_minigame_insect_capture.h" -SPECIAL_ACTOR_PROFILE(TAG_MINIGAME_INSECT_CAPTURE, dTgMinigameInsectCapture_c, fProfile::TAG_MINIGAME_INSECT_CAPTURE, 0x2A6, 0, 0); +SPECIAL_ACTOR_PROFILE( + TAG_MINIGAME_INSECT_CAPTURE, dTgMinigameInsectCapture_c, fProfile::TAG_MINIGAME_INSECT_CAPTURE, 0x2A6, 0, 0 +); dTgMinigameInsectCapture_c::dTgMinigameInsectCapture_c() {} dTgMinigameInsectCapture_c::~dTgMinigameInsectCapture_c() {} diff --git a/src/REL/d/t/d_t_mist.cpp b/src/REL/d/t/d_t_mist.cpp index ceb24b55..c2900084 100644 --- a/src/REL/d/t/d_t_mist.cpp +++ b/src/REL/d/t/d_t_mist.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_mist.h" SPECIAL_ACTOR_PROFILE(MIST_TAG, dMistTag_c, fProfile::MIST_TAG, 0xE, 0, 388); diff --git a/src/REL/d/t/d_t_mole_mgr.cpp b/src/REL/d/t/d_t_mole_mgr.cpp index 163cbee5..b8348d8a 100644 --- a/src/REL/d/t/d_t_mole_mgr.cpp +++ b/src/REL/d/t/d_t_mole_mgr.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_mole_mgr.h" SPECIAL_ACTOR_PROFILE(MOLE_MGR_TAG, dTgMoleMgr_c, fProfile::MOLE_MGR_TAG, 0x26, 0, 4); diff --git a/src/REL/d/t/d_t_mole_prohibit.cpp b/src/REL/d/t/d_t_mole_prohibit.cpp index 1a59bb18..9e828367 100644 --- a/src/REL/d/t/d_t_mole_prohibit.cpp +++ b/src/REL/d/t/d_t_mole_prohibit.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_mole_prohibit.h" SPECIAL_ACTOR_PROFILE(MOLE_PROHIBIT_TAG, dTgMoleProhibit_c, fProfile::MOLE_PROHIBIT_TAG, 0x0025, 0, 0); diff --git a/src/REL/d/t/d_t_musasabi.cpp b/src/REL/d/t/d_t_musasabi.cpp index e6c44b42..a36eb822 100644 --- a/src/REL/d/t/d_t_musasabi.cpp +++ b/src/REL/d/t/d_t_musasabi.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_musasabi.h" SPECIAL_ACTOR_PROFILE(TAG_MUSASABI, dTgMusasabi_c, fProfile::TAG_MUSASABI, 0x21C, 0, 0); diff --git a/src/REL/d/t/d_t_musou.cpp b/src/REL/d/t/d_t_musou.cpp index fbbf2fed..25bd34c5 100644 --- a/src/REL/d/t/d_t_musou.cpp +++ b/src/REL/d/t/d_t_musou.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_musou.h" SPECIAL_ACTOR_PROFILE(T_KUMITE, dTgMusou_c, fProfile::T_KUMITE, 0xC3, 0, 0); diff --git a/src/REL/d/t/d_t_noeffect_area.cpp b/src/REL/d/t/d_t_noeffect_area.cpp index f8116eed..a1657280 100644 --- a/src/REL/d/t/d_t_noeffect_area.cpp +++ b/src/REL/d/t/d_t_noeffect_area.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_noeffect_area.h" SPECIAL_ACTOR_PROFILE(TAG_NOEFFECT_AREA, dTgNoEffectArea_c, fProfile::TAG_NOEFFECT_AREA, 0x0158, 0, 0); diff --git a/src/REL/d/t/d_t_player_restart.cpp b/src/REL/d/t/d_t_player_restart.cpp index f209eb4d..b09dbc04 100644 --- a/src/REL/d/t/d_t_player_restart.cpp +++ b/src/REL/d/t/d_t_player_restart.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_player_restart.h" SPECIAL_ACTOR_PROFILE(PL_RESTART, dTgPlayerRestart_c, fProfile::PL_RESTART, 0x291, 0, 0); diff --git a/src/REL/d/t/d_t_plight.cpp b/src/REL/d/t/d_t_plight.cpp index a5e3533a..4abd9631 100644 --- a/src/REL/d/t/d_t_plight.cpp +++ b/src/REL/d/t/d_t_plight.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_plight.h" SPECIAL_ACTOR_PROFILE(PLIGHT_TAG, dTgPlight_c, fProfile::PLIGHT_TAG, 0x1E, 0, 4); diff --git a/src/REL/d/t/d_t_pltchg.cpp b/src/REL/d/t/d_t_pltchg.cpp index 6852cba9..1743bae2 100644 --- a/src/REL/d/t/d_t_pltchg.cpp +++ b/src/REL/d/t/d_t_pltchg.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_pltchg.h" SPECIAL_ACTOR_PROFILE(PLTCHG_TAG, dTgPltchg_c, fProfile::PLTCHG_TAG, 0x1D, 0, 4); diff --git a/src/REL/d/t/d_t_pumpkin_clay.cpp b/src/REL/d/t/d_t_pumpkin_clay.cpp index c62f4e30..c7e8eb3e 100644 --- a/src/REL/d/t/d_t_pumpkin_clay.cpp +++ b/src/REL/d/t/d_t_pumpkin_clay.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_pumpkin_clay.h" SPECIAL_ACTOR_PROFILE(TAG_PUMPKIN_CLAY, dTgPumpkinClay_c, fProfile::TAG_PUMPKIN_CLAY, 0x150, 0, 0); diff --git a/src/REL/d/t/d_t_reaction.cpp b/src/REL/d/t/d_t_reaction.cpp index eab2086f..f71f8553 100644 --- a/src/REL/d/t/d_t_reaction.cpp +++ b/src/REL/d/t/d_t_reaction.cpp @@ -1,10 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include +#include "d/t/d_t_reaction.h" + +#include "c/c_lib.h" +#include "c/c_math.h" +#include "d/a/d_a_player.h" +#include "d/a/obj/d_a_obj_item.h" +#include "d/col/cc/d_cc_mgr.h" +#include "toBeSorted/sceneflag_manager.h" + SPECIAL_ACTOR_PROFILE(TAG_REACTION, dTgReaction_c, fProfile::TAG_REACTION, 0x0151, 0, 0); diff --git a/src/REL/d/t/d_t_restart_time_stone.cpp b/src/REL/d/t/d_t_restart_time_stone.cpp index ce4a2784..4c14258e 100644 --- a/src/REL/d/t/d_t_restart_time_stone.cpp +++ b/src/REL/d/t/d_t_restart_time_stone.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_restart_time_stone.h" SPECIAL_ACTOR_PROFILE(TAG_RESTART_TIME_STONE, dTgRestartTimeStone_c, fProfile::TAG_RESTART_TIME_STONE, 0x29A, 0, 0); diff --git a/src/REL/d/t/d_t_ride_rock_set.cpp b/src/REL/d/t/d_t_ride_rock_set.cpp index ebde3f78..e8b80b0a 100644 --- a/src/REL/d/t/d_t_ride_rock_set.cpp +++ b/src/REL/d/t/d_t_ride_rock_set.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_ride_rock_set.h" SPECIAL_ACTOR_PROFILE(RIDE_ROCK_SET_TAG, dTgRideRockSet_c, fProfile::RIDE_ROCK_SET_TAG, 0x28, 0, 0); diff --git a/src/REL/d/t/d_t_ro_at_target_manager.cpp b/src/REL/d/t/d_t_ro_at_target_manager.cpp index 529216be..b32c1acd 100644 --- a/src/REL/d/t/d_t_ro_at_target_manager.cpp +++ b/src/REL/d/t/d_t_ro_at_target_manager.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_ro_at_target_manager.h" SPECIAL_ACTOR_PROFILE(RO_AT_TAR_MANAGER_TAG, dTgRoAtTargetManager_c, fProfile::RO_AT_TAR_MANAGER_TAG, 0x1FF, 0, 0); diff --git a/src/REL/d/t/d_t_rock_boat.cpp b/src/REL/d/t/d_t_rock_boat.cpp index 8071b58c..0ac1a4fb 100644 --- a/src/REL/d/t/d_t_rock_boat.cpp +++ b/src/REL/d/t/d_t_rock_boat.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/t/d_t_rock_boat.h" + +#include "d/a/obj/d_a_obj_base.h" + SPECIAL_ACTOR_PROFILE(TAG_ROCK_BOAT, dTgRockBoat_c, fProfile::TAG_ROCK_BOAT, 0x173, 0, 3); diff --git a/src/REL/d/t/d_t_roll_attack_log.cpp b/src/REL/d/t/d_t_roll_attack_log.cpp index a0d4ddde..b38151e4 100644 --- a/src/REL/d/t/d_t_roll_attack_log.cpp +++ b/src/REL/d/t/d_t_roll_attack_log.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_roll_attack_log.h" SPECIAL_ACTOR_PROFILE(TAG_ROLL_ATTACK_LOG, dTgRollAttackLog_c, fProfile::TAG_ROLL_ATTACK_LOG, 0x227, 0, 0); diff --git a/src/REL/d/t/d_t_scene_change.cpp b/src/REL/d/t/d_t_scene_change.cpp index 6258d6aa..babed843 100644 --- a/src/REL/d/t/d_t_scene_change.cpp +++ b/src/REL/d/t/d_t_scene_change.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_scene_change.h" SPECIAL_ACTOR_PROFILE(SC_CHANGE_TAG, dTgSceneChange_c, fProfile::SC_CHANGE_TAG, 0x21, 0, 4); diff --git a/src/REL/d/t/d_t_ship_flood.cpp b/src/REL/d/t/d_t_ship_flood.cpp index 9eb48c92..146c3994 100644 --- a/src/REL/d/t/d_t_ship_flood.cpp +++ b/src/REL/d/t/d_t_ship_flood.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_ship_flood.h" SPECIAL_ACTOR_PROFILE(TAG_SHIP_FLOOD, dTgShipFlood_c, fProfile::TAG_SHIP_FLOOD, 0x220, 0, 0); diff --git a/src/REL/d/t/d_t_ship_slope.cpp b/src/REL/d/t/d_t_ship_slope.cpp index 2b5ff0f4..e324e03c 100644 --- a/src/REL/d/t/d_t_ship_slope.cpp +++ b/src/REL/d/t/d_t_ship_slope.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_ship_slope.h" SPECIAL_ACTOR_PROFILE(TAG_SHIP_SLOPE, dTgShipSlope_c, fProfile::TAG_SHIP_SLOPE, 0x21F, 0, 0); diff --git a/src/REL/d/t/d_t_ship_window.cpp b/src/REL/d/t/d_t_ship_window.cpp index c550ff9f..9ae4a0f9 100644 --- a/src/REL/d/t/d_t_ship_window.cpp +++ b/src/REL/d/t/d_t_ship_window.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/t/d_t_ship_window.h" + +#include "toBeSorted/event_manager.h" +#include "toBeSorted/sceneflag_manager.h" + SPECIAL_ACTOR_PROFILE(TAG_SHIP_WINDOW, dTgShipWindow_c, fProfile::TAG_SHIP_WINDOW, 0x0228, 0, 0); @@ -73,7 +75,8 @@ void dTgShipWindow_c::executeState_Off() { } if ((mHasPlayedOffEvent == 0 || mAlwaysPlayEvent == 0) && - (mOutputStateFlagBase >= 0xFF || !SceneflagManager::sInstance->checkBoolFlag(roomid, mOutputStateFlagBase + 1))) { + (mOutputStateFlagBase >= 0xFF || !SceneflagManager::sInstance->checkBoolFlag(roomid, mOutputStateFlagBase + 1) + )) { if (mOffEventId != 0xFF) { { // this works but I don't like it @@ -112,7 +115,8 @@ void dTgShipWindow_c::executeState_On() { } if ((mHasPlayedOnEvent == 0 || mAlwaysPlayEvent == 0) && - (mOutputStateFlagBase >= 0xFF || !SceneflagManager::sInstance->checkBoolFlag(roomid, mOutputStateFlagBase + 2))) { + (mOutputStateFlagBase >= 0xFF || !SceneflagManager::sInstance->checkBoolFlag(roomid, mOutputStateFlagBase + 2) + )) { if (mOnEventId != 0xFF) { { // this works but I don't like it diff --git a/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp b/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp index 285dcd85..c85cbf98 100644 --- a/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp +++ b/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp @@ -1,6 +1,8 @@ -#include +#include "d/t/d_t_shutter_fence_forbiddance.h" -SPECIAL_ACTOR_PROFILE(TAG_SHUTTER_FENCE_FORBIDDANCE, dTgShutterFenceForbiddance_c, fProfile::TAG_SHUTTER_FENCE_FORBIDDANCE, 0x2A4, 0, 4); +SPECIAL_ACTOR_PROFILE( + TAG_SHUTTER_FENCE_FORBIDDANCE, dTgShutterFenceForbiddance_c, fProfile::TAG_SHUTTER_FENCE_FORBIDDANCE, 0x2A4, 0, 4 +); dTgShutterFenceForbiddance_c::dTgShutterFenceForbiddance_c() {} dTgShutterFenceForbiddance_c::~dTgShutterFenceForbiddance_c() {} diff --git a/src/REL/d/t/d_t_shutter_fence_permission.cpp b/src/REL/d/t/d_t_shutter_fence_permission.cpp index 86dce2f1..942d34c8 100644 --- a/src/REL/d/t/d_t_shutter_fence_permission.cpp +++ b/src/REL/d/t/d_t_shutter_fence_permission.cpp @@ -1,6 +1,8 @@ -#include +#include "d/t/d_t_shutter_fence_permission.h" -SPECIAL_ACTOR_PROFILE(TAG_SHUTTER_FENCE_PERMISSION, dTgShutterFencePermission_c, fProfile::TAG_SHUTTER_FENCE_PERMISSION, 0x2A3, 0, 0); +SPECIAL_ACTOR_PROFILE( + TAG_SHUTTER_FENCE_PERMISSION, dTgShutterFencePermission_c, fProfile::TAG_SHUTTER_FENCE_PERMISSION, 0x2A3, 0, 0 +); dTgShutterFencePermission_c::dTgShutterFencePermission_c() {} dTgShutterFencePermission_c::~dTgShutterFencePermission_c() {} diff --git a/src/REL/d/t/d_t_siren_time_attack.cpp b/src/REL/d/t/d_t_siren_time_attack.cpp index a1450098..af3810e2 100644 --- a/src/REL/d/t/d_t_siren_time_attack.cpp +++ b/src/REL/d/t/d_t_siren_time_attack.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_siren_time_attack.h" SPECIAL_ACTOR_PROFILE(TAG_SIREN_TIME_ATTACK, dTgSirenTimeAttack_c, fProfile::TAG_SIREN_TIME_ATTACK, 0x70, 0, 0); diff --git a/src/REL/d/t/d_t_skyEnemy.cpp b/src/REL/d/t/d_t_skyEnemy.cpp index f2ea824b..f768d388 100644 --- a/src/REL/d/t/d_t_skyEnemy.cpp +++ b/src/REL/d/t/d_t_skyEnemy.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_skyEnemy.h" SPECIAL_ACTOR_PROFILE(SKYENEMY_T, dTgSkyEnemyTag, fProfile::SKYENEMY_T, 0x28D, 0, 0); diff --git a/src/REL/d/t/d_t_sound.cpp b/src/REL/d/t/d_t_sound.cpp index 27b1b711..4de79e9c 100644 --- a/src/REL/d/t/d_t_sound.cpp +++ b/src/REL/d/t/d_t_sound.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_sound.h" SPECIAL_ACTOR_PROFILE(SOUND_TAG, dTgSound_c, fProfile::SOUND_TAG, 0x144, 0, 0); diff --git a/src/REL/d/t/d_t_sound_area.cpp b/src/REL/d/t/d_t_sound_area.cpp index c81321ab..f4cf89c6 100644 --- a/src/REL/d/t/d_t_sound_area.cpp +++ b/src/REL/d/t/d_t_sound_area.cpp @@ -1,9 +1,10 @@ -#include -#include -#include -#include -#include -#include +#include "d/t/d_t_sound_area.h" + +#include "d/a/d_a_player.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/c/c_m3d_g_cps.h" +#include "d/t/d_t_sound_area_mgr.h" +#include "rvl/MTX.h" // IWYU pragma: export SPECIAL_ACTOR_PROFILE(TAG_SOUND_AREA, dTgSndAr_c, fProfile::TAG_SOUND_AREA, 0x0146, 0, 0); diff --git a/src/REL/d/t/d_t_sound_area_mgr.cpp b/src/REL/d/t/d_t_sound_area_mgr.cpp index 3a12694c..0d9dd1d1 100644 --- a/src/REL/d/t/d_t_sound_area_mgr.cpp +++ b/src/REL/d/t/d_t_sound_area_mgr.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/t/d_t_sound_area_mgr.h" + +#include "d/a/d_a_player.h" + SPECIAL_ACTOR_PROFILE(SOUND_AREA_MGR, dTgSndMg_c, fProfile::SOUND_AREA_MGR, 0x0145, 0, 0); diff --git a/src/REL/d/t/d_t_sparks.cpp b/src/REL/d/t/d_t_sparks.cpp index 565c8525..e4a85593 100644 --- a/src/REL/d/t/d_t_sparks.cpp +++ b/src/REL/d/t/d_t_sparks.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_sparks.h" SPECIAL_ACTOR_PROFILE(SPARKS_TAG, dTgSparksTag, fProfile::SPARKS_TAG, 0x19, 0, 4); diff --git a/src/REL/d/t/d_t_sparks2.cpp b/src/REL/d/t/d_t_sparks2.cpp index 7fc1a793..bfd73ec8 100644 --- a/src/REL/d/t/d_t_sparks2.cpp +++ b/src/REL/d/t/d_t_sparks2.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_sparks2.h" SPECIAL_ACTOR_PROFILE(SPARKS2_TAG, dSparks2Tag_c, fProfile::SPARKS2_TAG, 0x1A, 0, 388); diff --git a/src/REL/d/t/d_t_spore.cpp b/src/REL/d/t/d_t_spore.cpp index d0025fc1..24a4dff2 100644 --- a/src/REL/d/t/d_t_spore.cpp +++ b/src/REL/d/t/d_t_spore.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_spore.h" SPECIAL_ACTOR_PROFILE(SPORE_TAG, dSporeTag_c, fProfile::SPORE_TAG, 0xD, 0, 388); diff --git a/src/REL/d/t/d_t_stream.cpp b/src/REL/d/t/d_t_stream.cpp index f558a3bf..f267bd24 100644 --- a/src/REL/d/t/d_t_stream.cpp +++ b/src/REL/d/t/d_t_stream.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_stream.h" SPECIAL_ACTOR_PROFILE(TAG_STREAM, dTgStream_c, fProfile::TAG_STREAM, 0x29D, 0, 0); diff --git a/src/REL/d/t/d_t_sw_area.cpp b/src/REL/d/t/d_t_sw_area.cpp index 6600b0b9..0e40fcb8 100644 --- a/src/REL/d/t/d_t_sw_area.cpp +++ b/src/REL/d/t/d_t_sw_area.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_sw_area.h" SPECIAL_ACTOR_PROFILE(SW_AREA_TAG, dTgSwArea_c, fProfile::SW_AREA_TAG, 0x292, 0, 0); diff --git a/src/REL/d/t/d_t_sword_battle_game.cpp b/src/REL/d/t/d_t_sword_battle_game.cpp index ce98882f..07148175 100644 --- a/src/REL/d/t/d_t_sword_battle_game.cpp +++ b/src/REL/d/t/d_t_sword_battle_game.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_sword_battle_game.h" SPECIAL_ACTOR_PROFILE(TAG_SWORD_BATTLE_GAME, dTgSwordBattleGame_c, fProfile::TAG_SWORD_BATTLE_GAME, 0x6F, 0, 4); diff --git a/src/REL/d/t/d_t_tackle.cpp b/src/REL/d/t/d_t_tackle.cpp index 9b5d77ca..e842b13b 100644 --- a/src/REL/d/t/d_t_tackle.cpp +++ b/src/REL/d/t/d_t_tackle.cpp @@ -1,4 +1,4 @@ -#include +#include "d/t/d_t_tackle.h" SPECIAL_ACTOR_PROFILE(TACKLE_TAG, dTgTackle_c, fProfile::TACKLE_TAG, 0x0241, 0, 0); diff --git a/src/REL/d/t/d_t_telop.cpp b/src/REL/d/t/d_t_telop.cpp index 05e79a59..ab4f8ce0 100644 --- a/src/REL/d/t/d_t_telop.cpp +++ b/src/REL/d/t/d_t_telop.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_telop.h" SPECIAL_ACTOR_PROFILE(TLP_TAG, dTgTelop_c, fProfile::TLP_TAG, 0x28C, 0, 0); diff --git a/src/REL/d/t/d_t_time_area_check.cpp b/src/REL/d/t/d_t_time_area_check.cpp index be415545..d35b3932 100644 --- a/src/REL/d/t/d_t_time_area_check.cpp +++ b/src/REL/d/t/d_t_time_area_check.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/t/d_t_time_area_check.h" + +#include "toBeSorted/sceneflag_manager.h" +#include "toBeSorted/time_area_mgr.h" + SPECIAL_ACTOR_PROFILE(TAG_TIME_AREA_CHECK, dTgTimeAreaCheck_c, fProfile::TAG_TIME_AREA_CHECK, 0x01AC, 0, 0); diff --git a/src/REL/d/t/d_t_time_door_beam.cpp b/src/REL/d/t/d_t_time_door_beam.cpp index 9db784ed..fa249fc8 100644 --- a/src/REL/d/t/d_t_time_door_beam.cpp +++ b/src/REL/d/t/d_t_time_door_beam.cpp @@ -1,3 +1,3 @@ -#include +#include "d/t/d_t_time_door_beam.h" SPECIAL_ACTOR_PROFILE(TAG_TIME_DOOR_BEAM, dTgTimeDoorBeam_c, fProfile::TAG_TIME_DOOR_BEAM, 0x252, 0, 0); diff --git a/src/REL/d/t/d_t_timer.cpp b/src/REL/d/t/d_t_timer.cpp index 8807870e..c5237049 100644 --- a/src/REL/d/t/d_t_timer.cpp +++ b/src/REL/d/t/d_t_timer.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/t/d_t_timer.h" + +#include "toBeSorted/sceneflag_manager.h" + SPECIAL_ACTOR_PROFILE(TAG_TIMER, dTgTimer_c, fProfile::TAG_TIMER, 0x029F, 0, 0); @@ -14,17 +16,15 @@ bool increment(u16 *t) { int dTgTimer_c::create() { switch (getSubtypeFromParams()) { - case 0: - mGetTargetTimeFunc = &dTgTimer_c::getConstant0x50_Thunk; - break; - case 1: - mTargetTime = getTimerFromParams() * 0x1e; - mGetTargetTimeFunc = &dTgTimer_c::getStoredTargetTime; - break; - default: - mTargetTime = getTimerFromParams(); - mGetTargetTimeFunc = &dTgTimer_c::getStoredTargetTime; - break; + case 0: mGetTargetTimeFunc = &dTgTimer_c::getConstant0x50_Thunk; break; + case 1: + mTargetTime = getTimerFromParams() * 0x1e; + mGetTargetTimeFunc = &dTgTimer_c::getStoredTargetTime; + break; + default: + mTargetTime = getTimerFromParams(); + mGetTargetTimeFunc = &dTgTimer_c::getStoredTargetTime; + break; } resetTimer(); return SUCCEEDED; diff --git a/src/REL/d/t/d_t_touch.cpp b/src/REL/d/t/d_t_touch.cpp index df97ddc3..06bcecff 100644 --- a/src/REL/d/t/d_t_touch.cpp +++ b/src/REL/d/t/d_t_touch.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/t/d_t_touch.h" + +#include "c/c_math.h" +#include "toBeSorted/area_math.h" +#include "toBeSorted/sceneflag_manager.h" + SPECIAL_ACTOR_PROFILE(TOUCH_TAG, dTgTouchTag, fProfile::TOUCH_TAG, 0x028E, 0, 0); diff --git a/src/REL/d/t/d_t_tumble_weed.cpp b/src/REL/d/t/d_t_tumble_weed.cpp index 021c391b..7e3bd710 100644 --- a/src/REL/d/t/d_t_tumble_weed.cpp +++ b/src/REL/d/t/d_t_tumble_weed.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/t/d_t_tumble_weed.h" + +#include "c/c_math.h" +#include "m/m_vec.h" + SPECIAL_ACTOR_PROFILE(TUMBLE_WEED_TAG, dTgTumbleWeed_c, fProfile::TUMBLE_WEED_TAG, 0x0244, 0, 0); diff --git a/src/REL/executor.c b/src/REL/executor.c index 64776d13..dba7c42f 100644 --- a/src/REL/executor.c +++ b/src/REL/executor.c @@ -1,4 +1,4 @@ -#include +#include "REL/executor.h" void _prolog(void) { ModuleConstructorsX(_ctors); diff --git a/src/c/c_list.cpp b/src/c/c_list.cpp index 9d39a755..61929a5f 100644 --- a/src/c/c_list.cpp +++ b/src/c/c_list.cpp @@ -1,4 +1,4 @@ -#include +#include "c/c_list.h" /* 0x802E08C0 */ void cListMg_c::insertAfter(cListNd_c *node, cListNd_c *prevNode) { diff --git a/src/c/c_tree.cpp b/src/c/c_tree.cpp index 9ed5eda0..de1318e3 100644 --- a/src/c/c_tree.cpp +++ b/src/c/c_tree.cpp @@ -1,4 +1,4 @@ -#include +#include "c/c_tree.h" /* 0x802E0E70 */ cTreeNd_c::cTreeNd_c() { diff --git a/src/d/a/d_a_base.cpp b/src/d/a/d_a_base.cpp index 3ae517e2..9995b106 100644 --- a/src/d/a/d_a_base.cpp +++ b/src/d/a/d_a_base.cpp @@ -2,12 +2,14 @@ #include "d/a/d_a_player.h" #include "d/a/obj/d_a_obj_base.h" +#include "d/d_heap.h" #include "f/f_list_nd.h" #include "m/m_vec.h" #include "toBeSorted/event.h" #include "toBeSorted/event_manager.h" #include "toBeSorted/file_manager.h" #include "toBeSorted/misc_flag_managers.h" +#include "toBeSorted/room_manager.h" #include "toBeSorted/scgame.h" #include "toBeSorted/special_item_drop_mgr.h" @@ -300,7 +302,7 @@ dAcBase_c *dAcBase_c::findActor(char *objName, dAcBase_c *parent) { // searches for actor based on groupType // 8002d0a0 -DECOMP_INLINE dAcBase_c *findActor(dAcBase_c *parent) { +FORCE_INLINE dAcBase_c *findActor(dAcBase_c *parent) { if (!parent) { return (dAcBase_c *)fManager_c::searchBaseByGroupType(2, nullptr); } @@ -358,8 +360,8 @@ bool dAcBase_c::getDistanceToActor(dAcBase_c *actor, f32 distThresh, f32 *outDis s32 doAbs(s16 val) { return labs(val); } -// Similar weirdness as the above function. Also, r29->31 are initted in the wrong order? -// 8002d290 +// Similar weirdness as the above function. Also, r29->31 are initted in the +// wrong order? 8002d290 bool dAcBase_c::getDistanceAndAngleToActor( dAcBase_c *actor, f32 distThresh, s16 yAngle, s16 xAngle, f32 *outDist, s16 *outDiffAngleY, s16 *outDiffAngleX ) { diff --git a/src/d/a/d_a_player.cpp b/src/d/a/d_a_player.cpp index f08c6dc7..f461951e 100644 --- a/src/d/a/d_a_player.cpp +++ b/src/d/a/d_a_player.cpp @@ -1,3 +1,3 @@ -#include +#include "d/a/d_a_player.h" dAcPy_c *dAcPy_c::LINK; diff --git a/src/d/a/obj/d_a_obj_fairy.cpp b/src/d/a/obj/d_a_obj_fairy.cpp index 23fcc6d3..3eaa20d6 100644 --- a/src/d/a/obj/d_a_obj_fairy.cpp +++ b/src/d/a/obj/d_a_obj_fairy.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/a/obj/d_a_obj_fairy.h" + +#include "d/a/d_a_player.h" + SPECIAL_ACTOR_PROFILE(OBJ_FAIRY, dAcObjFairy_c, fProfile::OBJ_FAIRY, 0x166, 0, 2); diff --git a/src/d/a/obj/d_a_obj_switch.cpp b/src/d/a/obj/d_a_obj_switch.cpp index d514b3a5..bd9c1250 100644 --- a/src/d/a/obj/d_a_obj_switch.cpp +++ b/src/d/a/obj/d_a_obj_switch.cpp @@ -1,10 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include +#include "d/a/obj/d_a_obj_switch.h" + +#include "c/c_math.h" +#include "d/a/d_a_player.h" +#include "d/col/bg/d_bg_s.h" +#include "d/col/bg/d_bg_w.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "s/s_Math.h" +#include "toBeSorted/sceneflag_manager.h" SPECIAL_ACTOR_PROFILE(OBJ_SW, dAcOsw_c, fProfile::OBJ_SW, 0x12B, 0, 0x1002); diff --git a/src/d/col/bg/d_bg_s.cpp b/src/d/col/bg/d_bg_s.cpp index 1dd88fb1..7b43718f 100644 --- a/src/d/col/bg/d_bg_s.cpp +++ b/src/d/col/bg/d_bg_s.cpp @@ -1,5 +1,6 @@ #include "d/col/bg/d_bg_s.h" +#include "common.h" #include "d/col/bg/d_bg_s_acch.h" #include "d/col/bg/d_bg_s_gnd_chk.h" #include "d/col/bg/d_bg_s_lin_chk.h" @@ -954,11 +955,11 @@ dAcObjBase_c *dBgS::PushPullCallBack(cBgS_PolyInfo const &info, dAcObjBase_c *pA } dAcObjBase_c *pObj = mChkElem[idx].mObj.get(); if (!pObj) { - return false; + return nullptr; } if (pBgW->GetPushPullCallback() == nullptr) { - return false; + return nullptr; } return pBgW->GetPushPullCallback()(pObj, pAc, label); } diff --git a/src/d/col/bg/d_bg_w.cpp b/src/d/col/bg/d_bg_w.cpp index c169f866..a8684c23 100644 --- a/src/d/col/bg/d_bg_w.cpp +++ b/src/d/col/bg/d_bg_w.cpp @@ -6,7 +6,6 @@ #include "d/col/c/c_bg_s_chk.h" #include "d/col/c/c_bg_s_lin_chk.h" #include "d/col/c/c_bg_s_shdw_draw.h" -#include "d/d_heap_alloc.h" #include "toBeSorted/scgame.h" bool cBgW::sLineCheck; diff --git a/src/d/col/c/c_m3d.cpp b/src/d/col/c/c_m3d.cpp index 9ade21dc..d23860d9 100644 --- a/src/d/col/c/c_m3d.cpp +++ b/src/d/col/c/c_m3d.cpp @@ -13,7 +13,7 @@ #include "m/m_vec.h" #include "math.h" #include "nw4r/math/math_types.h" -#include "rvl/MTX.h" +#include "rvl/MTX.h" // IWYU pragma: export using namespace nw4r::math; using namespace EGG; diff --git a/src/d/col/c/c_m3d_g_aab.cpp b/src/d/col/c/c_m3d_g_aab.cpp index 37b797cf..a0b9a78a 100644 --- a/src/d/col/c/c_m3d_g_aab.cpp +++ b/src/d/col/c/c_m3d_g_aab.cpp @@ -1,6 +1,6 @@ #include "d/col/c/c_m3d_g_aab.h" -#include "rvl/MTX.h" +#include "rvl/MTX.h" // IWYU pragma: export void cM3dGAab::SetMin(const mVec3_c &min) { if (mMin.x > min.x) { diff --git a/src/d/col/c/c_m3d_g_cps.cpp b/src/d/col/c/c_m3d_g_cps.cpp index 8d84457e..82d14480 100644 --- a/src/d/col/c/c_m3d_g_cps.cpp +++ b/src/d/col/c/c_m3d_g_cps.cpp @@ -1,7 +1,7 @@ #include "d/col/c/c_m3d_g_cps.h" #include "d/col/c/c_m3d.h" -#include "nw4r/math.h" +#include "nw4r/math.h" // IWYU pragma: export cM3dGCps::cM3dGCps() { mField_0x1C = 0.0f; diff --git a/src/d/col/c/c_m3d_g_tri.cpp b/src/d/col/c/c_m3d_g_tri.cpp index e8d1b128..5d6bac6d 100644 --- a/src/d/col/c/c_m3d_g_tri.cpp +++ b/src/d/col/c/c_m3d_g_tri.cpp @@ -1,7 +1,5 @@ #include "d/col/c/c_m3d_g_tri.h" -using nw4r::math::VEC3; - void cM3dGTri::SetPos(const VecType *vA, const VecType *vB, const VecType *vC) { mA = *vA; mB = *vB; diff --git a/src/d/col/cc/d_cc_d.cpp b/src/d/col/cc/d_cc_d.cpp index eb113b04..e7c935eb 100644 --- a/src/d/col/cc/d_cc_d.cpp +++ b/src/d/col/cc/d_cc_d.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "d/col/cc/d_cc_d.h" + +#include "d/a/d_a_base.h" +#include "f/f_base_id.h" +#include "m/m_vec.h" + inline bool cM3d_IsZero(f32 f); diff --git a/src/d/col/cc/d_cc_shape_colliders.cpp b/src/d/col/cc/d_cc_shape_colliders.cpp index 1c85dd3c..ad53e574 100644 --- a/src/d/col/cc/d_cc_shape_colliders.cpp +++ b/src/d/col/cc/d_cc_shape_colliders.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/col/cc/d_cc_shape_colliders.h" + +#include "d/col/cc/d_cc_d.h" +#include "m/m_vec.h" + dCcD_Unk1::dCcD_Unk1() {} dCcD_Unk1::~dCcD_Unk1() {} diff --git a/src/d/d_dvd.cpp b/src/d/d_dvd.cpp index 68e4a562..464702e5 100644 --- a/src/d/d_dvd.cpp +++ b/src/d/d_dvd.cpp @@ -1,7 +1,9 @@ -#include -#include +#include "d/d_dvd.h" + +#include "m/m_dvd.h" + // clang-format off -#include +#include "sized_string.h" // clang-format on namespace dDvd { diff --git a/src/d/d_dvd_unk.cpp b/src/d/d_dvd_unk.cpp index b4ab12d4..eb34b79a 100644 --- a/src/d/d_dvd_unk.cpp +++ b/src/d/d_dvd_unk.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/d_dvd_unk.h" + +#include "egg/core/eggHeap.h" +#include "nw4r/ut/ut_ResFont.h" + namespace dDvdUnk { @@ -26,9 +28,7 @@ void unkstruct_c::draw() { } /** 800526b0 */ -void unkstruct_c::execute() { - -} +void unkstruct_c::execute() {} /** 80052750 */ void unkstruct_c::init() { @@ -36,7 +36,6 @@ void unkstruct_c::init() { field_0x4 = 0; } - void unkstruct_c::createFont(EGG::Heap *heap) { fontPtr = new (heap, 0x04) nw4r::ut::ResFont(); } diff --git a/src/d/d_dylink.cpp b/src/d/d_dylink.cpp index 1d6ea37d..70c4365d 100644 --- a/src/d/d_dylink.cpp +++ b/src/d/d_dylink.cpp @@ -1,13 +1,13 @@ -#include -#include -#include -#include -#include -#include -#include -// clang-format off -#include -// clang-format on +#include "d/d_dylink.h" + +#include "DynamicLink.h" +#include "common.h" +#include "m/m_dvd.h" +#include "m/m_heap.h" +#include "rvl/DVD.h" // IWYU pragma: export +#include "rvl/NAND.h" // IWYU pragma: export +#include "string.h" + struct RelNamePtr { u16 relId; @@ -44,8 +44,10 @@ char relsDir[] = "/rels"; /** 80052E00 */ int initDylinkHeap(int maxRelId, const RelNamePtr *dynNameTable, int dynNameTableNum, EGG::Heap *parentHeap) { - cCc_frmHeap = mHeap::createFrmHeap(maxRelId * 0x10 + dynNameTableNum * 0x48, parentHeap, - "ダイナミックリンク制御用ヒープ(dDyl::cCc_frmHeap)", 0x20, 0); + cCc_frmHeap = mHeap::createFrmHeap( + maxRelId * 0x10 + dynNameTableNum * 0x48, parentHeap, "ダイナミックリンク制御用ヒープ(dDyl::cCc_frmHeap)", 0x20, + 0 + ); mHeap _guard(cCc_frmHeap); @@ -212,7 +214,7 @@ extern "C" bool fn_80053240(char *relPath, char *tmpRelPath, EGG::Heap *heap) { } if (NANDCreate(tmpRelPath, NAND_PERM_RUSR | NAND_PERM_WUSR, 0) != NAND_RESULT_OK || - NANDOpen(tmpRelPath, &nandFileInfo, 2) != NAND_RESULT_OK) { + NANDOpen(tmpRelPath, &nandFileInfo, 2) != NAND_RESULT_OK) { goto end; } @@ -247,8 +249,10 @@ extern "C" bool fn_80053240(char *relPath, char *tmpRelPath, EGG::Heap *heap) { chunkSize = fileSize - sizeRead; } // NB the whichThread * totalBufSize / 2 match relies on whichThread * totalBufSize being able to overflow - if (!startDvdRead(&nandStructs[whichThread], ((u8 *)buf) + whichThread * totalBufSize / 2, chunkSize, - /* offset */ sizeRead)) { + if (!startDvdRead( + &nandStructs[whichThread], ((u8 *)buf) + whichThread * totalBufSize / 2, chunkSize, + /* offset */ sizeRead + )) { break; } diff --git a/src/d/d_fader.cpp b/src/d/d_fader.cpp index 34242d0c..05fe7c60 100644 --- a/src/d/d_fader.cpp +++ b/src/d/d_fader.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/d_fader.h" + +#include "m/m_fader.h" + static mColor mFaderColor = mColor(200, 200, 200, 0xFF); @@ -45,38 +47,38 @@ bool dFader_c::create() { bool dFader_c::setFader(s32 fader) { switch (fader) { - case 0: - if (mFader_c::setFader(mpColorFader)) { - if (mpColorFader->getStatus() == mFaderBase_c::FADED_IN) { - mpColorFader->setColor(mColor(0, 0, 0, 0xFF)); + case 0: + if (mFader_c::setFader(mpColorFader)) { + if (mpColorFader->getStatus() == mFaderBase_c::FADED_IN) { + mpColorFader->setColor(mColor(0, 0, 0, 0xFF)); + } + return true; } - return true; - } - break; - case 1: - if (mFader_c::setFader(mpColorFader)) { - if (mpColorFader->getStatus() == mFaderBase_c::FADED_IN) { - mpColorFader->setColor(mFaderColor); + break; + case 1: + if (mFader_c::setFader(mpColorFader)) { + if (mpColorFader->getStatus() == mFaderBase_c::FADED_IN) { + mpColorFader->setColor(mFaderColor); + } + return true; } - return true; - } - break; - case 2: - if (mFader_c::setFader(mpLytFader)) { - if (mpLytFader->getStatus() == mFaderBase_c::FADED_IN) { - mpLytFader->setColor(mColor(0, 0, 0, 0xFF)); + break; + case 2: + if (mFader_c::setFader(mpLytFader)) { + if (mpLytFader->getStatus() == mFaderBase_c::FADED_IN) { + mpLytFader->setColor(mColor(0, 0, 0, 0xFF)); + } + return true; } - return true; - } - break; - case 3: - if (mFader_c::setFader(mpScreenFader)) { - if (mpScreenFader->getStatus() == mFaderBase_c::FADED_IN) { - mpScreenFader->setColor(mColor(0, 0, 0, 0xFF)); + break; + case 3: + if (mFader_c::setFader(mpScreenFader)) { + if (mpScreenFader->getStatus() == mFaderBase_c::FADED_IN) { + mpScreenFader->setColor(mColor(0, 0, 0, 0xFF)); + } + return true; } - return true; - } - break; + break; } return false; diff --git a/src/d/d_font_manager.cpp b/src/d/d_font_manager.cpp index 2e15c4f8..c992484b 100644 --- a/src/d/d_font_manager.cpp +++ b/src/d/d_font_manager.cpp @@ -1,12 +1,15 @@ -#include -#include -#include +#include "d/d_font_manager.h" + +#include "d/d_heap.h" +#include "sized_string.h" + static dFontMng_c l_dFontMng_obj[3]; static const char *systemFonts[] = {"normal_00.brfnt", "special_00.brfnt", "picture_00.brfnt"}; -static const char *fonts[] = {"normal_00.brfnt", "normal_01.brfnt", "special_00.brfnt", "special_01.brfnt", - "picture_00.brfnt"}; +static const char *fonts[] = { + "normal_00.brfnt", "normal_01.brfnt", "special_00.brfnt", "special_01.brfnt", "picture_00.brfnt" +}; // TODO What's up with these? char dFontMng_c::normal_01[] = "normal_01.brfnt"; @@ -62,7 +65,8 @@ bool dFontMng_c::create() { if (l_dFontMng_obj[i].mpFontFile == nullptr) { const char *path = getFontPath(i); nw4r::ut::BinaryFileHeader *file = static_cast( - l_dFontMng_obj[i].mLoader.request(path, 0, dHeap::fontHeap.heap)); + l_dFontMng_obj[i].mLoader.request(path, 0, dHeap::fontHeap.heap) + ); if (file == nullptr) { return false; } diff --git a/src/d/d_heap.cpp b/src/d/d_heap.cpp index 51f3cec1..49a21995 100644 --- a/src/d/d_heap.cpp +++ b/src/d/d_heap.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/d_heap.h" + +#include "d/d_heap_alloc.h" + dHeap dHeap::work1Heap; dHeap dHeap::work2Heap; diff --git a/src/d/d_rawarchive.cpp b/src/d/d_rawarchive.cpp index 3d4f43b3..45b20758 100644 --- a/src/d/d_rawarchive.cpp +++ b/src/d/d_rawarchive.cpp @@ -1,6 +1,6 @@ -#include -#include +#include "d/d_rawarchive.h" +#include "rvl/VI.h" // IWYU pragma: export int computeChecksumInner(void *d, u32 len) { u32 *data = (u32 *)d; @@ -107,8 +107,9 @@ bool dRawArcEntry_c::destroy(void *arg) { return true; } -bool dRawArcEntry_c::loadArcFromDiskChecked(const char *fileName, const char *dirName, u8 mountDirection, - EGG::Heap *heap) { +bool dRawArcEntry_c::loadArcFromDiskChecked( + const char *fileName, const char *dirName, u8 mountDirection, EGG::Heap *heap +) { SizedString<128> path; if (checkArcExistsOnDiskInner(path, fileName, dirName)) { @@ -142,7 +143,9 @@ BOOL dRawArcEntry_c::checkArcExistsOnDiskInner(SizedString<128> &path, const cha return true; } -int dRawArcEntry_c::mount(const char *name, void *data, ArcCallbackHandler *callbackArg, u8 mountDirection, EGG::Heap *heap) { +int dRawArcEntry_c::mount( + const char *name, void *data, ArcCallbackHandler *callbackArg, u8 mountDirection, EGG::Heap *heap +) { mArcName = name; mpArc = EGG::Archive::mount(data, heap, (mountDirection == 0 || mountDirection == 1) ? 4 : -4); if (mpArc == nullptr) { diff --git a/src/d/lyt/d2d.cpp b/src/d/lyt/d2d.cpp index 87934d36..90e13ff7 100644 --- a/src/d/lyt/d2d.cpp +++ b/src/d/lyt/d2d.cpp @@ -1,15 +1,17 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "d/lyt/d2d.h" + +#include "d/d_font_manager.h" +#include "d/lyt/d_textbox.h" +#include "d/lyt/d_window.h" +#include "egg/gfx/eggScreen.h" +#include "nw4r/lyt/lyt_bounding.h" +#include "nw4r/lyt/lyt_group.h" +#include "nw4r/lyt/lyt_picture.h" +#include "nw4r/lyt/lyt_textBox.h" +#include "nw4r/lyt/lyt_utils.h" +#include "nw4r/lyt/lyt_window.h" +#include "sized_string.h" + using namespace nw4r::lyt; @@ -42,28 +44,27 @@ nw4r::lyt::Pane *Layout_c::BuildPaneObj(s32 kind, const void *dataPtr, const Res // Had them as left over from editing and somehow when removing them it just broke Build. // Probably some analysis depth as 3 break statements do it switch (kind) { - case 'pan1': { - const res::Pane *pResPane = (const res::Pane *)dataPtr; - return NewObj(pResPane); - } break; - case 'pic1': { - const res::Picture *pResPic = (const res::Picture *)dataPtr; - return NewObj(pResPic, resBlockSet); - } break; - case 'txt1': { - const res::TextBox *pBlock = (const res::TextBox *)dataPtr; - return NewObj(pBlock, resBlockSet); - } break; - case 'wnd1': { - const res::Window *pBlock = (const res::Window *)dataPtr; - return NewObj(pBlock, resBlockSet); - } break; - case 'bnd1': { - const res::Bounding *pResBounding = (const res::Bounding *)dataPtr; - return NewObj(pResBounding, resBlockSet); - } break; - default: - return nullptr; + case 'pan1': { + const res::Pane *pResPane = (const res::Pane *)dataPtr; + return NewObj(pResPane); + } break; + case 'pic1': { + const res::Picture *pResPic = (const res::Picture *)dataPtr; + return NewObj(pResPic, resBlockSet); + } break; + case 'txt1': { + const res::TextBox *pBlock = (const res::TextBox *)dataPtr; + return NewObj(pBlock, resBlockSet); + } break; + case 'wnd1': { + const res::Window *pBlock = (const res::Window *)dataPtr; + return NewObj(pBlock, resBlockSet); + } break; + case 'bnd1': { + const res::Bounding *pResBounding = (const res::Bounding *)dataPtr; + return NewObj(pResBounding, resBlockSet); + } break; + default: return nullptr; } } @@ -87,68 +88,67 @@ bool Layout_c::Build(const void *lytResBuf, ResourceAccessor *pResAcsr) { for (int i = 0; i < pFileHead->dataBlocks; i++) { const res::DataBlockHeader *pDataBlockHead = (const res::DataBlockHeader *)dataPtr; switch (detail::GetSignatureInt(pDataBlockHead->kind)) { - case 'lyt1': // Main Layout - { - const res::Layout *pResLyt = ((const res::Layout *)dataPtr); - mLayoutSize = pResLyt->layoutSize; - } break; - case 'txl1': // Texture List - resBlockSet.pTextureList = (const res::TextureList *)dataPtr; - break; - case 'fnl1': // Font List - resBlockSet.pFontList = (const res::FontList *)dataPtr; - break; - case 'mat1': // Material - resBlockSet.pMaterialList = (const res::MaterialList *)dataPtr; - break; - case 'wnd1': // Window - case 'pan1': // Pane - case 'pic1': // Picture - case 'txt1': // Text Box - case 'bnd1': // Boundary Pane - { - Pane *pPane = BuildPaneObj(detail::GetSignatureInt(pDataBlockHead->kind), dataPtr, resBlockSet); - if (pPane) { - if (mpRootPane == nullptr) { - mpRootPane = pPane; - } - if (pParentPane) { - pParentPane->AppendChild(pPane); + case 'lyt1': // Main Layout + { + const res::Layout *pResLyt = ((const res::Layout *)dataPtr); + mLayoutSize = pResLyt->layoutSize; + } break; + case 'txl1': // Texture List + resBlockSet.pTextureList = (const res::TextureList *)dataPtr; + break; + case 'fnl1': // Font List + resBlockSet.pFontList = (const res::FontList *)dataPtr; + break; + case 'mat1': // Material + resBlockSet.pMaterialList = (const res::MaterialList *)dataPtr; + break; + case 'wnd1': // Window + case 'pan1': // Pane + case 'pic1': // Picture + case 'txt1': // Text Box + case 'bnd1': // Boundary Pane + { + Pane *pPane = BuildPaneObj(detail::GetSignatureInt(pDataBlockHead->kind), dataPtr, resBlockSet); + if (pPane) { + if (mpRootPane == nullptr) { + mpRootPane = pPane; + } + if (pParentPane) { + pParentPane->AppendChild(pPane); + } + pLastPane = pPane; } - pLastPane = pPane; - } - } break; - case 'usd1': // User Data - pLastPane->SetExtUserDataList((const res::ExtUserDataList *)dataPtr); - break; - case 'pas1': // PaneChildren Start - pParentPane = pLastPane; - break; - case 'pae1': // PaneChildren End - pLastPane = pParentPane; - pParentPane = pLastPane->GetParent(); - break; - case 'grp1': // Group - if (!bReadRootGroup) { - bReadRootGroup = true; - mpGroupContainer = NewObj(); - } else { - if (mpGroupContainer && groupNestLevel == 1) { - Group *pGroup = NewObj((const res::Group *)dataPtr, mpRootPane); - if (pGroup) { - mpGroupContainer->AppendGroup(pGroup); + } break; + case 'usd1': // User Data + pLastPane->SetExtUserDataList((const res::ExtUserDataList *)dataPtr); + break; + case 'pas1': // PaneChildren Start + pParentPane = pLastPane; + break; + case 'pae1': // PaneChildren End + pLastPane = pParentPane; + pParentPane = pLastPane->GetParent(); + break; + case 'grp1': // Group + if (!bReadRootGroup) { + bReadRootGroup = true; + mpGroupContainer = NewObj(); + } else { + if (mpGroupContainer && groupNestLevel == 1) { + Group *pGroup = NewObj((const res::Group *)dataPtr, mpRootPane); + if (pGroup) { + mpGroupContainer->AppendGroup(pGroup); + } } } - } - break; - case 'grs1': // Group Children Start - groupNestLevel++; - break; - case 'gre1': // Group Children End - groupNestLevel--; - break; - default: - break; + break; + case 'grs1': // Group Children Start + groupNestLevel++; + break; + case 'gre1': // Group Children End + groupNestLevel--; + break; + default: break; } dataPtr = ((u8 *)dataPtr + pDataBlockHead->size); } @@ -164,9 +164,10 @@ nw4r::lyt::AnimTransform *Layout_c::CreateAnimTransform(const void *animResBuf, } Multi_c::Multi_c() : Base_c(0x80), mLayout(), mDrawInfo(), mpResAcc(nullptr), mFlags(0) { - mDrawInfo.SetLocationAdjustScale(nw4r::math::VEC2((f32)EGG::Screen::GetSizeXMax(EGG::Screen::TV_MODE_1) / - (f32)EGG::Screen::GetSizeXMax(EGG::Screen::TV_MODE_2), - 1.0f)); + mDrawInfo.SetLocationAdjustScale(nw4r::math::VEC2( + (f32)EGG::Screen::GetSizeXMax(EGG::Screen::TV_MODE_1) / (f32)EGG::Screen::GetSizeXMax(EGG::Screen::TV_MODE_2), + 1.0f + )); mDrawInfo.SetLocationAdjust(true); } @@ -407,8 +408,7 @@ dTextBox_c *LytBase_c::getTextBoxViaUserData(nw4r::lyt::Pane *pane, const char * return nullptr; } -void LytBase_c::setPropertiesRecursive(nw4r::lyt::Pane *pane, f32 posX, f32 posY, f32 scale, f32 spaceX, - f32 spaceY) { +void LytBase_c::setPropertiesRecursive(nw4r::lyt::Pane *pane, f32 posX, f32 posY, f32 scale, f32 spaceX, f32 spaceY) { u16 num = pane->GetExtUserDataNum(); if (num != 0) { const nw4r::lyt::res::ExtUserData *list = pane->GetExtUserData(); @@ -437,7 +437,7 @@ void LytBase_c::setPropertiesRecursive(nw4r::lyt::Pane *pane, f32 posX, f32 posY setProperties(pane, posX, posY, scale, spaceX, spaceY); for (nw4r::ut::LinkList::Iterator it = pane->GetChildList()->GetBeginIter(); - it != pane->GetChildList()->GetEndIter(); ++it) { + it != pane->GetChildList()->GetEndIter(); ++it) { setPropertiesRecursive(&*it, posX, posY, scale, spaceX, spaceY); } } @@ -480,7 +480,6 @@ void LytBase_c::setProperties(nw4r::lyt::Pane *pane, f32 posX, f32 posY, f32 sca t2.y += textBox->GetTranslateX1(); textBox->SetTranslate(t2); - if (scale != -9999.0f) { const nw4r::ut::Font *f = textBox->GetFont(); if (f != nullptr) { @@ -495,7 +494,6 @@ void LytBase_c::setProperties(nw4r::lyt::Pane *pane, f32 posX, f32 posY, f32 sca } } - f32 f4 = 0.0f; f32 f6 = 0.0f; @@ -516,7 +514,6 @@ void LytBase_c::setProperties(nw4r::lyt::Pane *pane, f32 posX, f32 posY, f32 sca fn_800AB930(textBox); } - bool LytBase_c::fn_800AB930(dTextBox_c *box) { return fn_800AB9A0(box, -1); } @@ -596,8 +593,9 @@ bool LytBase_c::fn_800ABB80(dTextBox_c *textbox1, dTextBox_c *textbox2, int arg) return fn_800ABCE0(list, textbox1, textbox2, arg); } -bool LytBase_c::fn_800ABCE0(const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, - int arg) { +bool LytBase_c::fn_800ABCE0( + const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg +) { int userDatInt = userDatum->GetInt(); SizedString<0x40> str1; SizedString<0x40> str2; @@ -693,7 +691,9 @@ bool LytBase_c::fn_800AC040(dTextBox_c *textbox1, dTextBox_c *textbox2, int arg, extern "C" void fn_800AF840(dTextBox_c *textbox1, MsbtInfo *, const char *, int arg, void *unk); -bool LytBase_c::fn_800AC1AC(const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg, void *unk) { +bool LytBase_c::fn_800AC1AC( + const nw4r::lyt::res::ExtUserData *userDatum, dTextBox_c *textbox1, dTextBox_c *textbox2, int arg, void *unk +) { int userDatInt = userDatum->GetInt(); SizedString<0x40> str1; SizedString<0x40> str2; @@ -754,14 +754,13 @@ bool hasSameBaseName(const char *left, const char *right) { char *sRef = "ref"; - void LytBase_c::linkMeters(nw4r::lyt::Group *group, LytMeterGroup *meterGroup) { // single regswap nw4r::ut::LinkList::Iterator beginIt = meterGroup->GetBeginIter(); nw4r::ut::LinkList::Iterator endIt = meterGroup->GetEndIter(); for (nw4r::lyt::PaneList::Iterator paneIt = group->GetPaneList()->GetBeginIter(); - paneIt != group->GetPaneList()->GetEndIter(); ++paneIt) { + paneIt != group->GetPaneList()->GetEndIter(); ++paneIt) { nw4r::lyt::Pane *pane = paneIt->mTarget; int num = pane->GetExtUserDataNum(); if (num != 0) { @@ -796,8 +795,9 @@ bool AnmGroupBase_c::init(const char *fileName, m2d::ResAccIf_c *resAcc, d2d::La return init(transform, fileName, resAcc, group); } -bool AnmGroupBase_c::init(nw4r::lyt::AnimTransform *transform, const char *name, m2d::ResAccIf_c *acc, - nw4r::lyt::Group *group) { +bool AnmGroupBase_c::init( + nw4r::lyt::AnimTransform *transform, const char *name, m2d::ResAccIf_c *acc, nw4r::lyt::Group *group +) { if (transform == nullptr) { return false; } diff --git a/src/d/lyt/d_lyt_area_caption.cpp b/src/d/lyt/d_lyt_area_caption.cpp index 72d35fcb..3d5e653f 100644 --- a/src/d/lyt/d_lyt_area_caption.cpp +++ b/src/d/lyt/d_lyt_area_caption.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "d/lyt/d_lyt_area_caption.h" + +#include "d/lyt/d_textbox.h" +#include "toBeSorted/arc_managers/layout_arc_manager.h" + STATE_DEFINE(dLytAreaCaptionParts_c, Wait); STATE_DEFINE(dLytAreaCaptionParts_c, Start); diff --git a/src/d/lyt/d_lyt_battery.cpp b/src/d/lyt/d_lyt_battery.cpp index 7584214f..cd4a2703 100644 --- a/src/d/lyt/d_lyt_battery.cpp +++ b/src/d/lyt/d_lyt_battery.cpp @@ -1,7 +1,8 @@ -#include -#include -#include -#include +#include "d/lyt/d_lyt_battery.h" + +#include "egg/core/eggController.h" +#include "m/m_pad.h" +#include "toBeSorted/arc_managers/layout_arc_manager.h" STATE_DEFINE(dLytBattery_c, Off); STATE_DEFINE(dLytBattery_c, In); diff --git a/src/d/lyt/d_lyt_common_arrow.cpp b/src/d/lyt/d_lyt_common_arrow.cpp index 07607562..438bbb94 100644 --- a/src/d/lyt/d_lyt_common_arrow.cpp +++ b/src/d/lyt/d_lyt_common_arrow.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/lyt/d_lyt_common_arrow.h" + +#include "toBeSorted/arc_managers/layout_arc_manager.h" + STATE_DEFINE(dLytCommonArrow_c, None); STATE_DEFINE(dLytCommonArrow_c, In); @@ -9,15 +11,15 @@ STATE_DEFINE(dLytCommonArrow_c, Out); f32 arrow_fs[0x20]; static const d2d::LytBrlanMapping brlanMap[] = { - {"commonArrow_00_in.brlan", "G_inOut_00"}, - {"commonArrow_00_loop.brlan", "G_loop_00"}, - {"commonArrow_00_type.brlan", "G_type_00"}, - {"commonArrow_00_onOff.brlan", "G_arrowL_00"}, - {"commonArrow_00_onOff.brlan", "G_arrowR_00"}, - {"commonArrow_00_decide.brlan", "G_arrowL_00"}, - {"commonArrow_00_decide.brlan", "G_arrowR_00"}, - {"commonArrow_00_input.brlan", "G_input_00"}, - {"commonArrow_00_out.brlan", "G_inOut_00"}, + { "commonArrow_00_in.brlan", "G_inOut_00"}, + { "commonArrow_00_loop.brlan", "G_loop_00"}, + { "commonArrow_00_type.brlan", "G_type_00"}, + { "commonArrow_00_onOff.brlan", "G_arrowL_00"}, + { "commonArrow_00_onOff.brlan", "G_arrowR_00"}, + {"commonArrow_00_decide.brlan", "G_arrowL_00"}, + {"commonArrow_00_decide.brlan", "G_arrowR_00"}, + { "commonArrow_00_input.brlan", "G_input_00"}, + { "commonArrow_00_out.brlan", "G_inOut_00"}, }; dLytCommonArrow_c::dLytCommonArrow_c() : mStateMgr(*this, sStateID::null) {} @@ -165,19 +167,19 @@ void dLytCommonArrow_c::initializeState_In() { } void dLytCommonArrow_c::executeState_In() { switch (field_0x6C4) { - case 0: { - d2d::AnmGroup_c *s = &field_0x440[0]; - if (s->isEndReached() == 1) { - field_0x6C4 += 1; - field_0x6CA = 1; - } else { - s->play(); - } - } break; - case 1: - field_0x6CA = 0; - mStateMgr.changeState(StateID_Wait); - break; + case 0: { + d2d::AnmGroup_c *s = &field_0x440[0]; + if (s->isEndReached() == 1) { + field_0x6C4 += 1; + field_0x6CA = 1; + } else { + s->play(); + } + } break; + case 1: + field_0x6CA = 0; + mStateMgr.changeState(StateID_Wait); + break; } } void dLytCommonArrow_c::finalizeState_In() { @@ -214,17 +216,15 @@ void dLytCommonArrow_c::initializeState_Out() { } void dLytCommonArrow_c::executeState_Out() { switch (field_0x6C4) { - case 0: { - d2d::AnmGroup_c *s = &field_0x440[8]; - if (s->isEndReached() == 1) { - field_0x6C4 = 1; - field_0x6CA = 1; - } - s->play(); - } break; - case 1: - mStateMgr.changeState(StateID_None); - break; + case 0: { + d2d::AnmGroup_c *s = &field_0x440[8]; + if (s->isEndReached() == 1) { + field_0x6C4 = 1; + field_0x6CA = 1; + } + s->play(); + } break; + case 1: mStateMgr.changeState(StateID_None); break; } } void dLytCommonArrow_c::finalizeState_Out() {} diff --git a/src/d/lyt/d_lyt_do_button.cpp b/src/d/lyt/d_lyt_do_button.cpp index 96683949..052d71e3 100644 --- a/src/d/lyt/d_lyt_do_button.cpp +++ b/src/d/lyt/d_lyt_do_button.cpp @@ -1,4 +1,4 @@ -#include +#include "d/lyt/d_lyt_do_button.h" struct DoButtonClass { DoButtonClass(); diff --git a/src/d/lyt/d_lyt_fader.cpp b/src/d/lyt/d_lyt_fader.cpp index d0668a39..d34b8376 100644 --- a/src/d/lyt/d_lyt_fader.cpp +++ b/src/d/lyt/d_lyt_fader.cpp @@ -1,10 +1,12 @@ -#include -#include +#include "d/lyt/d_lyt_fader.h" + +#include "toBeSorted/arc_managers/layout_arc_manager.h" + static const d2d::LytBrlanMapping blanMap[] = { - {"wipe_01_wipeStart.brlan", "G_wipe_00"}, - {"wipe_01_wipeOpen.brlan", "G_wipe_00"}, - {"wipe_01_out.brlan", "G_out_00"}, + {"wipe_01_wipeStart.brlan", "G_wipe_00"}, + { "wipe_01_wipeOpen.brlan", "G_wipe_00"}, + { "wipe_01_out.brlan", "G_out_00"}, }; dLytFader_c::dLytFader_c(const mColor &color, EStatus status) : mFaderBase_c(color, status), field_0x4DD(false) {} @@ -48,14 +50,9 @@ void dLytFader_c::setStatus(EStatus status) { bool dLytFader_c::calc() { if (field_0x4DD == true) { switch (field_0x4D4) { - case 0: - fn_801759B0(); - break; - case 1: - fn_80175B10(); - break; - default: - break; + case 0: fn_801759B0(); break; + case 1: fn_80175B10(); break; + default: break; } return field_0x4D4 == 2; } else { diff --git a/src/d/lyt/d_lyt_pause_disp_00.cpp b/src/d/lyt/d_lyt_pause_disp_00.cpp index 7de352db..e5205160 100644 --- a/src/d/lyt/d_lyt_pause_disp_00.cpp +++ b/src/d/lyt/d_lyt_pause_disp_00.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/lyt/d_lyt_pause_disp_00.h" + +#include "nw4r/lyt/lyt_group.h" + STATE_DEFINE(dLytPauseDisp00_c, None); STATE_DEFINE(dLytPauseDisp00_c, In); diff --git a/src/d/lyt/d_screen_fader.cpp b/src/d/lyt/d_screen_fader.cpp index 5053861b..b43edebc 100644 --- a/src/d/lyt/d_screen_fader.cpp +++ b/src/d/lyt/d_screen_fader.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "d/lyt/d_screen_fader.h" + +#include "egg/gfx/eggDrawGX.h" +#include "egg/gfx/eggScreen.h" +#include "m/m_mtx.h" +#include "nw4r/ut/ut_algorithm.h" + dScreenFader_c::dScreenFader_c(const mColor &color, EStatus status) : mFaderBase_c(color, status), mProgress(0.0f) {} @@ -28,12 +30,8 @@ bool dScreenFader_c::calc() { } switch (mStatus) { - case FADING_IN: - mProgress = h - (h * nw4r::math::SinRad((float)elapsed * M_PI / ((float)(mFrame * 2)))); - break; - case FADING_OUT: - mProgress = h - (h * nw4r::math::CosRad((float)elapsed * M_PI / ((float)(mFrame * 2)))); - break; + case FADING_IN: mProgress = h - (h * nw4r::math::SinRad((float)elapsed * M_PI / ((float)(mFrame * 2)))); break; + case FADING_OUT: mProgress = h - (h * nw4r::math::CosRad((float)elapsed * M_PI / ((float)(mFrame * 2)))); break; } return res; @@ -52,11 +50,11 @@ void dScreenFader_c::draw() { PSMTXTransApply(mtx, mtx, -scaleX * 0.5f, scaleY * 0.5f - mProgress, 0.0f); GXColor a = EGG::DrawGX::BLACK; - EGG::DrawGX::DrawDL(EGG::DrawGX::DL_17, mtx.nw4rm, a); + EGG::DrawGX::DrawDL(EGG::DrawGX::DL_17, mtx, a); PSMTXScale(mtx, scaleX, mProgress, 1.0f); PSMTXTransApply(mtx, mtx, -scaleX * 0.5f, -scaleY * 0.5f, 0.0f); - EGG::DrawGX::DrawDL(EGG::DrawGX::DL_17, mtx.nw4rm, a); + EGG::DrawGX::DrawDL(EGG::DrawGX::DL_17, mtx, a); } bool dScreenFader_c::fadeIn() { diff --git a/src/d/lyt/d_structd.cpp b/src/d/lyt/d_structd.cpp index d4b5f2e7..dd249f22 100644 --- a/src/d/lyt/d_structd.cpp +++ b/src/d/lyt/d_structd.cpp @@ -1,4 +1,4 @@ -#include +#include "d/lyt/d_structd.h" namespace d2d { diff --git a/src/d/lyt/d_window.cpp b/src/d/lyt/d_window.cpp index 14c02a76..c2c23c26 100644 --- a/src/d/lyt/d_window.cpp +++ b/src/d/lyt/d_window.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/lyt/d_window.h" + +#include "d/lyt/d_textbox.h" + dWindow_c::dWindow_c(const nw4r::lyt::res::Window *pBlock, const nw4r::lyt::ResBlockSet &ResBlockSet) : nw4r::lyt::Window(pBlock, ResBlockSet) {} diff --git a/src/d/lyt/meter/d_lyt_meter.cpp b/src/d/lyt/meter/d_lyt_meter.cpp index cbae77ef..2b5c6020 100644 --- a/src/d/lyt/meter/d_lyt_meter.cpp +++ b/src/d/lyt/meter/d_lyt_meter.cpp @@ -1,5 +1,4 @@ -#include - +#include "d/lyt/meter/d_lyt_meter.h" dLytMeter_c::dLytMeter_c() {} diff --git a/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp b/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp index 108e119d..e2125a52 100644 --- a/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp +++ b/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "d/lyt/meter/d_lyt_meter_remocon_bg.h" + +#include "toBeSorted/event_manager.h" + STATE_DEFINE(dLytMeterRemoconBg_c, Wait); STATE_DEFINE(dLytMeterRemoconBg_c, On); diff --git a/src/d/tg/d_t_switch.cpp b/src/d/tg/d_t_switch.cpp index ca16d66b..c576d9d6 100644 --- a/src/d/tg/d_t_switch.cpp +++ b/src/d/tg/d_t_switch.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "d/t/d_t_switch.h" + +#include "c/c_math.h" +#include "toBeSorted/event.h" +#include "toBeSorted/sceneflag_manager.h" +#include "toBeSorted/scgame.h" + SPECIAL_ACTOR_PROFILE(SW_TAG, dTgSw_c, fProfile::SW_TAG, 0x24, 0, 0); @@ -89,7 +91,7 @@ bool dTgSw_c::isPuzzleSolved() { } if (field_0x192 == 0 && - SceneflagManager::sInstance->checkBoolFlag(roomid, mTrigSceneFlagIdBegin + mCurrentFlagPosition)) { + SceneflagManager::sInstance->checkBoolFlag(roomid, mTrigSceneFlagIdBegin + mCurrentFlagPosition)) { mCurrentFlagPosition++; } diff --git a/src/egg/audio/eggAudioArcPlayerMgr.cpp b/src/egg/audio/eggAudioArcPlayerMgr.cpp index 176ac9db..7413b618 100644 --- a/src/egg/audio/eggAudioArcPlayerMgr.cpp +++ b/src/egg/audio/eggAudioArcPlayerMgr.cpp @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include "egg/audio/eggAudioArcPlayerMgr.h" + +// #include "egg/audio/eggAudioMgr.h" +#include "nw4r/snd/snd_SoundPlayer.h" namespace EGG { @@ -30,7 +30,7 @@ UNKTYPE *ArcPlayer::openArchive(const char *name, snd::SoundHeap *heap, SARC_STO case STORAGE_NAND: ret = openNandArchive(name, heap); break; - default: break; + default: break; } return ret; diff --git a/src/egg/audio/eggAudioHeapMgr.cpp b/src/egg/audio/eggAudioHeapMgr.cpp index 5ca7c5d7..28e93e63 100644 --- a/src/egg/audio/eggAudioHeapMgr.cpp +++ b/src/egg/audio/eggAudioHeapMgr.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/audio/eggAudioHeapMgr.h" namespace EGG { diff --git a/src/egg/audio/eggAudioMgr.cpp b/src/egg/audio/eggAudioMgr.cpp index ab330146..9c98a801 100644 --- a/src/egg/audio/eggAudioMgr.cpp +++ b/src/egg/audio/eggAudioMgr.cpp @@ -1,7 +1,8 @@ -#include -#include -#include -#include +#include "egg/audio/eggAudioMgr.h" + +#include "nw4r/snd/snd_SoundSystem.h" +#include "rvl/AI.h" // IWYU pragma: export +#include "rvl/AX.h" // IWYU pragma: export namespace EGG { @@ -51,7 +52,7 @@ void SimpleAudioMgr::initialize(EGG::IAudioMgr::Arg *arg) { param.dvdThreadPriority = arg->dvdThreadPriority; param.dvdThreadStackSize = arg->dvdThreadStackSize; u32 size = nw4r::snd::SoundSystem::GetRequiredMemSize(param); - void *ptr = SoundHeapMgr::getSoundHeap()->Alloc(size, nullptr, (void*)'SYST'); + void *ptr = SoundHeapMgr::getSoundHeap()->Alloc(size, nullptr, (void *)'SYST'); nw4r::snd::SoundSystem::InitSoundSystem(param, ptr, size); } ArcPlayer::setSteamBlocks(arg->blocks); diff --git a/src/egg/audio/eggAudioRmtSpeakerMgr.cpp b/src/egg/audio/eggAudioRmtSpeakerMgr.cpp index 08695c8e..af752d30 100644 --- a/src/egg/audio/eggAudioRmtSpeakerMgr.cpp +++ b/src/egg/audio/eggAudioRmtSpeakerMgr.cpp @@ -1,6 +1,7 @@ -#include -#include -#include +#include "egg/audio/eggAudioRmtSpeakerMgr.h" + +#include "nw4r/snd/snd_SoundSystem.h" +#include "rvl/OS.h" // IWYU pragma: export namespace EGG { diff --git a/src/egg/audio/eggAudioSystem.cpp b/src/egg/audio/eggAudioSystem.cpp index 50d8634d..8687eb62 100644 --- a/src/egg/audio/eggAudioSystem.cpp +++ b/src/egg/audio/eggAudioSystem.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "egg/audio/eggAudioSystem.h" + +#include "nw4r/snd/snd_SoundSystem.h" + namespace EGG { diff --git a/src/egg/audio/eggAudioUtility.cpp b/src/egg/audio/eggAudioUtility.cpp index 95c2b0b9..5bbace2c 100644 --- a/src/egg/audio/eggAudioUtility.cpp +++ b/src/egg/audio/eggAudioUtility.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "egg/audio/eggAudioUtility.h" + +#include "egg/audio/eggAudioRmtSpeakerMgr.h" +#include "nw4r/snd/snd_SoundPlayer.h" +#include "nw4r/snd/snd_SoundSystem.h" + namespace EGG { diff --git a/src/egg/core/eggAllocator.cpp b/src/egg/core/eggAllocator.cpp index c89e5755..d12d57a8 100644 --- a/src/egg/core/eggAllocator.cpp +++ b/src/egg/core/eggAllocator.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "egg/core/eggAllocator.h" + +#include "egg/core/eggHeap.h" + /* 804952d0 */ static void *MEM_AllocFor_Heap(MEMAllocator *alloc, u32 size) { return static_cast(static_cast(alloc)->heap)->alloc(size, alloc->heapParam1); diff --git a/src/egg/core/eggArchive.cpp b/src/egg/core/eggArchive.cpp index 374356a1..9bde5af2 100644 --- a/src/egg/core/eggArchive.cpp +++ b/src/egg/core/eggArchive.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "egg/core/eggArchive.h" + +#include "egg/core/eggHeap.h" +#include "string.h" + namespace EGG { diff --git a/src/egg/core/eggAssertHeap.cpp b/src/egg/core/eggAssertHeap.cpp index a3e49c9e..83afa194 100644 --- a/src/egg/core/eggAssertHeap.cpp +++ b/src/egg/core/eggAssertHeap.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/core/eggAssertHeap.h" namespace EGG { diff --git a/src/egg/core/eggAsyncDisplay.cpp b/src/egg/core/eggAsyncDisplay.cpp index d04156a6..f8cbe935 100644 --- a/src/egg/core/eggAsyncDisplay.cpp +++ b/src/egg/core/eggAsyncDisplay.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include -#include +#include "egg/core/eggAsyncDisplay.h" + +#include "egg/core/eggXfbManager.h" +#include "egg/math/eggMatrix.h" +#include "rvl/GX/GXTexture.h" // TODO: Find the proper place for this symbol? - Ghidra has it literally unused extern "C" static EGG::Display *spSelector; @@ -10,7 +10,7 @@ extern "C" static EGG::Display *spSelector; namespace { static GXTexObj clear_z_tobj; // clang-format off -u8 clear_z_TX[64] ALIGN(32) = { +u8 clear_z_TX[64] ALIGN_DECL(32) = { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, diff --git a/src/egg/core/eggColorFader.cpp b/src/egg/core/eggColorFader.cpp index 69185240..a11eed1a 100644 --- a/src/egg/core/eggColorFader.cpp +++ b/src/egg/core/eggColorFader.cpp @@ -1,6 +1,5 @@ -#include -#include -#include + +#include "egg/core/eggColorFader.h" /* 80497930 */ EGG::ColorFader::ColorFader( diff --git a/src/egg/core/eggController.cpp b/src/egg/core/eggController.cpp index 3a8242d8..b73a02a4 100644 --- a/src/egg/core/eggController.cpp +++ b/src/egg/core/eggController.cpp @@ -1,12 +1,13 @@ #include "egg/core/eggController.h" -#include "MSL_C/string.h" #include "egg/core/eggAllocator.h" #include "egg/core/eggExpHeap.h" #include "egg/core/eggSystem.h" #include "egg/math/eggMath.h" -#include "rvl/VI.h" +#include "rvl/VI.h" // IWYU pragma: export +#include "string.h" + EGG::NullController null_controller; namespace EGG { diff --git a/src/egg/core/eggDisplay.cpp b/src/egg/core/eggDisplay.cpp index 6a5a75a7..b9684803 100644 --- a/src/egg/core/eggDisplay.cpp +++ b/src/egg/core/eggDisplay.cpp @@ -2,9 +2,8 @@ #include "egg/core/eggXfbManager.h" #include "nw4r/db/db_directPrint.h" -#include "rvl/GX.h" -#include "rvl/OS/OSHardware.h" - +#include "rvl/GX.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export extern "C" { void PreRetraceCallback(u32 retraceCount) { diff --git a/src/egg/core/eggDisposer.cpp b/src/egg/core/eggDisposer.cpp index ae6cba5f..eed5aa83 100644 --- a/src/egg/core/eggDisposer.cpp +++ b/src/egg/core/eggDisposer.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "egg/core/eggDisposer.h" + +#include "egg/core/eggHeap.h" + namespace EGG { diff --git a/src/egg/core/eggDvdFile.cpp b/src/egg/core/eggDvdFile.cpp index d067fdce..2f92ab08 100644 --- a/src/egg/core/eggDvdFile.cpp +++ b/src/egg/core/eggDvdFile.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/core/eggDvdFile.h" namespace EGG { diff --git a/src/egg/core/eggDvdRipper.cpp b/src/egg/core/eggDvdRipper.cpp index 217df265..718613e8 100644 --- a/src/egg/core/eggDvdRipper.cpp +++ b/src/egg/core/eggDvdRipper.cpp @@ -1,5 +1,6 @@ -#include -#include +#include "egg/core/eggDvdRipper.h" + +#include "rvl/VI.h" // IWYU pragma: export namespace EGG { diff --git a/src/egg/core/eggExpHeap.cpp b/src/egg/core/eggExpHeap.cpp index 96bf38f1..13296e54 100644 --- a/src/egg/core/eggExpHeap.cpp +++ b/src/egg/core/eggExpHeap.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/core/eggExpHeap.h" namespace EGG { diff --git a/src/egg/core/eggFrmHeap.cpp b/src/egg/core/eggFrmHeap.cpp index ad2931d1..ae3cdd2a 100644 --- a/src/egg/core/eggFrmHeap.cpp +++ b/src/egg/core/eggFrmHeap.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/core/eggFrmHeap.h" namespace EGG { diff --git a/src/egg/core/eggGraphicsFifo.cpp b/src/egg/core/eggGraphicsFifo.cpp index 1ea1455f..7716e3c6 100644 --- a/src/egg/core/eggGraphicsFifo.cpp +++ b/src/egg/core/eggGraphicsFifo.cpp @@ -1,6 +1,7 @@ -#include -#include -#include +#include "egg/core/eggGraphicsFifo.h" + +#include "egg/core/eggHeap.h" +#include "rvl/GX.h" // IWYU pragma: export extern "C" void GXGetGPStatus(GXBool *overhi, GXBool *underlow, GXBool *readIdle, GXBool *cmdIdle, GXBool *brkpt); diff --git a/src/egg/core/eggHeap.cpp b/src/egg/core/eggHeap.cpp index a6ebc139..37522dba 100644 --- a/src/egg/core/eggHeap.cpp +++ b/src/egg/core/eggHeap.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "egg/core/eggHeap.h" + +#include "egg/core/eggAllocator.h" +#include "nw4r/ut/ut_list.h" + namespace EGG { diff --git a/src/egg/core/eggStreamDecomp.cpp b/src/egg/core/eggStreamDecomp.cpp index 1a9e2e5b..ff9983b2 100644 --- a/src/egg/core/eggStreamDecomp.cpp +++ b/src/egg/core/eggStreamDecomp.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/core/eggStreamDecomp.h" namespace EGG { diff --git a/src/egg/core/eggThread.cpp b/src/egg/core/eggThread.cpp index 0179359a..1390bd51 100644 --- a/src/egg/core/eggThread.cpp +++ b/src/egg/core/eggThread.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/core/eggThread.h" namespace EGG { diff --git a/src/egg/core/eggVideo.cpp b/src/egg/core/eggVideo.cpp index e84f4fec..4f1982c7 100644 --- a/src/egg/core/eggVideo.cpp +++ b/src/egg/core/eggVideo.cpp @@ -1,7 +1,8 @@ -#include -#include -#include -#include +#include "egg/core/eggVideo.h" + +#include "rvl/OS/OSHardware.h" +#include "rvl/OS/OSTime.h" +#include "rvl/SC/scapi.h" namespace { diff --git a/src/egg/core/eggXfb.cpp b/src/egg/core/eggXfb.cpp index 0ea620e4..81b65b5d 100644 --- a/src/egg/core/eggXfb.cpp +++ b/src/egg/core/eggXfb.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "egg/core/eggXfb.h" + +#include "egg/core/eggSystem.h" +#include "egg/core/eggVideo.h" + namespace EGG { diff --git a/src/egg/core/eggXfbManager.cpp b/src/egg/core/eggXfbManager.cpp index 46ab8d2a..532f0e64 100644 --- a/src/egg/core/eggXfbManager.cpp +++ b/src/egg/core/eggXfbManager.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "egg/core/eggXfbManager.h" + +#include "common.h" +#include "egg/core/eggXfb.h" +#include "nw4r/db/db_directPrint.h" +#include "rvl/VI.h" // IWYU pragma: export + namespace EGG { diff --git a/src/egg/gfx/eggCamera.cpp b/src/egg/gfx/eggCamera.cpp index 980fa65d..ad0889b8 100644 --- a/src/egg/gfx/eggCamera.cpp +++ b/src/egg/gfx/eggCamera.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggCamera.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggCapTexture.cpp b/src/egg/gfx/eggCapTexture.cpp index 6a0d6b29..d2779ce3 100644 --- a/src/egg/gfx/eggCapTexture.cpp +++ b/src/egg/gfx/eggCapTexture.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggCapTexture.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggCpuTexture.cpp b/src/egg/gfx/eggCpuTexture.cpp index 1d91d1d0..674d190b 100644 --- a/src/egg/gfx/eggCpuTexture.cpp +++ b/src/egg/gfx/eggCpuTexture.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggCpuTexture.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggDrawGX.cpp b/src/egg/gfx/eggDrawGX.cpp index 123b5372..8f7b8d2a 100644 --- a/src/egg/gfx/eggDrawGX.cpp +++ b/src/egg/gfx/eggDrawGX.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggDrawGX.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggDrawPathBase.cpp b/src/egg/gfx/eggDrawPathBase.cpp index bbb5a2c0..e59be480 100644 --- a/src/egg/gfx/eggDrawPathBase.cpp +++ b/src/egg/gfx/eggDrawPathBase.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggDrawPathBase.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggDrawPathDOF.cpp b/src/egg/gfx/eggDrawPathDOF.cpp index ff43fac9..8f611cde 100644 --- a/src/egg/gfx/eggDrawPathDOF.cpp +++ b/src/egg/gfx/eggDrawPathDOF.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggDrawPathDOF.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggDrawPathUnk1.cpp b/src/egg/gfx/eggDrawPathUnk1.cpp index 5c81e59c..2a89d9da 100644 --- a/src/egg/gfx/eggDrawPathUnk1.cpp +++ b/src/egg/gfx/eggDrawPathUnk1.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggDrawPathUnk1.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggDrawPathUnk2.cpp b/src/egg/gfx/eggDrawPathUnk2.cpp index a903174e..eb4f9c5d 100644 --- a/src/egg/gfx/eggDrawPathUnk2.cpp +++ b/src/egg/gfx/eggDrawPathUnk2.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggDrawPathUnk2.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggFog.cpp b/src/egg/gfx/eggFog.cpp index 2da4345a..71bf0b8c 100644 --- a/src/egg/gfx/eggFog.cpp +++ b/src/egg/gfx/eggFog.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggFog.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggFrustum.cpp b/src/egg/gfx/eggFrustum.cpp index 5c2946fc..c060e519 100644 --- a/src/egg/gfx/eggFrustum.cpp +++ b/src/egg/gfx/eggFrustum.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggFrustum.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggG3DUtility.cpp b/src/egg/gfx/eggG3DUtility.cpp index 0ba51e9e..b8da6920 100644 --- a/src/egg/gfx/eggG3DUtility.cpp +++ b/src/egg/gfx/eggG3DUtility.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggG3DUtility.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggGXUtility.cpp b/src/egg/gfx/eggGXUtility.cpp index 68b6893f..43963b51 100644 --- a/src/egg/gfx/eggGXUtility.cpp +++ b/src/egg/gfx/eggGXUtility.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggGXUtility.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggGfxEngine.cpp b/src/egg/gfx/eggGfxEngine.cpp index 98c394b2..7a2da6a7 100644 --- a/src/egg/gfx/eggGfxEngine.cpp +++ b/src/egg/gfx/eggGfxEngine.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggGfxEngine.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggGlobalDrawState.cpp b/src/egg/gfx/eggGlobalDrawState.cpp index 085467aa..aed5311a 100644 --- a/src/egg/gfx/eggGlobalDrawState.cpp +++ b/src/egg/gfx/eggGlobalDrawState.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggGlobalDrawState.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggIScnProc.cpp b/src/egg/gfx/eggIScnProc.cpp index 60b81f8e..6b86ce5b 100644 --- a/src/egg/gfx/eggIScnProc.cpp +++ b/src/egg/gfx/eggIScnProc.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggIScnProc.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggLight.cpp b/src/egg/gfx/eggLight.cpp index 7e7867df..c842a6ec 100644 --- a/src/egg/gfx/eggLight.cpp +++ b/src/egg/gfx/eggLight.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggLight.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggLightTexture.cpp b/src/egg/gfx/eggLightTexture.cpp index fb016069..174c6584 100644 --- a/src/egg/gfx/eggLightTexture.cpp +++ b/src/egg/gfx/eggLightTexture.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggLightTexture.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggLightTextureMgr.cpp b/src/egg/gfx/eggLightTextureMgr.cpp index 1d4f43c0..6d8d0928 100644 --- a/src/egg/gfx/eggLightTextureMgr.cpp +++ b/src/egg/gfx/eggLightTextureMgr.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggLightTextureMgr.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggModelEx.cpp b/src/egg/gfx/eggModelEx.cpp index 9f213d6d..4fdaae07 100644 --- a/src/egg/gfx/eggModelEx.cpp +++ b/src/egg/gfx/eggModelEx.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggModelEx.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPalette.cpp b/src/egg/gfx/eggPalette.cpp index 490c1e9a..425ecb04 100644 --- a/src/egg/gfx/eggPalette.cpp +++ b/src/egg/gfx/eggPalette.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPalette.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectBase.cpp b/src/egg/gfx/eggPostEffectBase.cpp index c26fc8e1..d1110185 100644 --- a/src/egg/gfx/eggPostEffectBase.cpp +++ b/src/egg/gfx/eggPostEffectBase.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectBase.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectBlur.cpp b/src/egg/gfx/eggPostEffectBlur.cpp index a2094497..d988b7bb 100644 --- a/src/egg/gfx/eggPostEffectBlur.cpp +++ b/src/egg/gfx/eggPostEffectBlur.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectBlur.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectMask.cpp b/src/egg/gfx/eggPostEffectMask.cpp index edd8e1fc..64833345 100644 --- a/src/egg/gfx/eggPostEffectMask.cpp +++ b/src/egg/gfx/eggPostEffectMask.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectMask.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectMaskDOF.cpp b/src/egg/gfx/eggPostEffectMaskDOF.cpp index 67e87a23..9bd54d28 100644 --- a/src/egg/gfx/eggPostEffectMaskDOF.cpp +++ b/src/egg/gfx/eggPostEffectMaskDOF.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectMaskDOF.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectSimple.cpp b/src/egg/gfx/eggPostEffectSimple.cpp index b336e626..468e8539 100644 --- a/src/egg/gfx/eggPostEffectSimple.cpp +++ b/src/egg/gfx/eggPostEffectSimple.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectSimple.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectUnk1.cpp b/src/egg/gfx/eggPostEffectUnk1.cpp index 395447bb..f85768e6 100644 --- a/src/egg/gfx/eggPostEffectUnk1.cpp +++ b/src/egg/gfx/eggPostEffectUnk1.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectUnk1.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggPostEffectUnk2.cpp b/src/egg/gfx/eggPostEffectUnk2.cpp index 49c853fe..d44f65cc 100644 --- a/src/egg/gfx/eggPostEffectUnk2.cpp +++ b/src/egg/gfx/eggPostEffectUnk2.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggPostEffectUnk2.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggScreen.cpp b/src/egg/gfx/eggScreen.cpp index aec1ceb2..66b80c4e 100644 --- a/src/egg/gfx/eggScreen.cpp +++ b/src/egg/gfx/eggScreen.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggScreen.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggScreenEffectBase.cpp b/src/egg/gfx/eggScreenEffectBase.cpp index ba916c5d..6e8a1f55 100644 --- a/src/egg/gfx/eggScreenEffectBase.cpp +++ b/src/egg/gfx/eggScreenEffectBase.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggScreenEffectBase.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggScreenEffectBlur.cpp b/src/egg/gfx/eggScreenEffectBlur.cpp index 1617c385..65a45952 100644 --- a/src/egg/gfx/eggScreenEffectBlur.cpp +++ b/src/egg/gfx/eggScreenEffectBlur.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggScreenEffectBlur.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggStateEfb.cpp b/src/egg/gfx/eggStateEfb.cpp index d26203ba..25f2dbbb 100644 --- a/src/egg/gfx/eggStateEfb.cpp +++ b/src/egg/gfx/eggStateEfb.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggStateEfb.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggStateGX.cpp b/src/egg/gfx/eggStateGX.cpp index 848ef301..baf181f0 100644 --- a/src/egg/gfx/eggStateGX.cpp +++ b/src/egg/gfx/eggStateGX.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggStateGX.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggTexture.cpp b/src/egg/gfx/eggTexture.cpp index 32c3707a..0e673cef 100644 --- a/src/egg/gfx/eggTexture.cpp +++ b/src/egg/gfx/eggTexture.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggTexture.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggTextureBuffer.cpp b/src/egg/gfx/eggTextureBuffer.cpp index 9c7d9568..ed1b41e1 100644 --- a/src/egg/gfx/eggTextureBuffer.cpp +++ b/src/egg/gfx/eggTextureBuffer.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggTextureBuffer.h" namespace EGG {} // namespace EGG diff --git a/src/egg/gfx/eggUnk1.cpp b/src/egg/gfx/eggUnk1.cpp index a5a63d35..a5be01ae 100644 --- a/src/egg/gfx/eggUnk1.cpp +++ b/src/egg/gfx/eggUnk1.cpp @@ -1,3 +1,3 @@ -#include +#include "egg/gfx/eggUnk1.h" namespace EGG {} // namespace EGG diff --git a/src/egg/math/eggMatrix.cpp b/src/egg/math/eggMatrix.cpp index 9fef71b7..dd171848 100644 --- a/src/egg/math/eggMatrix.cpp +++ b/src/egg/math/eggMatrix.cpp @@ -1,6 +1,7 @@ -#include -#include -#include +#include "egg/math/eggMatrix.h" + +#include "rvl/GX.h" // IWYU pragma: export +#include "rvl/MTX.h" // IWYU pragma: export namespace EGG { @@ -295,32 +296,31 @@ void Matrix34f::toQuat(Quatf &q) const { } switch (tempMax) { - case 0: - q.w = Math::sqrt(temp0); - q.x = (0.25f / q.w) * (m[2][1] - m[1][2]); - q.y = (0.25f / q.w) * (m[0][2] - m[2][0]); - q.z = (0.25f / q.w) * (m[1][0] - m[0][1]); - break; - case 1: - q.x = Math::sqrt(temp1); - q.w = (0.25f / q.x) * (m[2][1] - m[1][2]); - q.y = (0.25f / q.x) * (m[0][1] + m[1][0]); - q.z = (0.25f / q.x) * (m[0][2] + m[2][0]); - break; - case 2: - q.y = Math::sqrt(temp2); - q.w = (0.25f / q.y) * (m[0][2] - m[2][0]); - q.z = (0.25f / q.y) * (m[1][2] + m[2][1]); - q.x = (0.25f / q.y) * (m[1][0] + m[0][1]); - break; - case 3: - q.z = Math::sqrt(temp3); - q.w = (0.25f / q.z) * (m[1][0] - m[0][1]); - q.x = (0.25f / q.z) * (m[2][0] + m[0][2]); - q.y = (0.25f / q.z) * (m[2][1] + m[1][2]); - break; - default: - break; + case 0: + q.w = Math::sqrt(temp0); + q.x = (0.25f / q.w) * (m[2][1] - m[1][2]); + q.y = (0.25f / q.w) * (m[0][2] - m[2][0]); + q.z = (0.25f / q.w) * (m[1][0] - m[0][1]); + break; + case 1: + q.x = Math::sqrt(temp1); + q.w = (0.25f / q.x) * (m[2][1] - m[1][2]); + q.y = (0.25f / q.x) * (m[0][1] + m[1][0]); + q.z = (0.25f / q.x) * (m[0][2] + m[2][0]); + break; + case 2: + q.y = Math::sqrt(temp2); + q.w = (0.25f / q.y) * (m[0][2] - m[2][0]); + q.z = (0.25f / q.y) * (m[1][2] + m[2][1]); + q.x = (0.25f / q.y) * (m[1][0] + m[0][1]); + break; + case 3: + q.z = Math::sqrt(temp3); + q.w = (0.25f / q.z) * (m[1][0] - m[0][1]); + q.x = (0.25f / q.z) * (m[2][0] + m[0][2]); + q.y = (0.25f / q.z) * (m[2][1] + m[1][2]); + break; + default: break; } if (q.w < 0.0f) { diff --git a/src/egg/math/eggQuat.cpp b/src/egg/math/eggQuat.cpp index 77eb58fc..0a735a78 100644 --- a/src/egg/math/eggQuat.cpp +++ b/src/egg/math/eggQuat.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/math/eggQuat.h" namespace EGG { diff --git a/src/egg/math/eggVector.cpp b/src/egg/math/eggVector.cpp index 7b480314..7eb2e4df 100644 --- a/src/egg/math/eggVector.cpp +++ b/src/egg/math/eggVector.cpp @@ -1,4 +1,4 @@ -#include +#include "egg/math/eggVector.h" namespace EGG { diff --git a/src/egg/prim/eggAssert.cpp b/src/egg/prim/eggAssert.cpp index 146012af..64239a9b 100644 --- a/src/egg/prim/eggAssert.cpp +++ b/src/egg/prim/eggAssert.cpp @@ -1,11 +1,14 @@ -#include -#include -#include -#include -#include -#include -#include -#include +#include "egg/prim/eggAssert.h" + +#include "__va_arg.h" +#include "egg/core/eggSystem.h" +#include "egg/core/eggXfbManager.h" +#include "nw4r/db/db_directPrint.h" +#include "nw4r/db/db_mapFile.h" +#include "rvl/OS.h" // IWYU pragma: export +#include "rvl/VI.h" // IWYU pragma: export +#include "string.h" + namespace EGG { @@ -54,7 +57,7 @@ bool sAssertOccurred; /* 80674c60 */ char buf[260]; /* 8049c100 */ const char *getMapSymbol(void *arg) { - bool success = nw4r::db::MapFile_QuerySymbol((u32)arg, (u8*)buf, sizeof(buf)); + bool success = nw4r::db::MapFile_QuerySymbol((u32)arg, (u8 *)buf, sizeof(buf)); return success ? buf : nullptr; } @@ -93,7 +96,7 @@ bool sAssertOccurred; system_report("\n"); u32 *stackp = (u32 *)OSGetStackPointer(); if (sPtrOverride != 0) { - stackp = (u32*)((u32*)sPtrOverride)[1]; + stackp = (u32 *)((u32 *)sPtrOverride)[1]; } u32 *stack = stackp; @@ -108,7 +111,7 @@ bool sAssertOccurred; } else { system_report("%d: %p\n", num, stack[1]); } - stack = (u32*)stack[0]; + stack = (u32 *)stack[0]; if (isOutsideMEM1((u32)stack)) { break; } @@ -153,14 +156,14 @@ bool sAssertOccurred; if (isOutsideMEM1((u32)stack)) { break; } - const char *sym = getMapSymbol((void*)stack[1]); + const char *sym = getMapSymbol((void *)stack[1]); if (sym != nullptr) { nw4r::db::DirectPrint_Printf(2, line, "%d:%s\n", counter, sym); } else { - nw4r::db::DirectPrint_Printf(2, line, "LR Save[%d]:%p\n", counter, (void*)stack[1]); + nw4r::db::DirectPrint_Printf(2, line, "LR Save[%d]:%p\n", counter, (void *)stack[1]); } nw4r::db::DirectPrint_StoreCache(); - stack = (u32*)*stack; + stack = (u32 *)*stack; if (isOutsideMEM1((u32)stack)) { break; } diff --git a/src/egg/util/eggException.cpp b/src/egg/util/eggException.cpp index 2b4ea036..6bf4e2e7 100644 --- a/src/egg/util/eggException.cpp +++ b/src/egg/util/eggException.cpp @@ -1,13 +1,14 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "egg/util/eggException.h" + +#include "egg/core/eggController.h" +#include "egg/core/eggHeap.h" +#include "egg/core/eggSystem.h" +#include "egg/core/eggVideo.h" +#include "nw4r/db/db_directPrint.h" +#include "nw4r/db/db_exception.h" +#include "nw4r/db/db_mapFile.h" +#include "rvl/KPAD.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace EGG { diff --git a/src/f/f_base.cpp b/src/f/f_base.cpp index c5652418..865f0395 100644 --- a/src/f/f_base.cpp +++ b/src/f/f_base.cpp @@ -1,6 +1,7 @@ #include "f/f_base.h" -#include "MSL_C/string.h" + #include "m/m_heap.h" +#include "string.h" /* .text File Range: @@ -265,7 +266,7 @@ int fBase_c::connectProc() { fBase_c *conn_parent = getConnectParent(); if (conn_parent != nullptr) { if (conn_parent->isProcControlFlag(ROOT_DISABLE_EXECUTE) || - conn_parent->isProcControlFlag(DISABLE_EXECUTE)) { + conn_parent->isProcControlFlag(DISABLE_EXECUTE)) { setProcControlFlag(DISABLE_EXECUTE); } else if (isProcControlFlag(DISABLE_EXECUTE)) { clearProcControlFlag(DISABLE_EXECUTE); @@ -341,7 +342,7 @@ void fBase_c::deleteRequest() { void fBase_c::forceUpdate() { // There is probably an inline active here if (((!delete_request && lifecycle_state != TO_BE_DELETED) && lifecycle_state != ACTIVE) && - (update_request == UPDATE_REQUEST && fManager_c::m_nowLoopProc == fManager_c::EXECUTE)) { + (update_request == UPDATE_REQUEST && fManager_c::m_nowLoopProc == fManager_c::EXECUTE)) { update_request = UPDATE_FORCE; fManager_c::m_drawManage.addNode(&manager.draw_node); lifecycle_state = ACTIVE; @@ -438,8 +439,8 @@ bool fBase_c::entryFrmHeap(size_t size, EGG::Heap *parentHeap) { EGG::FrmHeap *new_heap = nullptr; if (size != 0) { - new_heap = mHeap::makeFrmHeapAndUpdate(size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, - 0); + new_heap = + mHeap::makeFrmHeapAndUpdate(size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0); if (new_heap != nullptr) { bool create_sucess = createHeap(); mHeap::restoreCurrentHeap(); @@ -457,7 +458,7 @@ bool fBase_c::entryFrmHeap(size_t size, EGG::Heap *parentHeap) { } if (new_heap == nullptr) { new_heap = - mHeap::makeFrmHeapAndUpdate(-1, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0); + mHeap::makeFrmHeapAndUpdate(-1, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0); if (new_heap != nullptr) { bool create_sucess = createHeap(); @@ -472,8 +473,9 @@ bool fBase_c::entryFrmHeap(size_t size, EGG::Heap *parentHeap) { } if (new_heap != nullptr) { - EGG::FrmHeap *larger_heap = mHeap::makeFrmHeapAndUpdate(heap_size, parentHeap, - "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0); + EGG::FrmHeap *larger_heap = mHeap::makeFrmHeapAndUpdate( + heap_size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0 + ); if (larger_heap != nullptr) { if (larger_heap < new_heap) { mHeap::destroyFrmHeap(new_heap); @@ -511,7 +513,7 @@ bool fBase_c::entryFrmHeapNonAdjust(size_t size, EGG::Heap *parentHeap) { } EGG::FrmHeap *new_heap = - mHeap::makeFrmHeapAndUpdate(size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0); + mHeap::makeFrmHeapAndUpdate(size, parentHeap, "各プロセスが個別で持てるヒープ(fBase_c::mHeap)", 0x20, 0); if (new_heap != nullptr) { bool create_sucess = createHeap(); mHeap::restoreCurrentHeap(); diff --git a/src/f/f_list.cpp b/src/f/f_list.cpp index 6201b7f5..53d2d042 100644 --- a/src/f/f_list.cpp +++ b/src/f/f_list.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "f/f_base.h" +#include "f/f_list_mg.h" +#include "f/f_list_mg_ptmf.h" /* 802e2680 */ void fLiMgPTMF_c::addNode(fLiNdPrio_c *add) { diff --git a/src/f/f_manager.cpp b/src/f/f_manager.cpp index 69bf8043..84581d3c 100644 --- a/src/f/f_manager.cpp +++ b/src/f/f_manager.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "f/f_manager.h" + +#include "f/f_base.h" + fTrMgPTMF_c fManager_c::m_connectManage(&fBase_c::connectProc); fLiMgPTMF_c fManager_c::m_createManage(&fBase_c::createPack); diff --git a/src/libms/commonlib.c b/src/libms/commonlib.c index 3343ec18..d3ab83d7 100644 --- a/src/libms/commonlib.c +++ b/src/libms/commonlib.c @@ -1,5 +1,7 @@ -#include -#include +#include "libms/commonlib.h" + +#include "libms/libms.h" + void LMSi_AnalyzeMessageHeader(struct MsbInfo *info) { info->version = info->header->version; @@ -12,8 +14,8 @@ void LMSi_AnalyzeMessageHeader(struct MsbInfo *info) { info->fileLength = info->header->fileLength; } -inline static struct MsbBlockHeader* GetBlockHeader(struct MsbInfo *info, int offset) { - return (struct MsbBlockHeader*)(offset + (unsigned int)info->header); +inline static struct MsbBlockHeader *GetBlockHeader(struct MsbInfo *info, int offset) { + return (struct MsbBlockHeader *)(offset + (unsigned int)info->header); } void LMSi_AnalyzeMessageBlocks(struct MsbInfo *info) { @@ -29,9 +31,9 @@ void LMSi_AnalyzeMessageBlocks(struct MsbInfo *info) { section->name[3] = GetBlockHeader(info, offset)->name[3]; section->sectionLength = GetBlockHeader(info, offset)->sectionLength; section->field_0x0C = GetBlockHeader(info, offset)->field_0x08; - offset = offset + 0x10; // section header + offset = offset + 0x10; // section header offset = offset + section->sectionLength; // section - offset = ROUND_UP(offset, 0x10); // align + offset = ROUND_UP(offset, 0x10); // align } } diff --git a/src/libms/flowfile.c b/src/libms/flowfile.c index 21f7ea78..d25151b5 100644 --- a/src/libms/flowfile.c +++ b/src/libms/flowfile.c @@ -1,7 +1,7 @@ -#include -#include -#include +#include "libms/flowfile.h" +#include "libms/commonlib.h" +#include "libms/libms.h" struct MsbfInfo { /* 0x00 */ struct MsbInfo base; diff --git a/src/libms/libms.c b/src/libms/libms.c index 01ee4567..2b77adc3 100644 --- a/src/libms/libms.c +++ b/src/libms/libms.c @@ -1,4 +1,4 @@ -#include +#include "libms/libms.h" static void *(*MSB_ALLOC_FUNC)(size_t size); static void (*MSB_FREE_FUNC)(void *arg); diff --git a/src/libms/msgfile.c b/src/libms/msgfile.c index 738002c3..4304d381 100644 --- a/src/libms/msgfile.c +++ b/src/libms/msgfile.c @@ -1,6 +1,8 @@ -#include -#include -#include +#include "libms/msgfile.h" + +#include "libms/commonlib.h" +#include "libms/libms.h" + struct MsbtInfo { /* 0x00 */ struct MsbInfo base; @@ -64,5 +66,5 @@ const char *LMS_GetLabelByTextIndex(struct MsbtInfo *info, int index) { struct MsbtAttrInfo *LMS_GetAttribute(struct MsbtInfo *info, int index) { int *p = info->base.sectionInfos[info->atr1Index].ptr; - return (struct MsbtAttrInfo*)&((const char *)p)[p[1] * index + 8]; + return (struct MsbtAttrInfo *)&((const char *)p)[p[1] * index + 8]; } diff --git a/src/m/m2d.cpp b/src/m/m2d.cpp index 65dec866..f5dd3db4 100644 --- a/src/m/m2d.cpp +++ b/src/m/m2d.cpp @@ -1,11 +1,11 @@ -#include -#include -#include +#include "m/m2d.h" -#include - -#include -#include +#include "egg/core/eggExpHeap.h" +#include "egg/core/eggHeap.h" +#include "egg/gfx/eggScreen.h" +#include "nw4r/lyt/lyt_init.h" +#include "rvl/GX.h" // IWYU pragma: export +#include "rvl/SC.h" // IWYU pragma: export namespace m2d { @@ -46,7 +46,7 @@ void defaultSet() { void draw(u8 priority) { for (Base_c *base = static_cast(nw4r::ut::List_GetFirst(&l_list)); base != nullptr; - base = static_cast(nw4r::ut::List_GetNext(&l_list, base))) { + base = static_cast(nw4r::ut::List_GetNext(&l_list, base))) { if (base->mPriority >= priority) { break; } @@ -56,7 +56,7 @@ void draw(u8 priority) { void drawBefore(u8 priority) { for (Base_c *base = static_cast(nw4r::ut::List_GetFirst(&l_list)); base != nullptr; - base = static_cast(nw4r::ut::List_GetNext(&l_list, base))) { + base = static_cast(nw4r::ut::List_GetNext(&l_list, base))) { if (base->mPriority > priority) { base->draw(); } @@ -148,13 +148,9 @@ void FrameCtrl_c::setRate(f32 rate) { bool FrameCtrl_c::isStop() const { f32 actualEnd; switch (mFlags) { - case FLAG_NO_LOOP: - actualEnd = mEndFrame - 1.0f; - return mCurrFrame >= actualEnd; - case FLAG_NO_LOOP | FLAG_BACKWARDS: - return mCurrFrame <= 0; - default: - return false; + case FLAG_NO_LOOP: actualEnd = mEndFrame - 1.0f; return mCurrFrame >= actualEnd; + case FLAG_NO_LOOP | FLAG_BACKWARDS: return mCurrFrame <= 0; + default: return false; } } diff --git a/src/m/m3d/m3d.cpp b/src/m/m3d/m3d.cpp index e4ec66b8..dde2e070 100644 --- a/src/m/m3d/m3d.cpp +++ b/src/m/m3d/m3d.cpp @@ -1,19 +1,17 @@ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include +#include "m/m3d/m3d.h" + +#include "egg/gfx/eggDrawGX.h" +#include "egg/gfx/eggGfxEngine.h" +#include "egg/gfx/eggScreen.h" +#include "egg/gfx/eggStateGX.h" +#include "m/m_heap.h" +#include "m/m_video.h" +#include "nw4r/g3d/g3d_camera.h" +#include "nw4r/g3d/g3d_init.h" +#include "nw4r/g3d/g3d_resmat.h" +#include "nw4r/g3d/g3d_resmdl.h" +#include "nw4r/g3d/g3d_state.h" +#include "rvl/GX.h" // IWYU pragma: export namespace m3d { @@ -40,8 +38,9 @@ bool create(EGG::Heap *pHeap, u32 maxNumChildren, u32 maxNumScnObj, u32 numLight nw4r::g3d::G3dInit(true); nw4r::g3d::G3DState::SetRenderModeObj(*mVideo::m_video->pRenderMode); u32 allocedSize; - internal::l_scnRoot_p = nw4r::g3d::ScnRoot::Construct(internal::l_allocator_p, &allocedSize, maxNumChildren, - maxNumScnObj, numLightObj, numLightSet); + internal::l_scnRoot_p = nw4r::g3d::ScnRoot::Construct( + internal::l_allocator_p, &allocedSize, maxNumChildren, maxNumScnObj, numLightObj, numLightSet + ); if (internal::l_scnRoot_p == nullptr) { delete internal::l_allocator_p; internal::l_allocator_p = nullptr; @@ -50,8 +49,10 @@ bool create(EGG::Heap *pHeap, u32 maxNumChildren, u32 maxNumScnObj, u32 numLight return true; } -bool create(EGG::Heap *pHeap, GXPixelFmt pxlFmt, GXColor clearColor, u32 maxNumChildren, u32 maxNumScnObj, - u32 numLightObj, u32 numLightSet, u32 numLightMgr, u32 numFogMgr) { +bool create( + EGG::Heap *pHeap, GXPixelFmt pxlFmt, GXColor clearColor, u32 maxNumChildren, u32 maxNumScnObj, u32 numLightObj, + u32 numLightSet, u32 numLightMgr, u32 numFogMgr +) { if (internal::l_lightMgr_pp && internal::l_fogMgr_pp) { return false; } @@ -94,7 +95,7 @@ bool createLightMgr(EGG::Heap *pHeap, u16 p2, u16 p3, u8 p4, bool bCreateFogMgr, using namespace internal; if (!l_lightMgr_pp || (idx < 0 || idx >= l_numLightMgr || idx >= l_numFogMgr) || - (l_lightMgr_pp[idx] || l_fogMgr_pp[idx])) { + (l_lightMgr_pp[idx] || l_fogMgr_pp[idx])) { return false; } @@ -115,12 +116,9 @@ bool createLightMgr(EGG::Heap *pHeap, u16 p2, u16 p3, u8 p4, bool bCreateFogMgr, u8 *output; switch (input % 8) { do { - case 0: - *output++ = input; - case 1: - *output++ = input; - case 2: - *output++ = input; + case 0: *output++ = input; + case 1: *output++ = input; + case 2: *output++ = input; } while (true); } } diff --git a/src/m/m3d/m_anmchr.cpp b/src/m/m3d/m_anmchr.cpp index 985ef9d6..ea1bd169 100644 --- a/src/m/m3d/m_anmchr.cpp +++ b/src/m/m3d/m_anmchr.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m3d/m_anmchr.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_anmchr.h" +#include "nw4r/g3d/g3d_resanmchr.h" + namespace m3d { diff --git a/src/m/m3d/m_anmchrblend.cpp b/src/m/m3d/m_anmchrblend.cpp index 2c7d67ef..ff77ac91 100644 --- a/src/m/m3d/m_anmchrblend.cpp +++ b/src/m/m3d/m_anmchrblend.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m3d/m_anmchrblend.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_anmchr.h" +#include "nw4r/g3d/g3d_resanmchr.h" + namespace m3d { diff --git a/src/m/m3d/m_anmmatclr.cpp b/src/m/m3d/m_anmmatclr.cpp index 35ecd8f3..467d2fde 100644 --- a/src/m/m3d/m_anmmatclr.cpp +++ b/src/m/m3d/m_anmmatclr.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m3d/m_anmmatclr.h" + +#include "egg/core/eggFrmHeap.h" +#include "m/m3d/m3d.h" +#include "m/m_heap.h" + namespace m3d { @@ -146,7 +148,7 @@ void anmMatClr_c::setAnm(bmdl_c &mdl, nw4r::g3d::ResAnmClr clr, s32 idx, playMod mpChildren[idx].setAnm(mdl, clr, mode); nw4r::g3d::AnmObjMatClrRes *res = - nw4r::g3d::G3dObj::DynamicCast(mpChildren[idx].getAnimObj()); + nw4r::g3d::G3dObj::DynamicCast(mpChildren[idx].getAnimObj()); o->Attach(idx, res); } diff --git a/src/m/m3d/m_anmmdl.cpp b/src/m/m3d/m_anmmdl.cpp index 70c49fe8..c19887a1 100644 --- a/src/m/m3d/m_anmmdl.cpp +++ b/src/m/m3d/m_anmmdl.cpp @@ -1,4 +1,4 @@ -#include +#include "m/m3d/m_anmmdl.h" namespace m3d { @@ -20,18 +20,24 @@ void mdlAnmChr::setRate(f32 rate) { mAnm.setRate(rate); } -bool mdlAnmChr::create(void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, - u32 bufferOption, int nView, u32 *pSize) { +bool mdlAnmChr::create( + void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, + int nView, u32 *pSize +) { return create(mdlFile, anmFile, mdlName, anmName, nullptr, alloc, bufferOption, nView, pSize); } -bool mdlAnmChr::create2(void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, - u32 bufferOption, int nView, u32 *pSize) { +bool mdlAnmChr::create2( + void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, + int nView, u32 *pSize +) { return create(mdlFile, anmFile, mdlName, anmName, alloc, bufferOption, nView, pSize); } -bool mdlAnmChr::create(void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, - mdl_c::mdlCallback_c *callback, mAllocator_c *alloc, u32 bufferOption, int nView, u32 *pSize) { +bool mdlAnmChr::create( + void *mdlFile, void *anmFile, const char *mdlName, const char *anmName, mdl_c::mdlCallback_c *callback, + mAllocator_c *alloc, u32 bufferOption, int nView, u32 *pSize +) { mMdlFile = mdlFile; mAnmFile = anmFile; @@ -60,8 +66,10 @@ bool mdlAnmChr::create(void *mdlFile, void *anmFile, const char *mdlName, const return true; } -bool mdlAnmChr::create(void *resFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, - int nView, u32 *pSize) { +bool mdlAnmChr::create( + void *resFile, const char *mdlName, const char *anmName, mAllocator_c *alloc, u32 bufferOption, int nView, + u32 *pSize +) { return create(resFile, resFile, mdlName, anmName, nullptr, alloc, bufferOption, nView, pSize); } diff --git a/src/m/m3d/m_anmshp.cpp b/src/m/m3d/m_anmshp.cpp index 18ac5f48..ea9edc08 100644 --- a/src/m/m3d/m_anmshp.cpp +++ b/src/m/m3d/m_anmshp.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m3d/m_anmshp.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_anmshp.h" + namespace m3d { diff --git a/src/m/m3d/m_anmtexpat.cpp b/src/m/m3d/m_anmtexpat.cpp index 60c96097..088739a9 100644 --- a/src/m/m3d/m_anmtexpat.cpp +++ b/src/m/m3d/m_anmtexpat.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m3d/m_anmtexpat.h" + +#include "egg/core/eggFrmHeap.h" +#include "m/m3d/m3d.h" +#include "m/m_heap.h" + namespace m3d { @@ -146,7 +148,7 @@ void anmTexPat_c::setAnm(bmdl_c &mdl, nw4r::g3d::ResAnmTexPat pat, s32 idx, play mpChildren[idx].setAnm(mdl, pat, mode); nw4r::g3d::AnmObjTexPatRes *res = - nw4r::g3d::G3dObj::DynamicCast(mpChildren[idx].getAnimObj()); + nw4r::g3d::G3dObj::DynamicCast(mpChildren[idx].getAnimObj()); o->Attach(idx, res); } diff --git a/src/m/m3d/m_anmtexsrt.cpp b/src/m/m3d/m_anmtexsrt.cpp index c45d8be0..d020eed7 100644 --- a/src/m/m3d/m_anmtexsrt.cpp +++ b/src/m/m3d/m_anmtexsrt.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m3d/m_anmtexsrt.h" + +#include "egg/core/eggFrmHeap.h" +#include "m/m3d/m3d.h" +#include "m/m_heap.h" + namespace m3d { @@ -157,7 +159,7 @@ void anmTexSrt_c::setAnm(bmdl_c &mdl, nw4r::g3d::ResAnmTexSrt srt, s32 idx, play mpChildren[idx].setAnm(mdl, srt, mode); nw4r::g3d::AnmObjTexSrtRes *res = - nw4r::g3d::G3dObj::DynamicCast(mpChildren[idx].getAnimObj()); + nw4r::g3d::G3dObj::DynamicCast(mpChildren[idx].getAnimObj()); o->Attach(idx, res); } diff --git a/src/m/m3d/m_anmvis.cpp b/src/m/m3d/m_anmvis.cpp index 68d4bd21..39602dcc 100644 --- a/src/m/m3d/m_anmvis.cpp +++ b/src/m/m3d/m_anmvis.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "m/m3d/m_anmvis.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_anmvis.h" +#include "nw4r/g3d/g3d_resanmvis.h" +#include "nw4r/g3d/g3d_resmdl.h" + namespace m3d { diff --git a/src/m/m3d/m_banm.cpp b/src/m/m3d/m_banm.cpp index 026eaf45..3204f0a1 100644 --- a/src/m/m3d/m_banm.cpp +++ b/src/m/m3d/m_banm.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m3d/m_banm.h" + +#include "m/m3d/m3d.h" +#include "m/m_heap.h" + namespace m3d { banm_c::~banm_c() { @@ -27,8 +29,9 @@ bool banm_c::createAllocator(mAllocator_c *alloc, u32 *pStart) { i2 = ROUND_UP(i1, 0x20) - i2; i1 = mHeap::frmHeapCost(i2, 0x20); *pStart = ROUND_UP(i1, 0x20); - mpFrameHeap = mHeap::createFrmHeap(i2, (EGG::Heap *)alloc->mHeap, "アニメ切り替え用アロケータ(m3d::banm_c::m_heap)", - internal::l_alignment, 0); + mpFrameHeap = mHeap::createFrmHeap( + i2, (EGG::Heap *)alloc->mHeap, "アニメ切り替え用アロケータ(m3d::banm_c::m_heap)", internal::l_alignment, 0 + ); mAllocator.attach(mpFrameHeap, 0x20); return true; } diff --git a/src/m/m3d/m_bline.cpp b/src/m/m3d/m_bline.cpp index 326ae6c1..45d72b5f 100644 --- a/src/m/m3d/m_bline.cpp +++ b/src/m/m3d/m_bline.cpp @@ -1,10 +1,12 @@ -#include -#include -#include -#include -#include -#include -#include +#include "m/m3d/m_bline.h" + +#include "egg/core/eggColorFader.h" +#include "egg/core/eggHeap.h" +#include "egg/gfx/eggDrawGX.h" +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_light.h" +#include "nw4r/g3d/g3d_state.h" + namespace m3d { @@ -12,8 +14,10 @@ blineMat_c::~blineMat_c() { remove(); } -bool blineMat_c::create(mAllocator_c *pAllocator, int numLines, u16 numLinePts, f32 width, f32 repeat, - nw4r::ut::Color &color, EGG::ResTIMG *pTex, bool p9) { +bool blineMat_c::create( + mAllocator_c *pAllocator, int numLines, u16 numLinePts, f32 width, f32 repeat, nw4r::ut::Color &color, + EGG::ResTIMG *pTex, bool p9 +) { if (!proc_c::create(pAllocator, nullptr)) { return false; } @@ -60,7 +64,7 @@ void blineMat_c::update() { PSMTXMultVec(camMtx, mVec3_c::zero, vec); for (bline_c *line = (bline_c *)nw4r::ut::List_GetNext(&mLines, 0); line != nullptr; - line = (bline_c *)nw4r::ut::List_GetNext(&mLines, line)) { + line = (bline_c *)nw4r::ut::List_GetNext(&mLines, line)) { if ((line->mFlags & 1) == 0) { line->update(&vec); } @@ -77,8 +81,9 @@ void blineMat_c::setupGX(bool bTransparent) { u32 mask_diff_color, mask_diff_alpha, mask_spec_color, mask_spec_alpha; nw4r::g3d::AmbLightObj ambObj; - nw4r::g3d::G3DState::LoadLightSet(0, &mask_diff_color, &mask_diff_alpha, &mask_spec_color, &mask_spec_alpha, - &ambObj); + nw4r::g3d::G3DState::LoadLightSet( + 0, &mask_diff_color, &mask_diff_alpha, &mask_spec_color, &mask_spec_alpha, &ambObj + ); nw4r::ut::Color ambColor(0xFF, 0xFF, 0xFF, 0xFF); nw4r::ut::Color matColor(0xFF, 0xFF, 0xFF, 0xFF); @@ -146,7 +151,7 @@ void blineMat_c::drawOpa() { update(); setupGX(false); for (bline_c *line = (bline_c *)nw4r::ut::List_GetNext(&mLines, 0); line != nullptr; - line = (bline_c *)nw4r::ut::List_GetNext(&mLines, line)) { + line = (bline_c *)nw4r::ut::List_GetNext(&mLines, line)) { if ((line->mFlags & 1) == 0 && line->mColor.a == 0xFF) { line->draw(); } @@ -157,7 +162,7 @@ void blineMat_c::drawXlu() { update(); setupGX(true); for (bline_c *line = (bline_c *)nw4r::ut::List_GetNext(&mLines, 0); line != nullptr; - line = (bline_c *)nw4r::ut::List_GetNext(&mLines, line)) { + line = (bline_c *)nw4r::ut::List_GetNext(&mLines, line)) { if ((line->mFlags & 1) == 0 && line->mColor.a != 0xFF) { line->draw(); } diff --git a/src/m/m3d/m_bmdl.cpp b/src/m/m3d/m_bmdl.cpp index c565fb5b..9b51d8f6 100644 --- a/src/m/m3d/m_bmdl.cpp +++ b/src/m/m3d/m_bmdl.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m3d/m_bmdl.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_scnmdl.h" + namespace m3d { @@ -21,8 +23,9 @@ int bmdl_c::getNodeID(const char *name) const { } bool bmdl_c::getNodeWorldMtx(u32 p1, nw4r::math::MTX34 *out) const { - return nw4r::g3d::G3dObj::DynamicCast(mpScnLeaf)->GetScnMtxPos(out, - nw4r::g3d::ScnObj::MTX_TYPE_WORLD, p1); + return nw4r::g3d::G3dObj::DynamicCast(mpScnLeaf)->GetScnMtxPos( + out, nw4r::g3d::ScnObj::MTX_TYPE_WORLD, p1 + ); } bool bmdl_c::getNodeWorldMtxMultVecZero(u32 p1, nw4r::math::VEC3 &out) const { @@ -157,8 +160,9 @@ void bmdl_c::setTevKColorAll(GXTevKColorID tevKId, GXColor color, bool bMarkDirt } } -void bmdl_c::setBlendModeAll(GXBlendMode blendMode, GXBlendFactor srcFactor, GXBlendFactor dstFactor, GXLogicOp op, - bool bMarkDirty) { +void bmdl_c::setBlendModeAll( + GXBlendMode blendMode, GXBlendFactor srcFactor, GXBlendFactor dstFactor, GXLogicOp op, bool bMarkDirty +) { nw4r::g3d::ResMdl resMdl = getResMdl(); nw4r::g3d::ScnMdl *mdl = nw4r::g3d::G3dObj::DynamicCast(mpScnLeaf); if (mdl) { diff --git a/src/m/m3d/m_calc_ratio.cpp b/src/m/m3d/m_calc_ratio.cpp index f4ae81f6..25eb2f97 100644 --- a/src/m/m3d/m_calc_ratio.cpp +++ b/src/m/m3d/m_calc_ratio.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "m/m3d/m_calc_ratio.h" + +#include "nw4r/math/math_arithmetic.h" + namespace m3d { diff --git a/src/m/m3d/m_fanm.cpp b/src/m/m3d/m_fanm.cpp index 21cd0686..a5680af9 100644 --- a/src/m/m3d/m_fanm.cpp +++ b/src/m/m3d/m_fanm.cpp @@ -1,4 +1,4 @@ -#include +#include "m/m3d/m_fanm.h" namespace m3d { diff --git a/src/m/m3d/m_mdl.cpp b/src/m/m3d/m_mdl.cpp index 97dcb9ce..d66c4d65 100644 --- a/src/m/m3d/m_mdl.cpp +++ b/src/m/m3d/m_mdl.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m3d/m_mdl.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_scnmdlsmpl.h" + namespace m3d { @@ -12,8 +14,9 @@ mdl_c::mdlCallback_c::mdlCallback_c() { } mdl_c::mdlCallback_c::~mdlCallback_c() {} -void mdl_c::mdlCallback_c::ExecCallbackA(nw4r::g3d::ChrAnmResult *result, nw4r::g3d::ResMdl mdl, - nw4r::g3d::FuncObjCalcWorld *o) { +void mdl_c::mdlCallback_c::ExecCallbackA( + nw4r::g3d::ChrAnmResult *result, nw4r::g3d::ResMdl mdl, nw4r::g3d::FuncObjCalcWorld *o +) { u16 nodeId = o->GetNodeId(); nw4r::g3d::ChrAnmResult *resPtr = &mpNodes[nodeId]; if (mCalcRatio.is0x18() && !mCalcRatio.isEnd()) { @@ -78,8 +81,9 @@ void mdl_c::mdlCallback_c::ExecCallbackA(nw4r::g3d::ChrAnmResult *result, nw4r:: } } -void mdl_c::mdlCallback_c::ExecCallbackB(nw4r::g3d::WorldMtxManip *m, nw4r::g3d::ResMdl mdl, - nw4r::g3d::FuncObjCalcWorld *o) { +void mdl_c::mdlCallback_c::ExecCallbackB( + nw4r::g3d::WorldMtxManip *m, nw4r::g3d::ResMdl mdl, nw4r::g3d::FuncObjCalcWorld *o +) { u16 nodeId = o->GetNodeId(); if (mpBaseCallback != nullptr) { mpBaseCallback->timingB(nodeId, m, mdl); @@ -153,8 +157,9 @@ bool mdl_c::create(nw4r::g3d::ResMdl mdl, mAllocator_c *alloc, u32 bufferOption, return create(mdl, nullptr, alloc, bufferOption, nView, pSize); } -bool mdl_c::create(nw4r::g3d::ResMdl mdl, mdl_c::mdlCallback_c *cb, mAllocator_c *alloc, u32 bufferOption, int nView, - u32 *pSize) { +bool mdl_c::create( + nw4r::g3d::ResMdl mdl, mdl_c::mdlCallback_c *cb, mAllocator_c *alloc, u32 bufferOption, int nView, u32 *pSize +) { if (alloc == nullptr) { alloc = internal::l_allocator_p; } diff --git a/src/m/m3d/m_proc.cpp b/src/m/m3d/m_proc.cpp index 85ab31ec..eee1fca4 100644 --- a/src/m/m3d/m_proc.cpp +++ b/src/m/m3d/m_proc.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m3d/m_proc.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_scnproc.h" + namespace m3d { diff --git a/src/m/m3d/m_scnleaf.cpp b/src/m/m3d/m_scnleaf.cpp index 43f83c7c..d2a36eae 100644 --- a/src/m/m3d/m_scnleaf.cpp +++ b/src/m/m3d/m_scnleaf.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "m/m3d/m_scnleaf.h" + +#include "m/m3d/m3d.h" + namespace m3d { diff --git a/src/m/m3d/m_shadow.cpp b/src/m/m3d/m_shadow.cpp index 750e261a..b95c1f44 100644 --- a/src/m/m3d/m_shadow.cpp +++ b/src/m/m3d/m_shadow.cpp @@ -1,13 +1,15 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "m/m3d/m_shadow.h" + +#include "nw4r/g3d/g3d_calcview.h" +#include "nw4r/g3d/g3d_draw.h" +#include "nw4r/g3d/g3d_draw1mat1shp.h" +#include "nw4r/g3d/g3d_resmat.h" +#include "nw4r/g3d/g3d_resmdl.h" +#include "nw4r/g3d/g3d_resshp.h" +#include "nw4r/g3d/g3d_scnmdl.h" +#include "nw4r/g3d/g3d_scnmdlsmpl.h" +#include "nw4r/g3d/g3d_state.h" + // All of this is completely made up, as we don't have symbols for this TU // (contrary to the rest of m3d and most of nw4r::g3d) @@ -37,8 +39,9 @@ void mShadow_c::drawOpa() { } } -void mShadow_c::create(int count, u8 unk1, int unk2, u16 texSize, u32 drawOpaPriority, nw4r::g3d::ResMdl mdl, - u32 heapSize) { +void mShadow_c::create( + int count, u8 unk1, int unk2, u16 texSize, u32 drawOpaPriority, nw4r::g3d::ResMdl mdl, u32 heapSize +) { // Regswaps mAllocator.attach(mpHeap, 0x20); proc_c::create(&mAllocator, nullptr); @@ -179,8 +182,10 @@ bool mShadow_c::addCircle(mShadowCircle_c *circle, u32 priority, u32 isMdl) { return true; } -bool mShadow_c::drawMdl(mShadowCircle_c *circle, u32 priority, scnLeaf_c &mdl, const mQuat_c &quat, mVec3_c &pos, - mColor color, u32 param9, f32 dist) { +bool mShadow_c::drawMdl( + mShadowCircle_c *circle, u32 priority, scnLeaf_c &mdl, const mQuat_c &quat, mVec3_c &pos, mColor color, u32 param9, + f32 dist +) { if (!addCircle(circle, priority, 1)) { return false; } @@ -208,7 +213,10 @@ void mShadow_c::removeCircle(mShadowCircle_c *circle) { nw4r::ut::List_Remove(&mList, child); } -static f32 sTexMtx[2][4] = {{1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}}; +static f32 sTexMtx[2][4] = { + {1.0f, 0.0f, 0.0f, 0.0f}, + {0.0f, 1.0f, 0.0f, 0.0f} +}; static u32 STEP = 0x2492; @@ -219,8 +227,10 @@ static GXColor sColors[] = { {0x00, 0x00, 0x00, 0x00}, }; -bool mShadow_c::drawTexObj(mShadowCircle_c *circle, u32 priority, const GXTexObj *texObj, const mMtx_c &mtx, - const mQuat_c &quat, mVec3_c &pos, mColor color, u32 param9, f32 dist) { +bool mShadow_c::drawTexObj( + mShadowCircle_c *circle, u32 priority, const GXTexObj *texObj, const mMtx_c &mtx, const mQuat_c &quat, mVec3_c &pos, + mColor color, u32 param9, f32 dist +) { if (!addCircle(circle, priority, 0)) { return false; } @@ -401,8 +411,9 @@ void mShadow_c::drawAllShadows() { void mShadow_c::create(const mShadowCircleConfig *config, nw4r::g3d::ResMdl mdl, EGG::Heap *heap) { mShadow_c::sInstance = new (heap, 0x04) mShadow_c(heap); - mShadow_c::sInstance->create(config->count, config->unk1, config->unk2, config->texBufferSize, - config->drawOpaPriority, mdl, config->heapSize); + mShadow_c::sInstance->create( + config->count, config->unk1, config->unk2, config->texBufferSize, config->drawOpaPriority, mdl, config->heapSize + ); } void mShadow_c::beforeDraw() { @@ -505,9 +516,10 @@ void mShadowChild_c::updateMtx() { mVec3_c a = *(mVec3_c *)(&mQuat) + mPositionMaybe * mOffsetMaybe; mVec3_c b = *(mVec3_c *)(&mQuat) - mPositionMaybe * field_0x13C; mMtx_c mtx; - C_MTXLookAt(mtx.m, b, - *(fabsf((a.x - b.x) * (a.x - b.x) + (a.z - b.z) * (a.z - b.z)) <= FLT_EPSILON ? &mVec3_c::Ez : &mVec3_c::Ey), - a); + C_MTXLookAt( + mtx.m, b, + *(fabsf((a.x - b.x) * (a.x - b.x) + (a.z - b.z) * (a.z - b.z)) <= FLT_EPSILON ? &mVec3_c::Ez : &mVec3_c::Ey), a + ); f32 f = field_0x13C; mFrustum.set(f, -f, -f, f, f, f + mOffsetMaybe, mtx, true); } @@ -529,17 +541,21 @@ void mShadowChild_c::drawMdl() { u32 bufSize = mdl->GetNumViewMtx() * sizeof(math::MTX34); math::MTX34 *viewPosArray = static_cast(mShadow_c::sInstance->mpHeap->alloc(bufSize, 0x20)); - g3d::CalcView(viewPosArray, nullptr, mdl->GetWldMtxArray(), mdl->GetWldMtxAttribArray(), - mdl->GetNumViewMtx(), mFrustum.mView, mdl->GetResMdl(), nullptr); + g3d::CalcView( + viewPosArray, nullptr, mdl->GetWldMtxArray(), mdl->GetWldMtxAttribArray(), mdl->GetNumViewMtx(), + mFrustum.mView, mdl->GetResMdl(), nullptr + ); DCStoreRange(viewPosArray, bufSize); g3d::ScnMdl *mdl2 = g3d::G3dObj::DynamicCast(lf->getG3dObject()); g3d::DrawResMdlReplacement *pRep = mdl2 ? mdl2->GetDrawResMdlReplacement() : nullptr; - g3d::DrawResMdlDirectly(mdl->GetResMdl(), viewPosArray, nullptr, nullptr, + g3d::DrawResMdlDirectly( + mdl->GetResMdl(), viewPosArray, nullptr, nullptr, mdl2->GetByteCode(g3d::ScnMdlSimple::BYTE_CODE_DRAW_OPA), nullptr, pRep, - g3d::RESMDL_DRAWMODE_FORCE_LIGHTOFF | g3d::RESMDL_DRAWMODE_IGNORE_MATERIAL); + g3d::RESMDL_DRAWMODE_FORCE_LIGHTOFF | g3d::RESMDL_DRAWMODE_IGNORE_MATERIAL + ); GXInvalidateVtxCache(); } else { // this happens with bomb bag, and goes to 0x802EDC90 (mCustomShadow_c::draw) diff --git a/src/m/m3d/m_smdl.cpp b/src/m/m3d/m_smdl.cpp index e5d96425..ac0e2638 100644 --- a/src/m/m3d/m_smdl.cpp +++ b/src/m/m3d/m_smdl.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m3d/m_smdl.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_scnmdl.h" +#include "nw4r/g3d/g3d_scnmdlsmpl.h" + namespace m3d { diff --git a/src/m/m3d/m_video.cpp b/src/m/m3d/m_video.cpp index b5ef2eb6..28015013 100644 --- a/src/m/m3d/m_video.cpp +++ b/src/m/m3d/m_video.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "m/m_video.h" + +#include "d/d_system.h" + // I dont know if this file actually exists, the place that the function exists is in an odd spot diff --git a/src/m/m_allocator.cpp b/src/m/m_allocator.cpp index 6211fa00..922c6889 100644 --- a/src/m/m_allocator.cpp +++ b/src/m/m_allocator.cpp @@ -1,10 +1,12 @@ -#include -#include -#include +#include "m/m_allocator.h" + +#include "egg/core/eggAllocator.h" +#include "m/m_heap.h" + // TODO this include is weird -#include -#include +#include "egg/core/eggAssertHeap.h" +#include "egg/core/eggHeap.h" mAllocator_c::mAllocator_c() : EGG::Allocator(mHeap::g_assertHeap, 0x04) {} diff --git a/src/m/m_angle.cpp b/src/m/m_angle.cpp index a9e9474f..47912870 100644 --- a/src/m/m_angle.cpp +++ b/src/m/m_angle.cpp @@ -1,4 +1,4 @@ -#include +#include "m/m_angle.h" /** 80575c08 */ mAng3_c mAng3_c::Zero = mAng3_c::mAng3_c(0, 0, 0); diff --git a/src/m/m_color_fader.cpp b/src/m/m_color_fader.cpp index e0713020..ed36ceae 100644 --- a/src/m/m_color_fader.cpp +++ b/src/m/m_color_fader.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m_color_fader.h" + +#include "rvl/SC.h" // IWYU pragma: export +#include "rvl/VI.h" // IWYU pragma: export + mColorFader_c::mColorFader_c(const mColor &color, EStatus status) : mFaderBase_c(color, status) { mAspectRatio = SCGetAspectRatio(); @@ -27,20 +29,11 @@ bool mColorFader_c::calc() { } switch (mStatus) { - case FADED_IN: - mFaderColor.a = 0; - break; - case FADED_OUT: - mFaderColor.a = 0xff; - break; - case FADING_IN: - mFaderColor.a = 0xff - (elapsed * 0xff / frame); - break; - case FADING_OUT: - mFaderColor.a = elapsed * 0xff / frame; - break; + case FADED_IN: mFaderColor.a = 0; break; + case FADED_OUT: mFaderColor.a = 0xff; break; + case FADING_IN: mFaderColor.a = 0xff - (elapsed * 0xff / frame); break; + case FADING_OUT: mFaderColor.a = elapsed * 0xff / frame; break; } - return result; } diff --git a/src/m/m_dvd.cpp b/src/m/m_dvd.cpp index 4587caf1..2b0d5bbb 100644 --- a/src/m/m_dvd.cpp +++ b/src/m/m_dvd.cpp @@ -1,12 +1,14 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "m/m_dvd.h" + +#include "egg/core/eggArchive.h" +#include "egg/core/eggDvdFile.h" +#include "egg/core/eggDvdRipper.h" +#include "egg/core/eggHeap.h" +#include "egg/core/eggStreamDecomp.h" +#include "m/m_heap.h" +#include "rvl/DVD.h" // IWYU pragma: export +#include "string.h" + static int ConvertPathToEntrynum(const char *path, u8 *outType); @@ -345,8 +347,7 @@ mDvd_callback_c *mDvd_callback_c::create(dvdReadCallback cb, void *cbData) { /** 802ef650 */ mDvd_callback_c *mDvd_callback_c::createOrFail(dvdReadCallback cb, void *cbData) { mDvd_callback_c *cmd = mDvd_callback_c::create(cb, cbData); - while (!cmd) { - } + while (!cmd) {} return cmd; } @@ -574,8 +575,7 @@ mDvd_toMainRam_arc_c::create(EGG::Archive *arc, const char *path, int mountDirec mDvd_toMainRam_arc_c * mDvd_toMainRam_arc_c::createOrFail(EGG::Archive *arc, const char *path, int mountDirection, EGG::Heap *heap) { mDvd_toMainRam_arc_c *cmd = mDvd_toMainRam_arc_c::create(arc, path, mountDirection, heap); - while (!cmd) { - } + while (!cmd) {} return cmd; } @@ -615,8 +615,7 @@ mDvd_toMainRam_normal_c *mDvd_toMainRam_normal_c::create(const char *path, int m /** 802f0030 */ mDvd_toMainRam_normal_c *mDvd_toMainRam_normal_c::createOrFail(const char *path, int mountDirection, EGG::Heap *heap) { mDvd_toMainRam_normal_c *cmd = mDvd_toMainRam_normal_c::create(path, mountDirection, heap); - while (!cmd) { - } + while (!cmd) {} return cmd; } diff --git a/src/m/m_fader.cpp b/src/m/m_fader.cpp index 7e537c46..8677530f 100644 --- a/src/m/m_fader.cpp +++ b/src/m/m_fader.cpp @@ -1,6 +1,8 @@ -#include -#include -#include +#include "m/m_fader.h" + +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_state.h" + void mFader_c::draw() { nw4r::g3d::G3DState::Invalidate(0x7ff); @@ -21,12 +23,8 @@ bool mFader_c::setFader(mFaderBase_c *fader) { mpFader = fader; switch (status) { - case mFaderBase_c::FADED_OUT: - fader->setStatus(mFaderBase_c::FADED_OUT); - break; - case mFaderBase_c::FADED_IN: - fader->setStatus(mFaderBase_c::FADED_IN); - break; + case mFaderBase_c::FADED_OUT: fader->setStatus(mFaderBase_c::FADED_OUT); break; + case mFaderBase_c::FADED_IN: fader->setStatus(mFaderBase_c::FADED_IN); break; } return true; diff --git a/src/m/m_fader_base.cpp b/src/m/m_fader_base.cpp index 598edc56..e97a8085 100644 --- a/src/m/m_fader_base.cpp +++ b/src/m/m_fader_base.cpp @@ -1,16 +1,12 @@ -#include +#include "m/m_fader_base.h" mFaderBase_c::mFaderBase_c(const mColor &color, EStatus status) : mFlag(0), mFrame(20), mElapsed(0) { setColor(color); mFlag |= FLAG_2; switch (status) { - case FADED_OUT: - mStatus = FADED_OUT; - break; - case FADED_IN: - mStatus = FADED_IN; - break; + case FADED_OUT: mStatus = FADED_OUT; break; + case FADED_IN: mStatus = FADED_IN; break; } } diff --git a/src/m/m_heap.cpp b/src/m/m_heap.cpp index 5220d771..dcdd01d2 100644 --- a/src/m/m_heap.cpp +++ b/src/m/m_heap.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "m/m_heap.h" + +#include "egg/core/eggAssertHeap.h" +#include "egg/core/eggExpHeap.h" +#include "egg/core/eggFrmHeap.h" + u8 mHeap::g_DefaultGameHeapId = 1; @@ -14,10 +16,10 @@ EGG::Heap *mHeap::g_commandHeap; EGG::ExpHeap *mHeap::g_dylinkHeap; EGG::AssertHeap *mHeap::g_assertHeap; const char *const mHeap::s_GameHeapNames[4] = { - 0, - "ゲーム用汎用ヒープ1(mHeap::gameHeaps[1])", - "ゲーム用汎用ヒープ2(mHeap::gameHeaps[2])", - 0, + 0, + "ゲーム用汎用ヒープ1(mHeap::gameHeaps[1])", + "ゲーム用汎用ヒープ2(mHeap::gameHeaps[2])", + 0, }; u16 mHeap::copyAttribute(u32 arg) { diff --git a/src/m/m_mtx.cpp b/src/m/m_mtx.cpp index f72a6b65..712d612c 100644 --- a/src/m/m_mtx.cpp +++ b/src/m/m_mtx.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "c/c_math.h" +#include "m/m_math.h" +#include "nw4r/math.h" void mMtx_c::toRot(mAng3_c &out) const { f32 t1 = 0.0f; diff --git a/src/m/m_pad.cpp b/src/m/m_pad.cpp index d7d67ad1..b277c448 100644 --- a/src/m/m_pad.cpp +++ b/src/m/m_pad.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "m/m_pad.h" + +#include "common.h" +#include "egg/core/eggController.h" +#include "egg/math/eggVector.h" +#include "rvl/WPAD.h" // IWYU pragma: export + namespace mPad { @@ -74,10 +76,8 @@ void beginPad() { } // Not sure why this checks the controller index against the tick count - if (s_GetWPADInfoInterval != 0 && - ((s_GetWPADInfoInterval == 1 || s_GetWPADInfoCount == i) || - (s_GetWPADInfoInterval <= 3 && (s_GetWPADInfoCount & 1) == (i & 1)))) - { + if (s_GetWPADInfoInterval != 0 && ((s_GetWPADInfoInterval == 1 || s_GetWPADInfoCount == i) || + (s_GetWPADInfoInterval <= 3 && (s_GetWPADInfoCount & 1) == (i & 1)))) { getWPADInfoCB(i); } } else if (*connected) { diff --git a/src/nw4r/db/db_assert.cpp b/src/nw4r/db/db_assert.cpp index d466a61f..43bef1ad 100644 --- a/src/nw4r/db/db_assert.cpp +++ b/src/nw4r/db/db_assert.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "nw4r/db/db_assert.h" + +#include "common.h" + namespace nw4r { namespace db { diff --git a/src/nw4r/db/db_console.cpp b/src/nw4r/db/db_console.cpp index cb1a3126..3de39898 100644 --- a/src/nw4r/db/db_console.cpp +++ b/src/nw4r/db/db_console.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "nw4r/db/db_console.h" + +#include "common.h" +#include "nw4r/db/db_directPrint.h" +#include "nw4r/ut/ut_TextWriterBase.h" +#include "rvl/OS.h" // IWYU pragma: export + namespace nw4r { namespace db { @@ -204,8 +206,9 @@ static void DoDrawConsole_(ConsoleHandle console, nw4r::ut::TextWriterBase void Console_DrawDirect(ConsoleHandle console) { if (DirectPrint_IsActive() && console->isVisible) { - DirectPrint_EraseXfb(console->viewPosX - 6, console->viewPosY - 3, console->width * 6 + 12, - console->viewLines * 10 + 4); + DirectPrint_EraseXfb( + console->viewPosX - 6, console->viewPosY - 3, console->width * 6 + 12, console->viewLines * 10 + 4 + ); DoDrawConsole_(console, nullptr); DirectPrint_StoreCache(); } diff --git a/src/nw4r/db/db_directPrint.cpp b/src/nw4r/db/db_directPrint.cpp index 643456b8..eed054d5 100644 --- a/src/nw4r/db/db_directPrint.cpp +++ b/src/nw4r/db/db_directPrint.cpp @@ -1,9 +1,11 @@ -#include -#include -#include -#include -#include +#include "nw4r/db/db_directPrint.h" + +#include "rvl/OS.h" // IWYU pragma: export +#include "rvl/VI.h" +#include "stdio.h" +#include "string.h" + /* @@ -231,7 +233,6 @@ static void DrawStringToXfb_(int posh, int posv, const char *str, bool turnOver, } } - static const char *DrawStringLineToXfb_(int posh, int posv, const char *str, int width) { // Vars from DWARF info char c; @@ -274,7 +275,7 @@ static void DrawCharToXfb_(int posh, int posv, int code) { int wV = GetDotHeight_(); u16 *pixel = - reinterpret_cast(sFrameBufferInfo.frameMemory) + sFrameBufferInfo.frameRow * posv * wV + posh * wH; + reinterpret_cast(sFrameBufferInfo.frameMemory) + sFrameBufferInfo.frameRow * posv * wV + posh * wH; if (posv < 0 || posh < 0) { return; @@ -288,23 +289,23 @@ static void DrawCharToXfb_(int posh, int posv, int code) { fontBits = (fontBits & 0xFC000000) >> 1; } else { fontBits = (twiceBit[fontBits >> 26 & 0x3] << 0 | twiceBit[fontBits >> 28 & 0x3] << 4 | - twiceBit[fontBits >> 30 & 0x3] << 8) + twiceBit[fontBits >> 30 & 0x3] << 8) << 19; } for (int cnth = 0; cnth < 6 * wH; cnth += 2) { u16 pixColor; pixColor = ((fontBits & 0x40000000) ? sFrameBufferColor.colorY256 : 0x0) | - ((fontBits & 0x80000000) ? sFrameBufferColor.colorU4 : 0x20) + - ((fontBits & 0x40000000) ? sFrameBufferColor.colorU2 : 0x40) + - ((fontBits & 0x20000000) ? sFrameBufferColor.colorU4 : 0x20); + ((fontBits & 0x80000000) ? sFrameBufferColor.colorU4 : 0x20) + + ((fontBits & 0x40000000) ? sFrameBufferColor.colorU2 : 0x40) + + ((fontBits & 0x20000000) ? sFrameBufferColor.colorU4 : 0x20); pixel[0] = pixColor; if (wV > 1) { pixel[sFrameBufferInfo.frameRow] = pixColor; } pixColor = ((fontBits & 0x20000000) ? sFrameBufferColor.colorY256 : 0x0) | - ((fontBits & 0x40000000) ? sFrameBufferColor.colorV4 : 0x20) + - ((fontBits & 0x20000000) ? sFrameBufferColor.colorV2 : 0x40) + - ((fontBits & 0x10000000) ? sFrameBufferColor.colorV4 : 0x20); + ((fontBits & 0x40000000) ? sFrameBufferColor.colorV4 : 0x20) + + ((fontBits & 0x20000000) ? sFrameBufferColor.colorV2 : 0x40) + + ((fontBits & 0x10000000) ? sFrameBufferColor.colorV4 : 0x20); pixel[1] = pixColor; if (wV > 1) { pixel[sFrameBufferInfo.frameRow + 1] = pixColor; @@ -316,8 +317,9 @@ static void DrawCharToXfb_(int posh, int posv, int code) { } } -void detail::DirectPrint_DrawStringToXfb(int posh, int posv, const char *format, __va_list_struct *args, bool turnOver, - bool backErase) { +void detail::DirectPrint_DrawStringToXfb( + int posh, int posv, const char *format, __va_list_struct *args, bool turnOver, bool backErase +) { // Vars from dwarf info char string[0x100]; int length = vsnprintf(string, 0x100, format, args); @@ -356,20 +358,11 @@ void *detail::DirectPrint_SetupFB(const _GXRenderModeObj *rmode) { if (!frameMemory) { if (!rmode) { switch ((u32)VIGetTvFormat()) { - case 0: - rmode = &GXNtsc480IntDf; - break; - case 1: - rmode = &GXPal528IntDf; - break; - case 5: - rmode = &GXEurgb60Hz480IntDf; - break; - case 2: - rmode = &GXMpal480IntDf; - break; - default: - break; + case 0: rmode = &GXNtsc480IntDf; break; + case 1: rmode = &GXPal528IntDf; break; + case 5: rmode = &GXEurgb60Hz480IntDf; break; + case 2: rmode = &GXMpal480IntDf; break; + default: break; } } frameMemory = CreateFB_(rmode); diff --git a/src/nw4r/db/db_exception.cpp b/src/nw4r/db/db_exception.cpp index c26370e1..700e93ec 100644 --- a/src/nw4r/db/db_exception.cpp +++ b/src/nw4r/db/db_exception.cpp @@ -1,9 +1,11 @@ -#include -#include -#include -#include -#include -#include +#include "nw4r/db/db_exception.h" + +#include "nw4r/db/db_directPrint.h" +#include "nw4r/db/db_mapFile.h" +#include "rvl/GX.h" // IWYU pragma: export +#include "rvl/VI.h" // IWYU pragma: export +#include "string.h" + namespace nw4r { namespace db { @@ -25,28 +27,28 @@ struct ExceptionStruct { static OSMessage sMessageBuffer[1]; static struct ExceptionStruct sException; -static u8 sThreadBuffer[0x4000] ALIGN(0x20); +static u8 sThreadBuffer[0x4000] ALIGN_DECL(0x20); extern "C" u32 lbl_80574960; const char *CPU_EXP_NAME[] = { - "SYSTEM RESET", - "MACHINE CHECK", - "DSI", - "ISI", - "EXTERNAL INTERRUPT", - "ALIGNMENT", - "PROGRAM", - "FLOATING POINT", - "DECREMENTER", - "SYSTEM CALL", - "TRACE", - "PERFORMACE MONITOR", - "BREAK POINT", - "SYSTEM INTERRUPT", - "THERMAL INTERRUPT", - "PROTECTION", - "FLOATING POINT", + "SYSTEM RESET", + "MACHINE CHECK", + "DSI", + "ISI", + "EXTERNAL INTERRUPT", + "ALIGNMENT", + "PROGRAM", + "FLOATING POINT", + "DECREMENTER", + "SYSTEM CALL", + "TRACE", + "PERFORMACE MONITOR", + "BREAK POINT", + "SYSTEM INTERRUPT", + "THERMAL INTERRUPT", + "PROTECTION", + "FLOATING POINT", }; void *RunThread_(void *); @@ -342,8 +344,10 @@ void ShowMainInfo_(u16 error, const OSContext *context, u32 dsisr, u32 dar) { void ShowGPR_(const OSContext *ctx) { Exception_Printf_("-------------------------------- GPR\n"); for (int i = 0; i < 10; i++) { - Exception_Printf_("R%02d:%08XH R%02d:%08XH R%02d:%08XH\n", i, ctx->gprs[i], i + 11, ctx->gprs[i + 11], i + 22, - ctx->gprs[i + 22]); + Exception_Printf_( + "R%02d:%08XH R%02d:%08XH R%02d:%08XH\n", i, ctx->gprs[i], i + 11, ctx->gprs[i + 11], i + 22, + ctx->gprs[i + 22] + ); } Exception_Printf_("R%02d:%08XH R%02d:%08XH\n", 10, ctx->gprs[10], 21, ctx->gprs[21]); } diff --git a/src/nw4r/db/db_mapFile.cpp b/src/nw4r/db/db_mapFile.cpp index 6b73fbc0..2e3c2f41 100644 --- a/src/nw4r/db/db_mapFile.cpp +++ b/src/nw4r/db/db_mapFile.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "nw4r/db/db_mapFile.h" + +#include "rvl/DVD.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export +#include "stdio.h" + namespace nw4r { namespace db { @@ -10,7 +12,7 @@ static u32 sFileLength; static MapFile *sMapFileList = nullptr; static u8 (*GetCharPtr_)(const u8 *) = nullptr; -static u8 sMapBuf[512] ALIGN(32); +static u8 sMapBuf[512] ALIGN_DECL(32); static DVDFileInfo sFileInfo; static s32 sMapBufMaxSize = 0x200; diff --git a/src/nw4r/lyt/lyt_animation.cpp b/src/nw4r/lyt/lyt_animation.cpp index 0767b4a9..712bbe0b 100644 --- a/src/nw4r/lyt/lyt_animation.cpp +++ b/src/nw4r/lyt/lyt_animation.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "nw4r/lyt/lyt_animation.h" + +#include "nw4r/lyt/lyt_group.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/lyt/lyt_pane.h" + namespace nw4r { namespace lyt { @@ -88,7 +90,7 @@ f32 GetHermiteCurveValue(f32 frame, const res::HermiteKey *keyArray, u32 keySize f32 t1t1t1t2t2t2 = t1t1t1t2t2 * t2; return v0 * (2.0f * t1t1t1t2t2t2 - 3.0f * t1t1t2t2 + 1.0f) + v1 * (-2.0f * t1t1t1t2t2t2 + 3.0f * t1t1t2t2) + - s0 * (t1 + (t1t1t1t2t2 - 2.0f * t1t1t2)) + s1 * (t1t1t1t2t2 - t1t1t2); + s0 * (t1 + (t1t1t1t2t2 - 2.0f * t1t1t2)) + s1 * (t1t1t1t2t2 - t1t1t2); } // AnimatePainSRT__27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt4PanePCQ44nw4r3lyt3res13AnimationInfoPCUlf @@ -96,7 +98,7 @@ f32 GetHermiteCurveValue(f32 frame, const res::HermiteKey *keyArray, u32 keySize void AnimatePaneSRT(Pane *pPane, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); const res::HermiteKey *keys = detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); pPane->SetSRTElement(pAnimTarget->target, GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum)); } @@ -107,7 +109,7 @@ void AnimatePaneSRT(Pane *pPane, const res::AnimationInfo *pAnimInfo, const u32 void AnimateVisibility(Pane *pPane, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); const res::StepKey *keys = detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); pPane->SetVisible(GetStepCurveValue(frame, keys, pAnimTarget->keyNum) != 0); } @@ -118,7 +120,7 @@ void AnimateVisibility(Pane *pPane, const res::AnimationInfo *pAnimInfo, const u void AnimateVertexColor(Pane *pPane, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); const res::HermiteKey *keys = detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); f32 value = GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum); value += 0.5f; @@ -130,11 +132,12 @@ void AnimateVertexColor(Pane *pPane, const res::AnimationInfo *pAnimInfo, const // AnimateMaterialColor__27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlf // AnimateMaterialColor__Q34nw4r3lyt27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlf -void AnimateMaterialColor(Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, - f32 frame) { +void AnimateMaterialColor( + Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame +) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); const res::HermiteKey *keys = detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); f32 value = GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum); value += 0.5f; @@ -147,28 +150,31 @@ void AnimateMaterialColor(Material *pMaterial, const res::AnimationInfo *pAnimIn // AnimateTextureSRT__27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlf // AnimateTextureSRT__Q34nw4r3lyt27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlf -void AnimateTextureSRT(Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, - f32 frame) { +void AnimateTextureSRT( + Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame +) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); if (pAnimTarget->id < pMaterial->GetTexSRTCap()) { const res::HermiteKey *keys = - detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); + detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); - pMaterial->SetTexSRTElement(pAnimTarget->id, pAnimTarget->target, - GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum)); + pMaterial->SetTexSRTElement( + pAnimTarget->id, pAnimTarget->target, GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum) + ); } } } // AnimateTexturePattern__27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlfPPv // AnimateTexturePattern__Q34nw4r3lyt27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlfPPv -void AnimateTexturePattern(Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, - f32 frame, void **tpls) { +void AnimateTexturePattern( + Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame, void **tpls +) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); if (pAnimTarget->id < pMaterial->GetTextureNum()) { const res::StepKey *keys = detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); u16 fileIdx = GetStepCurveValue(frame, keys, pAnimTarget->keyNum); @@ -181,16 +187,18 @@ void AnimateTexturePattern(Material *pMaterial, const res::AnimationInfo *pAnimI // AnimateIndTexSRT__27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlf // AnimateIndTexSRT__Q34nw4r3lyt27@unnamed@lyt_animation_cpp@FPQ34nw4r3lyt8MaterialPCQ44nw4r3lyt3res13AnimationInfoPCUlf -void AnimateIndTexSRT(Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, - f32 frame) { +void AnimateIndTexSRT( + Material *pMaterial, const res::AnimationInfo *pAnimInfo, const u32 *animTargetOffsets, f32 frame +) { for (int i = 0; i < pAnimInfo->num; i++) { const res::AnimationTarget *pAnimTarget = - detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); + detail::ConvertOffsToPtr(pAnimInfo, animTargetOffsets[i]); if (pAnimTarget->id < pMaterial->GetIndTexSRTCap()) { const res::HermiteKey *keys = - detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); - pMaterial->SetIndTexSRTElement(pAnimTarget->id, pAnimTarget->target, - GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum)); + detail::ConvertOffsToPtr(pAnimTarget, pAnimTarget->keyOffset); + pMaterial->SetIndTexSRTElement( + pAnimTarget->id, pAnimTarget->target, GetHermiteCurveValue(frame, keys, pAnimTarget->keyNum) + ); } } } @@ -275,7 +283,7 @@ void AnimTransformBasic::Bind(Pane *pPane, bool bRecursive, bool bDisable) { const u32 *animContOffsets = detail::ConvertOffsToPtr(mpRes, mpRes->animContOffsetsOffset); for (u16 i = 0; i < mpRes->animContNum; i++) { const res::AnimationContent &animCont = - *detail::ConvertOffsToPtr(mpRes, animContOffsets[i]); + *detail::ConvertOffsToPtr(mpRes, animContOffsets[i]); if (animCont.type == 0) { Pane *pFindPane = pPane->FindPaneByName(animCont.name, bRecursive); if (pFindPane && !IsBindAnimation(pFindPane, this)) { @@ -303,7 +311,7 @@ void AnimTransformBasic::Bind(Material *pMaterial, bool bDisable) { const u32 *animContOffsets = detail::ConvertOffsToPtr(mpRes, mpRes->animContOffsetsOffset); for (u16 i = 0; i < mpRes->animContNum; i++) { const res::AnimationContent &animCont = - *detail::ConvertOffsToPtr(mpRes, animContOffsets[i]); + *detail::ConvertOffsToPtr(mpRes, animContOffsets[i]); if (animCont.type == 1) { if (detail::EqualsMaterialName(pMaterial->GetName(), animCont.name) && !IsBindAnimation(pMaterial, this)) { pCrAnimLink = Bind(pMaterial, pCrAnimLink, i, bDisable); @@ -323,18 +331,12 @@ void AnimTransformBasic::Animate(u32 idx, Pane *pPane) { for (int i = 0; i < pAnimCont->num; i++) { const res::AnimationInfo *pAnimInfo = - detail::ConvertOffsToPtr(pAnimCont, animInfoOffsets[i]); + detail::ConvertOffsToPtr(pAnimCont, animInfoOffsets[i]); const u32 *animTargetOffsets = detail::ConvertOffsToPtr(pAnimInfo, sizeof(res::AnimationInfo)); switch (pAnimInfo->kind) { - case 'RLPA': - AnimatePaneSRT(pPane, pAnimInfo, animTargetOffsets, mFrame); - break; - case 'RLVI': - AnimateVisibility(pPane, pAnimInfo, animTargetOffsets, mFrame); - break; - case 'RLVC': - AnimateVertexColor(pPane, pAnimInfo, animTargetOffsets, mFrame); - break; + case 'RLPA': AnimatePaneSRT(pPane, pAnimInfo, animTargetOffsets, mFrame); break; + case 'RLVI': AnimateVisibility(pPane, pAnimInfo, animTargetOffsets, mFrame); break; + case 'RLVC': AnimateVertexColor(pPane, pAnimInfo, animTargetOffsets, mFrame); break; } } } @@ -347,23 +349,17 @@ void AnimTransformBasic::Animate(u32 idx, Material *pMaterial) { for (int i = 0; i < pAnimCont->num; i++) { const res::AnimationInfo *pAnimInfo = - detail::ConvertOffsToPtr(pAnimCont, animInfoOffsets[i]); + detail::ConvertOffsToPtr(pAnimCont, animInfoOffsets[i]); const u32 *animTargetOffsets = detail::ConvertOffsToPtr(pAnimInfo, sizeof(res::AnimationInfo)); switch (pAnimInfo->kind) { - case 'RLMC': - AnimateMaterialColor(pMaterial, pAnimInfo, animTargetOffsets, mFrame); - break; - case 'RLTS': - AnimateTextureSRT(pMaterial, pAnimInfo, animTargetOffsets, mFrame); - break; - case 'RLTP': - if (mpFileResAry) { - AnimateTexturePattern(pMaterial, pAnimInfo, animTargetOffsets, mFrame, mpFileResAry); - } - break; - case 'RLIM': - AnimateIndTexSRT(pMaterial, pAnimInfo, animTargetOffsets, mFrame); - break; + case 'RLMC': AnimateMaterialColor(pMaterial, pAnimInfo, animTargetOffsets, mFrame); break; + case 'RLTS': AnimateTextureSRT(pMaterial, pAnimInfo, animTargetOffsets, mFrame); break; + case 'RLTP': + if (mpFileResAry) { + AnimateTexturePattern(pMaterial, pAnimInfo, animTargetOffsets, mFrame, mpFileResAry); + } + break; + case 'RLIM': AnimateIndTexSRT(pMaterial, pAnimInfo, animTargetOffsets, mFrame); break; } } } @@ -411,18 +407,12 @@ void AnimResource::Set(const void *animResBuf) { if (detail::TestFileVersion(*pFileHeader)) { mpFileHeader = pFileHeader; const res::DataBlockHeader *pDataBlockHead = - detail::ConvertOffsToPtr(mpFileHeader, mpFileHeader->headerSize); + detail::ConvertOffsToPtr(mpFileHeader, mpFileHeader->headerSize); for (int i = 0; i < mpFileHeader->dataBlocks; i++) { switch (detail::GetSignatureInt(pDataBlockHead->kind)) { - case 'pat1': - mpTagBlock = (res::AnimationTagBlock *)pDataBlockHead; - break; - case 'pah1': - mpShareBlock = (res::AnimationShareBlock *)pDataBlockHead; - break; - case 'pai1': - mpResBlock = (res::AnimationBlock *)pDataBlockHead; - break; + case 'pat1': mpTagBlock = (res::AnimationTagBlock *)pDataBlockHead; break; + case 'pah1': mpShareBlock = (res::AnimationShareBlock *)pDataBlockHead; break; + case 'pai1': mpResBlock = (res::AnimationBlock *)pDataBlockHead; break; } pDataBlockHead = detail::ConvertOffsToPtr(pDataBlockHead, pDataBlockHead->size); } @@ -450,7 +440,7 @@ u16 AnimResource::GetGroupNum() const { const AnimationGroupRef *AnimResource::GetGroupArray() const { if (mpTagBlock) { const AnimationGroupRef *groups = - detail::ConvertOffsToPtr(mpTagBlock, mpTagBlock->groupsOffset); + detail::ConvertOffsToPtr(mpTagBlock, mpTagBlock->groupsOffset); return groups; } return nullptr; @@ -486,7 +476,7 @@ u16 AnimResource::CalcAnimationNum(Pane *pPane, bool bRecursive) const { const u32 *animContOffsets = detail::ConvertOffsToPtr(mpResBlock, mpResBlock->animContOffsetsOffset); for (u16 i = 0; i < mpResBlock->animContNum; i++) { const res::AnimationContent &animCont = - *detail::ConvertOffsToPtr(mpResBlock, animContOffsets[i]); + *detail::ConvertOffsToPtr(mpResBlock, animContOffsets[i]); if (animCont.type == 0) { Pane *pFindPane = pPane->FindPaneByName(animCont.name, bRecursive); if (pFindPane) { @@ -507,7 +497,7 @@ u16 AnimResource::CalcAnimationNum(Group *pGroup, bool bRecursive) const { u16 linkNum = 0; ut::LinkList *paneList = pGroup->GetPaneList(); for (ut::LinkList::Iterator it = paneList->GetBeginIter(); it != paneList->GetEndIter(); - it++) { + it++) { linkNum += CalcAnimationNum(it->mTarget, bRecursive); } return linkNum; @@ -520,7 +510,7 @@ u16 AnimPaneTree::FindAnimContent(const res::AnimationBlock *pAnimBlock, const c const u32 *animContOffsets = detail::ConvertOffsToPtr(pAnimBlock, pAnimBlock->animContOffsetsOffset); for (u16 i = 0; i < pAnimBlock->animContNum; i++) { const res::AnimationContent *pAnimCont = - detail::ConvertOffsToPtr(pAnimBlock, animContOffsets[i]); + detail::ConvertOffsToPtr(pAnimBlock, animContOffsets[i]); if (pAnimCont->type == animContType && EqualsMaterialName(pAnimCont->name, animContName)) { return i; } diff --git a/src/nw4r/lyt/lyt_arcResourceAccessor.cpp b/src/nw4r/lyt/lyt_arcResourceAccessor.cpp index 89cd84e5..96416ced 100644 --- a/src/nw4r/lyt/lyt_arcResourceAccessor.cpp +++ b/src/nw4r/lyt/lyt_arcResourceAccessor.cpp @@ -1,11 +1,15 @@ #include "nw4r/lyt/lyt_arcResourceAccessor.h" + +#include "common.h" +#include "extras.h" #include "nw4r/ut/ut_Font.h" + namespace { // FindNameResource__37@unnamed@lyt_arcResourceAccessor_cpp@FP9ARCHandlePCc -DECOMP_DONT_INLINE s32 FindNameResource(ARCHandle *pArcHandle, const char *resName) { +DONT_INLINE s32 FindNameResource(ARCHandle *pArcHandle, const char *resName) { s32 entryNum = -1; ARCDir dir; ARCDirEntry dirEntry; diff --git a/src/nw4r/lyt/lyt_bounding.cpp b/src/nw4r/lyt/lyt_bounding.cpp index 296d22f4..21f25bca 100644 --- a/src/nw4r/lyt/lyt_bounding.cpp +++ b/src/nw4r/lyt/lyt_bounding.cpp @@ -1,4 +1,4 @@ -#include +#include "nw4r/lyt/lyt_bounding.h" namespace nw4r { diff --git a/src/nw4r/lyt/lyt_common.cpp b/src/nw4r/lyt/lyt_common.cpp index d5fc6b8b..62bab259 100644 --- a/src/nw4r/lyt/lyt_common.cpp +++ b/src/nw4r/lyt/lyt_common.cpp @@ -1,9 +1,10 @@ #include "nw4r/lyt/lyt_common.h" + #include "nw4r/lyt/lyt_layout.h" -#include "nw4r/lyt/lyt_pane.h" #include "nw4r/ut/ut_Color.h" #include "nw4r/ut/ut_algorithm.h" + namespace nw4r { namespace lyt { using namespace math; @@ -84,9 +85,8 @@ bool detail::IsModulateVertexColor(ut::Color *vtxColors, u8 glbAlpha) { return true; } - if ((vtxColors != NULL) && - ((vtxColors[0] != 0xFFFFFFFF) || (vtxColors[1] != 0xFFFFFFFF) || (vtxColors[2] != 0xFFFFFFFF) || - (vtxColors[3] != 0xFFFFFFFF))) { + if ((vtxColors != NULL) && ((vtxColors[0] != 0xFFFFFFFF) || (vtxColors[1] != 0xFFFFFFFF) || + (vtxColors[2] != 0xFFFFFFFF) || (vtxColors[3] != 0xFFFFFFFF))) { return true; } else { return false; @@ -133,8 +133,10 @@ void detail::SetVertexFormat(bool bModulate, u8 textCoordNum) { } // DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5Color -void detail::DrawQuad(const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords, - const ut::Color *vtxColors) { +void detail::DrawQuad( + const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords, + const ut::Color *vtxColors +) { GXBegin(GX_QUADS, GX_VTXFMT0, 4); GXPosition2f32(basePt.x, basePt.y); @@ -171,8 +173,10 @@ void detail::DrawQuad(const math::VEC2 &basePt, const Size &size, u8 texCoordNum } // DrawQuad__Q34nw4r3lyt6detailFRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeUcPA4_CQ34nw4r4math4VEC2PCQ34nw4r2ut5ColorUc -void detail::DrawQuad(const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords, - const ut::Color *vtxColors, u8 alpha) { +void detail::DrawQuad( + const math::VEC2 &basePt, const Size &size, u8 texCoordNum, const TexCoordData *texCoords, + const ut::Color *vtxColors, u8 alpha +) { ut::Color wkVtxColors[4]; if (vtxColors) { MultipleAlpha(wkVtxColors, vtxColors, alpha); diff --git a/src/nw4r/lyt/lyt_drawInfo.cpp b/src/nw4r/lyt/lyt_drawInfo.cpp index 83b25d92..fb999a71 100644 --- a/src/nw4r/lyt/lyt_drawInfo.cpp +++ b/src/nw4r/lyt/lyt_drawInfo.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "nw4r/lyt/lyt_drawInfo.h" + +#include "string.h" + namespace nw4r { namespace lyt { diff --git a/src/nw4r/lyt/lyt_group.cpp b/src/nw4r/lyt/lyt_group.cpp index 75876728..b85c93d6 100644 --- a/src/nw4r/lyt/lyt_group.cpp +++ b/src/nw4r/lyt/lyt_group.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "nw4r/lyt/lyt_group.h" + +#include "nw4r/lyt/lyt_layout.h" + namespace nw4r { @@ -64,7 +66,7 @@ void GroupContainer::AppendGroup(Group *pGroup) { // FindGroupByName__Q34nw4r3lyt14GroupContainerFPCc Group *GroupContainer::FindGroupByName(const char *findName) { for (ut::LinkList::Iterator it = this->mGroupList.GetBeginIter(); it != this->mGroupList.GetEndIter(); - it++) { + it++) { if (detail::EqualsResName(it->GetName(), findName)) { return &*it; } diff --git a/src/nw4r/lyt/lyt_init.cpp b/src/nw4r/lyt/lyt_init.cpp index 9acb89c0..15cbed83 100644 --- a/src/nw4r/lyt/lyt_init.cpp +++ b/src/nw4r/lyt/lyt_init.cpp @@ -1,4 +1,4 @@ -#include +#include "rvl/OS.h" // IWYU pragma: export namespace { const char *NW4R_LYT_Version_ = "<< NW4R - LYT \tfinal build: Mar 15 2010 02:17:33 (0x4302_158) >>"; } diff --git a/src/nw4r/lyt/lyt_layout.cpp b/src/nw4r/lyt/lyt_layout.cpp index 9897363f..dcacf110 100644 --- a/src/nw4r/lyt/lyt_layout.cpp +++ b/src/nw4r/lyt/lyt_layout.cpp @@ -1,13 +1,15 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "nw4r/lyt/lyt_layout.h" + +#include "nw4r/lyt/lyt_animation.h" +#include "nw4r/lyt/lyt_bounding.h" +#include "nw4r/lyt/lyt_group.h" +#include "nw4r/lyt/lyt_picture.h" +#include "nw4r/lyt/lyt_textBox.h" +#include "nw4r/lyt/lyt_utils.h" +#include "nw4r/lyt/lyt_window.h" +#include "nw4r/ut/ut_RuntimeTypeInfo.h" +#include "nw4r/ut/ut_TagProcessorBase.h" + namespace nw4r { @@ -25,26 +27,28 @@ void SetTagProcessorImpl(Pane *pPane, ut::TagProcessorBase *pTagProcess pTextBox->SetTagProcessor(pTagProcessor); } for (ut::LinkList::Iterator it = pPane->GetChildList()->GetBeginIter(); - it != pPane->GetChildList()->GetEndIter(); ++it) { + it != pPane->GetChildList()->GetEndIter(); ++it) { SetTagProcessorImpl(&*it, pTagProcessor); } } // IsIncludeAnimationGroupRef__Q34nw4r3lyt24@unnamed@lyt_layout_cpp@FPQ34nw4r3lyt14GroupContainerPCQ34nw4r3lyt17AnimationGroupRefUsbPQ34nw4r3lyt4Pane // Doesnt match DWARF Vars, but matches -bool IsIncludeAnimationGroupRef(GroupContainer *pGroupContainer, const AnimationGroupRef *groupRefs, u16 bindGroupNum, - bool bDescendingBind, Pane *pTargetPane) { +bool IsIncludeAnimationGroupRef( + GroupContainer *pGroupContainer, const AnimationGroupRef *groupRefs, u16 bindGroupNum, bool bDescendingBind, + Pane *pTargetPane +) { for (u16 grpIdx = 0; grpIdx < bindGroupNum; grpIdx++) { Group *pGroup = pGroupContainer->FindGroupByName(groupRefs[grpIdx].GetName()); for (ut::LinkList::Iterator paneList = pGroup->GetPaneList()->GetBeginIter(); - paneList != pGroup->GetPaneList()->GetEndIter(); paneList++) { + paneList != pGroup->GetPaneList()->GetEndIter(); paneList++) { const Pane *t = paneList->mTarget; if (t == pTargetPane) { return true; } if (bDescendingBind) { for (const Pane *pParentPane = pTargetPane->GetParent(); pParentPane != nullptr; - pParentPane = pParentPane->GetParent()) { + pParentPane = pParentPane->GetParent()) { if (t == pParentPane) { return true; } @@ -94,68 +98,67 @@ bool Layout::Build(const void *lytResBuf, ResourceAccessor *pResAcsr) { for (int i = 0; i < pFileHead->dataBlocks; i++) { const res::DataBlockHeader *pDataBlockHead = (const res::DataBlockHeader *)dataPtr; switch (detail::GetSignatureInt(pDataBlockHead->kind)) { - case 'lyt1': // Main Layout - { - const res::Layout *pResLyt = ((const res::Layout *)dataPtr); - mLayoutSize = pResLyt->layoutSize; - } break; - case 'txl1': // Texture List - resBlockSet.pTextureList = (const res::TextureList *)dataPtr; - break; - case 'fnl1': // Font List - resBlockSet.pFontList = (const res::FontList *)dataPtr; - break; - case 'mat1': // Material - resBlockSet.pMaterialList = (const res::MaterialList *)dataPtr; - break; - case 'wnd1': // Window - case 'pan1': // Pane - case 'pic1': // Picture - case 'txt1': // Text Box - case 'bnd1': // Boundary Pane - { - Pane *pPane = BuildPaneObj(detail::GetSignatureInt(pDataBlockHead->kind), dataPtr, resBlockSet); - if (pPane) { - if (mpRootPane == nullptr) { - mpRootPane = pPane; - } - if (pParentPane) { - pParentPane->AppendChild(pPane); + case 'lyt1': // Main Layout + { + const res::Layout *pResLyt = ((const res::Layout *)dataPtr); + mLayoutSize = pResLyt->layoutSize; + } break; + case 'txl1': // Texture List + resBlockSet.pTextureList = (const res::TextureList *)dataPtr; + break; + case 'fnl1': // Font List + resBlockSet.pFontList = (const res::FontList *)dataPtr; + break; + case 'mat1': // Material + resBlockSet.pMaterialList = (const res::MaterialList *)dataPtr; + break; + case 'wnd1': // Window + case 'pan1': // Pane + case 'pic1': // Picture + case 'txt1': // Text Box + case 'bnd1': // Boundary Pane + { + Pane *pPane = BuildPaneObj(detail::GetSignatureInt(pDataBlockHead->kind), dataPtr, resBlockSet); + if (pPane) { + if (mpRootPane == nullptr) { + mpRootPane = pPane; + } + if (pParentPane) { + pParentPane->AppendChild(pPane); + } + pLastPane = pPane; } - pLastPane = pPane; - } - } break; - case 'usd1': // User Data - pLastPane->SetExtUserDataList((const res::ExtUserDataList *)dataPtr); - break; - case 'pas1': // PaneChildren Start - pParentPane = pLastPane; - break; - case 'pae1': // PaneChildren End - pLastPane = pParentPane; - pParentPane = pLastPane->GetParent(); - break; - case 'grp1': // Group - if (!bReadRootGroup) { - bReadRootGroup = true; - mpGroupContainer = NewObj(); - } else { - if (mpGroupContainer && groupNestLevel == 1) { - Group *pGroup = NewObj((const res::Group *)dataPtr, mpRootPane); - if (pGroup) { - mpGroupContainer->AppendGroup(pGroup); + } break; + case 'usd1': // User Data + pLastPane->SetExtUserDataList((const res::ExtUserDataList *)dataPtr); + break; + case 'pas1': // PaneChildren Start + pParentPane = pLastPane; + break; + case 'pae1': // PaneChildren End + pLastPane = pParentPane; + pParentPane = pLastPane->GetParent(); + break; + case 'grp1': // Group + if (!bReadRootGroup) { + bReadRootGroup = true; + mpGroupContainer = NewObj(); + } else { + if (mpGroupContainer && groupNestLevel == 1) { + Group *pGroup = NewObj((const res::Group *)dataPtr, mpRootPane); + if (pGroup) { + mpGroupContainer->AppendGroup(pGroup); + } } } - } - break; - case 'grs1': // Group Children Start - groupNestLevel++; - break; - case 'gre1': // Group Children End - groupNestLevel--; - break; - default: - break; + break; + case 'grs1': // Group Children Start + groupNestLevel++; + break; + case 'gre1': // Group Children End + groupNestLevel--; + break; + default: break; } dataPtr = ((u8 *)dataPtr + pDataBlockHead->size); } @@ -252,11 +255,13 @@ bool Layout::BindAnimationAuto(const AnimResource &animRes, ResourceAccessor *pR Group *pGroup = mpGroupContainer->FindGroupByName(animSharInfoAry[i].GetTargetGroupName()); ut::LinkList *paneList = pGroup->GetPaneList(); for (ut::LinkList::Iterator it = paneList->GetBeginIter(); - it != paneList->GetEndIter(); it++) { + it != paneList->GetEndIter(); it++) { if (it->mTarget != pSrcPane) { if (bindGroupNum != 0) { - bool bInclude = IsIncludeAnimationGroupRef(mpGroupContainer, animRes.GetGroupArray(), - bindGroupNum, animRes.IsDescendingBind(), it->mTarget); + bool bInclude = IsIncludeAnimationGroupRef( + mpGroupContainer, animRes.GetGroupArray(), bindGroupNum, animRes.IsDescendingBind(), + it->mTarget + ); if (!bInclude) { continue; } @@ -318,28 +323,27 @@ Pane *Layout::BuildPaneObj(s32 kind, const void *dataPtr, const ResBlockSet &res // Had them as left over from editing and somehow when removing them it just broke Build. // Probably some analysis depth as 3 break statements do it switch (kind) { - case 'pan1': { - const res::Pane *pResPane = (const res::Pane *)dataPtr; - return NewObj(pResPane); - } break; - case 'pic1': { - const res::Picture *pResPic = (const res::Picture *)dataPtr; - return NewObj(pResPic, resBlockSet); - } break; - case 'txt1': { - const res::TextBox *pBlock = (const res::TextBox *)dataPtr; - return NewObj(pBlock, resBlockSet); - } break; - case 'wnd1': { - const res::Window *pBlock = (const res::Window *)dataPtr; - return NewObj(pBlock, resBlockSet); - } break; - case 'bnd1': { - const res::Bounding *pResBounding = (const res::Bounding *)dataPtr; - return NewObj(pResBounding, resBlockSet); - } break; - default: - return nullptr; + case 'pan1': { + const res::Pane *pResPane = (const res::Pane *)dataPtr; + return NewObj(pResPane); + } break; + case 'pic1': { + const res::Picture *pResPic = (const res::Picture *)dataPtr; + return NewObj(pResPic, resBlockSet); + } break; + case 'txt1': { + const res::TextBox *pBlock = (const res::TextBox *)dataPtr; + return NewObj(pBlock, resBlockSet); + } break; + case 'wnd1': { + const res::Window *pBlock = (const res::Window *)dataPtr; + return NewObj(pBlock, resBlockSet); + } break; + case 'bnd1': { + const res::Bounding *pResBounding = (const res::Bounding *)dataPtr; + return NewObj(pResBounding, resBlockSet); + } break; + default: return nullptr; } } diff --git a/src/nw4r/lyt/lyt_material.cpp b/src/nw4r/lyt/lyt_material.cpp index 55b9be64..f3d6db17 100644 --- a/src/nw4r/lyt/lyt_material.cpp +++ b/src/nw4r/lyt/lyt_material.cpp @@ -1,7 +1,9 @@ -#include -#include -#include +#include "nw4r/lyt/lyt_material.h" + +#include "nw4r/lyt/lyt_layout.h" +#include "string.h" + void float_ordering(u16 a) { 0.5f; @@ -72,20 +74,11 @@ void CalcIndTexMtx(f32 (*mtx)[3], const TexSRT &texSRT) { void SetColorComponentValue(ut::Color *pCol, u32 compIdx, s16 value) { u8 u8Val = ut::Min(ut::Max(value, 0), 0xFF); switch (compIdx % 4) { - case 0: - pCol->r = u8Val; - break; - case 1: - pCol->g = u8Val; - break; - case 2: - pCol->b = u8Val; - break; - case 3: - pCol->a = u8Val; - break; - default: - break; + case 0: pCol->r = u8Val; break; + case 1: pCol->g = u8Val; break; + case 2: pCol->b = u8Val; break; + case 3: pCol->a = u8Val; break; + default: break; } } @@ -255,19 +248,21 @@ Material::Material(const res::Material *pRes, const ResBlockSet &resBlockSet) : u8 indStageNum = ut::Min(pRes->resNum.GetIndTexStageNum(), 4); u8 tevStageNum = ut::Min(pRes->resNum.GetTevStageNum(), 16); - ReserveGXMem(texMapNum, texSRTNum, texCoordGenNum, tevStageNum, allocTevSwap, indStageNum, indTexSRTNum, - allocChanCtrl, allocMatCol, allocAlpComp, allocBlendMode); + ReserveGXMem( + texMapNum, texSRTNum, texCoordGenNum, tevStageNum, allocTevSwap, indStageNum, indTexSRTNum, allocChanCtrl, + allocMatCol, allocAlpComp, allocBlendMode + ); if (mpGXMem) { SetTextureNum(texMapNum); if (texMapNum != 0) { const res::Texture *textures = - detail::ConvertOffsToPtr(resBlockSet.pTextureList, sizeof(res::TextureList)); + detail::ConvertOffsToPtr(resBlockSet.pTextureList, sizeof(res::TextureList)); TexMap *texMaps = GetTexMapAry(); u8 di = 0; for (u8 si = 0; si < texMapNum; di++, si++) { const char *fileName = - detail::ConvertOffsToPtr(textures, textures[pResTexMap[si].texIdx].nameStrOffset); + detail::ConvertOffsToPtr(textures, textures[pResTexMap[si].texIdx].nameStrOffset); void *pTplRes = resBlockSet.pResAccessor->GetResource('timg', fileName, nullptr); texMaps[di].ReplaceImage((TPLPalette *)pTplRes, 0); texMaps[di].SetWrapMode(pResTexMap[si].GetWarpModeS(), pResTexMap[si].GetWarpModeT()); @@ -387,17 +382,19 @@ void Material::InitBitGXNums(detail::BitGXNums *ptr) { } // ReserveGXMem__Q34nw4r3lyt8MaterialFUcUcUcUcbUcUcbbbb -void Material::ReserveGXMem(u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, - u8 indStageNum, u8 indSRTNum, bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode) { +void Material::ReserveGXMem( + u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 tevStageNum, bool allocTevSwap, u8 indStageNum, u8 indSRTNum, + bool allocChanCtrl, bool allocMatCol, bool allocAlpComp, bool allocBlendMode +) { int tevSwapNum = allocTevSwap; int chanCtrlNum = allocChanCtrl; int matColNum = allocMatCol; int alpCompNum = allocAlpComp; int blendModeNum = allocBlendMode; if (mGXMemCap.texMap < texMapNum || mGXMemCap.texSRT < texSRTNum || mGXMemCap.texCoordGen < texCoordGenNum || - mGXMemCap.tevStage < tevStageNum || mGXMemCap.tevSwap < tevSwapNum || mGXMemCap.indStage < indStageNum || - mGXMemCap.indSRT < indSRTNum || mGXMemCap.chanCtrl < chanCtrlNum || mGXMemCap.matCol < matColNum || - mGXMemCap.alpComp < alpCompNum || mGXMemCap.blendMode < blendModeNum) { + mGXMemCap.tevStage < tevStageNum || mGXMemCap.tevSwap < tevSwapNum || mGXMemCap.indStage < indStageNum || + mGXMemCap.indSRT < indSRTNum || mGXMemCap.chanCtrl < chanCtrlNum || mGXMemCap.matCol < matColNum || + mGXMemCap.alpComp < alpCompNum || mGXMemCap.blendMode < blendModeNum) { if (mpGXMem) { Layout::FreeMemory(mpGXMem); mpGXMem = nullptr; @@ -405,9 +402,10 @@ void Material::ReserveGXMem(u8 texMapNum, u8 texSRTNum, u8 texCoordGenNum, u8 te InitBitGXNums(&mGXMemNum); } mpGXMem = Layout::AllocMemory( - (texCoordGenNum + chanCtrlNum + matColNum + tevSwapNum + alpCompNum + blendModeNum + indStageNum) * 4 + - texMapNum * sizeof(TexMap) + tevStageNum * sizeof(TevStage) + texSRTNum * sizeof(TexSRT) + - indSRTNum * sizeof(TexSRT)); + (texCoordGenNum + chanCtrlNum + matColNum + tevSwapNum + alpCompNum + blendModeNum + indStageNum) * 4 + + texMapNum * sizeof(TexMap) + tevStageNum * sizeof(TevStage) + texSRTNum * sizeof(TexSRT) + + indSRTNum * sizeof(TexSRT) + ); if (mpGXMem) { mGXMemCap.texMap = texMapNum; @@ -671,8 +669,9 @@ bool Material::SetupGX(bool bModVtxCol, u8 alpha) { bUseTexMtx[GetTexMtxIdx(texMtx)] = true; bSetTexMtx = true; } - GXSetTexCoordGen2((GXTexCoordID)i, texCoordGens[i].GetTexGenType(), texCoordGens[i].GetTexGenSrc(), texMtx, - FALSE, 0x7D); + GXSetTexCoordGen2( + (GXTexCoordID)i, texCoordGens[i].GetTexGenType(), texCoordGens[i].GetTexGenSrc(), texMtx, FALSE, 0x7D + ); } } if (bSetTexMtx) { @@ -723,8 +722,9 @@ bool Material::SetupGX(bool bModVtxCol, u8 alpha) { if (IsTevSwapCap()) { const TevSwapMode *tevSwaps = GetTevSwapAry(); for (int i = 0; i < 4; i++) { - GXSetTevSwapModeTable((GXTevSwapSel)i, tevSwaps[i].GetR(), tevSwaps[i].GetG(), tevSwaps[i].GetB(), - tevSwaps[i].GetA()); + GXSetTevSwapModeTable( + (GXTevSwapSel)i, tevSwaps[i].GetR(), tevSwaps[i].GetG(), tevSwaps[i].GetB(), tevSwaps[i].GetA() + ); } } else { GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA); @@ -743,23 +743,34 @@ bool Material::SetupGX(bool bModVtxCol, u8 alpha) { const TevStage *tevStages = GetTevStageAry(); for (int i = 0; i < mGXMemNum.tevStage; i++) { GXTevStageID tevStage = (GXTevStageID)i; - GXSetTevOrder(tevStage, tevStages[i].GetTexCoordGen(), tevStages[i].GetTexMap(), - tevStages[i].GetColorChan()); + GXSetTevOrder( + tevStage, tevStages[i].GetTexCoordGen(), tevStages[i].GetTexMap(), tevStages[i].GetColorChan() + ); GXSetTevSwapMode(tevStage, tevStages[i].GetRasSwapSel(), tevStages[i].GetTexSwapSel()); - GXSetTevColorIn(tevStage, tevStages[i].GetColorInA(), tevStages[i].GetColorInB(), - tevStages[i].GetColorInC(), tevStages[i].GetColorInD()); - GXSetTevColorOp(tevStage, tevStages[i].GetColorOp(), tevStages[i].GetColorBias(), - tevStages[i].GetColorScale(), tevStages[i].IsColorClamp(), tevStages[i].GetColorOutReg()); + GXSetTevColorIn( + tevStage, tevStages[i].GetColorInA(), tevStages[i].GetColorInB(), tevStages[i].GetColorInC(), + tevStages[i].GetColorInD() + ); + GXSetTevColorOp( + tevStage, tevStages[i].GetColorOp(), tevStages[i].GetColorBias(), tevStages[i].GetColorScale(), + tevStages[i].IsColorClamp(), tevStages[i].GetColorOutReg() + ); GXSetTevKColorSel(tevStage, tevStages[i].GetKColorSel()); - GXSetTevAlphaIn(tevStage, tevStages[i].GetAlphaInA(), tevStages[i].GetAlphaInB(), - tevStages[i].GetAlphaInC(), tevStages[i].GetAlphaInD()); - GXSetTevAlphaOp(tevStage, tevStages[i].GetAlphaOp(), tevStages[i].GetAlphaBias(), - tevStages[i].GetAlphaScale(), tevStages[i].IsAlphaClamp(), tevStages[i].GetAlphaOutReg()); + GXSetTevAlphaIn( + tevStage, tevStages[i].GetAlphaInA(), tevStages[i].GetAlphaInB(), tevStages[i].GetAlphaInC(), + tevStages[i].GetAlphaInD() + ); + GXSetTevAlphaOp( + tevStage, tevStages[i].GetAlphaOp(), tevStages[i].GetAlphaBias(), tevStages[i].GetAlphaScale(), + tevStages[i].IsAlphaClamp(), tevStages[i].GetAlphaOutReg() + ); GXSetTevKAlphaSel(tevStage, tevStages[i].GetKAlphaSel()); GXIndTexMtxID indMtxSel = tevStages[i].GetIndMtxSel(); - GXSetTevIndirect(tevStage, tevStages[i].GetIndStage(), tevStages[i].GetIndFormat(), - tevStages[i].GetIndBiasSel(), indMtxSel, tevStages[i].GetIndWrapS(), tevStages[i].GetIndWrapT(), - tevStages[i].IsIndAddPrev(), tevStages[i].IsIndUtcLod(), tevStages[i].GetIndAlphaSel()); + GXSetTevIndirect( + tevStage, tevStages[i].GetIndStage(), tevStages[i].GetIndFormat(), tevStages[i].GetIndBiasSel(), + indMtxSel, tevStages[i].GetIndWrapS(), tevStages[i].GetIndWrapT(), tevStages[i].IsIndAddPrev(), + tevStages[i].IsIndUtcLod(), tevStages[i].GetIndAlphaSel() + ); if (1 <= indMtxSel && indMtxSel <= 3) { bUseIndTexMtx[indMtxSel - 1] = true; bSetIndTexMtx = true; @@ -768,24 +779,12 @@ bool Material::SetupGX(bool bModVtxCol, u8 alpha) { bUseRasStage = true; } else { static GXTevKColorSel kColSels[8] = { - GX_TEV_KCSEL_K3_A, - GX_TEV_KCSEL_K3_B, - GX_TEV_KCSEL_K3_G, - GX_TEV_KCSEL_K3_R, - GX_TEV_KCSEL_K2_A, - GX_TEV_KCSEL_K2_B, - GX_TEV_KCSEL_K2_G, - GX_TEV_KCSEL_K2_R, + GX_TEV_KCSEL_K3_A, GX_TEV_KCSEL_K3_B, GX_TEV_KCSEL_K3_G, GX_TEV_KCSEL_K3_R, + GX_TEV_KCSEL_K2_A, GX_TEV_KCSEL_K2_B, GX_TEV_KCSEL_K2_G, GX_TEV_KCSEL_K2_R, }; static GXTevKAlphaSel kAlpSels[8] = { - GX_TEV_KASEL_K3_A, - GX_TEV_KASEL_K3_B, - GX_TEV_KASEL_K3_G, - GX_TEV_KASEL_K3_R, - GX_TEV_KASEL_K2_A, - GX_TEV_KASEL_K2_B, - GX_TEV_KASEL_K2_G, - GX_TEV_KASEL_K2_R, + GX_TEV_KASEL_K3_A, GX_TEV_KASEL_K3_B, GX_TEV_KASEL_K3_G, GX_TEV_KASEL_K3_R, + GX_TEV_KASEL_K2_A, GX_TEV_KASEL_K2_B, GX_TEV_KASEL_K2_G, GX_TEV_KASEL_K2_R, }; u8 tevStageID = 0; if (mGXMemNum.texMap == 0) { @@ -880,15 +879,17 @@ bool Material::SetupGX(bool bModVtxCol, u8 alpha) { } if (IsAlphaCompareCap()) { const AlphaCompare *pAlpComp = GetAlphaComparePtr(); - GXSetAlphaCompare(pAlpComp->GetComp0(), pAlpComp->GetRef0(), pAlpComp->GetOp(), pAlpComp->GetComp1(), - pAlpComp->GetRef1()); + GXSetAlphaCompare( + pAlpComp->GetComp0(), pAlpComp->GetRef0(), pAlpComp->GetOp(), pAlpComp->GetComp1(), pAlpComp->GetRef1() + ); } else { GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_AND, GX_ALWAYS, 0); } if (IsBlendModeCap()) { const BlendMode *pBlendMode = GetBlendModePtr(); - GXSetBlendMode(pBlendMode->GetType(), pBlendMode->GetSrcFactor(), pBlendMode->GetDstFactor(), - pBlendMode->GetOp()); + GXSetBlendMode( + pBlendMode->GetType(), pBlendMode->GetSrcFactor(), pBlendMode->GetDstFactor(), pBlendMode->GetOp() + ); } else { GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_SET); diff --git a/src/nw4r/lyt/lyt_pane.cpp b/src/nw4r/lyt/lyt_pane.cpp index 0a6d21e3..96761454 100644 --- a/src/nw4r/lyt/lyt_pane.cpp +++ b/src/nw4r/lyt/lyt_pane.cpp @@ -1,11 +1,13 @@ -#include -#include -#include -#include -#include -#include -#include -#include +#include "nw4r/lyt/lyt_pane.h" + +#include "nw4r/lyt/lyt_drawInfo.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/lyt/lyt_material.h" +#include "nw4r/ut/ut_Color.h" +#include "nw4r/ut/ut_Rect.h" +#include "nw4r/ut/ut_RuntimeTypeInfo.h" +#include "nw4r/ut/ut_list.h" + // ReverseYAxis__22@unnamed@lyt_pane_cpp@FPQ34nw4r4math5MTX34 namespace nw4r { @@ -188,7 +190,7 @@ Pane *Pane::FindPaneByName(const char *findName, bool bRecursive) { } if (bRecursive) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { Pane *pPane = it->FindPaneByName(findName, bRecursive); if (pPane != nullptr) { return pPane; @@ -205,7 +207,7 @@ Material *Pane::FindMaterialByName(const char *findName, bool bRecursive) { } if (bRecursive) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { Material *pPane = it->FindMaterialByName(findName, bRecursive); if (pPane != nullptr) { return pPane; @@ -313,7 +315,7 @@ void Pane::CalculateMtx(const DrawInfo &drawInfo) { // Guess but makes sense void Pane::CalculateMtxChild(const DrawInfo &drawInfo) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { it->CalculateMtx(drawInfo); } } @@ -323,7 +325,7 @@ void Pane::Draw(const DrawInfo &drawInfo) { if (IsVisible()) { this->DrawSelf(drawInfo); for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { it->Draw(drawInfo); } } @@ -337,7 +339,7 @@ void Pane::Animate(u32 option) { this->AnimateSelf(option); if (IsVisible() || !(option & 1)) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { it->Animate(option); } } @@ -346,7 +348,7 @@ void Pane::Animate(u32 option) { // AnimateSelf__Q34nw4r3lyt4PaneFUl void Pane::AnimateSelf(u32 option) { for (ut::LinkList::Iterator it = this->mAnimList.GetBeginIter(); - it != this->mAnimList.GetEndIter(); it++) { + it != this->mAnimList.GetEndIter(); it++) { if (it->IsEnable()) { AnimTransform *animTrans = it->GetAnimTransform(); animTrans->Animate(it->GetIndex(), this); @@ -369,7 +371,7 @@ void Pane::UnbindAnimation(AnimTransform *pAnimTrans, bool bRecusive) { this->UnbindAnimationSelf(pAnimTrans); if (bRecusive) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { it->UnbindAnimation(pAnimTrans, bRecusive); } } @@ -416,7 +418,7 @@ void Pane::SetAnimationEnable(AnimTransform *pAnimTrans, bool bEnable, bool bRec } if (bRecursive) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { it->SetAnimationEnable(pAnimTrans, bEnable, bRecursive); } } @@ -435,7 +437,7 @@ void Pane::SetAnimationEnable(const AnimResource &animRes, bool bEnable, bool bR } if (bRecursive) { for (ut::LinkList::Iterator it = this->mChildList.GetBeginIter(); it != this->mChildList.GetEndIter(); - it++) { + it++) { it->SetAnimationEnable(animRes, bEnable, bRecursive); } } @@ -460,26 +462,14 @@ math::VEC2 Pane::GetVtxPos() const { math::VEC2 basePt(0.0f, 0.0f); switch (this->mBasePosition % 3) { - default: - basePt.x = 0.0f; - break; - case 1: - basePt.x = -this->mSize.width / 2; - break; - case 2: - basePt.x = -this->mSize.width; - break; + default: basePt.x = 0.0f; break; + case 1: basePt.x = -this->mSize.width / 2; break; + case 2: basePt.x = -this->mSize.width; break; } switch (this->mBasePosition / 3) { - default: - basePt.y = 0.0f; - break; - case 1: - basePt.y = this->mSize.height / 2; - break; - case 2: - basePt.y = this->mSize.height; - break; + default: basePt.y = 0.0f; break; + case 1: basePt.y = this->mSize.height / 2; break; + case 2: basePt.y = this->mSize.height; break; } return basePt; } diff --git a/src/nw4r/lyt/lyt_picture.cpp b/src/nw4r/lyt/lyt_picture.cpp index e6a7c581..1b238e6e 100644 --- a/src/nw4r/lyt/lyt_picture.cpp +++ b/src/nw4r/lyt/lyt_picture.cpp @@ -1,8 +1,10 @@ -#include -#include -#include -#include -#include +#include "nw4r/lyt/lyt_picture.h" + +#include "nw4r/lyt/lyt_bounding.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/lyt/lyt_material.h" +#include "nw4r/lyt/lyt_texMap.h" + namespace nw4r { namespace lyt { @@ -32,7 +34,7 @@ Picture::Picture(const res::Picture *pResPic, const ResBlockSet &resBlockSet) } const u32 *matOffsTbl = detail::ConvertOffsToPtr(resBlockSet.pMaterialList, sizeof(res::MaterialList)); const res::Material *pResMaterial = - detail::ConvertOffsToPtr(resBlockSet.pMaterialList, matOffsTbl[pResPic->materialIdx]); + detail::ConvertOffsToPtr(resBlockSet.pMaterialList, matOffsTbl[pResPic->materialIdx]); mpMaterial = Layout::NewObj(pResMaterial, resBlockSet); } @@ -53,7 +55,7 @@ Picture::~Picture() { // Append__Q34nw4r3lyt7PictureFRCQ34nw4r3lyt6TexMap void Picture::Append(const TexMap &texMap) { if (mpMaterial->GetTextureNum() >= mpMaterial->GetTextureCap() || - mpMaterial->GetTextureNum() >= mpMaterial->GetTexCoordGenCap()) { + mpMaterial->GetTextureNum() >= mpMaterial->GetTexCoordGenCap()) { return; } u8 texIdx = mpMaterial->GetTextureNum(); @@ -107,8 +109,10 @@ void Picture::DrawSelf(const DrawInfo &drawInfo) { LoadMtx(drawInfo); bool bUseVtxCol = mpMaterial->SetupGX(detail::IsModulateVertexColor(mVtxColors, mGlbAlpha), mGlbAlpha); detail::SetVertexFormat(bUseVtxCol, mTexCoordAry.GetSize()); - detail::DrawQuad(GetVtxPos(), mSize, mTexCoordAry.GetSize(), mTexCoordAry.GetArray(), - bUseVtxCol ? mVtxColors : nullptr, mGlbAlpha); + detail::DrawQuad( + GetVtxPos(), mSize, mTexCoordAry.GetSize(), mTexCoordAry.GetArray(), bUseVtxCol ? mVtxColors : nullptr, + mGlbAlpha + ); } } diff --git a/src/nw4r/lyt/lyt_texMap.cpp b/src/nw4r/lyt/lyt_texMap.cpp index 6b65164a..47288be1 100644 --- a/src/nw4r/lyt/lyt_texMap.cpp +++ b/src/nw4r/lyt/lyt_texMap.cpp @@ -1,4 +1,4 @@ -#include +#include "nw4r/lyt/lyt_texMap.h" // NOTICE: This file seems to have been reworked. Not sure if all functions exist anymore, ReplaceImage doesnt even // appear stripped in BBA, but is in tokyo friend park 2 DWARF. In NSMBW there seems to be more parameters for @@ -18,15 +18,20 @@ namespace { void TexMap::Get(GXTexObj *pTexObj) const { if (detail::IsCITexelFormat(GetTexelFormat())) { u32 tlutName = GXGetTexObjTlut(pTexObj); - GXInitTexObjCI(pTexObj, GetImage(), GetWidth(), GetHeight(), GetTexelFormat(), GetWrapModeS(), GetWrapModeT(), - IsMipMap(), tlutName); + GXInitTexObjCI( + pTexObj, GetImage(), GetWidth(), GetHeight(), GetTexelFormat(), GetWrapModeS(), GetWrapModeT(), IsMipMap(), + tlutName + ); } else { - GXInitTexObj(pTexObj, GetImage(), GetWidth(), GetHeight(), GetTexelFormat(), GetWrapModeS(), GetWrapModeT(), - IsMipMap()); + GXInitTexObj( + pTexObj, GetImage(), GetWidth(), GetHeight(), GetTexelFormat(), GetWrapModeS(), GetWrapModeT(), IsMipMap() + ); } - GXInitTexObjLOD(pTexObj, GetMinFilter(), GetMagFilter(), GetMinLOD(), GetMaxLOD(), GetLODBias(), - IsBiasClampEnable(), IsEdgeLODEnable(), GetAnisotropy()); + GXInitTexObjLOD( + pTexObj, GetMinFilter(), GetMagFilter(), GetMinLOD(), GetMaxLOD(), GetLODBias(), IsBiasClampEnable(), + IsEdgeLODEnable(), GetAnisotropy() + ); } // Get__Q34nw4r3lyt6TexMapCFP10_GXTlutObj @@ -52,8 +57,9 @@ void TexMap::Set(const GXTexObj &pTexObj) { f32 minLOD, maxLOD, LODBias; u8 biasClampEnable, edgeLODEnable; GXAnisotropy anisotropy; - GXGetTexObjLODAll(&pTexObj, &minFilter, &magFilter, &minLOD, &maxLOD, &LODBias, &biasClampEnable, &edgeLODEnable, - &anisotropy); + GXGetTexObjLODAll( + &pTexObj, &minFilter, &magFilter, &minLOD, &maxLOD, &LODBias, &biasClampEnable, &edgeLODEnable, &anisotropy + ); SetFilter(minFilter, magFilter); SetLOD(minLOD, maxLOD); SetLODBias(LODBias); diff --git a/src/nw4r/lyt/lyt_textBox.cpp b/src/nw4r/lyt/lyt_textBox.cpp index 3dba86db..9be924d7 100644 --- a/src/nw4r/lyt/lyt_textBox.cpp +++ b/src/nw4r/lyt/lyt_textBox.cpp @@ -1,10 +1,9 @@ -#include -#include -#include -#include -#include -#include -#include +#include "nw4r/lyt/lyt_textBox.h" + +#include "nw4r/lyt/lyt_drawInfo.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/lyt/lyt_material.h" +#include "nw4r/ut.h" // IWYU pragma: export namespace nw4r { namespace lyt { @@ -36,6 +35,20 @@ ut::Color GetColor(const GXColorS10 &src) { return dst; } +// Protos +template +void CalcStringRect(ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth); +template +int CalcLineStrNum( + f32 *pWidth, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth, bool *pbOver +); +template +int CalcLineRectImpl( + ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth, bool *pbOver +); +template +void CalcStringRectImpl(ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth); + template void CalcStringRect(ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth) { ut::TextWriterBase myCopy = *pTextWriter; @@ -43,8 +56,9 @@ void CalcStringRect(ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T } template -int CalcLineStrNum(f32 *pWidth, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth, - bool *pbOver) { +int CalcLineStrNum( + f32 *pWidth, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth, bool *pbOver +) { ut::Rect rect; ut::TextWriterBase myCopy = *pTextWriter; myCopy.SetCursor(0.0f, 0.0f); @@ -55,8 +69,9 @@ int CalcLineStrNum(f32 *pWidth, ut::TextWriterBase *pTextWriter, const T *str } template -int CalcLineRectImpl(ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth, - bool *pbOver) { +int CalcLineRectImpl( + ut::Rect *pRect, ut::TextWriterBase *pTextWriter, const T *str, int length, f32 maxWidth, bool *pbOver +) { ut::PrintContext context = {pTextWriter, str, 0.0f, 0.0f, 0}; f32 x = 0.0f; @@ -225,7 +240,7 @@ TextBox::TextBox(const res::TextBox *pBlock, const ResBlockSet &resBlockSet) } const u32 *matOffsTbl = detail::ConvertOffsToPtr(resBlockSet.pMaterialList, sizeof(res::MaterialList)); const res::Material *pResMaterial = - detail::ConvertOffsToPtr(resBlockSet.pMaterialList, matOffsTbl[pBlock->materialIdx]); + detail::ConvertOffsToPtr(resBlockSet.pMaterialList, matOffsTbl[pBlock->materialIdx]); mpMaterial = Layout::NewObj(pResMaterial, resBlockSet); } @@ -465,38 +480,28 @@ ut::Rect TextBox::GetTextDrawRect(ut::TextWriterBase *pWriter) const { // GetTextMagH__Q34nw4r3lyt7TextBoxCFv f32 TextBox::GetTextMagH() const { switch (GetTextPositionH()) { - default: - return 0.0f; - case 1: - return 0.5f; - case 2: - return 1.0f; + default: return 0.0f; + case 1: return 0.5f; + case 2: return 1.0f; } } // GetTextMagV__Q34nw4r3lyt7TextBoxCFv f32 TextBox::GetTextMagV() const { switch (GetTextPositionV()) { - default: - return 0.0f; - case 1: - return 0.5f; - case 2: - return 1.0f; + default: return 0.0f; + case 1: return 0.5f; + case 2: return 1.0f; } } // GetTextAlignMag__Q34nw4r3lyt7TextBoxCFv f32 TextBox::GetTextAlignMag() const { switch (mBits.textAlignment) { - default: - return GetTextMagH(); - case 1: - return 0.0f; - case 2: - return 0.5f; - case 3: - return 1.0f; + default: return GetTextMagH(); + case 1: return 0.0f; + case 2: return 0.5f; + case 3: return 1.0f; } } diff --git a/src/nw4r/lyt/lyt_util.cpp b/src/nw4r/lyt/lyt_util.cpp index 33bba481..7db782e9 100644 --- a/src/nw4r/lyt/lyt_util.cpp +++ b/src/nw4r/lyt/lyt_util.cpp @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include +#include "nw4r/lyt/lyt_pane.h" +#include "nw4r/lyt/lyt_utils.h" +#include "nw4r/math/math_geometry.h" +#include "nw4r/math/math_types.h" +#include "nw4r/ut/ut_Rect.h" namespace nw4r { namespace lyt { diff --git a/src/nw4r/lyt/lyt_window.cpp b/src/nw4r/lyt/lyt_window.cpp index 93bb2ed7..777cdfa4 100644 --- a/src/nw4r/lyt/lyt_window.cpp +++ b/src/nw4r/lyt/lyt_window.cpp @@ -1,7 +1,9 @@ -#include -#include -#include -#include +#include "nw4r/lyt/lyt_window.h" + +#include "nw4r/lyt/lyt_common.h" +#include "nw4r/lyt/lyt_layout.h" +#include "nw4r/lyt/lyt_types.h" + namespace nw4r { namespace lyt { @@ -17,13 +19,13 @@ namespace { // look at TextureFlip enum in lyt_window.h TextureFlipInfo &GetTextureFlipInfo(u8 textureFlip) { static TextureFlipInfo flipInfos[6] = { - // TopL TopR BotL BotR idx - {{{0, 0}, {1, 0}, {0, 1}, {1, 1}}, {0, 1}}, // Normal - {{{1, 0}, {0, 0}, {1, 1}, {0, 1}}, {0, 1}}, // Horizontal Flip - {{{0, 1}, {1, 1}, {0, 0}, {1, 0}}, {0, 1}}, // Vertical Flip - {{{0, 1}, {0, 0}, {1, 1}, {1, 0}}, {1, 0}}, // Rotate 90 - {{{1, 1}, {0, 1}, {1, 0}, {0, 0}}, {0, 1}}, // Rotate 180 - {{{1, 0}, {1, 1}, {0, 0}, {0, 1}}, {1, 0}}, // Rotate 270 + // TopL TopR BotL BotR idx + {{{0, 0}, {1, 0}, {0, 1}, {1, 1}}, {0, 1}}, // Normal + {{{1, 0}, {0, 0}, {1, 1}, {0, 1}}, {0, 1}}, // Horizontal Flip + {{{0, 1}, {1, 1}, {0, 0}, {1, 0}}, {0, 1}}, // Vertical Flip + {{{0, 1}, {0, 0}, {1, 1}, {1, 0}}, {1, 0}}, // Rotate 90 + {{{1, 1}, {0, 1}, {1, 0}, {0, 0}}, {0, 1}}, // Rotate 180 + {{{1, 0}, {1, 1}, {0, 0}, {0, 1}}, {1, 0}}, // Rotate 270 }; return flipInfos[textureFlip]; } @@ -56,8 +58,9 @@ TextureFlipInfo &GetTextureFlipInfo(u8 textureFlip) { // GetLTFrameSize__Q34nw4r3lyt24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize // GetLTFrameSize__24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize -void GetLTFrameSize(math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, - const WindowFrameSize &frameSize) { +void GetLTFrameSize( + math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, const WindowFrameSize &frameSize +) { *pPt = basePt; // pPt->x = basePt.x; // pPt->y = basePt.y; @@ -87,8 +90,9 @@ void GetLTTexCoord(math::VEC2 *texCds, const Size &polSize, const Size &texSize, // GetRTFrameSize__Q34nw4r3lyt24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize // GetRTFrameSize__24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize -void GetRTFrameSize(math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, - const WindowFrameSize &frameSize) { +void GetRTFrameSize( + math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, const WindowFrameSize &frameSize +) { *pPt = math::VEC2(basePt.x + windSize.width - frameSize.r, basePt.y); // pPt->x = basePt.x + windSize.width - frameSize.r; // pPt->y = basePt.y @@ -117,8 +121,9 @@ void GetRTTexCoord(math::VEC2 *texCds, const Size &polSize, const Size &texSize, // GetLBFrameSize__Q34nw4r3lyt24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize // GetLBFrameSize__24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize -void GetLBFrameSize(math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, - const WindowFrameSize &frameSize) { +void GetLBFrameSize( + math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, const WindowFrameSize &frameSize +) { *pPt = math::VEC2(basePt.x, basePt.y - frameSize.t); // pPt->x = basePt.x; // pPt->y = basePt.y - frameSize.t; @@ -149,8 +154,9 @@ void GetLBTexCoord(math::VEC2 *texCds, const Size &polSize, const Size &texSize, // GetRBFrameSize__Q34nw4r3lyt24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize // GetRBFrameSize__24@unnamed@lyt_window_cpp@FPQ34nw4r4math4VEC2PQ34nw4r3lyt4SizeRCQ34nw4r4math4VEC2RCQ34nw4r3lyt4SizeRCQ34nw4r3lyt15WindowFrameSize -void GetRBFrameSize(math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, - const WindowFrameSize &frameSize) { +void GetRBFrameSize( + math::VEC2 *pPt, Size *pSize, const math::VEC2 &basePt, const Size &windSize, const WindowFrameSize &frameSize +) { *pPt = math::VEC2(basePt.x + frameSize.l, basePt.y - windSize.height + frameSize.b); // pPt->x = basePt.x + frameSize.l; // pPt->y = basePt.y - windSize.height + frameSize.b; @@ -184,7 +190,7 @@ NW4R_UT_RTTI_DEF_DERIVED(Window, Pane); // __ct__Q34nw4r3lyt6WindowFPCQ44nw4r3lyt3res6WindowRCQ34nw4r3lyt11ResBlockSet Window::Window(const res::Window *pBlock, const ResBlockSet &resBlockSet) : Pane(pBlock), mContent() { const res::WindowContent *pResContent = - detail::ConvertOffsToPtr(pBlock, pBlock->contentOffset); + detail::ConvertOffsToPtr(pBlock, pBlock->contentOffset); u8 texCoordNum = ut::Min(pResContent->texCoordNum, 8); @@ -202,7 +208,7 @@ Window::Window(const res::Window *pBlock, const ResBlockSet &resBlockSet) : Pane } const res::Material *pResMaterial = - detail::ConvertOffsToPtr(resBlockSet.pMaterialList, matOffsTbl[pResContent->materialIdx]); + detail::ConvertOffsToPtr(resBlockSet.pMaterialList, matOffsTbl[pResContent->materialIdx]); mpMaterial = Layout::NewObj(pResMaterial, resBlockSet); mFrameNum = 0; @@ -212,10 +218,11 @@ Window::Window(const res::Window *pBlock, const ResBlockSet &resBlockSet) : Pane const u32 *frameOffsetTable = detail::ConvertOffsToPtr(pBlock, pBlock->frameOffsetTableOffset); for (int i = 0; i < mFrameNum; i++) { const res::WindowFrame *pResWindowFrame = - detail::ConvertOffsToPtr(pBlock, frameOffsetTable[i]); + detail::ConvertOffsToPtr(pBlock, frameOffsetTable[i]); mFrames[i].textureFlip = pResWindowFrame->textureFlip; - const res::Material *pResMaterial = detail::ConvertOffsToPtr(resBlockSet.pMaterialList, - matOffsTbl[pResWindowFrame->materialIdx]); + const res::Material *pResMaterial = detail::ConvertOffsToPtr( + resBlockSet.pMaterialList, matOffsTbl[pResWindowFrame->materialIdx] + ); mFrames[i].pMaterial = Layout::NewObj(pResMaterial, resBlockSet); } } @@ -317,15 +324,9 @@ void Window::DrawSelf(const DrawInfo &drawInfo) { math::VEC2 basePt = GetVtxPos(); DrawContent(basePt, frameSize, mGlbAlpha); switch (mFrameNum) { - case 1: - DrawFrame(basePt, mFrames[0], frameSize, mGlbAlpha); - break; - case 4: - DrawFrame4(basePt, mFrames, frameSize, mGlbAlpha); - break; - case 8: - DrawFrame8(basePt, mFrames, frameSize, mGlbAlpha); - break; + case 1: DrawFrame(basePt, mFrames[0], frameSize, mGlbAlpha); break; + case 4: DrawFrame4(basePt, mFrames, frameSize, mGlbAlpha); break; + case 8: DrawFrame8(basePt, mFrames, frameSize, mGlbAlpha); break; } } @@ -355,11 +356,14 @@ void Window::DrawContent(const math::VEC2 &basePt, const WindowFrameSize &frameS // Why not use temps wtf. only bUseVtxCol is defined in DWARF and I cant find evidence of an inline detail::DrawQuad( - math::VEC2(basePt.x + frameSize.l - mContentInflation.l, basePt.y - frameSize.t + mContentInflation.t), - Size(mSize.width - frameSize.l + mContentInflation.l - frameSize.r + mContentInflation.r, - mSize.height - frameSize.t + mContentInflation.t - frameSize.b + mContentInflation.b), - mContent.texCoordAry.GetSize(), mContent.texCoordAry.GetArray(), bUseVtxCol ? mContent.vtxColors : nullptr, - alpha); + math::VEC2(basePt.x + frameSize.l - mContentInflation.l, basePt.y - frameSize.t + mContentInflation.t), + Size( + mSize.width - frameSize.l + mContentInflation.l - frameSize.r + mContentInflation.r, + mSize.height - frameSize.t + mContentInflation.t - frameSize.b + mContentInflation.b + ), + mContent.texCoordAry.GetSize(), mContent.texCoordAry.GetArray(), bUseVtxCol ? mContent.vtxColors : nullptr, + alpha + ); } // DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc @@ -484,8 +488,9 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(mSize.width - frameSize.l - frameSize.r, frameSize.t); GetLTTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[6].pMaterial, 0), frame[6].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x + frameSize.l, basePt.y), polSize, 1, texCds, - bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x + frameSize.l, basePt.y), polSize, 1, texCds, bUseVtxCol ? vtxColors : nullptr, alpha + ); } // TOP RIGHT if (frame[1].pMaterial->GetTextureNum() != 0) { @@ -493,8 +498,10 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(frameSize.r, frameSize.t); GetRTTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[1].pMaterial, 0), frame[1].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x + mSize.width - frameSize.r, basePt.y), polSize, 1, texCds, - bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x + mSize.width - frameSize.r, basePt.y), polSize, 1, texCds, + bUseVtxCol ? vtxColors : nullptr, alpha + ); } // RIGHT if (frame[5].pMaterial->GetTextureNum() != 0) { @@ -502,8 +509,10 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(frameSize.r, mSize.height - frameSize.t - frameSize.b); GetRTTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[5].pMaterial, 0), frame[5].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x + mSize.width - frameSize.r, basePt.y - frameSize.t), polSize, 1, texCds, - bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x + mSize.width - frameSize.r, basePt.y - frameSize.t), polSize, 1, texCds, + bUseVtxCol ? vtxColors : nullptr, alpha + ); } // BOTTOM RIGHT if (frame[3].pMaterial->GetTextureNum() != 0) { @@ -511,8 +520,10 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(frameSize.r, frameSize.b); GetRBTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[3].pMaterial, 0), frame[3].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x + mSize.width - frameSize.r, basePt.y - mSize.height + frameSize.b), - polSize, 1, texCds, bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x + mSize.width - frameSize.r, basePt.y - mSize.height + frameSize.b), polSize, 1, texCds, + bUseVtxCol ? vtxColors : nullptr, alpha + ); } // BOTTOM if (frame[7].pMaterial->GetTextureNum() != 0) { @@ -520,8 +531,10 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(mSize.width - frameSize.l - frameSize.r, frameSize.b); GetRBTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[7].pMaterial, 0), frame[7].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x + frameSize.l, basePt.y - mSize.height + frameSize.b), polSize, 1, texCds, - bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x + frameSize.l, basePt.y - mSize.height + frameSize.b), polSize, 1, texCds, + bUseVtxCol ? vtxColors : nullptr, alpha + ); } // BOTTOM LEFT if (frame[2].pMaterial->GetTextureNum() != 0) { @@ -529,8 +542,10 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(frameSize.l, frameSize.b); GetLBTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[2].pMaterial, 0), frame[2].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x, basePt.y - mSize.height + frameSize.b), polSize, 1, texCds, - bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x, basePt.y - mSize.height + frameSize.b), polSize, 1, texCds, + bUseVtxCol ? vtxColors : nullptr, alpha + ); } // LEFT if (frame[4].pMaterial->GetTextureNum() != 0) { @@ -538,8 +553,9 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind polSize = Size(frameSize.l, mSize.height - frameSize.t - frameSize.b); GetLBTexCoord(texCds[0], polSize, detail::GetTextureSize(frame[4].pMaterial, 0), frame[4].textureFlip); detail::SetVertexFormat(bUseVtxCol, 1); - detail::DrawQuad(math::VEC2(basePt.x, basePt.y - frameSize.t), polSize, 1, texCds, - bUseVtxCol ? vtxColors : nullptr, alpha); + detail::DrawQuad( + math::VEC2(basePt.x, basePt.y - frameSize.t), polSize, 1, texCds, bUseVtxCol ? vtxColors : nullptr, alpha + ); } } @@ -547,22 +563,22 @@ void Window::DrawFrame8(const math::VEC2 &basePt, const Frame *frame, const Wind WindowFrameSize Window::GetFrameSize(u8 frameNum, const Frame *frames) { WindowFrameSize ret = {0.0f, 0.0f, 0.0f, 0.0f}; switch (frameNum) { - case 1: { - Size texSize = detail::GetTextureSize(frames[0].pMaterial, 0); - ret.l = texSize.width; - ret.t = texSize.height; - ret.r = texSize.width; - ret.b = texSize.height; - } break; - case 4: - case 8: { - Size texSize = detail::GetTextureSize(frames[0].pMaterial, 0); - ret.l = texSize.width; - ret.t = texSize.height; - texSize = detail::GetTextureSize(frames[3].pMaterial, 0); - ret.r = texSize.width; - ret.b = texSize.height; - } break; + case 1: { + Size texSize = detail::GetTextureSize(frames[0].pMaterial, 0); + ret.l = texSize.width; + ret.t = texSize.height; + ret.r = texSize.width; + ret.b = texSize.height; + } break; + case 4: + case 8: { + Size texSize = detail::GetTextureSize(frames[0].pMaterial, 0); + ret.l = texSize.width; + ret.t = texSize.height; + texSize = detail::GetTextureSize(frames[3].pMaterial, 0); + ret.r = texSize.width; + ret.b = texSize.height; + } break; } return ret; } diff --git a/src/nw4r/snd/snd_AnimSound.cpp b/src/nw4r/snd/snd_AnimSound.cpp index e09c9f25..12826469 100644 --- a/src/nw4r/snd/snd_AnimSound.cpp +++ b/src/nw4r/snd/snd_AnimSound.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_AnimSound.h" diff --git a/src/nw4r/snd/snd_AxManager.cpp b/src/nw4r/snd/snd_AxManager.cpp index 8dda5f6f..191fbc1b 100644 --- a/src/nw4r/snd/snd_AxManager.cpp +++ b/src/nw4r/snd/snd_AxManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_AxManager.h" diff --git a/src/nw4r/snd/snd_AxVoice.cpp b/src/nw4r/snd/snd_AxVoice.cpp index af1ef1b5..dd9877af 100644 --- a/src/nw4r/snd/snd_AxVoice.cpp +++ b/src/nw4r/snd/snd_AxVoice.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_AxVoice.h" diff --git a/src/nw4r/snd/snd_AxVoiceManager.cpp b/src/nw4r/snd/snd_AxVoiceManager.cpp index 40cd94e6..227c9434 100644 --- a/src/nw4r/snd/snd_AxVoiceManager.cpp +++ b/src/nw4r/snd/snd_AxVoiceManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_AxVoiceManager.h" diff --git a/src/nw4r/snd/snd_AxfxImpl.cpp b/src/nw4r/snd/snd_AxfxImpl.cpp index 598b35bc..0ba51228 100644 --- a/src/nw4r/snd/snd_AxfxImpl.cpp +++ b/src/nw4r/snd/snd_AxfxImpl.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_AxfxImpl.h" diff --git a/src/nw4r/snd/snd_Bank.cpp b/src/nw4r/snd/snd_Bank.cpp index bc417748..6842d6ac 100644 --- a/src/nw4r/snd/snd_Bank.cpp +++ b/src/nw4r/snd/snd_Bank.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Bank.h" diff --git a/src/nw4r/snd/snd_BankFile.cpp b/src/nw4r/snd/snd_BankFile.cpp index 5eb7fb71..fbb3e65d 100644 --- a/src/nw4r/snd/snd_BankFile.cpp +++ b/src/nw4r/snd/snd_BankFile.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_BankFile.h" diff --git a/src/nw4r/snd/snd_BasicPlayer.cpp b/src/nw4r/snd/snd_BasicPlayer.cpp index a857612d..7e14d54e 100644 --- a/src/nw4r/snd/snd_BasicPlayer.cpp +++ b/src/nw4r/snd/snd_BasicPlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_BasicPlayer.h" diff --git a/src/nw4r/snd/snd_BasicSound.cpp b/src/nw4r/snd/snd_BasicSound.cpp index 6e555a0a..468d1264 100644 --- a/src/nw4r/snd/snd_BasicSound.cpp +++ b/src/nw4r/snd/snd_BasicSound.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_BasicSound.h" diff --git a/src/nw4r/snd/snd_BiquadFilterPreset.cpp b/src/nw4r/snd/snd_BiquadFilterPreset.cpp index 24f6e746..a20b76bb 100644 --- a/src/nw4r/snd/snd_BiquadFilterPreset.cpp +++ b/src/nw4r/snd/snd_BiquadFilterPreset.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_BiquadFilterPreset.h" diff --git a/src/nw4r/snd/snd_Channel.cpp b/src/nw4r/snd/snd_Channel.cpp index 7c9da7a9..884cb22e 100644 --- a/src/nw4r/snd/snd_Channel.cpp +++ b/src/nw4r/snd/snd_Channel.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Channel.h" diff --git a/src/nw4r/snd/snd_DisposeCallbackManager.cpp b/src/nw4r/snd/snd_DisposeCallbackManager.cpp index c28dceff..377f3dfb 100644 --- a/src/nw4r/snd/snd_DisposeCallbackManager.cpp +++ b/src/nw4r/snd/snd_DisposeCallbackManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_DisposeCallbackManager.h" diff --git a/src/nw4r/snd/snd_DvdSoundArchive.cpp b/src/nw4r/snd/snd_DvdSoundArchive.cpp index ac765278..84a871c6 100644 --- a/src/nw4r/snd/snd_DvdSoundArchive.cpp +++ b/src/nw4r/snd/snd_DvdSoundArchive.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_DvdSoundArchive.h" diff --git a/src/nw4r/snd/snd_EnvGenerator.cpp b/src/nw4r/snd/snd_EnvGenerator.cpp index a145682a..fa494de5 100644 --- a/src/nw4r/snd/snd_EnvGenerator.cpp +++ b/src/nw4r/snd/snd_EnvGenerator.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_EnvGenerator.h" diff --git a/src/nw4r/snd/snd_ExternalSoundPlayer.cpp b/src/nw4r/snd/snd_ExternalSoundPlayer.cpp index 01365145..e8e9240a 100644 --- a/src/nw4r/snd/snd_ExternalSoundPlayer.cpp +++ b/src/nw4r/snd/snd_ExternalSoundPlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_ExternalSoundPlayer.h" diff --git a/src/nw4r/snd/snd_FrameHeap.cpp b/src/nw4r/snd/snd_FrameHeap.cpp index f7152e3f..187b2b84 100644 --- a/src/nw4r/snd/snd_FrameHeap.cpp +++ b/src/nw4r/snd/snd_FrameHeap.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_FrameHeap.h" diff --git a/src/nw4r/snd/snd_FxBase.cpp b/src/nw4r/snd/snd_FxBase.cpp index 057ddd63..40cc0276 100644 --- a/src/nw4r/snd/snd_FxBase.cpp +++ b/src/nw4r/snd/snd_FxBase.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_FxBase.h" diff --git a/src/nw4r/snd/snd_FxChorus.cpp b/src/nw4r/snd/snd_FxChorus.cpp index e09327a2..4061a349 100644 --- a/src/nw4r/snd/snd_FxChorus.cpp +++ b/src/nw4r/snd/snd_FxChorus.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_FxChorus.h" diff --git a/src/nw4r/snd/snd_FxDelay.cpp b/src/nw4r/snd/snd_FxDelay.cpp index 458244c1..ff6a3d3a 100644 --- a/src/nw4r/snd/snd_FxDelay.cpp +++ b/src/nw4r/snd/snd_FxDelay.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_FxDelay.h" diff --git a/src/nw4r/snd/snd_FxReverbHi.cpp b/src/nw4r/snd/snd_FxReverbHi.cpp index 27baa7d3..2918b04c 100644 --- a/src/nw4r/snd/snd_FxReverbHi.cpp +++ b/src/nw4r/snd/snd_FxReverbHi.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_FxReverbHi.h" diff --git a/src/nw4r/snd/snd_FxReverbHiDpl2.cpp b/src/nw4r/snd/snd_FxReverbHiDpl2.cpp index 9f05b2d5..8aa219ba 100644 --- a/src/nw4r/snd/snd_FxReverbHiDpl2.cpp +++ b/src/nw4r/snd/snd_FxReverbHiDpl2.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_FxReverbHiDpl2.h" diff --git a/src/nw4r/snd/snd_FxReverbStd.cpp b/src/nw4r/snd/snd_FxReverbStd.cpp index 025c530d..49707606 100644 --- a/src/nw4r/snd/snd_FxReverbStd.cpp +++ b/src/nw4r/snd/snd_FxReverbStd.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_FxReverbStd.h" diff --git a/src/nw4r/snd/snd_FxReverbStdDpl2.cpp b/src/nw4r/snd/snd_FxReverbStdDpl2.cpp index b3f2638e..ed62b7ac 100644 --- a/src/nw4r/snd/snd_FxReverbStdDpl2.cpp +++ b/src/nw4r/snd/snd_FxReverbStdDpl2.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_FxReverbStdDpl2.h" diff --git a/src/nw4r/snd/snd_InstancePool.cpp b/src/nw4r/snd/snd_InstancePool.cpp index 2da1bb1b..d89aed59 100644 --- a/src/nw4r/snd/snd_InstancePool.cpp +++ b/src/nw4r/snd/snd_InstancePool.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_InstancePool.h" diff --git a/src/nw4r/snd/snd_Lfo.cpp b/src/nw4r/snd/snd_Lfo.cpp index 4bb4300a..a4058492 100644 --- a/src/nw4r/snd/snd_Lfo.cpp +++ b/src/nw4r/snd/snd_Lfo.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Lfo.h" diff --git a/src/nw4r/snd/snd_MemorySoundArchive.cpp b/src/nw4r/snd/snd_MemorySoundArchive.cpp index b020a091..f031ff79 100644 --- a/src/nw4r/snd/snd_MemorySoundArchive.cpp +++ b/src/nw4r/snd/snd_MemorySoundArchive.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_MemorySoundArchive.h" diff --git a/src/nw4r/snd/snd_MidiSeqPlayer.cpp b/src/nw4r/snd/snd_MidiSeqPlayer.cpp index 8325b2bd..61ffb281 100644 --- a/src/nw4r/snd/snd_MidiSeqPlayer.cpp +++ b/src/nw4r/snd/snd_MidiSeqPlayer.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_MidiSeqPlayer.h" diff --git a/src/nw4r/snd/snd_MmlParser.cpp b/src/nw4r/snd/snd_MmlParser.cpp index b5321cdd..3bd3237b 100644 --- a/src/nw4r/snd/snd_MmlParser.cpp +++ b/src/nw4r/snd/snd_MmlParser.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_MmlParser.h" diff --git a/src/nw4r/snd/snd_MmlSeqTrack.cpp b/src/nw4r/snd/snd_MmlSeqTrack.cpp index 6c86739c..5f86bf4c 100644 --- a/src/nw4r/snd/snd_MmlSeqTrack.cpp +++ b/src/nw4r/snd/snd_MmlSeqTrack.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_MmlSeqTrack.h" diff --git a/src/nw4r/snd/snd_MmlSeqTrackAllocator.cpp b/src/nw4r/snd/snd_MmlSeqTrackAllocator.cpp index b31f212a..4869b377 100644 --- a/src/nw4r/snd/snd_MmlSeqTrackAllocator.cpp +++ b/src/nw4r/snd/snd_MmlSeqTrackAllocator.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_MmlSeqTrackAllocator.h" diff --git a/src/nw4r/snd/snd_NandSoundArchive.cpp b/src/nw4r/snd/snd_NandSoundArchive.cpp index d16c4ac6..36fad331 100644 --- a/src/nw4r/snd/snd_NandSoundArchive.cpp +++ b/src/nw4r/snd/snd_NandSoundArchive.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_NandSoundArchive.h" diff --git a/src/nw4r/snd/snd_PlayerHeap.cpp b/src/nw4r/snd/snd_PlayerHeap.cpp index 75ea87b2..e7f0677a 100644 --- a/src/nw4r/snd/snd_PlayerHeap.cpp +++ b/src/nw4r/snd/snd_PlayerHeap.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_PlayerHeap.h" diff --git a/src/nw4r/snd/snd_RemoteSpeaker.cpp b/src/nw4r/snd/snd_RemoteSpeaker.cpp index e0e6fb63..0ff3e857 100644 --- a/src/nw4r/snd/snd_RemoteSpeaker.cpp +++ b/src/nw4r/snd/snd_RemoteSpeaker.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_RemoteSpeaker.h" diff --git a/src/nw4r/snd/snd_RemoteSpeakerManager.cpp b/src/nw4r/snd/snd_RemoteSpeakerManager.cpp index 7be22856..4a82dfa5 100644 --- a/src/nw4r/snd/snd_RemoteSpeakerManager.cpp +++ b/src/nw4r/snd/snd_RemoteSpeakerManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_RemoteSpeakerManager.h" diff --git a/src/nw4r/snd/snd_SeqFile.cpp b/src/nw4r/snd/snd_SeqFile.cpp index ef8da3d9..8d56b0c9 100644 --- a/src/nw4r/snd/snd_SeqFile.cpp +++ b/src/nw4r/snd/snd_SeqFile.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SeqFile.h" diff --git a/src/nw4r/snd/snd_SeqPlayer.cpp b/src/nw4r/snd/snd_SeqPlayer.cpp index 28a95541..bbe51d54 100644 --- a/src/nw4r/snd/snd_SeqPlayer.cpp +++ b/src/nw4r/snd/snd_SeqPlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SeqPlayer.h" diff --git a/src/nw4r/snd/snd_SeqSound.cpp b/src/nw4r/snd/snd_SeqSound.cpp index 201ba9d2..b6c65099 100644 --- a/src/nw4r/snd/snd_SeqSound.cpp +++ b/src/nw4r/snd/snd_SeqSound.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SeqSound.h" diff --git a/src/nw4r/snd/snd_SeqSoundHandle.cpp b/src/nw4r/snd/snd_SeqSoundHandle.cpp index 2c69a9cf..6e8ba32b 100644 --- a/src/nw4r/snd/snd_SeqSoundHandle.cpp +++ b/src/nw4r/snd/snd_SeqSoundHandle.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SeqSoundHandle.h" diff --git a/src/nw4r/snd/snd_SeqTrack.cpp b/src/nw4r/snd/snd_SeqTrack.cpp index 14af5d5b..a38a94a6 100644 --- a/src/nw4r/snd/snd_SeqTrack.cpp +++ b/src/nw4r/snd/snd_SeqTrack.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SeqTrack.h" diff --git a/src/nw4r/snd/snd_Sound3DActor.cpp b/src/nw4r/snd/snd_Sound3DActor.cpp index e4460d7a..5dc4b760 100644 --- a/src/nw4r/snd/snd_Sound3DActor.cpp +++ b/src/nw4r/snd/snd_Sound3DActor.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Sound3DActor.h" diff --git a/src/nw4r/snd/snd_Sound3DCalculator.cpp b/src/nw4r/snd/snd_Sound3DCalculator.cpp index a5b89074..e061638f 100644 --- a/src/nw4r/snd/snd_Sound3DCalculator.cpp +++ b/src/nw4r/snd/snd_Sound3DCalculator.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_Sound3DCalculator.h" diff --git a/src/nw4r/snd/snd_Sound3DEngine.cpp b/src/nw4r/snd/snd_Sound3DEngine.cpp index 12765498..e6ddfd4d 100644 --- a/src/nw4r/snd/snd_Sound3DEngine.cpp +++ b/src/nw4r/snd/snd_Sound3DEngine.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_Sound3DEngine.h" diff --git a/src/nw4r/snd/snd_Sound3DListener.cpp b/src/nw4r/snd/snd_Sound3DListener.cpp index 9ba1c070..9d6a9533 100644 --- a/src/nw4r/snd/snd_Sound3DListener.cpp +++ b/src/nw4r/snd/snd_Sound3DListener.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Sound3DListener.h" diff --git a/src/nw4r/snd/snd_Sound3DManager.cpp b/src/nw4r/snd/snd_Sound3DManager.cpp index 4e71a6e6..5c410f11 100644 --- a/src/nw4r/snd/snd_Sound3DManager.cpp +++ b/src/nw4r/snd/snd_Sound3DManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Sound3DManager.h" diff --git a/src/nw4r/snd/snd_SoundActor.cpp b/src/nw4r/snd/snd_SoundActor.cpp index abac5894..c65cd722 100644 --- a/src/nw4r/snd/snd_SoundActor.cpp +++ b/src/nw4r/snd/snd_SoundActor.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundActor.h" diff --git a/src/nw4r/snd/snd_SoundArchive.cpp b/src/nw4r/snd/snd_SoundArchive.cpp index f0ef4889..988abab9 100644 --- a/src/nw4r/snd/snd_SoundArchive.cpp +++ b/src/nw4r/snd/snd_SoundArchive.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundArchive.h" diff --git a/src/nw4r/snd/snd_SoundArchiveFile.cpp b/src/nw4r/snd/snd_SoundArchiveFile.cpp index 6b6ee691..d51d58fa 100644 --- a/src/nw4r/snd/snd_SoundArchiveFile.cpp +++ b/src/nw4r/snd/snd_SoundArchiveFile.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundArchiveFile.h" diff --git a/src/nw4r/snd/snd_SoundArchiveLoader.cpp b/src/nw4r/snd/snd_SoundArchiveLoader.cpp index 9bdc00e1..175076b5 100644 --- a/src/nw4r/snd/snd_SoundArchiveLoader.cpp +++ b/src/nw4r/snd/snd_SoundArchiveLoader.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundArchiveLoader.h" diff --git a/src/nw4r/snd/snd_SoundArchivePlayer.cpp b/src/nw4r/snd/snd_SoundArchivePlayer.cpp index 8a1e2e48..4b894881 100644 --- a/src/nw4r/snd/snd_SoundArchivePlayer.cpp +++ b/src/nw4r/snd/snd_SoundArchivePlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundArchivePlayer.h" diff --git a/src/nw4r/snd/snd_SoundHandle.cpp b/src/nw4r/snd/snd_SoundHandle.cpp index 6562d142..eff7be7d 100644 --- a/src/nw4r/snd/snd_SoundHandle.cpp +++ b/src/nw4r/snd/snd_SoundHandle.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundHandle.h" diff --git a/src/nw4r/snd/snd_SoundHeap.cpp b/src/nw4r/snd/snd_SoundHeap.cpp index 349ca05c..1e021805 100644 --- a/src/nw4r/snd/snd_SoundHeap.cpp +++ b/src/nw4r/snd/snd_SoundHeap.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundHeap.h" diff --git a/src/nw4r/snd/snd_SoundPlayer.cpp b/src/nw4r/snd/snd_SoundPlayer.cpp index 44105d1a..dfdff590 100644 --- a/src/nw4r/snd/snd_SoundPlayer.cpp +++ b/src/nw4r/snd/snd_SoundPlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundPlayer.h" diff --git a/src/nw4r/snd/snd_SoundStartable.cpp b/src/nw4r/snd/snd_SoundStartable.cpp index 867e6b06..2d5a8f4c 100644 --- a/src/nw4r/snd/snd_SoundStartable.cpp +++ b/src/nw4r/snd/snd_SoundStartable.cpp @@ -1 +1 @@ -#include \ No newline at end of file +#include "nw4r/snd/snd_SoundStartable.h" diff --git a/src/nw4r/snd/snd_SoundSystem.cpp b/src/nw4r/snd/snd_SoundSystem.cpp index 5f240adc..6510587b 100644 --- a/src/nw4r/snd/snd_SoundSystem.cpp +++ b/src/nw4r/snd/snd_SoundSystem.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundSystem.h" diff --git a/src/nw4r/snd/snd_SoundThread.cpp b/src/nw4r/snd/snd_SoundThread.cpp index 0ed49fb7..3a8b3a65 100644 --- a/src/nw4r/snd/snd_SoundThread.cpp +++ b/src/nw4r/snd/snd_SoundThread.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_SoundThread.h" diff --git a/src/nw4r/snd/snd_StrmChannel.cpp b/src/nw4r/snd/snd_StrmChannel.cpp index 6e101201..d8ef1022 100644 --- a/src/nw4r/snd/snd_StrmChannel.cpp +++ b/src/nw4r/snd/snd_StrmChannel.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_StrmChannel.h" diff --git a/src/nw4r/snd/snd_StrmFile.cpp b/src/nw4r/snd/snd_StrmFile.cpp index 19796df8..938e397c 100644 --- a/src/nw4r/snd/snd_StrmFile.cpp +++ b/src/nw4r/snd/snd_StrmFile.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_StrmFile.h" diff --git a/src/nw4r/snd/snd_StrmPlayer.cpp b/src/nw4r/snd/snd_StrmPlayer.cpp index 40ba5ba0..9dc713ef 100644 --- a/src/nw4r/snd/snd_StrmPlayer.cpp +++ b/src/nw4r/snd/snd_StrmPlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_StrmPlayer.h" diff --git a/src/nw4r/snd/snd_StrmSound.cpp b/src/nw4r/snd/snd_StrmSound.cpp index afd58488..90c6fe5a 100644 --- a/src/nw4r/snd/snd_StrmSound.cpp +++ b/src/nw4r/snd/snd_StrmSound.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_StrmSound.h" diff --git a/src/nw4r/snd/snd_StrmSoundHandle.cpp b/src/nw4r/snd/snd_StrmSoundHandle.cpp index 46708077..2161fba2 100644 --- a/src/nw4r/snd/snd_StrmSoundHandle.cpp +++ b/src/nw4r/snd/snd_StrmSoundHandle.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_StrmSoundHandle.h" diff --git a/src/nw4r/snd/snd_Task.cpp b/src/nw4r/snd/snd_Task.cpp index 49d2abfe..af1196c6 100644 --- a/src/nw4r/snd/snd_Task.cpp +++ b/src/nw4r/snd/snd_Task.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Task.h" diff --git a/src/nw4r/snd/snd_TaskManager.cpp b/src/nw4r/snd/snd_TaskManager.cpp index 14adc5a9..ad40ec9b 100644 --- a/src/nw4r/snd/snd_TaskManager.cpp +++ b/src/nw4r/snd/snd_TaskManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_TaskManager.h" diff --git a/src/nw4r/snd/snd_TaskThread.cpp b/src/nw4r/snd/snd_TaskThread.cpp index bd8371fb..237b3bc0 100644 --- a/src/nw4r/snd/snd_TaskThread.cpp +++ b/src/nw4r/snd/snd_TaskThread.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_TaskThread.h" diff --git a/src/nw4r/snd/snd_Util.cpp b/src/nw4r/snd/snd_Util.cpp index 28cfa88d..ccdb8035 100644 --- a/src/nw4r/snd/snd_Util.cpp +++ b/src/nw4r/snd/snd_Util.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Util.h" diff --git a/src/nw4r/snd/snd_Voice.cpp b/src/nw4r/snd/snd_Voice.cpp index fa0846a8..ef9e27ef 100644 --- a/src/nw4r/snd/snd_Voice.cpp +++ b/src/nw4r/snd/snd_Voice.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_Voice.h" diff --git a/src/nw4r/snd/snd_VoiceManager.cpp b/src/nw4r/snd/snd_VoiceManager.cpp index 2ab38dcb..df1bd462 100644 --- a/src/nw4r/snd/snd_VoiceManager.cpp +++ b/src/nw4r/snd/snd_VoiceManager.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_VoiceManager.h" diff --git a/src/nw4r/snd/snd_WaveArchive.cpp b/src/nw4r/snd/snd_WaveArchive.cpp index 8746f935..6f55e5f7 100644 --- a/src/nw4r/snd/snd_WaveArchive.cpp +++ b/src/nw4r/snd/snd_WaveArchive.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_WaveArchive.h" diff --git a/src/nw4r/snd/snd_WaveFile.cpp b/src/nw4r/snd/snd_WaveFile.cpp index ce520003..888d419e 100644 --- a/src/nw4r/snd/snd_WaveFile.cpp +++ b/src/nw4r/snd/snd_WaveFile.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_WaveFile.h" diff --git a/src/nw4r/snd/snd_WaveSound.cpp b/src/nw4r/snd/snd_WaveSound.cpp index 183cbb69..6bfc8d64 100644 --- a/src/nw4r/snd/snd_WaveSound.cpp +++ b/src/nw4r/snd/snd_WaveSound.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_WaveSound.h" diff --git a/src/nw4r/snd/snd_WaveSoundHandle.cpp b/src/nw4r/snd/snd_WaveSoundHandle.cpp index cd4eda6b..b4080e69 100644 --- a/src/nw4r/snd/snd_WaveSoundHandle.cpp +++ b/src/nw4r/snd/snd_WaveSoundHandle.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_WaveSoundHandle.h" diff --git a/src/nw4r/snd/snd_WsdFile.cpp b/src/nw4r/snd/snd_WsdFile.cpp index 2e9866c6..45bbc662 100644 --- a/src/nw4r/snd/snd_WsdFile.cpp +++ b/src/nw4r/snd/snd_WsdFile.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_WsdFile.h" diff --git a/src/nw4r/snd/snd_WsdPlayer.cpp b/src/nw4r/snd/snd_WsdPlayer.cpp index d48f49f3..e45ee650 100644 --- a/src/nw4r/snd/snd_WsdPlayer.cpp +++ b/src/nw4r/snd/snd_WsdPlayer.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_WsdPlayer.h" diff --git a/src/nw4r/snd/snd_adpcm.cpp b/src/nw4r/snd/snd_adpcm.cpp index e4e79102..bbcb0efa 100644 --- a/src/nw4r/snd/snd_adpcm.cpp +++ b/src/nw4r/snd/snd_adpcm.cpp @@ -1 +1 @@ -#include +#include "nw4r/snd/snd_adpcm.h" diff --git a/src/nw4r/snd/snd_debug.cpp b/src/nw4r/snd/snd_debug.cpp index dad0b031..b86b404b 100644 --- a/src/nw4r/snd/snd_debug.cpp +++ b/src/nw4r/snd/snd_debug.cpp @@ -1 +1 @@ -// #include +// #include "nw4r/snd/snd_debug.h" diff --git a/src/nw4r/ut/ut_CharStrmReader.cpp b/src/nw4r/ut/ut_CharStrmReader.cpp index 3891cc00..f57dba0d 100644 --- a/src/nw4r/ut/ut_CharStrmReader.cpp +++ b/src/nw4r/ut/ut_CharStrmReader.cpp @@ -1,6 +1,6 @@ // ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_CharStrmReader.cpp -#include +#include "nw4r/ut/ut_CharStrmReader.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_CharWriter.cpp b/src/nw4r/ut/ut_CharWriter.cpp index 15eef532..f9a733c5 100644 --- a/src/nw4r/ut/ut_CharWriter.cpp +++ b/src/nw4r/ut/ut_CharWriter.cpp @@ -1,6 +1,6 @@ // ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_CharWriter.cpp -#include +#include "nw4r/ut.h" namespace { @@ -43,22 +43,14 @@ void CharWriter::SetupGX() { SetupGXWithColorMapping(mColorMapping.min, mColorMapping.max); } else if (mFont != NULL) { switch (mFont->GetTextureFormat()) { - case GX_TF_I4: - case GX_TF_I8: - SetupGXForI(); - break; - case GX_TF_IA4: - case GX_TF_IA8: - SetupGXDefault(); - break; - case GX_TF_RGB565: - case GX_TF_RGB5A3: - case GX_TF_RGBA8: - SetupGXForRGBA(); - break; - default: - SetupGXDefault(); - break; + case GX_TF_I4: + case GX_TF_I8: SetupGXForI(); break; + case GX_TF_IA4: + case GX_TF_IA8: SetupGXDefault(); break; + case GX_TF_RGB565: + case GX_TF_RGB5A3: + case GX_TF_RGBA8: SetupGXForRGBA(); break; + default: SetupGXDefault(); break; } } else { SetupGXDefault(); diff --git a/src/nw4r/ut/ut_DvdFileStream.cpp b/src/nw4r/ut/ut_DvdFileStream.cpp index 249d1659..bf0fd294 100644 --- a/src/nw4r/ut/ut_DvdFileStream.cpp +++ b/src/nw4r/ut/ut_DvdFileStream.cpp @@ -1,6 +1,6 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_DvdFileStream.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_DvdLockedFileStream.cpp b/src/nw4r/ut/ut_DvdLockedFileStream.cpp index a327b252..a4753d5c 100644 --- a/src/nw4r/ut/ut_DvdLockedFileStream.cpp +++ b/src/nw4r/ut/ut_DvdLockedFileStream.cpp @@ -1,7 +1,7 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_DvdLockedFileStream.cpp -#include -#include +#include "nw4r/ut.h" // IWYU pragma: export +#include "rvl/OS.h" // IWYU pragma: export namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_FileStream.cpp b/src/nw4r/ut/ut_FileStream.cpp index da46710f..d230b627 100644 --- a/src/nw4r/ut/ut_FileStream.cpp +++ b/src/nw4r/ut/ut_FileStream.cpp @@ -1,6 +1,6 @@ // Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_FileStream.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { @@ -39,15 +39,10 @@ u32 FileStream::FilePosition::Append(s32 offset) { void FileStream::FilePosition::Seek(s32 offset, u32 origin) { switch (origin) { - case SEEKORG_BEG: - mFileOffset = 0; - break; - case SEEKORG_END: - mFileOffset = mFileSize; - break; - case SEEKORG_CUR: - default: - break; + case SEEKORG_BEG: mFileOffset = 0; break; + case SEEKORG_END: mFileOffset = mFileSize; break; + case SEEKORG_CUR: + default: break; } Skip(offset); diff --git a/src/nw4r/ut/ut_Font.cpp b/src/nw4r/ut/ut_Font.cpp index eb46562f..305209f3 100644 --- a/src/nw4r/ut/ut_Font.cpp +++ b/src/nw4r/ut/ut_Font.cpp @@ -1,25 +1,17 @@ // Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_Font.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { void Font::InitReaderFunc(FontEncoding encode) { switch (encode) { - case FONT_ENCODE_UTF8: - mReadFunc = &CharStrmReader::ReadNextCharUTF8; - break; - case FONT_ENCODE_UTF16: - mReadFunc = &CharStrmReader::ReadNextCharUTF16; - break; - case FONT_ENCODE_SJIS: - mReadFunc = &CharStrmReader::ReadNextCharSJIS; - break; - case FONT_ENCODE_CP1252: - default: - mReadFunc = &CharStrmReader::ReadNextCharCP1252; - break; + case FONT_ENCODE_UTF8: mReadFunc = &CharStrmReader::ReadNextCharUTF8; break; + case FONT_ENCODE_UTF16: mReadFunc = &CharStrmReader::ReadNextCharUTF16; break; + case FONT_ENCODE_SJIS: mReadFunc = &CharStrmReader::ReadNextCharSJIS; break; + case FONT_ENCODE_CP1252: + default: mReadFunc = &CharStrmReader::ReadNextCharCP1252; break; } } diff --git a/src/nw4r/ut/ut_IOStream.cpp b/src/nw4r/ut/ut_IOStream.cpp index 91d37c83..77bd0b8a 100644 --- a/src/nw4r/ut/ut_IOStream.cpp +++ b/src/nw4r/ut/ut_IOStream.cpp @@ -1,6 +1,6 @@ // Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_IOStream.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_LinkList.cpp b/src/nw4r/ut/ut_LinkList.cpp index 5b0d8ee1..687243a6 100644 --- a/src/nw4r/ut/ut_LinkList.cpp +++ b/src/nw4r/ut/ut_LinkList.cpp @@ -1,4 +1,4 @@ -#include +#include "nw4r/ut/ut_LinkList.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_LockedCache.cpp b/src/nw4r/ut/ut_LockedCache.cpp index 7db98a98..295f3365 100644 --- a/src/nw4r/ut/ut_LockedCache.cpp +++ b/src/nw4r/ut/ut_LockedCache.cpp @@ -1,6 +1,6 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_LockedCache.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_NandFileStream.cpp b/src/nw4r/ut/ut_NandFileStream.cpp index 4b2c7bb8..9dd77084 100644 --- a/src/nw4r/ut/ut_NandFileStream.cpp +++ b/src/nw4r/ut/ut_NandFileStream.cpp @@ -1,7 +1,7 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_NandFileStream.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { @@ -134,7 +134,7 @@ bool NandFileStream::ReadAsync(void *dst, u32 size, AsyncCallback callback, void NANDSeek(&mAsyncContext.info, mFilePosition.Tell(), NAND_SEEK_BEG); bool success = - NANDReadAsync(&mAsyncContext.info, dst, size, NandAsyncCallback_, &mAsyncContext.block) == NAND_RESULT_OK; + NANDReadAsync(&mAsyncContext.info, dst, size, NandAsyncCallback_, &mAsyncContext.block) == NAND_RESULT_OK; if (success) { mFilePosition.Skip(size); diff --git a/src/nw4r/ut/ut_ResFont.cpp b/src/nw4r/ut/ut_ResFont.cpp index 2fd198e2..3323afb5 100644 --- a/src/nw4r/ut/ut_ResFont.cpp +++ b/src/nw4r/ut/ut_ResFont.cpp @@ -1,6 +1,6 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_ResFont.cpp -#include +#include "nw4r/ut.h" const u32 MAGIC_RESFONT = 'RFNT'; const u32 MAGIC_UNPACKED = 'RFNU'; @@ -36,7 +36,7 @@ bool ResFont::SetResource(void *buffer) { if (header->magic == MAGIC_UNPACKED) { BinaryBlockHeader *block = - reinterpret_cast(reinterpret_cast(header) + header->headerSize); + reinterpret_cast(reinterpret_cast(header) + header->headerSize); for (int i = 0; i < header->numBlocks; i++) { if (block->magic == MAGIC_FONTINFO) { @@ -74,44 +74,42 @@ void *ResFont::RemoveResource() { FontInformation *ResFont::Rebuild(BinaryFileHeader *header) { BinaryBlockHeader *block = - reinterpret_cast(reinterpret_cast(header) + header->headerSize); + reinterpret_cast(reinterpret_cast(header) + header->headerSize); FontInformation *info = NULL; for (int i = 0; i < header->numBlocks; i++) { switch (block->magic) { - case MAGIC_FONTINFO: - info = reinterpret_cast(block + 1); - ResolveOffset(info->fontGlyph, header); + case MAGIC_FONTINFO: + info = reinterpret_cast(block + 1); + ResolveOffset(info->fontGlyph, header); - if (info->fontWidth != 0) { - ResolveOffset(info->fontWidth, header); - } + if (info->fontWidth != 0) { + ResolveOffset(info->fontWidth, header); + } - if (info->fontMap != 0) { - ResolveOffset(info->fontMap, header); - } - break; - case MAGIC_TEXGLYPH: - ResolveOffset(reinterpret_cast(block + 1)->sheetImage, header); - break; - case MAGIC_CHARWIDTH: { - FontWidth *width = reinterpret_cast(block + 1); - if (width->next != 0) { - ResolveOffset(width->next, header); + if (info->fontMap != 0) { + ResolveOffset(info->fontMap, header); + } + break; + case MAGIC_TEXGLYPH: + ResolveOffset(reinterpret_cast(block + 1)->sheetImage, header); + break; + case MAGIC_CHARWIDTH: { + FontWidth *width = reinterpret_cast(block + 1); + if (width->next != 0) { + ResolveOffset(width->next, header); + } + break; } - break; - } - case MAGIC_CHARMAP: { - FontCodeMap *map = reinterpret_cast(block + 1); - if (map->next != 0) { - ResolveOffset(map->next, header); + case MAGIC_CHARMAP: { + FontCodeMap *map = reinterpret_cast(block + 1); + if (map->next != 0) { + ResolveOffset(map->next, header); + } + break; } - break; - } - case MAGIC_GLGR: - break; - default: - return NULL; + case MAGIC_GLGR: break; + default: return NULL; } block = reinterpret_cast(reinterpret_cast(block) + block->length); diff --git a/src/nw4r/ut/ut_ResFontBase.cpp b/src/nw4r/ut/ut_ResFontBase.cpp index 87e78e2a..126b21e8 100644 --- a/src/nw4r/ut/ut_ResFontBase.cpp +++ b/src/nw4r/ut/ut_ResFontBase.cpp @@ -1,6 +1,6 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_ResFontBase.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { @@ -146,31 +146,27 @@ u16 ResFontBase::FindGlyphIndex(const FontCodeMap *map, u16 c) const { u16 index = 0xFFFF; switch (map->mappingMethod) { - case FONT_MAPMETHOD_LINEAR: - index = map->mapInfo[0] + (c - map->firstChar); - break; - case FONT_MAPMETHOD_ARRAY: - index = map->mapInfo[c - map->firstChar]; - break; - case FONT_MAPMETHOD_SCAN: - const CMapInfoScan *info = reinterpret_cast(map->mapInfo); - - const CMapScanEntry *s = info->entries; - const CMapScanEntry *e = &info->entries[info->num - 1]; - - while (s <= e) { - const CMapScanEntry *m = s + (e - s) / 2; - - if (m->code < c) { - s = m + 1; - } else if (c < m->code) { - e = m - 1; - } else { - return m->index; + case FONT_MAPMETHOD_LINEAR: index = map->mapInfo[0] + (c - map->firstChar); break; + case FONT_MAPMETHOD_ARRAY: index = map->mapInfo[c - map->firstChar]; break; + case FONT_MAPMETHOD_SCAN: + const CMapInfoScan *info = reinterpret_cast(map->mapInfo); + + const CMapScanEntry *s = info->entries; + const CMapScanEntry *e = &info->entries[info->num - 1]; + + while (s <= e) { + const CMapScanEntry *m = s + (e - s) / 2; + + if (m->code < c) { + s = m + 1; + } else if (c < m->code) { + e = m - 1; + } else { + return m->index; + } } - } - break; + break; } return index; diff --git a/src/nw4r/ut/ut_RomFont.cpp b/src/nw4r/ut/ut_RomFont.cpp index 4c7ee649..8afe68ae 100644 --- a/src/nw4r/ut/ut_RomFont.cpp +++ b/src/nw4r/ut/ut_RomFont.cpp @@ -1,6 +1,6 @@ // Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_RomFont.cpp --- Mostly unused -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { @@ -61,10 +61,8 @@ bool RomFont::Load(void *buffer) { u32 RomFont::GetRequireBufferSize() { switch (OSGetFontEncode()) { - case OS_FONT_ENCODE_ANSI: - return 0x00020120; - case OS_FONT_ENCODE_SJIS: - return 0x00120F00; + case OS_FONT_ENCODE_ANSI: return 0x00020120; + case OS_FONT_ENCODE_SJIS: return 0x00120F00; } return 0; @@ -187,10 +185,8 @@ void RomFont::GetGlyph(Glyph *out, u16 c) const { FontEncoding RomFont::GetEncoding() const { switch (mFontEncode) { - case OS_FONT_ENCODE_ANSI: - return FONT_ENCODE_CP1252; - case OS_FONT_ENCODE_SJIS: - return FONT_ENCODE_SJIS; + case OS_FONT_ENCODE_ANSI: return FONT_ENCODE_CP1252; + case OS_FONT_ENCODE_SJIS: return FONT_ENCODE_SJIS; } return FONT_ENCODE_CP1252; @@ -213,12 +209,8 @@ u16 RomFont::HandleUndefinedChar(u16 c) const { bool valid; switch (mFontEncode) { - case OS_FONT_ENCODE_ANSI: - valid = IsCP1252Char(c); - break; - case OS_FONT_ENCODE_SJIS: - valid = IsSJISHalfWidthChar(c) || IsSJISFullWidthChar(c); - break; + case OS_FONT_ENCODE_ANSI: valid = IsCP1252Char(c); break; + case OS_FONT_ENCODE_SJIS: valid = IsSJISHalfWidthChar(c) || IsSJISFullWidthChar(c); break; } return valid ? c : mAlternateChar; diff --git a/src/nw4r/ut/ut_TagProcessorBase.cpp b/src/nw4r/ut/ut_TagProcessorBase.cpp index a0fa7dd5..11669ae4 100644 --- a/src/nw4r/ut/ut_TagProcessorBase.cpp +++ b/src/nw4r/ut/ut_TagProcessorBase.cpp @@ -1,6 +1,6 @@ // Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_TagProcessorBase.cpp -#include +#include "nw4r/ut.h" namespace nw4r { namespace ut { @@ -14,12 +14,8 @@ TagProcessorBase::~TagProcessorBase() {} template Operation TagProcessorBase::Process(u16 ch, PrintContext *ctx) { switch (ch) { - case '\n': - ProcessLinefeed(ctx); - return OPERATION_NEXT_LINE; - case '\t': - ProcessTab(ctx); - return OPERATION_NO_CHAR_SPACE; + case '\n': ProcessLinefeed(ctx); return OPERATION_NEXT_LINE; + case '\t': ProcessTab(ctx); return OPERATION_NO_CHAR_SPACE; } return OPERATION_DEFAULT; @@ -28,26 +24,26 @@ Operation TagProcessorBase::Process(u16 ch, PrintContext *ctx) { template Operation TagProcessorBase::CalcRect(Rect *rect, u16 ch, PrintContext *ctx) { switch (ch) { - case '\n': { - const TextWriterBase &writer = *ctx->writer; - rect->right = writer.GetCursorX(); - rect->top = writer.GetCursorY(); - ProcessLinefeed(ctx); - rect->left = writer.GetCursorX(); - rect->bottom = writer.GetCursorY() + ctx->writer->GetFontHeight(); - rect->Normalize(); - return OPERATION_NEXT_LINE; - } - case '\t': { - const TextWriterBase &writer = *ctx->writer; - rect->left = writer.GetCursorX(); - ProcessTab(ctx); - rect->right = writer.GetCursorX(); - rect->top = writer.GetCursorY(); - rect->bottom = rect->top + writer.GetFontHeight(); - rect->Normalize(); - return OPERATION_NO_CHAR_SPACE; - } + case '\n': { + const TextWriterBase &writer = *ctx->writer; + rect->right = writer.GetCursorX(); + rect->top = writer.GetCursorY(); + ProcessLinefeed(ctx); + rect->left = writer.GetCursorX(); + rect->bottom = writer.GetCursorY() + ctx->writer->GetFontHeight(); + rect->Normalize(); + return OPERATION_NEXT_LINE; + } + case '\t': { + const TextWriterBase &writer = *ctx->writer; + rect->left = writer.GetCursorX(); + ProcessTab(ctx); + rect->right = writer.GetCursorX(); + rect->top = writer.GetCursorY(); + rect->bottom = rect->top + writer.GetFontHeight(); + rect->Normalize(); + return OPERATION_NO_CHAR_SPACE; + } } return OPERATION_DEFAULT; diff --git a/src/nw4r/ut/ut_TextWriterBase.cpp b/src/nw4r/ut/ut_TextWriterBase.cpp index 0caa89f3..af8f085e 100644 --- a/src/nw4r/ut/ut_TextWriterBase.cpp +++ b/src/nw4r/ut/ut_TextWriterBase.cpp @@ -1,8 +1,8 @@ // Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_TextWriterBase.cpp -#include -#include +#include "__va_arg.h" +#include "nw4r/ut.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_binaryFileFormat.cpp b/src/nw4r/ut/ut_binaryFileFormat.cpp index cde48e24..30e6a89d 100644 --- a/src/nw4r/ut/ut_binaryFileFormat.cpp +++ b/src/nw4r/ut/ut_binaryFileFormat.cpp @@ -1,4 +1,4 @@ -#include +#include "nw4r/ut/ut_binaryFileFormat.h" namespace nw4r { namespace ut { diff --git a/src/nw4r/ut/ut_list.cpp b/src/nw4r/ut/ut_list.cpp index f11fc02c..7f1c9bd1 100644 --- a/src/nw4r/ut/ut_list.cpp +++ b/src/nw4r/ut/ut_list.cpp @@ -1,6 +1,6 @@ // Ported From https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_list.cpp -#include +#include "nw4r/ut/ut_list.h" namespace nw4r { namespace ut { @@ -106,7 +106,7 @@ void *List_GetNth(const List *list, u16 n) { void *object; int c; - for (c = 0, object = nullptr; object = List_GetNext(list, object); c++) { + for (c = 0, object = nullptr; (object = List_GetNext(list, object)); c++) { if (n == c) { return object; } diff --git a/src/s/s_Crc.cpp b/src/s/s_Crc.cpp index 3a1ab434..7ba034fb 100644 --- a/src/s/s_Crc.cpp +++ b/src/s/s_Crc.cpp @@ -1,5 +1,6 @@ -#include -#include +#include "s/s_Crc.h" + +#include "rvl/OS.h" // IWYU pragma: export namespace sCrc { diff --git a/src/s/s_Math.cpp b/src/s/s_Math.cpp index ebc8504b..7712c9f4 100644 --- a/src/s/s_Math.cpp +++ b/src/s/s_Math.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "s/s_Math.h" + +#include "math.h" + namespace sLib { diff --git a/src/s/s_Phase.cpp b/src/s/s_Phase.cpp index 734bb35e..1f8681e8 100644 --- a/src/s/s_Phase.cpp +++ b/src/s/s_Phase.cpp @@ -1,4 +1,4 @@ -#include +#include "s/s_Phase.hpp" // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made diff --git a/src/s/s_StateID.cpp b/src/s/s_StateID.cpp index c03ca5a7..be1e8988 100644 --- a/src/s/s_StateID.cpp +++ b/src/s/s_StateID.cpp @@ -1,8 +1,11 @@ -#include -#include -#include -#include -#include +// clang-format off +#include "s/s_StateID.hpp" + +#include "common.h" +#include "s/s_StateMethodUsr_FI.hpp" +#include "s/s_StateInterfaces.hpp" +#include "s/s_StateIDChk.hpp" +// clang-format on // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made diff --git a/src/s/s_StateMethod.cpp b/src/s/s_StateMethod.cpp index 7c59854f..96655a45 100644 --- a/src/s/s_StateMethod.cpp +++ b/src/s/s_StateMethod.cpp @@ -1,24 +1,17 @@ -#include -#include -#include -#include +#include "s/s_StateMethod.hpp" + +#include "common.h" +#include "s/s_StateID.hpp" +#include "s/s_StateInterfaces.hpp" + // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made -sStateMethod_c::sStateMethod_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState) : - mpStateChk(checker), - mpStateFct(factory), - mInitFinalizeLock(false), - mExecutionLock(false), - mIsValid(false), - mStateChanged(false), - mRefreshStateMethod(false), - mpNewStateID(&initialState), - mpOldStateID(&sStateID::null), - mpStateID(&initialState), - mpState(nullptr) { -} +sStateMethod_c::sStateMethod_c(sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState) + : mpStateChk(checker), mpStateFct(factory), mInitFinalizeLock(false), mExecutionLock(false), mIsValid(false), + mStateChanged(false), mRefreshStateMethod(false), mpNewStateID(&initialState), mpOldStateID(&sStateID::null), + mpStateID(&initialState), mpState(nullptr) {} sStateMethod_c::~sStateMethod_c() {} diff --git a/src/s/s_StateMethodUsr_FI.cpp b/src/s/s_StateMethodUsr_FI.cpp index 9e42fc58..b11ef0cc 100644 --- a/src/s/s_StateMethodUsr_FI.cpp +++ b/src/s/s_StateMethodUsr_FI.cpp @@ -1,12 +1,13 @@ -#include -#include +#include "s/s_StateMethodUsr_FI.hpp" + +#include "common.h" + // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made -sStateMethodUsr_FI_c::sStateMethodUsr_FI_c(sStateIDChkIf_c &check, sStateFctIf_c &factory, const sStateIDIf_c &state) : - sStateMethod_c(check, factory, state) { -} +sStateMethodUsr_FI_c::sStateMethodUsr_FI_c(sStateIDChkIf_c &check, sStateFctIf_c &factory, const sStateIDIf_c &state) + : sStateMethod_c(check, factory, state) {} int sStateMethodUsr_FI_c::initializeStateLocalMethod() { mpState = mpStateFct.build(*getNewStateID()); // Create new state holder with the next state ID @@ -25,6 +26,6 @@ void sStateMethodUsr_FI_c::finalizeStateLocalMethod() { } void sStateMethodUsr_FI_c::changeStateLocalMethod(const sStateIDIf_c &newID) { - finalizeStateMethod(); // Terminate the current state + finalizeStateMethod(); // Terminate the current state initializeStateMethod(); // Initialize the new state } diff --git a/src/toBeSorted/arc_callback_handler.cpp b/src/toBeSorted/arc_callback_handler.cpp index 9b79d21c..8439aec8 100644 --- a/src/toBeSorted/arc_callback_handler.cpp +++ b/src/toBeSorted/arc_callback_handler.cpp @@ -1,13 +1,13 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "d/col/bg/d_bg_s.h" +#include "d/col/bg/d_bg_w_kcol.h" +#include "d/d_rawarchive.h" +#include "egg/gfx/eggLight.h" +#include "m/m3d/m3d.h" +#include "nw4r/g3d/g3d_resfile.h" +#include "nw4r/g3d/g3d_resmat.h" +#include "nw4r/g3d/g3d_resmdl.h" +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" +#include "toBeSorted/arc_managers/oarc_manager.h" ArcCallbackHandler ArcCallbackHandler::sInstance; diff --git a/src/toBeSorted/arc_managers/current_stage_arc_manager.cpp b/src/toBeSorted/arc_managers/current_stage_arc_manager.cpp index 945cd34e..dec837b6 100644 --- a/src/toBeSorted/arc_managers/current_stage_arc_manager.cpp +++ b/src/toBeSorted/arc_managers/current_stage_arc_manager.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" + +#include "d/d_heap.h" + CurrentStageArcManager *CurrentStageArcManager::sInstance; @@ -20,12 +22,14 @@ bool CurrentStageArcManager::setStage(const char *newStage) { mCurrentLoadingStageArcName.sprintf("%s_stg_l0", mStageName); if (dRawArcEntry_c::checkArcExistsOnDisk(mCurrentLoadingStageArcName, getCurrentStageDirectory())) { - return (bool)mArcTable.getArcOrLoadFromDisk(mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0, - dHeap::work2Heap.heap); + return (bool)mArcTable.getArcOrLoadFromDisk( + mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0, dHeap::work2Heap.heap + ); } else { mCurrentLoadingStageArcName.sprintf("%s_stg", mStageName); - return (bool)mArcTable.getArcOrLoadFromDisk(mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0, - dHeap::work2Heap.heap); + return (bool)mArcTable.getArcOrLoadFromDisk( + mCurrentLoadingStageArcName, getCurrentStageDirectory(), 0, dHeap::work2Heap.heap + ); } } @@ -48,8 +52,8 @@ bool CurrentStageArcManager::loadFileFromExtraLayerArc(int layer) { mStageExtraLayerArcName.sprintf("%s_stg_l%d", mStageName, layer); if (dRawArcEntry_c::checkArcExistsOnDisk(mStageExtraLayerArcName, getCurrentStageDirectory())) { - return (bool)mArcTable.getArcOrLoadFromDisk(mStageExtraLayerArcName, getCurrentStageDirectory(), 0, - dHeap::work2Heap.heap); + return (bool + )mArcTable.getArcOrLoadFromDisk(mStageExtraLayerArcName, getCurrentStageDirectory(), 0, dHeap::work2Heap.heap); } else { return true; } @@ -63,8 +67,8 @@ bool CurrentStageArcManager::unloadExtraLayerArc() { } bool CurrentStageArcManager::loadRoomArc(int room) { - return (bool)mArcTable.getArcOrLoadFromDisk(getRoomArcDirectory(room), getCurrentStageDirectory(), 0, - dHeap::work2Heap.heap); + return (bool + )mArcTable.getArcOrLoadFromDisk(getRoomArcDirectory(room), getCurrentStageDirectory(), 0, dHeap::work2Heap.heap); } bool CurrentStageArcManager::addEntryFromSuperArc(const char *path, void *data) { diff --git a/src/toBeSorted/arc_managers/layout_arc_manager.cpp b/src/toBeSorted/arc_managers/layout_arc_manager.cpp index 8afda7b7..3870ed76 100644 --- a/src/toBeSorted/arc_managers/layout_arc_manager.cpp +++ b/src/toBeSorted/arc_managers/layout_arc_manager.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "toBeSorted/arc_managers/layout_arc_manager.h" + +#include "d/d_heap.h" + LayoutArcManager *LayoutArcManager::sInstance; diff --git a/src/toBeSorted/arc_managers/oarc_manager.cpp b/src/toBeSorted/arc_managers/oarc_manager.cpp index a939b8b4..1faec959 100644 --- a/src/toBeSorted/arc_managers/oarc_manager.cpp +++ b/src/toBeSorted/arc_managers/oarc_manager.cpp @@ -1,5 +1,7 @@ -#include -#include +#include "toBeSorted/arc_managers/oarc_manager.h" + +#include "d/d_heap.h" + OarcManager *OarcManager::sInstance; diff --git a/src/toBeSorted/attention.cpp b/src/toBeSorted/attention.cpp index 0093ae88..b81dff54 100644 --- a/src/toBeSorted/attention.cpp +++ b/src/toBeSorted/attention.cpp @@ -1,9 +1,11 @@ -#include -#include -#include -#include -#include -#include +#include "toBeSorted/attention.h" + +#include "c/c_lib.h" +#include "d/a/d_a_player.h" +#include "d/d_heap.h" +#include "d/d_pad.h" +#include "toBeSorted/arc_managers/oarc_manager.h" +#include "toBeSorted/event_manager.h" mVec3_c attnVectors[4]; @@ -29,13 +31,9 @@ class UnkAttnClass { f32 field_0x14; }; -void UnkAttnClass::init() { - -} +void UnkAttnClass::init() {} -void UnkAttnClass::remove() { - -} +void UnkAttnClass::remove() {} UnkAttnClass::UnkAttnClass() : field_0x00(0), field_0x08(field_0x00 | 8), field_0x0A(300), field_0x0C(30), field_0x10(30), field_0x12(10), @@ -66,7 +64,6 @@ bool AttentionManager::create() { mGroups[i].getOtherPool()->clear(); } - mModels.field_0xA5C = 0; mModels.mCurrentTargetInfoIdx = 0; mModels.mState = NONE; @@ -90,8 +87,10 @@ bool AttentionManager::create() { return success; } -static const CursorStruct s_Cursors[2] = {{"ZcursorA", "ZcursorAInOut_00", "ZcursorALoop_00", nullptr}, - {"ZcursorB", "ZcursorBIn_00", "ZcursorBLoop_00", "ZcursorBIn_00"}}; +static const CursorStruct s_Cursors[2] = { + {"ZcursorA", "ZcursorAInOut_00", "ZcursorALoop_00", nullptr}, + {"ZcursorB", "ZcursorBIn_00", "ZcursorBLoop_00", "ZcursorBIn_00"} +}; bool AttentionManager::createHeap() { mModels.mResFile = OarcManager::sInstance->getMdlFromArc2("UI_Data"); @@ -194,7 +193,8 @@ bool AttentionManager::switchTarget(s32 idx) { mHoldingZ = checkZButtonHeld(); AttentionPool *left = mGroups[idx].getPool(); AttentionPool *right = mGroups[idx].getOtherPool(); - if ((attnClass.field_0x08 & 8) != 0 && (mModels.mState == OFF || mModels.mState == NONE) && checkLink2() && right->mNumUsedRefs != 0) { + if ((attnClass.field_0x08 & 8) != 0 && (mModels.mState == OFF || mModels.mState == NONE) && checkLink2() && + right->mNumUsedRefs != 0) { zPressed = true; } @@ -205,7 +205,6 @@ bool AttentionManager::switchTarget(s32 idx) { } } - debugPrint8("%4.4s -> %4.4s (%c pos=%d, cnt=%d)"); } @@ -323,8 +322,9 @@ int AttentionPool::fn_80096190(dAcObjBase_c *actor, u8 arg, InteractionType arg2 return -1; } -bool AttentionPool::insertTarget(dAcObjBase_c *actor, u32 unk1, mVec3_c *pos, InteractionType interactionType, - u8 field_0x03, f32 field_0x04) { +bool AttentionPool::insertTarget( + dAcObjBase_c *actor, u32 unk1, mVec3_c *pos, InteractionType interactionType, u8 field_0x03, f32 field_0x04 +) { // Bunch of regshuffles for (s32 i = 0; i < 8; i++) { if (i >= mNumUsedRefs) { @@ -398,8 +398,10 @@ void AttentionGroup::fn_800964B0() { // This effectively copies a position vector from "left" to "right", // where left and right are swapped sometimes. So this is effectively // a double-buffered object pool? - int target = right->fn_80096190(left->mRefs[left->mInfos[i].mActorIdx].get(), left->mInfos[i].unk, - (InteractionType)left->mInfos[i].mInteractionType); + int target = right->fn_80096190( + left->mRefs[left->mInfos[i].mActorIdx].get(), left->mInfos[i].unk, + (InteractionType)left->mInfos[i].mInteractionType + ); if (target != -1) { right->mInfos[target].field_0x08 = left->mInfos[i].field_0x08; } @@ -446,10 +448,11 @@ void AttentionManager::addTalkTarget_unused(dAcObjBase_c &actor) { addTarget(actor, talkTarget, 0, nullptr); } -void AttentionManager::addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, - f32 field_0x20, f32 field_0x24) { - static InteractionTargetDef examineTalkTarget = {1, 3, 0, EXAMINE_TALK, 0, 0.0f, 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, - 1.0f}; +void AttentionManager::addExamineTalkTarget( + dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, f32 field_0x24 +) { + static InteractionTargetDef examineTalkTarget = {1, 3, 0, EXAMINE_TALK, 0, 0.0f, + 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, 1.0f}; examineTalkTarget.interactFlags = flags; examineTalkTarget.field_0x14 = field_0x14; examineTalkTarget.field_0x20 = field_0x20; @@ -458,10 +461,11 @@ void AttentionManager::addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 addTarget(actor, examineTalkTarget, 0, nullptr); } -void AttentionManager::addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x20, - f32 field_0x24) { - static InteractionTargetDef examineTalkTarget2 = {0, 3, 0, EXAMINE_TALK, 0, 0.0f, 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, - 1.0f}; +void AttentionManager::addExamineTalkTarget( + dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x20, f32 field_0x24 +) { + static InteractionTargetDef examineTalkTarget2 = {0, 3, 0, EXAMINE_TALK, 0, 0.0f, + 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, 1.0f}; examineTalkTarget2.interactFlags = flags; examineTalkTarget2.field_0x14 = field_0x14; examineTalkTarget2.field_0x20 = field_0x20; @@ -470,8 +474,9 @@ void AttentionManager::addExamineTalkTarget(dAcObjBase_c &actor, u32 flags, f32 addTarget(actor, examineTalkTarget2, 0, nullptr); } -void AttentionManager::addCatchTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x24_neg, - f32 field_0x20_neg) { +void AttentionManager::addCatchTarget( + dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg +) { static InteractionTargetDef catchTarget = {3, 2, 1, CATCH, 0, 0.0f, 60.0f, 0.0f, 0.0f, 0.0f, 100.0f, 1.0f}; catchTarget.interactFlags = flags; catchTarget.field_0x14 = field_0x14; @@ -481,8 +486,10 @@ void AttentionManager::addCatchTarget(dAcObjBase_c &actor, u32 flags, f32 field_ addTarget(actor, catchTarget, 0, nullptr); } -void AttentionManager::addCatchLikeTarget(dAcObjBase_c &actor, InteractionType interactionType, u32 flags, - f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg) { +void AttentionManager::addCatchLikeTarget( + dAcObjBase_c &actor, InteractionType interactionType, u32 flags, f32 field_0x14, f32 field_0x24_neg, + f32 field_0x20_neg +) { static InteractionTargetDef catchTarget2 = {4, 2, 1, CATCH, 0, 0.0f, 60.0f, 0.0f, 0.0f, 0.0f, 100.0f, 1.0f}; catchTarget2.interactFlags = flags; @@ -494,8 +501,9 @@ void AttentionManager::addCatchLikeTarget(dAcObjBase_c &actor, InteractionType i addTarget(actor, catchTarget2, 0, nullptr); } -void AttentionManager::addUnk3Target(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x24_neg, - f32 field_0x20_neg) { +void AttentionManager::addUnk3Target( + dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg +) { static InteractionTargetDef unk3Target = {2, 2, 1, UNK_3, 0, 0.0f, 90.0f, 0.0f, 0.0f, 0.0f, 50.0f, 1.0f}; unk3Target.interactFlags = flags; @@ -506,13 +514,16 @@ void AttentionManager::addUnk3Target(dAcObjBase_c &actor, u32 flags, f32 field_0 addTarget(actor, unk3Target, 0, nullptr); } -void AttentionManager::addUnk3Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, - f32 field_0x20_neg) { +void AttentionManager::addUnk3Target( + dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg +) { addUnk3Target(actor, 0, nullptr, flags, arg5, field_0x14, field_0x24_neg, field_0x20_neg); } -void AttentionManager::addUnk3Target(dAcObjBase_c &actor, u32 arg2, mVec3_c *arg3, u32 flags, f32 arg5, - f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg) { +void AttentionManager::addUnk3Target( + dAcObjBase_c &actor, u32 arg2, mVec3_c *arg3, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, + f32 field_0x20_neg +) { static InteractionTargetDef unk3Target2 = {1, 1, 1, UNK_3, 0, 0.0f, 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, 1.2f}; unk3Target2.interactFlags = flags; unk3Target2.field_0x18 = arg5 - field_0x14; @@ -523,8 +534,9 @@ void AttentionManager::addUnk3Target(dAcObjBase_c &actor, u32 arg2, mVec3_c *arg addTarget(actor, unk3Target2, arg2, arg3); } -void AttentionManager::addNpcTalkTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, - f32 field_0x24) { +void AttentionManager::addNpcTalkTarget( + dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, f32 field_0x24 +) { static InteractionTargetDef talkTarget = {1, 3, 0, TALK, 0, 0.0f, 45.0f, 45.0f, 0.0f, 0.0f, 50.0f, 1.0f}; talkTarget.interactFlags = flags; talkTarget.field_0x14 = field_0x14; @@ -534,8 +546,9 @@ void AttentionManager::addNpcTalkTarget(dAcObjBase_c &actor, u32 flags, f32 fiel addTarget(actor, talkTarget, 0, nullptr); } -void AttentionManager::addUnk7Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, - f32 field_0x20_neg) { +void AttentionManager::addUnk7Target( + dAcObjBase_c &actor, u32 flags, f32 arg5, f32 field_0x14, f32 field_0x24_neg, f32 field_0x20_neg +) { static InteractionTargetDef unk7Target = {1, 1, 1, UNK_7, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 50.0f, 0.5f}; unk7Target.interactFlags = flags; unk7Target.field_0x18 = arg5 - field_0x14; @@ -546,8 +559,9 @@ void AttentionManager::addUnk7Target(dAcObjBase_c &actor, u32 flags, f32 arg5, f addTarget(actor, unk7Target, 0, nullptr); } -void AttentionManager::addReadTarget(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, - f32 field_0x24) { +void AttentionManager::addReadTarget( + dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 ignored, f32 field_0x20, f32 field_0x24 +) { static InteractionTargetDef readTarget = {1, 3, 0, READ, 0, 0.0f, 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, 1.0f}; readTarget.interactFlags = flags; readTarget.field_0x14 = field_0x14; @@ -557,8 +571,7 @@ void AttentionManager::addReadTarget(dAcObjBase_c &actor, u32 flags, f32 field_0 addTarget(actor, readTarget, 0, nullptr); } -void AttentionManager::addReadTarget2(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x20, - f32 field_0x24) { +void AttentionManager::addReadTarget2(dAcObjBase_c &actor, u32 flags, f32 field_0x14, f32 field_0x20, f32 field_0x24) { static InteractionTargetDef readTarget2 = {0, 3, 0, READ, 0, 0.0f, 60.0f, 60.0f, 0.0f, 0.0f, 50.0f, 1.0f}; readTarget2.interactFlags = flags; readTarget2.field_0x14 = field_0x14; diff --git a/src/toBeSorted/bitwise_flag_helper.cpp b/src/toBeSorted/bitwise_flag_helper.cpp index 50c3b15b..bc3ac870 100644 --- a/src/toBeSorted/bitwise_flag_helper.cpp +++ b/src/toBeSorted/bitwise_flag_helper.cpp @@ -1,6 +1,6 @@ #include "toBeSorted/bitwise_flag_helper.h" -#include +#include "common.h" bool BitwiseFlagHelper::checkFlag(u16 slot, u16 shift, const u16 *pData, u16 flagCount) { return (pData[slot] >> shift) & 1; diff --git a/src/toBeSorted/counters/arrow_counter.cpp b/src/toBeSorted/counters/arrow_counter.cpp index 4d29aae0..494acb4d 100644 --- a/src/toBeSorted/counters/arrow_counter.cpp +++ b/src/toBeSorted/counters/arrow_counter.cpp @@ -1,4 +1,4 @@ -#include +#include "toBeSorted/counters/counter.h" class ArrowCounter : public Counter { public: diff --git a/src/toBeSorted/counters/bomb_counter.cpp b/src/toBeSorted/counters/bomb_counter.cpp index 7e81493e..a4479e88 100644 --- a/src/toBeSorted/counters/bomb_counter.cpp +++ b/src/toBeSorted/counters/bomb_counter.cpp @@ -1,4 +1,4 @@ -#include +#include "toBeSorted/counters/counter.h" class BombCounter : public Counter { public: @@ -11,4 +11,4 @@ class BombCounter : public Counter { /* 80575620 */ BombCounter BOMB_COUNTER; -/* 8016E060 */ BombCounter::BombCounter(): Counter(0x1f3) { } +/* 8016E060 */ BombCounter::BombCounter() : Counter(0x1f3) {} diff --git a/src/toBeSorted/counters/counter.cpp b/src/toBeSorted/counters/counter.cpp index 42729f33..3e5cd598 100644 --- a/src/toBeSorted/counters/counter.cpp +++ b/src/toBeSorted/counters/counter.cpp @@ -1,6 +1,6 @@ -#include -#include +#include "toBeSorted/counters/counter.h" +#include "toBeSorted/item_story_flag_manager.h" /* 8016cc40 */ s32 Counter::checkedAdd(s32 num) { s32 uncommitted = getUncommittedValue(); diff --git a/src/toBeSorted/counters/extra_wallet_counter.cpp b/src/toBeSorted/counters/extra_wallet_counter.cpp index eb7bbc73..5570bff7 100644 --- a/src/toBeSorted/counters/extra_wallet_counter.cpp +++ b/src/toBeSorted/counters/extra_wallet_counter.cpp @@ -1,4 +1,4 @@ -#include +#include "toBeSorted/counters/counter.h" class ExtraWalletCounter : public Counter { public: @@ -9,7 +9,6 @@ class ExtraWalletCounter : public Counter { } }; - /* 80575640 */ ExtraWalletCounter EXTRA_WALLET_COUNTER; -/* 8016E260 */ ExtraWalletCounter::ExtraWalletCounter(): Counter(0x1fc) { } +/* 8016E260 */ ExtraWalletCounter::ExtraWalletCounter() : Counter(0x1fc) {} diff --git a/src/toBeSorted/counters/key_piece_counter.cpp b/src/toBeSorted/counters/key_piece_counter.cpp index 804ddf37..1ff6e6aa 100644 --- a/src/toBeSorted/counters/key_piece_counter.cpp +++ b/src/toBeSorted/counters/key_piece_counter.cpp @@ -1,4 +1,4 @@ -#include +#include "toBeSorted/counters/counter.h" class KeyPieceCounter : public Counter { public: diff --git a/src/toBeSorted/counters/rupee_counter.cpp b/src/toBeSorted/counters/rupee_counter.cpp index 2d9e4f26..4832a4cb 100644 --- a/src/toBeSorted/counters/rupee_counter.cpp +++ b/src/toBeSorted/counters/rupee_counter.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "toBeSorted/counters/counter.h" +#include "toBeSorted/item_story_flag_manager.h" static u16 getBaseCapacity(); static u16 getExtraWalletCapacity(); @@ -21,10 +21,10 @@ struct WalletStruct { /* 8016DE10 */ static u16 getBaseCapacity() { int i = 0; /* 804E91B0 */ WalletStruct wallet_definitions[4] = { - {0x6c, 500}, - {0x6d, 1000}, - {0x6e, 5000}, - {0x6f, 9000}, + {0x6c, 500}, + {0x6d, 1000}, + {0x6e, 5000}, + {0x6f, 9000}, }; const WalletStruct *wallet = &wallet_definitions[3]; for (; i < 4; i++, wallet--) { diff --git a/src/toBeSorted/counters/slingshot_seed_counter.cpp b/src/toBeSorted/counters/slingshot_seed_counter.cpp index 3b6528cd..d34d069f 100644 --- a/src/toBeSorted/counters/slingshot_seed_counter.cpp +++ b/src/toBeSorted/counters/slingshot_seed_counter.cpp @@ -1,4 +1,4 @@ -#include +#include "toBeSorted/counters/counter.h" class SlingshotSeedCounter : public Counter { public: diff --git a/src/toBeSorted/counters/tear_counter.cpp b/src/toBeSorted/counters/tear_counter.cpp index 6161f5bc..73aa15bf 100644 --- a/src/toBeSorted/counters/tear_counter.cpp +++ b/src/toBeSorted/counters/tear_counter.cpp @@ -1,4 +1,4 @@ -#include +#include "toBeSorted/counters/counter.h" class TearCounter : public Counter { public: @@ -11,4 +11,4 @@ class TearCounter : public Counter { /* 80575628 */ TearCounter TEAR_COUNTER; -/* 8016E0E0 */ TearCounter::TearCounter(): Counter(0x1f4) { } +/* 8016E0E0 */ TearCounter::TearCounter() : Counter(0x1f4) {} diff --git a/src/toBeSorted/dowsing_target.cpp b/src/toBeSorted/dowsing_target.cpp index 277a5883..ac5dae13 100644 --- a/src/toBeSorted/dowsing_target.cpp +++ b/src/toBeSorted/dowsing_target.cpp @@ -1,9 +1,11 @@ -#include -#include -#include -#include -#include -#include +#include "toBeSorted/dowsing_target.h" + +#include "c/c_math.h" +#include "m/m_mtx.h" +#include "nw4r/ut/ut_LinkList.h" +#include "toBeSorted/item_story_flag_manager.h" +#include "toBeSorted/tlist.h" + typedef TList DowsingList; diff --git a/src/toBeSorted/dungeonflag_manager.cpp b/src/toBeSorted/dungeonflag_manager.cpp index fc0d660e..7fcab742 100644 --- a/src/toBeSorted/dungeonflag_manager.cpp +++ b/src/toBeSorted/dungeonflag_manager.cpp @@ -1,8 +1,9 @@ +#include "libc.h" #include "toBeSorted/bitwise_flag_helper.h" #include "toBeSorted/file_manager.h" #include "toBeSorted/flag_space.h" #include "toBeSorted/unk_flag_stuff.h" -#include + // TODO move extern "C" UnkFlagDefinition DungeonflagManager__FLAG_DEFINITIONS[]; diff --git a/src/toBeSorted/file_manager.cpp b/src/toBeSorted/file_manager.cpp index 1aa3326f..394975d5 100644 --- a/src/toBeSorted/file_manager.cpp +++ b/src/toBeSorted/file_manager.cpp @@ -1,9 +1,11 @@ #include "toBeSorted/file_manager.h" + #include "f/f_base.h" -#include -#include +#include "m/m_heap.h" +#include "s/s_Crc.h" + // clang-format off -#include +#include "sized_string.h" // clang-format on // This class here makes no sense and the name might @@ -104,7 +106,6 @@ u16 *FileManager::getStoryFlagsMut() { /* 8000AA40 */ void FileManager::setSkipFlagsChecked(u16 *flags, u32 offset, u16 count) {} /* 8000AAA0 */ void FileManager::initFile(int fileNum) { - mIsFileInvalid[1] = 1; SaveFile *file = getFileA(); if (fileNum != 0) { diff --git a/src/toBeSorted/flag_space.cpp b/src/toBeSorted/flag_space.cpp index c6959e59..f915eaa7 100644 --- a/src/toBeSorted/flag_space.cpp +++ b/src/toBeSorted/flag_space.cpp @@ -1,8 +1,8 @@ #include "toBeSorted/flag_space.h" + +#include "common.h" #include "libc.h" #include "toBeSorted/file_manager.h" -#include - u16 *FlagSpace::getFlagPtrChecked() { filemanagerCheck(); diff --git a/src/toBeSorted/misc_flag_managers.cpp b/src/toBeSorted/misc_flag_managers.cpp index 1d941aa2..d23b36ec 100644 --- a/src/toBeSorted/misc_flag_managers.cpp +++ b/src/toBeSorted/misc_flag_managers.cpp @@ -1,9 +1,11 @@ -#include -#include -#include -#include -#include -#include +#include "toBeSorted/misc_flag_managers.h" + +#include "common.h" +#include "libc.h" +#include "toBeSorted/bitwise_flag_helper.h" +#include "toBeSorted/file_manager.h" +#include "toBeSorted/flag_space.h" + /* 0x800BE7B0 */ bool CommittableFlagManager::commitIfNecessary() { @@ -50,8 +52,9 @@ void TBoxFlagManager::copyFromSave(s16 sceneIndex) { /* 0x800BE990 */ bool TBoxFlagManager::checkFlag(u16 sceneIndex, u16 flag) { s32 actualFlag = (flag + sceneIndex * 0x20); - return mFlagHelper.checkFlag(actualFlag / 16, flag % 16, FileManager::getInstance()->getTBoxFlagsConst(), - getFlagCount()); + return mFlagHelper.checkFlag( + actualFlag / 16, flag % 16, FileManager::getInstance()->getTBoxFlagsConst(), getFlagCount() + ); } /* 0x800BEA30 */ diff --git a/src/toBeSorted/save_file.cpp b/src/toBeSorted/save_file.cpp index c41f1fcb..82269358 100644 --- a/src/toBeSorted/save_file.cpp +++ b/src/toBeSorted/save_file.cpp @@ -1,81 +1,82 @@ #include "toBeSorted/save_file.h" -#include "MSL_C/string.h" + +#include "string.h" // 0x800099b0 getStoryFlags0__8SaveFileFv -u16* SaveFile::getStoryFlags0() { - return story_flags; +u16 *SaveFile::getStoryFlags0() { + return story_flags; } // 0x800099c0 getStoryFlags1__8SaveFileCFv -const u16* SaveFile::getStoryFlags1() const { - return story_flags; +const u16 *SaveFile::getStoryFlags1() const { + return story_flags; } // 0x800099d0 getItemFlags0__8SaveFileFv -u16* SaveFile::getItemFlags0() { - return item_flags; +u16 *SaveFile::getItemFlags0() { + return item_flags; } // 0x800099e0 getItemFlags1__8SaveFileCFv -const u16* SaveFile::getItemFlags1() const { - return item_flags; +const u16 *SaveFile::getItemFlags1() const { + return item_flags; } // 0x800099F0 getDungeonFlags0__8SaveFileFv -u16* SaveFile::getDungeonFlags0() { +u16 *SaveFile::getDungeonFlags0() { return dungeon_flags[0]; } // 0x80009A00 getDungeonFlags1__8SaveFileCFv -const u16* SaveFile::getDungeonFlags1() const { +const u16 *SaveFile::getDungeonFlags1() const { return dungeon_flags[0]; } // 0x80009A10 getSceneFlags0__8SaveFileFv -u16* SaveFile::getSceneFlags0() { +u16 *SaveFile::getSceneFlags0() { return scene_flags; } // 0x80009A20 getSceneFlags1__8SaveFileCFv -const u16* SaveFile::getSceneFlags1() const { +const u16 *SaveFile::getSceneFlags1() const { return scene_flags; } // 0x80009A30 getTboxFlags0__8SaveFileFv -u16* SaveFile::getTboxFlags0() { +u16 *SaveFile::getTboxFlags0() { return tbox_flags; -} +} // 0x80009A40 getTboxFlags1__8SaveFileCFv -const u16* SaveFile::getTboxFlags1() const { +const u16 *SaveFile::getTboxFlags1() const { return tbox_flags; } // 0x80009A50 getTempFlags0__8SaveFileFv -u16* SaveFile::getTempFlags0() { +u16 *SaveFile::getTempFlags0() { return temp_flags; } // 0x80009A60 getTempFlags1__8SaveFileCFv -const u16* SaveFile::getTempFlags1() const { +const u16 *SaveFile::getTempFlags1() const { return temp_flags; } // 0x80009A70 getZoneFlags0__8SaveFileFv -u16* SaveFile::getZoneFlags0() { +u16 *SaveFile::getZoneFlags0() { return zone_flags; } // 0x80009A80 getZoneFlags1__8SaveFileCFv -const u16* SaveFile::getZoneFlags1() const { +const u16 *SaveFile::getZoneFlags1() const { return zone_flags; } // 0x80009A90 getEnemyFlags0__8SaveFileFv -u16* SaveFile::getEnemyFlags0() { +u16 *SaveFile::getEnemyFlags0() { return enemy_flags; } // 0x80009AA0 getEnemyFlags1__8SaveFileCFv -const u16* SaveFile::getEnemyFlags1() const { +const u16 *SaveFile::getEnemyFlags1() const { return enemy_flags; } // 0x80009AB0 getPlayerName__8SaveFileFv -wchar_t* SaveFile::getPlayerName() { +wchar_t *SaveFile::getPlayerName() { return player_name; } // 0x80009AC0 setAreaT1__8SaveFileFPc -void SaveFile::setAreaT1(char* name) { - char nameCopy [32]; - memset(nameCopy,0, 32); - - for (int i = 0; i < sizeof(nameCopy)-1; i++) { +void SaveFile::setAreaT1(char *name) { + char nameCopy[32]; + memset(nameCopy, 0, 32); + + for (int i = 0; i < sizeof(nameCopy) - 1; i++) { nameCopy[i] = name[i]; } for (int i = 0; i < sizeof(nameCopy); i++) { @@ -83,15 +84,15 @@ void SaveFile::setAreaT1(char* name) { } } // 0x80009BE0 getAreaT1__8SaveFileFv -char* SaveFile::getAreaT1() { +char *SaveFile::getAreaT1() { return area_t1; } // 0x80009BF0 setAreaT2__8SaveFileFPc -void SaveFile::setAreaT2(char* name) { - char nameCopy [32]; - memset(nameCopy,0, 32); - - for (int i = 0; i < sizeof(nameCopy)-1; i++) { +void SaveFile::setAreaT2(char *name) { + char nameCopy[32]; + memset(nameCopy, 0, 32); + + for (int i = 0; i < sizeof(nameCopy) - 1; i++) { nameCopy[i] = name[i]; } for (int i = 0; i < sizeof(nameCopy); i++) { @@ -99,10 +100,10 @@ void SaveFile::setAreaT2(char* name) { } } // 0x80009D10 getAreaT2__8SaveFileFv -s8* SaveFile::getAreaT2() { +s8 *SaveFile::getAreaT2() { return area_t2; } // 0x80009D20 getAreaT3__8SaveFileFv -s8* SaveFile::getAreaT3() { +s8 *SaveFile::getAreaT3() { return area_t3; } diff --git a/src/toBeSorted/sceneflag_manager.cpp b/src/toBeSorted/sceneflag_manager.cpp index a446027c..0f7b7b89 100644 --- a/src/toBeSorted/sceneflag_manager.cpp +++ b/src/toBeSorted/sceneflag_manager.cpp @@ -1,9 +1,10 @@ -#include "libc.h" -#include - #include "toBeSorted/sceneflag_manager.h" + +#include "common.h" +#include "libc.h" #include "toBeSorted/file_manager.h" + SceneflagManager *SceneflagManager::sInstance = nullptr; u16 SceneflagManager::sTempFlags[] = {}; u16 SceneflagManager::sSceneFlags[8] = {}; diff --git a/src/toBeSorted/skipflag_manager.cpp b/src/toBeSorted/skipflag_manager.cpp index 23cfe946..f0ffad77 100644 --- a/src/toBeSorted/skipflag_manager.cpp +++ b/src/toBeSorted/skipflag_manager.cpp @@ -1,4 +1,4 @@ -#include +#include "libc.h" #include "toBeSorted/bitwise_flag_helper.h" #include "toBeSorted/file_manager.h" #include "toBeSorted/flag_space.h" @@ -29,7 +29,7 @@ u16 SkipflagManager::sSkipFlags[16] = {}; // 800bfba0 void SkipflagManager::copyFromSave() { - u16* savedSkipflags = FileManager::sInstance->getSkipFlags(); + u16 *savedSkipflags = FileManager::sInstance->getSkipFlags(); mFlagSpace.copyFromSaveFile(savedSkipflags, 0, 0x10); } @@ -39,8 +39,7 @@ void SkipflagManager::setCommitFlag(u16 flag) { } // 800bfc00 -SkipflagManager::SkipflagManager() : mFlagSpace(sSkipFlags, ARRAY_LENGTH(sSkipFlags)), mShouldCommit(false) { -} +SkipflagManager::SkipflagManager() : mFlagSpace(sSkipFlags, ARRAY_LENGTH(sSkipFlags)), mShouldCommit(false) {} // 800bfc30 void SkipflagManager::unsetCommitFlag() { @@ -66,7 +65,7 @@ void SkipflagManager::setFlag(u16 flag) { // 800bfd20 bool SkipflagManager::checkFlag(u16 flag) { - u16* savedSkipflags = FileManager::sInstance->getSkipFlags(); + u16 *savedSkipflags = FileManager::sInstance->getSkipFlags(); return mFlagHelper.checkFlag(flag / 16, flag % 16, savedSkipflags, 0x10); } diff --git a/src/toBeSorted/sound_info.cpp b/src/toBeSorted/sound_info.cpp index 0009e3c7..5e18b0bf 100644 --- a/src/toBeSorted/sound_info.cpp +++ b/src/toBeSorted/sound_info.cpp @@ -1,4 +1,4 @@ -#include +#include "d/a/d_a_base.h" extern "C" SoundSource *soundForActorInitRelated_803889c0(int, fBase_c *, char *, u8); diff --git a/src/toBeSorted/special_item_drop_mgr.cpp b/src/toBeSorted/special_item_drop_mgr.cpp index dad1148f..25940a21 100644 --- a/src/toBeSorted/special_item_drop_mgr.cpp +++ b/src/toBeSorted/special_item_drop_mgr.cpp @@ -1,9 +1,10 @@ -#include "m/m_vec.h" -#include "m/m_Angle.h" -#include "d/a/d_a_player.h" #include "toBeSorted/special_item_drop_mgr.h" -SpecialItemDropMgr* SpecialItemDropMgr::sInstance = nullptr; +#include "d/a/d_a_player.h" +#include "m/m_Angle.h" +#include "m/m_vec.h" + +SpecialItemDropMgr *SpecialItemDropMgr::sInstance = nullptr; extern "C" short targetAngleY(mVec3_c *, mVec3_c *); extern "C" int rndInt(int); @@ -23,7 +24,8 @@ SpecialItemDropMgr::SpecialItemDropMgr() { } // TODO: Convert to enum once work on items has started -int SPECIAL_ITEM_ARRAY[28] = {0, 6, 6, 2, 3, 4, 0x2b, 0x28, 0x29, 7, 8, 0x39, 0, 0, 0x1c, 0xa5, 58, 59, 183, 184, 185, 72, 72, 1, 34, 0, 0, 0}; +int SPECIAL_ITEM_ARRAY[28] = {0, 6, 6, 2, 3, 4, 0x2b, 0x28, 0x29, 7, 8, 0x39, 0, 0, + 0x1c, 0xa5, 58, 59, 183, 184, 185, 72, 72, 1, 34, 0, 0, 0}; int RAND_RUPEE_ARRAY[4] = {2, 3, 4, 0}; // 800c7bb0 @@ -36,7 +38,9 @@ short fn_800C7D00(SpecialItemDropMgr *mgr, int specialItemId) {} short fn_800C7D20(SpecialItemDropMgr *mgr, int specialItemId) {} // 800c7d40 -int giveSpecialDropItem(SpecialItemDropMgr *mgr, int specialItemId, int roomid, mVec3_c *pos, int subtype, s16 *rot, s32 unused) {} +int giveSpecialDropItem( + SpecialItemDropMgr *mgr, int specialItemId, int roomid, mVec3_c *pos, int subtype, s16 *rot, s32 unused +) {} // 800c7ef0 // Very unmatching. Just here as a starting point @@ -108,7 +112,7 @@ bool spawnSpecialDropItem(SpecialItemDropMgr *mgr, int specialItemId, int roomid } // 800c81d0 -void fn_800C81D0(s16, s16, s16) {}; +void fn_800C81D0(s16, s16, s16){}; // 800c8270 SpecialItemDropMgr::~SpecialItemDropMgr() {} diff --git a/src/toBeSorted/time_area_mgr.cpp b/src/toBeSorted/time_area_mgr.cpp index 609a9129..4c79ef7a 100644 --- a/src/toBeSorted/time_area_mgr.cpp +++ b/src/toBeSorted/time_area_mgr.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include "toBeSorted/time_area_mgr.h" +#include "d/d_heap.h" +#include "nw4r/g3d/g3d_obj.h" +#include "toBeSorted/scgame.h" dTimeAreaMgr_c::dTimeAreaMgr_c() { sInstance = this; @@ -50,7 +50,7 @@ bool dTimeAreaMgrProcB_c::create(mHeapAllocator_c *alloc) { if (!m3d::proc_c::create(alloc, nullptr)) { return false; } - + setPriorityDraw(0x13, 0); setOption(/* DISABLE_DRAW_XLU */ 0x07, 1); field_0x18 = 0x8C; diff --git a/tools/download_tool.py b/tools/download_tool.py index 69ef96a7..f4512d01 100644 --- a/tools/download_tool.py +++ b/tools/download_tool.py @@ -55,6 +55,7 @@ def dtk_url(tag: str) -> str: repo = "https://github.com/encounter/decomp-toolkit" return f"{repo}/releases/download/{tag}/dtk-{system}-{arch}{suffix}" + def objdiff_cli_url(tag: str) -> str: uname = platform.uname() suffix = "" diff --git a/tools/project.py b/tools/project.py index 727d45c5..1de844d3 100644 --- a/tools/project.py +++ b/tools/project.py @@ -17,7 +17,7 @@ import platform import sys from pathlib import Path -from typing import IO, Any, Dict, List, Optional, Set, Tuple, Union, cast +from typing import IO, Any, Dict, Iterable, List, Optional, Set, Tuple, Union, cast from . import ninja_syntax from .ninja_syntax import serialize_path @@ -81,6 +81,20 @@ def set_default(key: str, value: Any) -> None: set_default("shift_jis", config.shift_jis) set_default("src_dir", config.src_dir) + # Validate progress categories + def check_category(category: str): + if not any(category == c.id for c in config.progress_categories): + sys.exit( + f"Progress category '{category}' missing from config.progress_categories" + ) + + progress_category = obj.options["progress_category"] + if isinstance(progress_category, list): + for category in progress_category: + check_category(category) + elif progress_category is not None: + check_category(progress_category) + # Resolve paths build_dir = config.out_path() obj.src_path = Path(obj.options["src_dir"]) / obj.options["source"] @@ -155,6 +169,9 @@ def __init__(self) -> None: self.custom_build_steps: Optional[Dict[str, List[Dict[str, Any]]]] = ( None # Custom build steps, types are ["pre-compile", "post-compile", "post-link", "post-build"] ) + self.generate_compile_commands: bool = ( + True # Generate compile_commands.json for clangd + ) # Progress output, progress.json and report.json config self.progress = True # Enable progress output @@ -164,6 +181,9 @@ def __init__(self) -> None: False # Include individual modules, disable for large numbers of modules ) self.progress_categories: List[ProgressCategory] = [] # Additional categories + self.print_progress_categories: Union[bool, List[str]] = ( + True # Print additional progress categories in the CLI progress output + ) # Progress fancy printing self.progress_use_fancy: bool = False @@ -200,9 +220,40 @@ def objects(self) -> Dict[str, Object]: out[obj.name] = obj.resolve(self, lib) return out + # Gets the output path for build-related files. def out_path(self) -> Path: return self.build_dir / str(self.version) + # Gets the path to the compilers directory. + # Exits the program if neither `compilers_path` nor `compilers_tag` is provided. + def compilers(self) -> Path: + if self.compilers_path: + return self.compilers_path + elif self.compilers_tag: + return self.build_dir / "compilers" + else: + sys.exit("ProjectConfig.compilers_tag missing") + + # Gets the wrapper to use for compiler commands, if set. + def compiler_wrapper(self) -> Optional[Path]: + wrapper = self.wrapper + + if self.use_wibo(): + wrapper = self.build_dir / "tools" / "wibo" + if not is_windows() and wrapper is None: + wrapper = Path("wine") + + return wrapper + + # Determines whether or not to use wibo as the compiler wrapper. + def use_wibo(self) -> bool: + return ( + self.wibo_tag is not None + and sys.platform == "linux" + and platform.machine() in ("i386", "x86_64") + and self.wrapper is None + ) + def is_windows() -> bool: return os.name == "nt" @@ -214,13 +265,26 @@ def is_windows() -> bool: EXE = ".exe" if is_windows() else "" -def make_flags_str(flags: Optional[Union[str, List[str]]]) -> str: +def file_is_asm(path: Path) -> bool: + return path.suffix.lower() == ".s" + + +def file_is_c(path: Path) -> bool: + return path.suffix.lower() == ".c" + + +def file_is_cpp(path: Path) -> bool: + return path.suffix.lower() in (".cc", ".cp", ".cpp", ".cxx") + + +def file_is_c_cpp(path: Path) -> bool: + return file_is_c(path) or file_is_cpp(path) + + +def make_flags_str(flags: Optional[List[str]]) -> str: if flags is None: return "" - elif isinstance(flags, list): - return " ".join(flags) - else: - return flags + return " ".join(flags) # Load decomp-toolkit generated config.json @@ -253,13 +317,14 @@ def versiontuple(v: str) -> Tuple[int, ...]: return build_config -# Generate build.ninja and objdiff.json +# Generate build.ninja, objdiff.json and compile_commands.json def generate_build(config: ProjectConfig) -> None: config.validate() objects = config.objects() build_config = load_build_config(config, config.out_path() / "config.json") generate_build_ninja(config, objects, build_config) generate_objdiff_config(config, objects, build_config) + generate_compile_commands(config, objects, build_config) # Generate build.ninja @@ -406,16 +471,10 @@ def write_cargo_rule(): else: sys.exit("ProjectConfig.sjiswrap_tag missing") + wrapper = config.compiler_wrapper() # Only add an implicit dependency on wibo if we download it - wrapper = config.wrapper wrapper_implicit: Optional[Path] = None - if ( - config.wibo_tag is not None - and sys.platform == "linux" - and platform.machine() in ("i386", "x86_64") - and config.wrapper is None - ): - wrapper = build_tools_path / "wibo" + if wrapper is not None and config.use_wibo(): wrapper_implicit = wrapper n.build( outputs=wrapper, @@ -426,15 +485,11 @@ def write_cargo_rule(): "tag": config.wibo_tag, }, ) - if not is_windows() and wrapper is None: - wrapper = Path("wine") wrapper_cmd = f"{wrapper} " if wrapper else "" + compilers = config.compilers() compilers_implicit: Optional[Path] = None - if config.compilers_path: - compilers = config.compilers_path - elif config.compilers_tag: - compilers = config.build_dir / "compilers" + if config.compilers_path is None and config.compilers_tag is not None: compilers_implicit = compilers n.build( outputs=compilers, @@ -445,8 +500,6 @@ def write_cargo_rule(): "tag": config.compilers_tag, }, ) - else: - sys.exit("ProjectConfig.compilers_tag missing") binutils_implicit = None if config.binutils_path: @@ -660,7 +713,6 @@ def write(self, n: ninja_syntax.Writer) -> None: n.comment(f"Link {self.name}") if self.module_id == 0: elf_path = build_path / f"{self.name}.elf" - dol_path = build_path / f"{self.name}.dol" elf_ldflags = f"$ldflags -lcf {serialize_path(self.ldscript)}" if config.generate_map: elf_map = map_path(elf_path) @@ -725,17 +777,36 @@ def write(self, n: ninja_syntax.Writer) -> None: source_added: Set[Path] = set() def c_build(obj: Object, src_path: Path) -> Optional[Path]: - cflags_str = make_flags_str(obj.options["cflags"]) - if obj.options["extra_cflags"] is not None: - extra_cflags_str = make_flags_str(obj.options["extra_cflags"]) - cflags_str += " " + extra_cflags_str - used_compiler_versions.add(obj.options["mw_version"]) - # Avoid creating duplicate build rules if obj.src_obj_path is None or obj.src_obj_path in source_added: return obj.src_obj_path source_added.add(obj.src_obj_path) + cflags = obj.options["cflags"] + extra_cflags = obj.options["extra_cflags"] + + # Add appropriate language flag if it doesn't exist already + # Added directly to the source so it flows to other generation tasks + if not any(flag.startswith("-lang") for flag in cflags) and ( + extra_cflags is None + or not any(flag.startswith("-lang") for flag in extra_cflags) + ): + # Ensure extra_cflags is a unique instance, + # and insert into there to avoid modifying shared sets of flags + if extra_cflags is None: + extra_cflags = [] + extra_cflags = obj.options["extra_cflags"] = list(extra_cflags) + if file_is_cpp(src_path): + extra_cflags.insert(0, "-lang=c++") + else: + extra_cflags.insert(0, "-lang=c") + + cflags_str = make_flags_str(cflags) + if extra_cflags is not None: + extra_cflags_str = make_flags_str(extra_cflags) + cflags_str += " " + extra_cflags_str + used_compiler_versions.add(obj.options["mw_version"]) + # Add MWCC build rule lib_name = obj.options["lib"] n.comment(f"{obj.name}: {lib_name} (linked {obj.completed})") @@ -767,7 +838,7 @@ def c_build(obj: Object, src_path: Path) -> Optional[Path]: if obj.options["host"] and obj.host_obj_path is not None: n.build( outputs=obj.host_obj_path, - rule="host_cc" if src_path.suffix == ".c" else "host_cpp", + rule="host_cc" if file_is_c(src_path) else "host_cpp", inputs=src_path, variables={ "basedir": os.path.dirname(obj.host_obj_path), @@ -827,10 +898,10 @@ def add_unit(build_obj, link_step: LinkStep): link_built_obj = obj.completed built_obj_path: Optional[Path] = None if obj.src_path is not None and obj.src_path.exists(): - if obj.src_path.suffix in (".c", ".cp", ".cpp"): + if file_is_c_cpp(obj.src_path): # Add MWCC & host build rules built_obj_path = c_build(obj, obj.src_path) - elif obj.src_path.suffix == ".s": + elif file_is_asm(obj.src_path): # Add assembler build rule built_obj_path = asm_build(obj, obj.src_path, obj.src_obj_path) else: @@ -1177,6 +1248,13 @@ def generate_objdiff_config( if build_config is None: return + # Load existing objdiff.json + existing_units = {} + if Path("objdiff.json").is_file(): + with open("objdiff.json", "r", encoding="utf-8") as r: + existing_config = json.load(r) + existing_units = {unit["name"]: unit for unit in existing_config["units"]} + objdiff_config: Dict[str, Any] = { "min_version": "2.0.0-beta.5", "custom_make": "ninja", @@ -1234,15 +1312,27 @@ def add_unit( ) -> None: obj_path, obj_name = build_obj["object"], build_obj["name"] base_object = Path(obj_name).with_suffix("") + name = str(Path(module_name) / base_object).replace(os.sep, "/") unit_config: Dict[str, Any] = { - "name": Path(module_name) / base_object, + "name": name, "target_path": obj_path, + "base_path": None, + "scratch": None, "metadata": { - "auto_generated": build_obj["autogenerated"], + "complete": None, + "reverse_fn_order": None, + "source_path": None, "progress_categories": progress_categories, + "auto_generated": build_obj["autogenerated"], }, + "symbol_mappings": None, } + # Preserve existing symbol mappings + existing_unit = existing_units.get(name) + if existing_unit is not None: + unit_config["symbol_mappings"] = existing_unit.get("symbol_mappings") + obj = objects.get(obj_name) if obj is None: objdiff_config["units"].append(unit_config) @@ -1255,30 +1345,20 @@ def add_unit( cflags = obj.options["cflags"] reverse_fn_order = False - if type(cflags) is list: - for flag in cflags: - if not flag.startswith("-inline "): - continue - for value in flag.split(" ")[1].split(","): - if value == "deferred": - reverse_fn_order = True - elif value == "nodeferred": - reverse_fn_order = False + for flag in cflags: + if not flag.startswith("-inline "): + continue + for value in flag.split(" ")[1].split(","): + if value == "deferred": + reverse_fn_order = True + elif value == "nodeferred": + reverse_fn_order = False - # Filter out include directories - def keep_flag(flag): - return not flag.startswith("-i ") and not flag.startswith("-I ") + # Filter out include directories + def keep_flag(flag): + return not flag.startswith("-i ") and not flag.startswith("-I ") - cflags = list(filter(keep_flag, cflags)) - - # Add appropriate lang flag - if obj.src_path is not None and not any( - flag.startswith("-lang") for flag in cflags - ): - if obj.src_path.suffix in (".cp", ".cpp"): - cflags.insert(0, "-lang=c++") - else: - cflags.insert(0, "-lang=c") + cflags = list(filter(keep_flag, cflags)) compiler_version = COMPILER_MAP.get(obj.options["mw_version"]) if compiler_version is None: @@ -1352,13 +1432,214 @@ def add_category(id: str, name: str): for category in config.progress_categories: add_category(category.id, category.name) + def cleandict(d): + if isinstance(d, dict): + return {k: cleandict(v) for k, v in d.items() if v is not None} + elif isinstance(d, list): + return [cleandict(v) for v in d] + else: + return d + # Write objdiff.json with open("objdiff.json", "w", encoding="utf-8") as w: def unix_path(input: Any) -> str: return str(input).replace(os.sep, "/") if input else "" - json.dump(objdiff_config, w, indent=4, default=unix_path) + json.dump(cleandict(objdiff_config), w, indent=2, default=unix_path) + + +def generate_compile_commands( + config: ProjectConfig, + objects: Dict[str, Object], + build_config: Optional[Dict[str, Any]], +) -> None: + if build_config is None or not config.generate_compile_commands: + return + + # The following code attempts to convert mwcc flags to clang flags + # for use with clangd. + + # Flags to ignore explicitly + CFLAG_IGNORE: Set[str] = { + # Search order modifier + # Has a different meaning to Clang, and would otherwise + # be picked up by the include passthrough prefix + "-I-", + "-i-", + } + CFLAG_IGNORE_PREFIX: Tuple[str, ...] = tuple() + + # Flags to replace + CFLAG_REPLACE: Dict[str, str] = {} + CFLAG_REPLACE_PREFIX: Tuple[Tuple[str, str], ...] = ( + # Includes + ("-i ", "-I"), + ("-I ", "-I"), + ("-I+", "-I"), + # Defines + ("-d ", "-D"), + ("-D ", "-D"), + ("-D+", "-D"), + ) + + # Flags with a finite set of options + CFLAG_REPLACE_OPTIONS: Tuple[Tuple[str, Dict[str, Tuple[str, ...]]], ...] = ( + # Exceptions + ( + "-Cpp_exceptions", + { + "off": ("-fno-cxx-exceptions",), + "on": ("-fcxx-exceptions",), + }, + ), + # RTTI + ( + "-RTTI", + { + "off": ("-fno-rtti",), + "on": ("-frtti",), + }, + ), + # Language configuration + ( + "-lang", + { + "c": ("--language=c", "--std=c89"), + "c99": ("--language=c", "--std=c99"), + "c++": ("--language=c++", "--std=c++98"), + "cplus": ("--language=c++", "--std=c++98"), + }, + ), + ) + + # Flags to pass through + CFLAG_PASSTHROUGH: Set[str] = set() + CFLAG_PASSTHROUGH_PREFIX: Tuple[str, ...] = ( + "-I", # includes + "-D", # defines + ) + + clangd_config = [] + + def add_unit(build_obj: Dict[str, Any]) -> None: + obj = objects.get(build_obj["name"]) + if obj is None: + return + + # Skip unresolved objects + if ( + obj.src_path is None + or obj.src_obj_path is None + or not file_is_c_cpp(obj.src_path) + ): + return + + # Gather cflags for source file + cflags: list[str] = [] + + def append_cflags(flags: Iterable[str]) -> None: + # Match a flag against either a set of concrete flags, or a set of prefixes. + def flag_match( + flag: str, concrete: Set[str], prefixes: Tuple[str, ...] + ) -> bool: + if flag in concrete: + return True + + for prefix in prefixes: + if flag.startswith(prefix): + return True + + return False + + # Determine whether a flag should be ignored. + def should_ignore(flag: str) -> bool: + return flag_match(flag, CFLAG_IGNORE, CFLAG_IGNORE_PREFIX) + + # Determine whether a flag should be passed through. + def should_passthrough(flag: str) -> bool: + return flag_match(flag, CFLAG_PASSTHROUGH, CFLAG_PASSTHROUGH_PREFIX) + + # Attempts replacement for the given flag. + def try_replace(flag: str) -> bool: + replacement = CFLAG_REPLACE.get(flag) + if replacement is not None: + cflags.append(replacement) + return True + + for prefix, replacement in CFLAG_REPLACE_PREFIX: + if flag.startswith(prefix): + cflags.append(flag.replace(prefix, replacement, 1)) + return True + + for prefix, options in CFLAG_REPLACE_OPTIONS: + if not flag.startswith(prefix): + continue + + # "-lang c99" and "-lang=c99" are both generally valid option forms + option = flag.removeprefix(prefix).removeprefix("=").lstrip() + replacements = options.get(option) + if replacements is not None: + cflags.extend(replacements) + + return True + + return False + + for flag in flags: + # Ignore flags first + if should_ignore(flag): + continue + + # Then find replacements + if try_replace(flag): + continue + + # Pass flags through last + if should_passthrough(flag): + cflags.append(flag) + continue + + append_cflags(obj.options["cflags"]) + if isinstance(obj.options["extra_cflags"], list): + append_cflags(obj.options["extra_cflags"]) + + unit_config = { + "directory": Path.cwd(), + "file": obj.src_path, + "output": obj.src_obj_path, + "arguments": [ + "clang", + "-nostdinc", + "-fno-builtin", + "--target=powerpc-eabi", + *cflags, + "-c", + obj.src_path, + "-o", + obj.src_obj_path, + ], + } + clangd_config.append(unit_config) + + # Add DOL units + for unit in build_config["units"]: + add_unit(unit) + + # Add REL units + for module in build_config["modules"]: + for unit in module["units"]: + add_unit(unit) + + # Write compile_commands.json + with open("compile_commands.json", "w", encoding="utf-8") as w: + + def default_format(o): + if isinstance(o, Path): + return o.resolve().as_posix() + return str(o) + + json.dump(clangd_config, w, indent=2, default=default_format) # Calculate, print and write progress to progress.json @@ -1423,7 +1704,11 @@ def print_category(name: str, measures: Dict[str, Any]) -> None: print_category("All", report_data["measures"]) for category in report_data["categories"]: - print_category(category["name"], category["measures"]) + if config.print_progress_categories is True or ( + isinstance(config.print_progress_categories, list) + and category["id"] in config.print_progress_categories + ): + print_category(category["name"], category["measures"]) if config.progress_use_fancy: measures = report_data["measures"] @@ -1480,4 +1765,4 @@ def add_category(id: str, measures: Dict[str, Any]) -> None: add_category(category["id"], category["measures"]) with open(out_path / "progress.json", "w", encoding="utf-8") as w: - json.dump(progress_json, w, indent=4) + json.dump(progress_json, w, indent=2)