Splat refactor (#257)

* all non-world rodata migrated

* data disasm

* kinda working

* updated yaml

* bloop

* linker header

* configure 2.0

* bin

* mass rename to remove code_

* pause rename

* battle partner stuff

* whew

* more renames

* more renames

* more renaming

* it builds!

* updates

* remove main prefix

* one more thing

* crc, yay0

* .data, .rodata, .bss

* img

* dead_atan2

* it buildsgit add -A

* split battle/partner/6FAD10

* rm &s on sleepy_sheep syms

* sha1sum ninja rule description

* OK but commented out PaperMarioMapFS and PaperMarioNpcSprites

* uncomment

* fix mapfs

* match func_8003CFB4

* .

* clean up and name npc_iter_no_op

* npc.c

* enable cc warnings

* name npc_find_near

* use singular options.asset_path

* smores

* cc_dsl only when needed

* kinda fix configure for splat refactor2

* ok!

* new msg format

* remove old msg format docs

* slight bug fixes, splat adjustment

* git subrepo pull (merge) --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "cfc140bb76"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "cfc140bb76"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull (merge) --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "85349befcd"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "85349befcd"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Update symbol addrs

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "a44631e194"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "a44631e194"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

Co-authored-by: Alex Bates <hi@imalex.xyz>
This commit is contained in:
Ethan Roseman 2021-04-13 16:47:52 +09:00 committed by GitHub
parent 3fd09d2a7c
commit 3315d6010f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5966 changed files with 20639 additions and 17729 deletions

5
.gitignore vendored
View File

@ -12,6 +12,7 @@ expected/
.vscode/launch.json
/tools/star-rod
/ver/current
/ver/*/assets
# Build artifacts
build.ninja
@ -27,7 +28,9 @@ build.ninja
*.zip
baserom.*
build/
assets/
!tools/build
/assets/jp
/assets/us
/docs/doxygen/
/include/ld_addrs.h
/include/message_ids.h

View File

@ -33,11 +33,11 @@ Decide on a function to match. These can be found in the subdirectories of `ver/
Take the relevant `.s` file and pass it to [mips_to_c](https://github.com/matt-kempster/mips_to_c) ([online version](https://simonsoftware.se/other/mips_to_c.py)).
Open up the `.c` file that uses your function and replace the function's `INCLUDE_ASM` macro with the output from mips_to_c. For example, for a function `asm/nonmatchings/code_FOO/func_DEADBEEF`:
Open up the `.c` file that uses your function and replace the function's `INCLUDE_ASM` macro with the output from mips_to_c. For example, for a function `asm/nonmatchings/FOO/func_DEADBEEF`:
```diff
// src/code_FOO.c
- INCLUDE_ASM("code_FOO", func_DEADBEEF);
// src/FOO.c
- INCLUDE_ASM("FOO", func_DEADBEEF);
+ s32 func_DEADBEEF() {
+ // ...
+ }

View File

@ -1,597 +0,0 @@
#!/usr/bin/env python3
import re
import os, sys
from glob import glob
import ninja_syntax
from argparse import ArgumentParser
import asyncio
from subprocess import PIPE
import subprocess
sys.path.append(os.path.dirname(__file__) + "/tools/splat")
import split
from segtypes.n64.code import Subsegment
INCLUDE_ASM_RE = re.compile(r"___INCLUDE_ASM\([^,]+, ([^,]+), ([^,)]+)") # note _ prefix
SUPPORTED_VERSIONS = ["us", "jp"]
TARGET = "papermario"
def obj(path: str):
if not path.startswith("ver/"):
path = f"ver/{version}/build/{path}"
path = re.sub(r"/assets/", "/build/", path) # XXX what about other asset dirs?
return path + ".o"
def read_splat(splat_config: str, version: str):
import argparse
import yaml
from segtypes.n64.code import N64SegCode
from util import options
# Load config
with open(splat_config) as f:
config = yaml.safe_load(f.read())
options.initialize(config)
assert options.get("ld_o_replace_extension", True) == False
# Initialize segments
all_segments = split.initialize_segments(splat_config, config["segments"])
objects = set()
segments = {}
for segment in all_segments:
for subdir, path, obj_type, start in segment.get_ld_files():
# src workaround
if subdir.startswith("../../"):
subdir = subdir[6:]
if path.endswith(".c") or path.endswith(".s") or path.endswith(".data") or path.endswith(".rodata"):
path = subdir + "/" + path
else:
assert subdir == "assets", subdir + " " + path
subdir = "ver/" + version + "/assets"
objects.add(path)
segments[path] = segment
if isinstance(segment, N64SegCode):
for split_file in segment.subsegments:
if split_file.type in ["i4", "i8", "ia4", "ia8", "ia16", "rgba16", "rgba32", "ci4", "ci8", "palette"]:
path = os.path.join(
#segment.get_subdir(split_file["subtype"]),
split_file.name + "." + split_file.get_ext()
)
if path in segments:
segments[path] = split_file
# note: `objects` lacks .o extensions
return objects, segments
def rm_recursive(path):
from pathlib import Path
path = Path(path)
if path.exists():
if path.is_dir():
for f in path.iterdir():
rm_recursive(f)
path.rmdir()
else:
path.unlink()
async def shell(cmd: str):
async with task_sem:
proc = await asyncio.create_subprocess_shell(cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = await proc.communicate()
assert proc.returncode == 0, f"{cmd} failed: {stderr}"
return stdout.decode("utf-8"), stderr.decode("utf-8")
async def shell_status(cmd: str):
async with task_sem:
proc = await asyncio.create_subprocess_shell(cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = await proc.communicate()
return proc.returncode
def build_yay0_file(bin_file: str):
yay0_file = f"ver/{version}/build/{os.path.splitext(bin_file)[0]}.Yay0"
n.build(yay0_file, "yay0compress", find_asset(bin_file), implicit="tools/Yay0compress")
build_bin_object(yay0_file)
def build_bin_object(bin_file: str):
n.build(obj(bin_file), "bin", bin_file)
def build_image(f: str, segment):
path, img_type, png = f.rsplit(".", 2)
out = f"ver/{version}/build/" + path + "." + img_type + ".png"
flags = ""
if img_type != "palette" and not isinstance(segment, dict):
if segment.flip_horizontal:
flags += "--flip-x"
if segment.flip_vertical:
flags += "--flip-y"
n.build(out, "img", find_asset(path + ".png"), implicit="tools/img/build.py", variables={
"img_type": img_type,
"img_flags": flags,
})
build_bin_object(out)
def cmd_exists(cmd):
return subprocess.call("type " + cmd, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
def find_asset_dir(path):
global ASSET_DIRS
for d in ASSET_DIRS:
if os.path.exists(d + "/" + path):
return d
print("Unable to find asset: " + path)
print("The asset dump may be incomplete. Try:")
print(" ./configure.py --clean")
exit(1)
def find_asset(path):
return find_asset_dir(path) + "/" + path
async def main():
global n, cpp, task_sem, num_tasks, num_tasks_done, ASSET_DIRS, version
task_sem = asyncio.Semaphore(8)
parser = ArgumentParser(description="Paper Mario build.ninja generator")
parser.add_argument("version", nargs="*", default=[], help="Version(s) to configure for. Most tools will operate on the first-provided only. Supported versions: " + ','.join(SUPPORTED_VERSIONS))
parser.add_argument("--cpp", help="GNU C preprocessor command")
parser.add_argument("--cflags", default="", help="Extra cc/cpp flags")
parser.add_argument("--no-splat", action="store_true", help="Don't split assets from the baserom(s)")
parser.add_argument("--clean", action="store_true", help="Delete assets and previously-built files")
parser.add_argument("--depend-on-s", action="store_true", help="Configure dependencies on .s files for c files that include them")
args = parser.parse_args()
versions = args.version
# default version behaviour is to only do those that exist
if len(versions) == 0:
for version in SUPPORTED_VERSIONS:
rom = f"ver/{version}/baserom.z64"
if os.path.exists(rom):
versions.append(version)
if len(versions) == 0:
print("error: no baserom.z64 files could be found in the ver/*/ directories.")
exit(1)
print("Configuring for versions: " + ', '.join(versions))
print("")
# on macOS, /usr/bin/cpp defaults to clang rather than gcc (but we need gcc's)
if args.cpp is None and sys.platform == "darwin" and "Free Software Foundation" not in (await shell("cpp --version"))[0]:
print("error: system C preprocessor is not GNU!")
print("This is a known issue on macOS - only clang's cpp is installed by default.")
print("Use 'brew' to obtain GNU cpp, then run this script again with the --cpp option, e.g.")
print(" ./configure.py --cpp cpp-10")
exit(1)
cpp = args.cpp or "cpp"
if args.clean:
print("Cleaning...")
await shell("ninja -t clean")
rm_recursive(f".splat_cache")
for version in versions:
rm_recursive(f"ver/{version}/assets")
rm_recursive(f"ver/{version}/build")
rm_recursive(f"ver/{version}/.splat_cache")
if not args.no_splat:
# compile splat dependencies
await shell("make -C tools/splat")
has_any_rom = False
for version in versions:
rom = f"ver/{version}/baserom.z64"
has_rom = False
try:
with open(rom, "rb") as f:
has_rom = True
has_any_rom = True
except IOError:
print(f"error: could not find baserom file '{rom}'!")
if len(versions) >= 2:
print(f"You can avoid building version '{version}' by specifying versions on the command-line:")
print(f" ./configure.py {' '.join(ver for ver in versions if ver != version)}")
exit(1)
if has_rom:
print(f"Splitting assets from {rom}", end="")
split.main(
f"ver/{version}/splat.yaml",
f"ver/{version}",
rom,
[ "ld", "bin", "Yay0", "PaperMarioMapFS", "PaperMarioMessages", "img", "PaperMarioNpcSprites" ],
False,
False,
)
print("")
print("Configuring build...")
n = ninja_syntax.Writer(open("build.ninja", "w"), width=120)
cflags = " " + args.cflags
iconv = "tools/iconv.py UTF-8 SHIFT-JIS" if sys.platform == "darwin" else "iconv --from UTF-8 --to SHIFT-JIS"
cross = "mips-linux-gnu-"
n.variable("target", TARGET)
n.variable("cross", cross)
n.variable("python", sys.executable)
if sys.platform == "darwin":
os_dir = "mac"
elif sys.platform == "linux":
if os.uname()[4] == "aarch64":
os_dir = "arm"
else:
os_dir = "linux"
else:
print(f"Unsupported platform {sys.platform}")
sys.exit(1)
# $version
n.rule("cc",
command=f"bash -o pipefail -c '{cpp} -Iver/$version/build/include -Iinclude -Isrc -D _LANGUAGE_C -D _FINALROM -D VERSION=$version -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 {args.cflags} -MD -MF $out.d $in -o - | {iconv} | tools/{os_dir}/cc1 -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wuninitialized -Wshadow {args.cflags} -o - | tools/{os_dir}/mips-nintendo-nu64-as -EB -G 0 - -o $out'",
description="cc $in",
depfile="$out.d",
deps="gcc")
n.rule("cc_dsl",
command=f"bash -o pipefail -c '{cpp} -Iver/$version/build/include -Iinclude -Isrc -D _LANGUAGE_C -D _FINALROM -D VERSION=$version -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 {args.cflags} -MD -MF $out.d $in -o - | $python tools/compile_dsl_macros.py | {iconv} | tools/{os_dir}/cc1 -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wuninitialized -Wshadow {args.cflags} -o - | tools/{os_dir}/mips-nintendo-nu64-as -EB -G 0 - -o $out'",
description="dsl $in",
depfile="$out.d",
deps="gcc")
n.newline()
with open("tools/permuter_settings.toml", "w") as f:
version = versions[0]
f.write(f"compiler_command = \"{cpp} -Iver/{version}/build/include -Iinclude -Isrc -DPERMUTER -D _LANGUAGE_C -D _FINALROM -D VERSION={version} -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=32 {args.cflags} -D SCRIPT(...)={{}} | {iconv} | tools/{os_dir}/cc1 -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wuninitialized -Wshadow {args.cflags} -o - | tools/{os_dir}/mips-nintendo-nu64-as -EB -G 0 -\"\n")
f.write(f"assembler_command = \"{cross}as -march=vr4300 -mabi=32\"\n")
f.write("\n")
f.write("[preserve_macros]\n")
f.write("\"g[DS]P.*\" = \"void\"\n")
# $version
n.rule("cpp",
command=f"{cpp} -P -DBUILD_DIR=ver/$version/build $in -o $out",
description="cpp $in",
depfile="$out.d",
deps="gcc")
n.newline()
n.rule("yay0compress",
command=f"tools/Yay0compress $in $out",
description="compress $in")
n.newline()
n.rule("bin",
command="${cross}ld -r -b binary $in -o $out",
description="bin $in")
n.newline()
n.rule("as",
command="${cross}as -EB -march=vr4300 -mtune=vr4300 -Iinclude $in -o $out",
description="assemble $in")
n.newline()
# $img_type, $img_flags
n.rule("img",
command="$python tools/img/build.py $img_type $in $out $img_flags",
description="image $in")
n.rule("img_header",
command="$python tools/img/header.py $in $out",
description="image_header $in")
n.newline()
# $sprite_id, $sprite_dir, $sprite_name
n.rule("sprite_animations_h",
command="$python tools/gen_sprite_animations_h.py $out $sprite_dir $sprite_id",
description="sprite_animations_h $sprite_name ($sprite_id)")
n.rule("npc_sprite",
command="$python tools/compile_npc_sprite.py $out $sprite_dir",
description="npc_sprite $sprite_name ($sprite_id)")
n.rule("npc_sprites",
command="$python tools/compile_npc_sprites.py $out $in",
description="package npc sprites")
n.newline()
n.rule("ld_addrs_h",
command="grep -E \"[^\. ]+ =\" $in -o | sed 's/^/extern void* /; s/ =/;/' > $out",
description="ld_addrs_h $in")
n.newline()
n.rule("msg_combine",
command="$python tools/msg/combine.py $out $in",
description="combine messages")
n.rule("msg",
command="$python tools/msg/parse_compile.py $in $out",
description="msg $in")
n.newline()
n.rule("assets",
command="$python tools/build_assets_bin.py $out $in",
description="combine assets")
n.newline()
# $version
n.rule("link",
command="${cross}ld -T ver/$version/undefined_syms.txt -T ver/$version/undefined_syms_auto.txt -T ver/$version/undefined_funcs_auto.txt -T ver/$version/dead_syms.txt -Map ver/$version/build/$target.map --no-check-sections -T $in -o $out",
description="link $out")
n.newline()
n.rule("rom",
command="${cross}objcopy $in $out -O binary && tools/n64crc $out",
description="rom $in")
n.newline()
# $version
n.rule("checksum",
command=f"sha1sum -c ver/$version/checksum.sha1 && touch $out",
description="compare")
n.newline()
n.rule("cc_modern_exe", command="cc $in -O3 -o $out")
n.newline()
for version in versions:
objects, segments = read_splat(f"ver/{version}/splat.yaml", version) # no .o extensions!
#c_files = (f for f in objects if f.endswith(".c"))
n.build(f"ver/{version}/build/$target.ld", "cpp", f"ver/{version}/$target.ld", variables={ "version": version })
n.build(f"ver/{version}/build/$target.elf", "link", f"ver/{version}/build/$target.ld", implicit=[obj(o) for o in objects], implicit_outputs=f"ver/{version}/$target.map", variables={ "version": version })
n.build(f"ver/{version}/build/$target.z64", "rom", f"ver/{version}/build/$target.elf", implicit="tools/n64crc")
n.build(f"ver/{version}/build/ok", "checksum", implicit=f"ver/{version}/build/$target.z64", variables={ "version": version })
n.build(version, "phony", f"ver/{version}/build/ok")
n.build(f"$target.{version}.z64", "phony", f"ver/{version}/build/$target.z64")
CFG = {}
with open(f"ver/{version}/build.cfg", "r") as f:
for line in f.readlines():
if line.strip() != "":
key, value = [part.strip() for part in line.split("=", 1)]
CFG[key] = value
ASSET_DIRS = CFG.get("asset_dirs", "assets").split(" ")
NPC_SPRITES = CFG.get("npc_sprites", "").split(" ")
MAPS = CFG.get("maps", "").split(" ")
TEXTURE_ARCHIVES = CFG.get("texture_archives", "").split(" ")
BACKGROUNDS = CFG.get("backgrounds", "").split(" ")
PARTY_IMAGES = CFG.get("party_images", "").split(" ")
ASSETS = sum([[f"{map_name}_shape", f"{map_name}_hit"] for map_name in MAPS], []) + TEXTURE_ARCHIVES + BACKGROUNDS + ["title_data"] + PARTY_IMAGES
generated_headers = []
def add_generated_header(h: str):
generated_headers.append(h)
if not os.path.exists(h):
# mkdir -p
os.makedirs(os.path.dirname(h), exist_ok=True)
# touch it so cpp doesn't complain if its #included
open(h, "w").close()
# mark it as really old so ninja builds it
os.utime(h, (0, 0))
return h
n.build(add_generated_header(f"ver/{version}/build/include/ld_addrs.h"), "ld_addrs_h", f"ver/{version}/build/$target.ld")
# messages
msg_files = set()
for d in ASSET_DIRS:
for f in glob(d + "/msg/**/*.msg", recursive=True):
msg_files.add(find_asset(f[len(d)+1:]))
msg_files = list(msg_files)
for msg_file in msg_files:
n.build(
f"ver/{version}/build/{msg_file.split('/', 1)[1]}.bin",
"msg",
msg_file,
implicit="tools/msg/parse_compile.py",
)
msg_bins = [f"ver/{version}/build/{msg_file.split('/', 1)[1]}.bin" for msg_file in msg_files]
n.build(
[f"ver/{version}/build/msg.bin", add_generated_header(f"ver/{version}/build/include/message_ids.h")],
"msg_combine",
msg_bins,
implicit="tools/msg/combine.py",
)
n.build(f"ver/{version}/build/msg.o", "bin", f"ver/{version}/build/msg.bin")
# sprites
npc_sprite_yay0s = []
for sprite_id, sprite_name in enumerate(NPC_SPRITES, 1):
if len(sprite_name) == 0 or sprite_name == "_":
continue
asset_dir = find_asset_dir(f"sprite/npc/{sprite_name}")
sources = glob(f"{asset_dir}/sprite/npc/{sprite_name}/**/*.*", recursive=True)
variables = {
"sprite_name": sprite_name,
"sprite_dir": f"{asset_dir}/sprite/npc/{sprite_name}",
"sprite_id": sprite_id,
}
# generated header
n.build(
add_generated_header(f"ver/{version}/build/include/sprite/npc/{sprite_name}.h"),
"sprite_animations_h",
implicit=sources + ["tools/gen_sprite_animations_h.py"],
variables=variables,
)
# sprite bin/yay0
n.build(
f"ver/{version}/build/sprite/npc/{sprite_name}",
"npc_sprite",
implicit=sources + ["tools/compile_npc_sprite.py"],
variables=variables,
)
yay0 = f"ver/{version}/build/sprite/npc/{sprite_name}.Yay0"
npc_sprite_yay0s.append(yay0)
n.build(
yay0,
"yay0compress",
f"ver/{version}/build/sprite/npc/{sprite_name}",
implicit=["tools/Yay0compress"],
)
n.newline()
# fast tasks
for f in objects:
segment = segments[f]
if f.endswith(".c"):
continue # these are handled later
elif f.endswith(".Yay0"):
build_yay0_file(os.path.splitext(f)[0] + ".bin")
elif f.endswith(".bin"):
build_bin_object(find_asset(f))
elif f.endswith(".data"):
n.build(obj(f), "as", f"ver/{version}/asm/" + f + ".s")
elif f.endswith(".rodata"):
n.build(obj(f), "as", f"ver/{version}/asm/" + f[2:] + ".s")
elif f.endswith(".s"):
n.build(obj(f), "as", f"ver/{version}/" + f)
elif f.endswith(".png"):
if isinstance(segment, Subsegment):
# image within a code section
out = f"ver/{version}/build/{f}.bin"
infile = find_asset(re.sub(r"\.pal\.png", ".png", f))
n.build(out, "img", infile, implicit="tools/img/build.py", variables={
"img_type": segment.type,
"img_flags": "",
})
if ".pal.png" not in f:
n.build(add_generated_header(f"ver/{version}/build/include/" + f + ".h"), "img_header", infile, implicit="tools/img/header.py")
n.build(f"ver/{version}/build/{f}.o", "bin", out)
else:
build_image(f, segment)
elif f == "sprite/npc":
# combine sprites
n.build(f"ver/{version}/build/{f}.bin", "npc_sprites", npc_sprite_yay0s, implicit="tools/compile_npc_sprites.py")
n.build(obj(f), "bin", f"ver/{version}/build/{f}.bin")
elif segment.type == "PaperMarioMessages":
continue # done already above
elif segment.type == "PaperMarioMapFS":
asset_files = [] # even indexes: uncompressed; odd indexes: compressed
for asset_name in ASSETS:
if asset_name.endswith("_tex"): # uncompressed
asset_files.append(find_asset(f"map/{asset_name}.bin"))
asset_files.append(find_asset(f"map/{asset_name}.bin"))
elif asset_name.startswith("party_"):
source_file = f"ver/{version}/build/{asset_name}.bin"
asset_file = f"ver/{version}/build/{asset_name}.Yay0"
n.build(source_file, "img", find_asset(f"party/{asset_name}.png"), implicit="tools/img/build.py", variables={
"img_type": "party",
"img_flags": "",
})
asset_files.append(source_file)
asset_files.append(asset_file)
n.build(asset_file, "yay0compress", source_file, implicit="tools/Yay0compress")
elif asset_name.endswith("_bg"):
source_file = f"ver/{version}/build/{asset_name}.bin"
asset_file = f"ver/{version}/build/{asset_name}.Yay0"
n.build(source_file, "img", find_asset(f"map/{asset_name}.png"), implicit="tools/img/build.py", variables={
"img_type": "bg",
"img_flags": "",
})
asset_files.append(source_file)
asset_files.append(asset_file)
n.build(asset_file, "yay0compress", source_file, implicit="tools/Yay0compress")
elif asset_name.endswith("_shape") or asset_name.endswith("_hit"):
source_file = find_asset(f"map/{asset_name}.bin")
asset_file = f"ver/{version}/build/assets/{asset_name}.Yay0"
asset_files.append(source_file)
asset_files.append(asset_file)
n.build(asset_file, "yay0compress", source_file, implicit="tools/Yay0compress")
else:
source_file = find_asset(f"{asset_name}.bin")
asset_file = f"ver/{version}/build/assets/{asset_name}.Yay0"
asset_files.append(source_file)
asset_files.append(asset_file)
n.build(asset_file, "yay0compress", source_file, implicit="tools/Yay0compress")
n.build(f"ver/{version}/build/assets.bin", "assets", asset_files)
n.build(obj(f), "bin", f"ver/{version}/build/assets.bin")
else:
print("warning: dont know what to do with object " + f)
n.newline()
n.build("generated_headers_" + version, "phony", generated_headers)
n.newline()
for c_file in glob("src/**/*.c", recursive=True):
if c_file.endswith(".inc.c"):
continue
status = await shell_status(f"grep -q SCRIPT\( {c_file}")
for version in versions:
s_glob = "ver/" + version + "/" + re.sub("src/", "asm/nonmatchings/", c_file)[:-2] + "/*.s"
n.build(
obj(c_file),
"cc_dsl" if status == 0 else "cc",
c_file,
implicit = None if not args.depend_on_s else glob(s_glob),
order_only="generated_headers_" + version,
variables={ "version": version }
)
print("")
# c tools that need to be compiled
n.build("tools/Yay0compress", "cc_modern_exe", "tools/Yay0compress.c")
n.build("tools/n64crc", "cc_modern_exe", "tools/n64crc.c")
n.newline()
n.build("all", "phony", versions)
n.default("all")
# update ver/current to versions[0]
try:
os.remove("ver/current")
except Exception:
pass
os.symlink(versions[0], "ver/current")
n.build("ver/current/build/papermario.z64", "phony", "ver/" + versions[0] + "/build/papermario.z64")
print("Build configuration complete! Now run")
print(" ninja")
print("to compile " + ', '.join(f'\'{TARGET}.{version}.z64\'' for version in versions) + ".")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())

1
configure.py Symbolic link
View File

@ -0,0 +1 @@
tools/build/configure.py

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@ -1,214 +0,0 @@
# `.msg` syntax
## Character Set
`[font=normal]`: 𝅘𝅥𝅮!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[¥]^_`abcdefghijklmnopqrstuvwxyz{|}~°ÀÁÂÄÇÈÉÊËÌÍÎÏÑÒÓÔÖÙÚÛÜßàáâäçèéêëìíîïñòóôöùúûü¡¿ª♥★↑↓←→●✖“”‘’ ⒶⒷⓈ▲▼◀▶ⓁⓇⓏ
`[font=title]` and `[font=subtitle]`: ABCDEFGHIJKLMNOPQRSTUVWXYZ'.,0123456789©&
## Tags
Similar to BBCode, tags begin with `[` and end with `]`. They may take positional arguments (`value`) and named arguments (`arg=value`). The order of named arguments does not matter. Values are parsed as integers if possible, and hexidecimal integers are supported. Tag names and argument names are case-insensitive.
To write a literal `[` character (and not start a tag), prefix it with a backslash; i.e. `\[`.
### `[message name section= index=]...[/message]`
Marks the beginning and end of a message.
All parameters on the opening tag are optional.
If `section` and/or `index` are omitted, the message will be allocated a section and/or index respectively.
### `[br]`
Line break.
### `[prompt]`
Waits for the A button to be pressed before continuing.
### `[next]`
Scrolls down the message box to begin a new 'paragraph.'
### `[sleep n]`
Waits for `n` frames before continuing.
### `[color= ctx=]`
Supported color names are:
`ctx=normal` (default): normal red pink purple blue cyan green yellow
`ctx=diary`: normal red
`ctx=inspect`: dark
`ctx=button`: blue green red yellow gray grey
`ctx=popup`: normal red pink purple blue teal green yellow
`ctx=sign`: normal red blue green
To use other colors, provide `color` as an integer (e.g. `[color=0x10]`). Here are all the colors supported by the engine:
![Message colors](message-colors.jpg)
### `[/color]`
Resets the color to what it was before the most recent `[color=]` tag. The default color at the start of the message is assumed to be `[color=normal]`, which is true for most messages.
### `[a]` `[b]` `[l]` `[r]` `[z]` `[start]` `[c-up]` `[c-down]` `[c-left]` `[c-right]`
Shorthand for the button prompt characters ⒶⒷⓁⓇⓏⓈ▲▼◀▶ respectively. You can override the color used with a named parameter `[a color=]`.
Supported color names: blue green red yellow gray grey
### `[style=]`
Sets the box style to use for this message. Supported styles are:
`[style=right]` `[style=left]` `[style=center]` - Standard speech bubble with the speaker coming from the given direction
`[style=tattle]` - Small bubble used for overworld tattles
`[style=choice x= y= w= h=]` - Box for multiple-choice options
`[style=inspect]` - Internal narration box, often used when inspecting objects by pressing A
`[style=sign]` `[style=lamppost]` `[style=postcard]` - Boxes with custom backgrounds
`[style=popup]` - Box in center of screen that grows dynamically depending on how long the message is
`[style=upgrade x= y= w= h=]` - Super Block box
`[style=narrate]` - Narration; used when you obtain new partners
`[style=epilogue]` - Used for post-chapter descriptions of what Mario and party did
### `[font=]`
Supported fonts: normal title subtitle
Note that the `title` and `subtitle` fonts use a different character set to `normal`.
### `[/font]`
Resets the font to what it was before the most recent `[font=]` tag.
### `[noskip]...[/noskip]`
Disables the B button from skipping text within.
### `[instant]...[/instant]`
Causes all text within to appear instantly.
### `[kerning=]`
Modifies the spacing between letters.
### `[scroll n]`
Scrolls down `n` lines.
### `[size x= y=]`
Changes font size.
### `[/size]`
Resets the size back to x=10 y=10 (the default).
### `[speed delay= chars=]`
Changes text printing speed. `delay` is the number of frames between each print, and `chars` is the number of characters to print at once. For example, `[speed delay=5 chars=3]` would print 3 characters every 5 frames.
### `[pos x= y=]`
Overrides the current text printing position.
`x` is optional. If only `y` is provided, the x position will not change.
### `[indent n]`
Indents the following text by `n` tabs.
### `[up n]` and `[down n]`
Moves the text printing position up/down by `n` pixels respectively.
### `[image id]`
Displays the given image. This requires extra setup when printing the message.
There is also a 7-parameter variant of `image` that is not yet understood.
### `[sprite unknown id raster]`
Displays the given sprite.
### `[item a b]`
Displays the given world icon.
### `[cursor n]` and `[option n]`
Denotes the position for the hand cursor to appear and the start of the option text for choice `n` of a `[style=choice]` box.
### `[choicecount=]`
Sets the number of options given in this `[style=choice]` box.
### `[cancel=]`
Sets the option number to be selected if the user presses B.
If this is not provided, pressing B does nothing.
### Effects
- `[shaky]...[/shaky]`
- `[noise fade=]...[/noise]`
- `[faded-shaky fade=]...[/faded-shaky]`
- `[fade=]...[/fade]`
- `[shout]...[/shout]` or `[shrinking]...[/shrinking]`
- `[whisper]...[/whisper]` or `[growing]...[/growing]`
- `[scream]...[/scream]` or `[shaky-size]...[/shaky-size]`
- `[chortle]...[/chortle]` or `[wavy-size]...[/wavy-size]`
- `[shadow]...[/shadow]`
### `[var n]`
Replaced with the value of message variable `n`. Must be set before the message is printed.
### `[center=]`
Centers the following text. Parameter purpose is unknown.
### `[volume=]`
Changes the volume of the following text.
### `[sound=]`
Changes the speech sound for the following text.
Supported sound names: normal bowser spirit
You can also use an integer for the parameter.
### `[/sound]`
Resets the speech sound to what it was before the most recent `[sound=]` tag.
### `[note]` `[heart]` `[star]` `[circle]` `[cross]` `[arrow-up]` `[arrow-down]` `[arrow-left]` `[arrow-right]`
Equivalent to the characters 𝅘𝅥𝅮♥★●✖↑↓←→ respectively.
### `[raw ...]`
Outputs all arguments provided as bytes, without modification.
### `[func ...]`
Same as `raw`, but prefixed with 0xFF.
## Comments
`//` line comments are allowed anywhere outside of a `[message]...[/message]` block and will be ignored.
Block comments are not supported.

View File

@ -1704,7 +1704,7 @@ typedef struct struct802E2BA4 {
/* 0x02 */ u16 unk_02[24][2];
} struct802E2BA4;
// from code_102c80, size unknown.
// from 102c80, size unknown.
typedef struct struct802E1400 {
/* 0x000 */ Vec3f unk_00;
/* 0x00C */ char unk_0C[4];
@ -1734,7 +1734,7 @@ typedef struct struct802E1400 {
/* 0x188 */ f32 unk_188[24];
} struct802E1400;
// from code_104940_len_dc0, size unknown
// from 104940_len_dc0, size unknown
// appears to belong to the hammer blocks(?)
typedef struct struct802E3650 {
/* 0x000 */ u8 unk_00;

View File

@ -1541,6 +1541,7 @@ enum NpcFlags {
NPC_FLAG_200000 = 0x00200000,
NPC_FLAG_400000 = 0x00400000,
NPC_FLAG_NO_DROPS = 0x00800000, ///< Do not drop hearts, flowers, or coins on defeat
NPC_FLAG_SIMPLE_XZ_HITBOX = 0x04000000, ///< Perform only a single lateral collision test during motion.
NPC_FLAG_40000000 = 0x40000000,
NPC_FLAG_80000000 = 0x80000000,
};

View File

@ -30,7 +30,6 @@
#define OVERRIDE_FLAG_UNSET(flag) { s32* overrideFlags = &gOverrideFlags; *overrideFlags &= ~flag; }
#define OVERRIDE_FLAG_CHECK(flag) ({ s32* overrideFlags = &gOverrideFlags; *overrideFlags & flag; })
#define MAX_MAPVARS 16
#define MAX_MAPFLAGS 3

View File

@ -10,6 +10,9 @@
#define UNK_FUN_PTR(name) void(*name)(void)
#define UNK_ARGS
/// Linker symbol address, as in `ld_addrs.h`.
typedef u8 Addr[];
typedef s32 BattleID;
#define BATTLE_ID(unk, area, stage, index) ((unk << 24) + (area << 16) + (stage << 8) + index)

View File

@ -1 +0,0 @@
ver/jp/papermario.z64

View File

@ -1 +0,0 @@
ver/us/build/papermario.z64

15
src/101b90_len_8f0.c Normal file
View File

@ -0,0 +1,15 @@
#include "common.h"
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DEAA0);
INCLUDE_ASM(s32, "101b90_len_8f0", load_sprite);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DED60);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DEEA0);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DEFB4);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DF00C);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DF2D8);

View File

@ -14,7 +14,7 @@ s32 func_802E0DB0(Shadow* shadow) {
return FALSE;
}
INCLUDE_ASM(s32, "code_102610_len_2330", func_802E0DE0);
INCLUDE_ASM(s32, "102610_len_2330", func_802E0DE0);
typedef struct struct802E10F4 {
char unk_0[4];

View File

@ -310,7 +310,7 @@ s32 func_802E17A8(Entity* entity) {
}
}
#else
INCLUDE_ASM(s32, "code_102C80", func_802E17A8, Entity* entity);
INCLUDE_ASM(s32, "102C80", func_802E17A8, Entity* entity);
#endif
void func_802E1EA8(Entity* entity) {
@ -461,7 +461,7 @@ void func_802E1EDC(Entity* entity) {
}
}
#else
INCLUDE_ASM(void, "code_102C80", func_802E1EDC, Entity* entity);
INCLUDE_ASM(void, "102C80", func_802E1EDC, Entity* entity);
#endif
void func_802E234C(Entity* entity) {
@ -513,9 +513,9 @@ void func_802E2450(Entity* entity) {
}
INCLUDE_ASM(void, "code_102C80", func_802E246C, Entity* entity, void* arg1, void* arg2);
INCLUDE_ASM(void, "102C80", func_802E246C, Entity* entity, void* arg1, void* arg2);
INCLUDE_ASM(void, "code_102C80", func_802E263C, Entity* entity);
INCLUDE_ASM(void, "102C80", func_802E263C, Entity* entity);
#ifdef NON_MATCHING
// display list issues
@ -569,5 +569,5 @@ void func_802E2BA4(s32 entityIndex) {
gMasterGfxPos = temp_s2;
}
#else
INCLUDE_ASM(s32, "code_102C80", func_802E2BA4);
INCLUDE_ASM(s32, "102C80", func_802E2BA4);
#endif

View File

@ -46,9 +46,9 @@ void state_init_file_select(void) {
OVERRIDE_FLAG_SET(0x10000);
}
INCLUDE_ASM(s32, "code_10400_len_d30", state_step_language_select);
INCLUDE_ASM(s32, "10400_len_d30", state_step_language_select);
INCLUDE_ASM(s32, "code_10400_len_d30", func_800354EC);
INCLUDE_ASM(s32, "10400_len_d30", func_800354EC);
void state_drawUI_language_select(void) {
}
@ -83,9 +83,9 @@ void func_80035660(void) {
OVERRIDE_FLAG_UNSET(0x40);
}
INCLUDE_ASM(s32, "code_10400_len_d30", func_80035704);
INCLUDE_ASM(s32, "10400_len_d30", func_80035704);
INCLUDE_ASM(s32, "code_10400_len_d30", func_80035B40);
INCLUDE_ASM(s32, "10400_len_d30", func_80035B40);
void func_80035D18(void) {
}

View File

@ -1,7 +1,7 @@
#include "common.h"
//display list func
INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E30C0);
INCLUDE_ASM(s32, "104940_len_dc0", func_802E30C0);
void func_802E31B0(Entity* entity) {
func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C);
@ -38,7 +38,7 @@ void func_802E328C(Entity* entity) {
func_802E3650(entity);
}
INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3370);
INCLUDE_ASM(s32, "104940_len_dc0", func_802E3370);
s32 func_802E3650(Entity* entity) {
struct802E3650* temp = (struct802E3650*)entity->dataBuf;
@ -306,7 +306,7 @@ s32 func_802E3BA4(Entity* entity) {
return 1;
}
#else
INCLUDE_ASM(s32, "code_104940_len_dc0", func_802E3BA4, Entity* entity);
INCLUDE_ASM(s32, "104940_len_dc0", func_802E3BA4, Entity* entity);
#endif
void entity_init_Hammer1Block_normal(Entity* entity) {

View File

@ -33,9 +33,9 @@ void func_802E3E9C(Entity* entity) {
}
}
INCLUDE_ASM(s32, "code_105700_len_2130", func_802E3EE0);
INCLUDE_ASM(s32, "105700_len_2130", func_802E3EE0);
INCLUDE_ASM(void, "code_105700_len_2130", func_802E3F0C, Entity* entity);
INCLUDE_ASM(void, "105700_len_2130", func_802E3F0C, Entity* entity);
void func_802E4040(Entity* entity) {
func_80110678(entity);

View File

@ -5,9 +5,9 @@ extern UNK_TYPE D_802EA760;
extern StaticEntityData D_802EA7BC;
extern UNK_TYPE D_802EB3C0;
INCLUDE_ASM(s32, "code_105F90", func_802E4710);
INCLUDE_ASM(s32, "105F90", func_802E4710);
INCLUDE_ASM(s32, "code_105F90", func_802E4730);
INCLUDE_ASM(s32, "105F90", func_802E4730);
void func_802E4AEC(s32 entityIndex) {
func_802E4730(entityIndex, &D_0A000808);
@ -52,7 +52,7 @@ void func_802E4B60(Entity* entity) {
func_802E4B10(entity);
}
INCLUDE_ASM(s32, "code_105F90", func_802E4C10);
INCLUDE_ASM(s32, "105F90", func_802E4C10);
void func_802E4DE0(Entity* entity) {
struct802E4B10* temp = entity->dataBuf;
@ -64,13 +64,13 @@ void func_802E4DE0(Entity* entity) {
entity->rotation.z = 0.0f;
}
INCLUDE_ASM(s32, "code_105F90", func_802E4E04);
INCLUDE_ASM(s32, "105F90", func_802E4E04);
void func_802E5308(Entity* entity) {
func_802E3650(entity);
}
INCLUDE_ASM(s32, "code_105F90", func_802E5324);
INCLUDE_ASM(s32, "105F90", func_802E5324);
void func_802E540C(Entity* entity) {
func_802E4B10(entity);

View File

@ -86,7 +86,7 @@ void func_80025F44(char* arg0, char* file, s32 line) {
PANIC();
}
#else
INCLUDE_ASM(void, "code_1060_len_310", func_80025F44, char* arg0, char* file, s32 line);
INCLUDE_ASM(void, "1060_len_310", func_80025F44, char* arg0, char* file, s32 line);
#endif

View File

@ -68,7 +68,7 @@ void func_802E581C(Entity* entity) {
}
// display list func
INCLUDE_ASM(s32, "code_106EF0", func_802E586C);
INCLUDE_ASM(s32, "106EF0", func_802E586C);
void func_802E5E50(Entity* entity) {
struct802E4B10* temp_s0 = entity->dataBuf;

28
src/107830_len_e70.c Normal file
View File

@ -0,0 +1,28 @@
#include "common.h"
INCLUDE_ASM(s32, "107830_len_e70", func_802E5FB0);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6064);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6118);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6178);
void func_802E6194(void) {
}
INCLUDE_ASM(s32, "107830_len_e70", func_802E619C);
INCLUDE_ASM(s32, "107830_len_e70", func_802E61B0);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6338);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6390);
INCLUDE_ASM(s32, "107830_len_e70", func_802E63A8);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6574);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6B6C);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6C24);

37
src/1086a0_len_fc0.c Normal file
View File

@ -0,0 +1,37 @@
#include "common.h"
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E6E20);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E6E90);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E6ED8);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7034);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E70B0);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E71F8);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7230);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E742C);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E75C0);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E75E4);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7AE4);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7C70);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7C8C);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7CB8);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7D28);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7D38);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7D54);
INCLUDE_ASM(s32, "1086a0_len_fc0", entity_init_Chest);

View File

@ -18,7 +18,7 @@ typedef struct struct802E7DE0 {
/* 0x304 */ f32 unk_304[36];
} struct802E7DE0;
INCLUDE_ASM(s32, "code_109660_len_1270", func_802E7DE0);
INCLUDE_ASM(s32, "109660_len_1270", func_802E7DE0);
typedef struct struct802E7F40 {
/* 0x00 */ s32 unk_00;
@ -44,9 +44,9 @@ void func_802E7F6C(Entity* entity) {
func_802E7DE0(entity, &D_0A004350, &D_0A0026F0);
}
INCLUDE_ASM(s32, "code_109660_len_1270", func_802E7FA0);
INCLUDE_ASM(s32, "109660_len_1270", func_802E7FA0);
INCLUDE_ASM(s32, "code_109660_len_1270", func_802E854C);
INCLUDE_ASM(s32, "109660_len_1270", func_802E854C);
s32 func_802E8858(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus;

View File

@ -146,7 +146,7 @@ void func_802E8E10(Entity* entity) {
func_80110678(entity);
}
INCLUDE_ASM(s32, "code_10A230", push_entity_matrix);
INCLUDE_ASM(s32, "10A230", push_entity_matrix);
f32 func_802E8F94(Entity* entity) {
struct802E89B0* temp_s0;

View File

@ -6,7 +6,7 @@ void begin_state_world(void) {
void step_world(void) {
update_counters();
update_npcs();
npc_list_update();
update_player();
update_item_entities();
update_effects();

View File

@ -37,7 +37,7 @@ void func_80035E54(void) {
D_8009A5D8 = 0;
}
INCLUDE_ASM(s32, "code_111f0_len_860", func_80035EEC);
INCLUDE_ASM(s32, "111f0_len_860", func_80035EEC);
void func_800360FC(void) {
if (gGameStatusPtr->loadMenuState == 2) {
@ -58,7 +58,7 @@ void func_80036130(void) {
}
}
INCLUDE_ASM(s32, "code_111f0_len_860", func_8003617C);
INCLUDE_ASM(s32, "111f0_len_860", func_8003617C);
void func_800363FC(void) {
if (D_800A0944 == 4 || D_800A0944 == 0) {
@ -78,7 +78,7 @@ s32 func_80036430(void) {
return playerStatus->flags;
}
INCLUDE_ASM(s32, "code_111f0_len_860", func_8003646C);
INCLUDE_ASM(s32, "111f0_len_860", func_8003646C);
void func_80036640(void) {
}

View File

@ -72,7 +72,7 @@ void begin_state_intro(void) {
intro_logos_update_fade();
}
INCLUDE_ASM(s32, "code_11a50_len_7a0", step_intro);
INCLUDE_ASM(s32, "11a50_len_7a0", step_intro);
void func_80036DE0(void) {
}

20
src/121f0_len_1290.c Normal file
View File

@ -0,0 +1,20 @@
#include "common.h"
INCLUDE_ASM(s32, "121f0_len_1290", begin_state_title_screen);
INCLUDE_ASM(s32, "121f0_len_1290", step_title_screen);
INCLUDE_ASM(s32, "121f0_len_1290", func_800375A4);
INCLUDE_ASM(s32, "121f0_len_1290", title_append_gfx);
void func_80037960(void) {
}
INCLUDE_ASM(s32, "121f0_len_1290", title_draw_images);
INCLUDE_ASM(s32, "121f0_len_1290", title_draw_logo);
INCLUDE_ASM(s32, "121f0_len_1290", title_draw_press_start);
INCLUDE_ASM(s32, "121f0_len_1290", title_draw_copyright);

View File

@ -19,7 +19,7 @@ void init_demo_data(void) {
clear_script_list();
}
INCLUDE_ASM(s32, "code_13480_len_3f0", next_demo_scene);
INCLUDE_ASM(s32, "13480_len_3f0", next_demo_scene);
void func_8003845C(void) {

View File

@ -89,7 +89,7 @@ void gfxRetrace_Callback(s32 arg0) {
}
}
INCLUDE_ASM(void, "code_1370_len_7d0", gfx_task_main);
INCLUDE_ASM(void, "1370_len_7d0", gfx_task_main);
void gfxPreNMI_Callback(void) {
D_80073E00 = 1;

59
src/163400.c Normal file
View File

@ -0,0 +1,59 @@
#include "common.h"
INCLUDE_ASM(s32, "163400", func_80242BA0);
INCLUDE_ASM(s32, "163400", func_80242D94);
INCLUDE_ASM(s32, "163400", func_80242DEC);
INCLUDE_ASM(s32, "163400", func_80242E00);
INCLUDE_ASM(s32, "163400", func_80242F68);
INCLUDE_ASM(s32, "163400", func_802431A0);
INCLUDE_ASM(s32, "163400", func_8024330C);
INCLUDE_ASM(s32, "163400", func_80243380);
INCLUDE_ASM(s32, "163400", func_802433F4);
INCLUDE_ASM(s32, "163400", func_80243468);
INCLUDE_ASM(s32, "163400", func_802434DC);
INCLUDE_ASM(s32, "163400", func_80243550);
INCLUDE_ASM(s32, "163400", func_802435C4);
INCLUDE_ASM(s32, "163400", func_80243628);
INCLUDE_ASM(s32, "163400", func_8024368C);
INCLUDE_ASM(s32, "163400", func_802436F0);
INCLUDE_ASM(s32, "163400", func_80243754);
INCLUDE_ASM(s32, "163400", func_802437B8);
INCLUDE_ASM(s32, "163400", func_8024381C);
INCLUDE_ASM(s32, "163400", func_80243898);
INCLUDE_ASM(s32, "163400", func_80243908);
INCLUDE_ASM(s32, "163400", func_80243B10);
INCLUDE_ASM(s32, "163400", func_80243CCC);
INCLUDE_ASM(s32, "163400", func_80243EEC);
INCLUDE_ASM(s32, "163400", func_80244030);
INCLUDE_ASM(s32, "163400", func_802440BC);
INCLUDE_ASM(s32, "163400", func_802448E0);
INCLUDE_ASM(s32, "163400", func_80244B00);
INCLUDE_ASM(s32, "163400", func_80244BC4);

41
src/165490.c Normal file
View File

@ -0,0 +1,41 @@
#include "common.h"
INCLUDE_ASM(s32, "165490", func_80244C30);
INCLUDE_ASM(s32, "165490", func_80244CEC);
INCLUDE_ASM(s32, "165490", func_80244D60);
INCLUDE_ASM(s32, "165490", func_80244DD0);
INCLUDE_ASM(s32, "165490", func_80244E54);
INCLUDE_ASM(s32, "165490", func_80244F44);
INCLUDE_ASM(s32, "165490", func_80244FD4);
INCLUDE_ASM(s32, "165490", func_8024544C);
INCLUDE_ASM(s32, "165490", func_80245588);
INCLUDE_ASM(s32, "165490", func_802455D8);
INCLUDE_ASM(s32, "165490", func_80245628);
INCLUDE_ASM(s32, "165490", func_80245678);
INCLUDE_ASM(s32, "165490", func_802456C8);
INCLUDE_ASM(s32, "165490", func_80245718);
INCLUDE_ASM(s32, "165490", func_80245768);
INCLUDE_ASM(s32, "165490", func_802457B8);
INCLUDE_ASM(s32, "165490", func_80245808);
INCLUDE_ASM(s32, "165490", func_80245A40);
INCLUDE_ASM(s32, "165490", func_80246B2C);
INCLUDE_ASM(s32, "165490", func_80246CBC);

15
src/167570.c Normal file
View File

@ -0,0 +1,15 @@
#include "common.h"
INCLUDE_ASM(s32, "167570", func_80246D10);
INCLUDE_ASM(s32, "167570", func_80246E24);
INCLUDE_ASM(s32, "167570", func_80247198);
INCLUDE_ASM(s32, "167570", func_802471EC);
void func_80247D14(void) {
}
void func_80247D1C(void) {
}

28
src/168590.c Normal file
View File

@ -0,0 +1,28 @@
#include "common.h"
INCLUDE_ASM(s32, "168590", func_80247D30);
INCLUDE_ASM(s32, "168590", func_80247FD0);
INCLUDE_ASM(s32, "168590", func_80248024);
void func_80248160(void) {
}
void func_80248168(void) {
}
INCLUDE_ASM(s32, "168590", func_80248170);
INCLUDE_ASM(s32, "168590", func_802481B8);
INCLUDE_ASM(s32, "168590", func_8024830C);
INCLUDE_ASM(s32, "168590", func_80248A80);
INCLUDE_ASM(s32, "168590", func_80248BF4);
void func_80249324(void) {
}
INCLUDE_ASM(s32, "168590", func_8024932C);

9
src/169BE0.c Normal file
View File

@ -0,0 +1,9 @@
#include "common.h"
INCLUDE_ASM(s32, "169BE0", func_80249380);
INCLUDE_ASM(s32, "169BE0", func_8024997C);
INCLUDE_ASM(s32, "169BE0", func_80249AA4);
INCLUDE_ASM(s32, "169BE0", func_80249AB8);

View File

@ -5,9 +5,9 @@ extern s16 D_802809F6;
extern s32 D_80280A30;
extern s32 D_8029F254;
INCLUDE_ASM(s32, "code_16F740", func_80240E60);
INCLUDE_ASM(s32, "16F740", func_80240E60);
INCLUDE_ASM(s32, "code_16F740", func_80240FDC);
INCLUDE_ASM(s32, "16F740", func_80240FDC);
void func_80241190(s32 battleState) {
s32 flags = gBattleStatus.flags2;
@ -38,7 +38,7 @@ void func_80241190(s32 battleState) {
}
}
INCLUDE_ASM(s32, "code_16F740", begin_battle);
INCLUDE_ASM(s32, "16F740", begin_battle);
void func_80241AB8(void) {
set_transition_stencil_color(0, 0, 0, 0);
@ -50,32 +50,32 @@ void func_80241AB8(void) {
}
}
INCLUDE_ASM(s32, "code_16F740", func_80241B14);
INCLUDE_ASM(s32, "16F740", func_80241B14);
void func_8024201C(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_heroes_start_turn);
INCLUDE_ASM(s32, "16F740", update_heroes_start_turn);
void func_80242AC0(void) {
}
INCLUDE_ASM(s32, "code_16F740", switch_to_player);
INCLUDE_ASM(s32, "16F740", switch_to_player);
void func_80242BA8(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_end_player_turn);
INCLUDE_ASM(s32, "16F740", update_end_player_turn);
void func_80242EF8(void) {
}
INCLUDE_ASM(s32, "code_16F740", switch_to_partner);
INCLUDE_ASM(s32, "16F740", switch_to_partner);
void func_80242FD8(void) {
}
INCLUDE_ASM(s32, "code_16F740", func_80242FE0);
INCLUDE_ASM(s32, "16F740", func_80242FE0);
void func_80243910(void) {
}
@ -94,7 +94,7 @@ void switch_order(void) {
battleStatus->unk_62 = -1;
battleStatus->unk_63 = -1;
dma_copy(&code_code_415D90_ROM_START, &code_code_415D90_ROM_END, &code_code_415D90_VRAM);
dma_copy(_415D90_ROM_START, _415D90_ROM_END, _415D90_VRAM);
// TODO Needed to match
if (0) { s32 new_var; do { } while (new_var); }
@ -113,7 +113,7 @@ void switch_order(void) {
void func_802439D0(void) {
}
INCLUDE_ASM(s32, "code_16F740", func_802439D8);
INCLUDE_ASM(s32, "16F740", func_802439D8);
void func_80243FD4(void) {
}
@ -126,31 +126,31 @@ void func_80243FDC(void) {
void func_80244000(void) {
}
INCLUDE_ASM(s32, "code_16F740", func_80244008);
INCLUDE_ASM(s32, "16F740", func_80244008);
void func_80244708(void) {
}
INCLUDE_ASM(s32, "code_16F740", func_80244710);
INCLUDE_ASM(s32, "16F740", func_80244710);
void func_80244A48(void) {
}
INCLUDE_ASM(s32, "code_16F740", end_battle);
INCLUDE_ASM(s32, "16F740", end_battle);
INCLUDE_ASM(s32, "code_16F740", func_80244D90);
INCLUDE_ASM(s32, "16F740", func_80244D90);
INCLUDE_ASM(s32, "code_16F740", func_80244E38);
INCLUDE_ASM(s32, "16F740", func_80244E38);
void func_80244EF8(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_run_away);
INCLUDE_ASM(s32, "16F740", update_run_away);
void func_80245438(void) {
}
INCLUDE_ASM(s32, "code_16F740", func_80245440);
INCLUDE_ASM(s32, "16F740", func_80245440);
void func_802456B0(void) {
}
@ -165,22 +165,22 @@ ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_16F740", update_swap_partner);
INCLUDE_ASM(s32, "16F740", update_swap_partner);
void func_80245AC8(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_player_action);
INCLUDE_ASM(s32, "16F740", update_player_action);
void func_80246448(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_player_change_turn);
INCLUDE_ASM(s32, "16F740", update_player_change_turn);
void func_80246B2C_code(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_partner_action);
INCLUDE_ASM(s32, "16F740", update_partner_action);
void func_80247214(void) {
}
@ -211,28 +211,28 @@ void func_8024721C(void) {
}
}
#else
INCLUDE_ASM(s32, "code_16F740", func_8024721C);
INCLUDE_ASM(s32, "16F740", func_8024721C);
#endif
void func_802472A4(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_enemy_change_turn);
INCLUDE_ASM(s32, "16F740", update_enemy_change_turn);
void func_80247568(void) {
}
INCLUDE_ASM(s32, "code_16F740", update_enemy_action);
INCLUDE_ASM(s32, "16F740", update_enemy_action);
void func_80247AFC(void) {
}
INCLUDE_ASM(s32, "code_16F740", func_80247B04);
INCLUDE_ASM(s32, "16F740", func_80247B04);
INCLUDE_ASM(s32, "code_16F740", func_802480F0);
INCLUDE_ASM(s32, "16F740", func_802480F0);
INCLUDE_ASM(s32, "code_16F740", func_80248190);
INCLUDE_ASM(s32, "16F740", func_80248190);
void func_802485FC(void) {
if (D_8029F254 != 0) {
@ -251,7 +251,7 @@ void func_802485FC(void) {
}
}
INCLUDE_ASM(s32, "code_16F740", func_80248660);
INCLUDE_ASM(s32, "16F740", func_80248660);
void func_80248AA4(void) {
if (D_8029F254 != 0) {
@ -270,7 +270,7 @@ void func_80248AA4(void) {
}
}
INCLUDE_ASM(s32, "code_16F740", func_80248B08);
INCLUDE_ASM(s32, "16F740", func_80248B08);
void func_80248D78(void) {
if (D_802809F6 == -1) {

View File

@ -46,7 +46,7 @@ Script BtlBringPartnerOut = SCRIPT({
SetActorScale(ACTOR_PARTNER, 1.0, 1.0, 1.0);
}
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_D);
GetGoalPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
GetGoalPos(256, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SetActorJumpGravity(ACTOR_PARTNER, 1.0);
if (SI_VAR(1) == 0) {
JumpToGoal(ACTOR_PARTNER, 20, 0, 0, 1);
@ -181,7 +181,7 @@ void func_8023E11C(void) {
D_802809F5 = 0;
}
INCLUDE_ASM(s32, "code_16c8e0", initialize_battle);
INCLUDE_ASM(s32, "16c8e0", initialize_battle);
void func_8023E3FC(void) {
}
@ -193,27 +193,27 @@ void update_actor_shadows(void) {
}
}
INCLUDE_ASM(s32, "code_16c8e0", update_battle_state);
INCLUDE_ASM(s32, "16c8e0", update_battle_state);
INCLUDE_ASM(s32, "code_16c8e0", draw_main_battle_ui);
INCLUDE_ASM(s32, "16c8e0", draw_main_battle_ui);
INCLUDE_ASM(s32, "code_16c8e0", func_8023ED5C);
INCLUDE_ASM(s32, "16c8e0", func_8023ED5C);
INCLUDE_ASM(s32, "code_16c8e0", func_8023F060);
INCLUDE_ASM(s32, "16c8e0", func_8023F060);
INCLUDE_ASM(s32, "code_16c8e0", func_8023F088);
INCLUDE_ASM(s32, "16c8e0", func_8023F088);
void func_8023FF84(void) {
show_foreground_models_unsafe();
}
INCLUDE_ASM(s32, "code_16c8e0", draw_enemy_health_bars);
INCLUDE_ASM(s32, "16c8e0", draw_enemy_health_bars);
INCLUDE_ASM(s32, "code_16c8e0", update_starpoints_display);
INCLUDE_ASM(s32, "16c8e0", update_starpoints_display);
INCLUDE_ASM(s32, "code_16c8e0", func_802409F4);
INCLUDE_ASM(s32, "16c8e0", func_802409F4);
INCLUDE_ASM(s32, "code_16c8e0", func_80240AA8);
INCLUDE_ASM(s32, "16c8e0", func_80240AA8);
void delete_actor(Actor* actor) {
ActorPart* partsTable;

95
src/1776B0.c Normal file
View File

@ -0,0 +1,95 @@
#include "common.h"
INCLUDE_ASM(ApiStatus, "1776B0", func_80248DD0, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "1776B0", func_80248DE4);
INCLUDE_ASM(s32, "1776B0", func_80249804);
INCLUDE_ASM(s32, "1776B0", func_8024A214);
INCLUDE_ASM(s32, "1776B0", func_8024A990);
INCLUDE_ASM(s32, "1776B0", func_8024AFE4);
INCLUDE_ASM(s32, "1776B0", func_8024B5FC);
INCLUDE_ASM(s32, "1776B0", func_8024B9A0);
INCLUDE_ASM(s32, "1776B0", func_8024BDA4);
INCLUDE_ASM(s32, "1776B0", func_8024C180);
INCLUDE_ASM(s32, "1776B0", func_8024C570);
INCLUDE_ASM(s32, "1776B0", func_8024C944);
INCLUDE_ASM(s32, "1776B0", func_8024CB68);
INCLUDE_ASM(s32, "1776B0", func_8024CE9C);
INCLUDE_ASM(s32, "1776B0", use_cam_preset);
INCLUDE_ASM(s32, "1776B0", func_8024E3D8);
INCLUDE_ASM(s32, "1776B0", func_8024E40C);
INCLUDE_ASM(s32, "1776B0", cam_target_actor);
INCLUDE_ASM(s32, "1776B0", func_8024E45C);
INCLUDE_ASM(s32, "1776B0", func_8024E484);
INCLUDE_ASM(s32, "1776B0", move_cam_over);
INCLUDE_ASM(s32, "1776B0", set_cam_target_pos);
INCLUDE_ASM(s32, "1776B0", func_8024E554);
INCLUDE_ASM(s32, "1776B0", func_8024E584);
INCLUDE_ASM(s32, "1776B0", set_cam_zoom);
INCLUDE_ASM(s32, "1776B0", add_cam_zoom);
INCLUDE_ASM(s32, "1776B0", set_cam_zoffset);
INCLUDE_ASM(s32, "1776B0", unfreeze_cam);
INCLUDE_ASM(s32, "1776B0", func_8024E60C);
INCLUDE_ASM(s32, "1776B0", UseCamPreset);
INCLUDE_ASM(s32, "1776B0", func_8024E664);
INCLUDE_ASM(s32, "1776B0", func_8024E6B4);
INCLUDE_ASM(s32, "1776B0", func_8024E748);
INCLUDE_ASM(s32, "1776B0", func_8024E820);
INCLUDE_ASM(s32, "1776B0", SetBattleCamTarget);
INCLUDE_ASM(s32, "1776B0", func_8024E9B0);
INCLUDE_ASM(s32, "1776B0", SetBattleCamOffsetZ);
INCLUDE_ASM(s32, "1776B0", AddBattleCamOffsetZ);
INCLUDE_ASM(s32, "1776B0", SetBattleCamYaw);
INCLUDE_ASM(s32, "1776B0", BattleCamTargetActor);
INCLUDE_ASM(s32, "1776B0", func_8024EB84);
INCLUDE_ASM(s32, "1776B0", MoveBattleCamOver);
INCLUDE_ASM(s32, "1776B0", SetBattleCamZoom);
INCLUDE_ASM(s32, "1776B0", AddBattleCamZoom);
INCLUDE_ASM(s32, "1776B0", func_8024ECF8);
INCLUDE_ASM(s32, "1776B0", FreezeBattleCam);
INCLUDE_ASM(s32, "1776B0", func_8024EDA4);

75
src/17D6A0.c Normal file
View File

@ -0,0 +1,75 @@
#include "common.h"
INCLUDE_ASM(s32, "17D6A0", func_8024EDC0);
INCLUDE_ASM(s32, "17D6A0", func_8024EDEC);
INCLUDE_ASM(s32, "17D6A0", func_8024EE48);
INCLUDE_ASM(s32, "17D6A0", func_8024EEA8);
INCLUDE_ASM(s32, "17D6A0", func_8024EF08);
INCLUDE_ASM(s32, "17D6A0", create_popup);
INCLUDE_ASM(s32, "17D6A0", func_8024EFA4);
INCLUDE_ASM(s32, "17D6A0", func_8024EFE0);
INCLUDE_ASM(s32, "17D6A0", func_8024F394);
INCLUDE_ASM(s32, "17D6A0", func_8024F5AC);
INCLUDE_ASM(s32, "17D6A0", func_8024F768);
INCLUDE_ASM(s32, "17D6A0", func_8024F7C8);
INCLUDE_ASM(s32, "17D6A0", func_8024F84C);
INCLUDE_ASM(s32, "17D6A0", func_8024F940);
INCLUDE_ASM(s32, "17D6A0", show_battle_message);
INCLUDE_ASM(s32, "17D6A0", show_variable_battle_message);
INCLUDE_ASM(s32, "17D6A0", is_popup_displayed);
INCLUDE_ASM(s32, "17D6A0", set_popup_duration);
INCLUDE_ASM(s32, "17D6A0", func_8024FAE8);
INCLUDE_ASM(s32, "17D6A0", func_8024FAFC);
INCLUDE_ASM(s32, "17D6A0", close_action_command_instruction_popup);
INCLUDE_ASM(s32, "17D6A0", func_8024FB3C);
INCLUDE_ASM(s32, "17D6A0", func_80250818);
INCLUDE_ASM(s32, "17D6A0", show_message_popup);
INCLUDE_ASM(s32, "17D6A0", ShowMessageBox);
INCLUDE_ASM(s32, "17D6A0", ShowVariableMessageBox);
ApiStatus IsMessageBoxDisplayed(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 outVar = *args++;
set_variable(script, outVar, is_popup_displayed());
return ApiStatus_DONE2;
}
ApiStatus WaitForMessageBoxDone(ScriptInstance* script, s32 isInitialCall) {
return !is_popup_displayed() * ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "17D6A0", ForceCloseMessageBox);
INCLUDE_ASM(s32, "17D6A0", SetMessageBoxDuration);
INCLUDE_ASM(s32, "17D6A0", func_80251434);
INCLUDE_ASM(s32, "17D6A0", func_80251454);
INCLUDE_ASM(s32, "17D6A0", func_80251474);

View File

@ -37,7 +37,7 @@ HitResult calc_item_check_hit(void) {
return HIT_RESULT_HIT;
}
INCLUDE_ASM(s32, "code_17FEB0", calc_item_damage_enemy);
INCLUDE_ASM(s32, "17FEB0", calc_item_damage_enemy);
ApiStatus ItemDamageEnemy(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;

View File

@ -108,7 +108,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
INCLUDE_ASM(s32, "code_181810", EndActorSpeech);
INCLUDE_ASM(s32, "181810", EndActorSpeech);
ApiStatus ShowBattleChoice(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -146,7 +146,7 @@ ApiStatus OverrideBattleDmaDest(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_181810", LoadBattleDmaData);
INCLUDE_ASM(s32, "181810", LoadBattleDmaData);
ApiStatus func_802536A8(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
@ -347,9 +347,9 @@ s32 is_actortype_hpbar_visible(s32 actorType) {
return ((get_global_byte(idx + 365) | battleStatus->tattleFlags[idx]) >> (actorType - (idx * 8))) & 1;
}
INCLUDE_ASM(s32, "code_181810", save_tattle_flags);
INCLUDE_ASM(s32, "181810", save_tattle_flags);
INCLUDE_ASM(s32, "code_181810", load_tattle_flags);
INCLUDE_ASM(s32, "181810", load_tattle_flags);
ApiStatus func_80253FB0(ScriptInstance* script, s32 isInitialCall) {
gCurrentEncounter.battleOutcome = 3;

View File

@ -25,11 +25,11 @@ void mtx_mirror_y(Matrix4f arg0) {
(arg0)[3][3] = 1.0f;
}
INCLUDE_ASM(s32, "code_182B30", enable_actor_blur);
INCLUDE_ASM(s32, "182B30", enable_actor_blur);
INCLUDE_ASM(s32, "code_182B30", disable_actor_blur);
INCLUDE_ASM(s32, "182B30", disable_actor_blur);
INCLUDE_ASM(s32, "code_182B30", reset_actor_blur);
INCLUDE_ASM(s32, "182B30", reset_actor_blur);
void func_80254610(Actor* actor) {
ActorPart* actorPart = actor->partsTable;
@ -125,13 +125,13 @@ void func_802549C0(void) {
decorationTable->effectType = 1;
}
INCLUDE_ASM(s32, "code_182B30", func_802549F4);
INCLUDE_ASM(s32, "182B30", func_802549F4);
INCLUDE_ASM(s32, "code_182B30", func_80254C50);
INCLUDE_ASM(s32, "182B30", func_80254C50);
INCLUDE_ASM(s32, "code_182B30", func_802550BC);
INCLUDE_ASM(s32, "182B30", func_802550BC);
INCLUDE_ASM(s32, "code_182B30", func_802552EC);
INCLUDE_ASM(s32, "182B30", func_802552EC);
void func_8025593C(s32 arg0) {
func_802550BC(0, arg0);
@ -149,7 +149,7 @@ void func_8025599C(s32 arg0) {
func_802552EC(1, arg0);
}
INCLUDE_ASM(s32, "code_182B30", update_actor_shadow);
INCLUDE_ASM(s32, "182B30", update_actor_shadow);
s32 update_enemy_shadows(void) {
BattleStatus* battleStatus = &gBattleStatus;
@ -168,9 +168,9 @@ void update_hero_shadows(void) {
void func_80255FD8(void) {
}
INCLUDE_ASM(s32, "code_182B30", func_80255FE0);
INCLUDE_ASM(s32, "182B30", func_80255FE0);
INCLUDE_ASM(s32, "code_182B30", func_802571F0);
INCLUDE_ASM(s32, "182B30", func_802571F0);
void func_80257B28(s32 arg0) {
func_80255FE0(0, arg0);
@ -188,23 +188,23 @@ void func_80257B88(void) {
func_802571F0(1, gBattleStatus.partnerActor);
}
INCLUDE_ASM(s32, "code_182B30", update_player_actor_shadow);
INCLUDE_ASM(s32, "182B30", update_player_actor_shadow);
INCLUDE_ASM(s32, "code_182B30", func_80257DA4);
INCLUDE_ASM(s32, "182B30", func_80257DA4);
INCLUDE_ASM(s32, "code_182B30", func_80258E14);
INCLUDE_ASM(s32, "182B30", func_80258E14);
INCLUDE_ASM(s32, "code_182B30", func_802591EC);
INCLUDE_ASM(s32, "182B30", func_802591EC);
INCLUDE_ASM(s32, "code_182B30", func_80259494);
INCLUDE_ASM(s32, "182B30", func_80259494);
INCLUDE_ASM(s32, "code_182B30", func_8025950C);
INCLUDE_ASM(s32, "182B30", func_8025950C);
INCLUDE_ASM(s32, "code_182B30", func_802596C0);
INCLUDE_ASM(s32, "182B30", func_802596C0);
INCLUDE_ASM(s32, "code_182B30", func_802597B0);
INCLUDE_ASM(s32, "182B30", func_802597B0);
INCLUDE_ASM(s32, "code_182B30", func_8025995C);
INCLUDE_ASM(s32, "182B30", func_8025995C);
void func_80259A48(s32 arg0, ActorPart* arg1, s32 arg2, s32 arg3) {
DecorationTable* decorationTable = arg1->decorationTable;
@ -222,27 +222,27 @@ void func_80259A48(s32 arg0, ActorPart* arg1, s32 arg2, s32 arg3) {
}
}
INCLUDE_ASM(s32, "code_182B30", func_80259AAC);
INCLUDE_ASM(s32, "182B30", func_80259AAC);
INCLUDE_ASM(s32, "code_182B30", func_80259D9C);
INCLUDE_ASM(s32, "182B30", func_80259D9C);
INCLUDE_ASM(s32, "code_182B30", func_8025A2C4);
INCLUDE_ASM(s32, "182B30", func_8025A2C4);
INCLUDE_ASM(s32, "code_182B30", func_8025A50C);
INCLUDE_ASM(s32, "182B30", func_8025A50C);
INCLUDE_ASM(s32, "code_182B30", func_8025A74C);
INCLUDE_ASM(s32, "182B30", func_8025A74C);
INCLUDE_ASM(s32, "code_182B30", func_8025AA80);
INCLUDE_ASM(s32, "182B30", func_8025AA80);
INCLUDE_ASM(s32, "code_182B30", func_8025AD90);
INCLUDE_ASM(s32, "182B30", func_8025AD90);
INCLUDE_ASM(s32, "code_182B30", func_8025B1A8);
INCLUDE_ASM(s32, "182B30", func_8025B1A8);
INCLUDE_ASM(s32, "code_182B30", func_8025B5C0);
INCLUDE_ASM(s32, "182B30", func_8025B5C0);
INCLUDE_ASM(s32, "code_182B30", func_8025BAA0);
INCLUDE_ASM(s32, "182B30", func_8025BAA0);
INCLUDE_ASM(s32, "code_182B30", func_8025C120);
INCLUDE_ASM(s32, "182B30", func_8025C120);
s32 func_8025C840(s32 arg0, ActorPart* arg1) {
@ -270,7 +270,7 @@ s32 func_8025C8A0(s32 arg0, ActorPart* arg1) {
}
}
INCLUDE_ASM(s32, "code_182B30", func_8025C918);
INCLUDE_ASM(s32, "182B30", func_8025C918);
s32 func_8025CCC8(s32 arg0, ActorPart* arg1) {
@ -296,11 +296,11 @@ void func_8025CD28(s32 arg0, ActorPart* arg1) {
decorationTable->unk_768 = 0;
}
INCLUDE_ASM(s32, "code_182B30", func_8025CD40);
INCLUDE_ASM(s32, "182B30", func_8025CD40);
INCLUDE_ASM(s32, "code_182B30", func_8025CEC8);
INCLUDE_ASM(s32, "182B30", func_8025CEC8);
INCLUDE_ASM(s32, "code_182B30", _remove_part_decoration);
INCLUDE_ASM(s32, "182B30", _remove_part_decoration);
void func_8025D150(void) {
}
@ -308,52 +308,52 @@ void func_8025D150(void) {
void func_8025D158(void) {
}
INCLUDE_ASM(s32, "code_182B30", func_8025D160);
INCLUDE_ASM(s32, "182B30", func_8025D160);
INCLUDE_ASM(s32, "code_182B30", func_8025D290);
INCLUDE_ASM(s32, "182B30", func_8025D290);
INCLUDE_ASM(s32, "code_182B30", func_8025D2B0);
INCLUDE_ASM(s32, "182B30", func_8025D2B0);
void func_8025D3C4(void) {
}
INCLUDE_ASM(s32, "code_182B30", func_8025D3CC);
INCLUDE_ASM(s32, "182B30", func_8025D3CC);
INCLUDE_ASM(s32, "code_182B30", func_8025D4A0);
INCLUDE_ASM(s32, "182B30", func_8025D4A0);
INCLUDE_ASM(s32, "code_182B30", func_8025D4C8);
INCLUDE_ASM(s32, "182B30", func_8025D4C8);
INCLUDE_ASM(s32, "code_182B30", func_8025D620);
INCLUDE_ASM(s32, "182B30", func_8025D620);
INCLUDE_ASM(s32, "code_182B30", func_8025D640);
INCLUDE_ASM(s32, "182B30", func_8025D640);
INCLUDE_ASM(s32, "code_182B30", func_8025D6FC);
INCLUDE_ASM(s32, "182B30", func_8025D6FC);
INCLUDE_ASM(s32, "code_182B30", func_8025D71C);
INCLUDE_ASM(s32, "182B30", func_8025D71C);
INCLUDE_ASM(s32, "code_182B30", func_8025D810);
INCLUDE_ASM(s32, "182B30", func_8025D810);
INCLUDE_ASM(s32, "code_182B30", func_8025D830);
INCLUDE_ASM(s32, "182B30", func_8025D830);
INCLUDE_ASM(s32, "code_182B30", func_8025D8EC);
INCLUDE_ASM(s32, "182B30", func_8025D8EC);
INCLUDE_ASM(s32, "code_182B30", func_8025D90C);
INCLUDE_ASM(s32, "182B30", func_8025D90C);
void func_8025DA60(void) {
}
INCLUDE_ASM(s32, "code_182B30", func_8025DA68);
INCLUDE_ASM(s32, "182B30", func_8025DA68);
void func_8025DBC8(void) {
}
INCLUDE_ASM(s32, "code_182B30", func_8025DBD0);
INCLUDE_ASM(s32, "182B30", func_8025DBD0);
void func_8025DD40(ActorPart* actorPart, s32 arg1) {
actorPart->decorationTable->unk_8B0[arg1]->unk_0C->unk_2C = 5;
}
INCLUDE_ASM(s32, "code_182B30", func_8025DD60);
INCLUDE_ASM(s32, "182B30", func_8025DD60);
void func_8025DE88(ActorPart* actorPart, s32 arg1) {
actorPart->decorationTable->unk_8B0[arg1]->unk_00 |= 0x10;

23
src/18C790.c Normal file
View File

@ -0,0 +1,23 @@
#include "common.h"
INCLUDE_ASM(s32, "18C790", func_8025DEB0);
INCLUDE_ASM(s32, "18C790", func_8025DEC4);
INCLUDE_ASM(s32, "18C790", func_8025E030);
INCLUDE_ASM(s32, "18C790", func_8025E044);
INCLUDE_ASM(s32, "18C790", func_8025E108);
INCLUDE_ASM(s32, "18C790", func_8025E14C);
INCLUDE_ASM(s32, "18C790", func_8025E190);
INCLUDE_ASM(s32, "18C790", func_8025FF8C);
INCLUDE_ASM(s32, "18C790", func_802601BC);
INCLUDE_ASM(s32, "18C790", func_80260948);
INCLUDE_ASM(s32, "18C790", func_80260A20);

View File

@ -1,6 +1,6 @@
#include "common.h"
INCLUDE_ASM(s32, "code_18F340", func_80260A60);
INCLUDE_ASM(s32, "18F340", func_80260A60);
ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
@ -20,11 +20,11 @@ ApiStatus IsPartnerImmobile(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_18F340", activate_defend_command);
INCLUDE_ASM(s32, "18F340", activate_defend_command);
INCLUDE_ASM(s32, "code_18F340", func_80260B70);
INCLUDE_ASM(s32, "18F340", func_80260B70);
INCLUDE_ASM(s32, "code_18F340", func_80260BF4);
INCLUDE_ASM(s32, "18F340", func_80260BF4);
ApiStatus func_80260DB8(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.flags1 |= 0x40000;
@ -60,17 +60,17 @@ ApiStatus func_80260E5C(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_18F340", func_80260E90);
INCLUDE_ASM(s32, "18F340", func_80260E90);
INCLUDE_ASM(s32, "code_18F340", func_80261064);
INCLUDE_ASM(s32, "18F340", func_80261064);
INCLUDE_ASM(s32, "code_18F340", func_802610CC);
INCLUDE_ASM(s32, "18F340", func_802610CC);
INCLUDE_ASM(s32, "code_18F340", func_80261164);
INCLUDE_ASM(s32, "18F340", func_80261164);
INCLUDE_ASM(s32, "code_18F340", func_802611E8);
INCLUDE_ASM(s32, "18F340", func_802611E8);
INCLUDE_ASM(s32, "code_18F340", func_8026127C);
INCLUDE_ASM(s32, "18F340", func_8026127C);
ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) {
s32 partnerActorExists = gBattleStatus.partnerActor != NULL;
@ -87,21 +87,21 @@ ApiStatus func_802613A8(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_18F340", func_802613BC);
INCLUDE_ASM(s32, "18F340", func_802613BC);
INCLUDE_ASM(s32, "code_18F340", func_80261478);
INCLUDE_ASM(s32, "18F340", func_80261478);
INCLUDE_ASM(s32, "code_18F340", func_80261530);
INCLUDE_ASM(s32, "18F340", func_80261530);
INCLUDE_ASM(s32, "code_18F340", func_802615C8);
INCLUDE_ASM(s32, "18F340", func_802615C8);
INCLUDE_ASM(s32, "code_18F340", func_80261648);
INCLUDE_ASM(s32, "18F340", func_80261648);
INCLUDE_ASM(s32, "code_18F340", func_802616B4);
INCLUDE_ASM(s32, "18F340", func_802616B4);
INCLUDE_ASM(s32, "code_18F340", func_802616F4);
INCLUDE_ASM(s32, "18F340", func_802616F4);
INCLUDE_ASM(s32, "code_18F340", func_802619B4);
INCLUDE_ASM(s32, "18F340", func_802619B4);
ApiStatus HasMerleeCastsLeft(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
@ -113,13 +113,13 @@ ApiStatus HasMerleeCastsLeft(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_18F340", func_802619E8);
INCLUDE_ASM(s32, "18F340", func_802619E8);
INCLUDE_ASM(s32, "code_18F340", func_80261B40);
INCLUDE_ASM(s32, "18F340", func_80261B40);
INCLUDE_ASM(s32, "code_18F340", FXRecoverHP);
INCLUDE_ASM(s32, "18F340", FXRecoverHP);
INCLUDE_ASM(s32, "code_18F340", FXRecoverFP);
INCLUDE_ASM(s32, "18F340", FXRecoverFP);
ApiStatus IncrementPlayerHP(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
@ -155,8 +155,8 @@ ApiStatus func_80261DD4(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_18F340", func_80261DF4);
INCLUDE_ASM(s32, "18F340", func_80261DF4);
INCLUDE_ASM(s32, "code_18F340", func_80261FB4);
INCLUDE_ASM(s32, "18F340", func_80261FB4);
INCLUDE_ASM(s32, "code_18F340", func_802620F8);
INCLUDE_ASM(s32, "18F340", func_802620F8);

5
src/190A10.c Normal file
View File

@ -0,0 +1,5 @@
#include "common.h"
INCLUDE_ASM(s32, "190A10", func_80262130);
INCLUDE_ASM(s32, "190A10", func_8026220C);

View File

@ -1052,7 +1052,7 @@ MessageID bActorMessages[] = {
s32 D_802838F8 = 0;
INCLUDE_ASM(s32, "code_190B20", create_target_list);
INCLUDE_ASM(s32, "190B20", create_target_list);
void player_create_target_list(Actor* actor) {
create_target_list(actor, 0);
@ -1062,41 +1062,41 @@ void enemy_create_target_list(Actor* actor) {
create_target_list(actor, 1);
}
INCLUDE_ASM(s32, "code_190B20", func_80263064);
INCLUDE_ASM(s32, "190B20", func_80263064);
INCLUDE_ASM(s32, "code_190B20", func_80263230);
INCLUDE_ASM(s32, "190B20", func_80263230);
INCLUDE_ASM(s32, "code_190B20", func_8026324C);
INCLUDE_ASM(s32, "190B20", func_8026324C);
INCLUDE_ASM(s32, "code_190B20", func_80263268);
INCLUDE_ASM(s32, "190B20", func_80263268);
INCLUDE_ASM(s32, "code_190B20", func_80263300);
INCLUDE_ASM(s32, "190B20", func_80263300);
INCLUDE_ASM(s32, "code_190B20", func_802633E8);
INCLUDE_ASM(s32, "190B20", func_802633E8);
INCLUDE_ASM(s32, "code_190B20", func_80263434);
INCLUDE_ASM(s32, "190B20", func_80263434);
INCLUDE_ASM(s32, "code_190B20", func_80263464);
INCLUDE_ASM(s32, "190B20", func_80263464);
INCLUDE_ASM(s32, "code_190B20", func_802634B8);
INCLUDE_ASM(s32, "190B20", func_802634B8);
INCLUDE_ASM(s32, "code_190B20", func_802636E4);
INCLUDE_ASM(s32, "190B20", func_802636E4);
INCLUDE_ASM(s32, "code_190B20", func_80263914);
INCLUDE_ASM(s32, "190B20", func_80263914);
INCLUDE_ASM(s32, "code_190B20", count_power_plus);
INCLUDE_ASM(s32, "190B20", count_power_plus);
INCLUDE_ASM(s32, "code_190B20", deduct_current_move_fp);
INCLUDE_ASM(s32, "190B20", deduct_current_move_fp);
INCLUDE_ASM(s32, "code_190B20", func_80263C60);
INCLUDE_ASM(s32, "190B20", func_80263C60);
INCLUDE_ASM(s32, "code_190B20", func_80263CC4);
INCLUDE_ASM(s32, "190B20", func_80263CC4);
INCLUDE_ASM(s32, "code_190B20", set_animation);
INCLUDE_ASM(s32, "190B20", set_animation);
INCLUDE_ASM(s32, "code_190B20", func_80263E08);
INCLUDE_ASM(s32, "190B20", func_80263E08);
INCLUDE_ASM(void, "code_190B20", set_animation_rate, ActorID actorID, s32 partIndex, f32 rate);
INCLUDE_ASM(void, "190B20", set_animation_rate, ActorID actorID, s32 partIndex, f32 rate);
void set_actor_yaw(ActorID actorID, s32 yaw) {
get_actor(actorID)->yaw = yaw;
@ -1106,17 +1106,17 @@ void set_part_yaw(ActorID actorID, s32 partIndex, s32 value) {
get_actor_part(get_actor(actorID), partIndex)->yaw = value;
}
INCLUDE_ASM(s32, "code_190B20", func_80263FE8);
INCLUDE_ASM(s32, "190B20", func_80263FE8);
INCLUDE_ASM(s32, "code_190B20", func_80264084);
INCLUDE_ASM(s32, "190B20", func_80264084);
INCLUDE_ASM(void, "code_190B20", add_xz_vec3f, Vec3f* vector, f32 speed, f32 angleDeg);
INCLUDE_ASM(void, "190B20", add_xz_vec3f, Vec3f* vector, f32 speed, f32 angleDeg);
INCLUDE_ASM(void, "code_190B20", add_xz_vec3f_copy1, Vec3f* vector, f32 speed, f32 angleDeg);
INCLUDE_ASM(void, "190B20", add_xz_vec3f_copy1, Vec3f* vector, f32 speed, f32 angleDeg);
INCLUDE_ASM(void, "code_190B20", add_xz_vec3f_copy2, Vec3f* vector, f32 speed, f32 angleDeg);
INCLUDE_ASM(void, "190B20", add_xz_vec3f_copy2, Vec3f* vector, f32 speed, f32 angleDeg);
INCLUDE_ASM(void, "code_190B20", play_movement_dust_effects, s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg);
INCLUDE_ASM(void, "190B20", play_movement_dust_effects, s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg);
ActorPart* get_actor_part(Actor* actor, s32 partIndex) {
ActorPart* part = &actor->partsTable[0];
@ -1135,15 +1135,15 @@ ActorPart* get_actor_part(Actor* actor, s32 partIndex) {
return NULL;
}
INCLUDE_ASM(s32, "code_190B20", load_player_actor);
INCLUDE_ASM(s32, "190B20", load_player_actor);
INCLUDE_ASM(s32, "code_190B20", load_partner_actor);
INCLUDE_ASM(s32, "190B20", load_partner_actor);
INCLUDE_ASM(s32, "code_190B20", create_actor);
INCLUDE_ASM(s32, "190B20", create_actor);
INCLUDE_ASM(s32, "code_190B20", func_80265CE8);
INCLUDE_ASM(s32, "190B20", func_80265CE8);
INCLUDE_ASM(s32, "code_190B20", func_80265D44);
INCLUDE_ASM(s32, "190B20", func_80265D44);
s32 lookup_defense(DefenseTableEntry* defenseTable, Element elementKey) {
DefenseTableEntry* row;
@ -1164,11 +1164,11 @@ s32 lookup_defense(DefenseTableEntry* defenseTable, Element elementKey) {
return normalDefense;
}
INCLUDE_ASM(s32, "code_190B20", lookup_status_chance); // exactly (?) the same as lookup_defense
INCLUDE_ASM(s32, "190B20", lookup_status_chance); // exactly (?) the same as lookup_defense
INCLUDE_ASM(s32, "code_190B20", lookup_status_duration_mod); // exactly (?) the same as lookup_defense
INCLUDE_ASM(s32, "190B20", lookup_status_duration_mod); // exactly (?) the same as lookup_defense
INCLUDE_ASM(s32, "code_190B20", inflict_status);
INCLUDE_ASM(s32, "190B20", inflict_status);
s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) {
if (statusTypeKey == STATUS_DAZE) {
@ -1280,53 +1280,53 @@ s32 get_defense(Actor* actor, s32* defenseTable, s32 elementFlags) {
return minDefense;
}
INCLUDE_ASM(s32, "code_190B20", func_802664DC);
INCLUDE_ASM(s32, "190B20", func_802664DC);
INCLUDE_ASM(void, "code_190B20", show_damage_popup, f32 x, f32 y, f32 z, s32 damageAmount, s32 arg4);
INCLUDE_ASM(void, "190B20", show_damage_popup, f32 x, f32 y, f32 z, s32 damageAmount, s32 arg4);
INCLUDE_ASM(s32, "code_190B20", func_80266684);
INCLUDE_ASM(s32, "190B20", func_80266684);
INCLUDE_ASM(s32, "code_190B20", func_802666E4);
INCLUDE_ASM(s32, "190B20", func_802666E4);
INCLUDE_ASM(s32, "code_190B20", func_802667F0);
INCLUDE_ASM(s32, "190B20", func_802667F0);
INCLUDE_ASM(s32, "code_190B20", func_80266970);
INCLUDE_ASM(s32, "190B20", func_80266970);
INCLUDE_ASM(s32, "code_190B20", func_80266978);
INCLUDE_ASM(s32, "190B20", func_80266978);
INCLUDE_ASM(s32, "code_190B20", func_80266ADC);
INCLUDE_ASM(s32, "190B20", func_80266ADC);
INCLUDE_ASM(s32, "code_190B20", func_80266AF8);
INCLUDE_ASM(s32, "190B20", func_80266AF8);
INCLUDE_ASM(s32, "code_190B20", func_80266B14);
INCLUDE_ASM(s32, "190B20", func_80266B14);
INCLUDE_ASM(s32, "code_190B20", try_inflict_status);
INCLUDE_ASM(s32, "190B20", try_inflict_status);
INCLUDE_ASM(s32, "code_190B20", inflict_status_set_duration);
INCLUDE_ASM(s32, "190B20", inflict_status_set_duration);
INCLUDE_ASM(s32, "code_190B20", func_80266D6C);
INCLUDE_ASM(s32, "190B20", func_80266D6C);
INCLUDE_ASM(s32, "code_190B20", func_80266DAC);
INCLUDE_ASM(s32, "190B20", func_80266DAC);
INCLUDE_ASM(s32, "code_190B20", func_80266E14);
INCLUDE_ASM(s32, "190B20", func_80266E14);
INCLUDE_ASM(s32, "code_190B20", func_80266E40);
INCLUDE_ASM(s32, "190B20", func_80266E40);
INCLUDE_ASM(s32, "code_190B20", func_80266EA8);
INCLUDE_ASM(s32, "190B20", func_80266EA8);
INCLUDE_ASM(s32, "code_190B20", func_80266EE8);
INCLUDE_ASM(s32, "190B20", func_80266EE8);
INCLUDE_ASM(s32, "code_190B20", func_80266F60);
INCLUDE_ASM(s32, "190B20", func_80266F60);
INCLUDE_ASM(s32, "code_190B20", func_80266F8C);
INCLUDE_ASM(s32, "190B20", func_80266F8C);
INCLUDE_ASM(s32, "code_190B20", func_80266FD8);
INCLUDE_ASM(s32, "190B20", func_80266FD8);
INCLUDE_ASM(s32, "code_190B20", func_80267018);
INCLUDE_ASM(s32, "190B20", func_80267018);
INCLUDE_ASM(s32, "code_190B20", func_8026709C);
INCLUDE_ASM(s32, "190B20", func_8026709C);
INCLUDE_ASM(s32, "code_190B20", func_802670C8);
INCLUDE_ASM(s32, "190B20", func_802670C8);
void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID decorationType) {
if ((part->idleAnimations) && !(part->flags & 2)) {
@ -1469,13 +1469,13 @@ void remove_player_buffs(PlayerBuff buffs) {
}
}
INCLUDE_ASM(s32, "code_190B20", func_8026777C);
INCLUDE_ASM(s32, "190B20", func_8026777C);
INCLUDE_ASM(s32, "code_190B20", func_8026787C);
INCLUDE_ASM(s32, "190B20", func_8026787C);
INCLUDE_ASM(s32, "code_190B20", func_80267A3C);
INCLUDE_ASM(s32, "190B20", func_80267A3C);
INCLUDE_ASM(s32, "code_190B20", reset_all_actor_sounds);
INCLUDE_ASM(s32, "190B20", reset_all_actor_sounds);
void hide_foreground_models_unsafe(void) {
FGModelData* data = gBattleStatus.foregroundModelData;
@ -1545,5 +1545,5 @@ void show_foreground_models(void) {
#include "common/StartRumbleWithParams.inc.c"
INCLUDE_ASM(s32, "code_190B20", start_rumble_type);
INCLUDE_ASM(s32, "190B20", start_rumble_type);

View File

@ -1,8 +1,8 @@
#include "common.h"
INCLUDE_ASM(s32, "code_1967B0", LoadItemScript);
INCLUDE_ASM(s32, "1967B0", LoadItemScript);
INCLUDE_ASM(s32, "code_1967B0", LoadFreeItemScript);
INCLUDE_ASM(s32, "1967B0", LoadFreeItemScript);
ApiStatus LoadMoveScript(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;

View File

@ -1,45 +1,45 @@
#include "common.h"
INCLUDE_ASM(s32, "code_196AA0", LoadActionCommand);
INCLUDE_ASM(s32, "196AA0", LoadActionCommand);
INCLUDE_ASM(s32, "code_196AA0", func_80268224);
INCLUDE_ASM(s32, "196AA0", func_80268224);
INCLUDE_ASM(s32, "code_196AA0", func_80268284);
INCLUDE_ASM(s32, "196AA0", func_80268284);
INCLUDE_ASM(s32, "code_196AA0", func_80268770);
INCLUDE_ASM(s32, "196AA0", func_80268770);
INCLUDE_ASM(s32, "code_196AA0", func_80268798);
INCLUDE_ASM(s32, "196AA0", func_80268798);
INCLUDE_ASM(s32, "code_196AA0", func_802687BC);
INCLUDE_ASM(s32, "196AA0", func_802687BC);
INCLUDE_ASM(s32, "code_196AA0", func_802687E4);
INCLUDE_ASM(s32, "196AA0", func_802687E4);
INCLUDE_ASM(s32, "code_196AA0", func_8026880C);
INCLUDE_ASM(s32, "196AA0", func_8026880C);
INCLUDE_ASM(s32, "code_196AA0", func_80268834);
INCLUDE_ASM(s32, "196AA0", func_80268834);
INCLUDE_ASM(s32, "code_196AA0", func_80268858);
INCLUDE_ASM(s32, "196AA0", func_80268858);
INCLUDE_ASM(s32, "code_196AA0", func_80268938);
INCLUDE_ASM(s32, "196AA0", func_80268938);
INCLUDE_ASM(s32, "code_196AA0", func_80268AF8);
INCLUDE_ASM(s32, "196AA0", func_80268AF8);
INCLUDE_ASM(s32, "code_196AA0", func_80268C9C);
INCLUDE_ASM(s32, "196AA0", func_80268C9C);
INCLUDE_ASM(s32, "code_196AA0", func_80268E88);
INCLUDE_ASM(s32, "196AA0", func_80268E88);
INCLUDE_ASM(s32, "code_196AA0", check_block_input);
INCLUDE_ASM(s32, "196AA0", check_block_input);
INCLUDE_ASM(s32, "code_196AA0", func_80269118);
INCLUDE_ASM(s32, "196AA0", func_80269118);
INCLUDE_ASM(s32, "code_196AA0", func_80269160);
INCLUDE_ASM(s32, "196AA0", func_80269160);
ApiStatus func_8026919C(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.unk_434 = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_196AA0", func_802691C8);
INCLUDE_ASM(s32, "196AA0", func_802691C8);
ApiStatus GetActionSuccess(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
@ -61,22 +61,22 @@ ApiStatus func_80269318(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_196AA0", func_80269344);
INCLUDE_ASM(s32, "196AA0", func_80269344);
INCLUDE_ASM(s32, "code_196AA0", func_80269370);
INCLUDE_ASM(s32, "196AA0", func_80269370);
INCLUDE_ASM(s32, "code_196AA0", func_8026939C);
INCLUDE_ASM(s32, "196AA0", func_8026939C);
ApiStatus func_802693F0(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.flags1 &= ~0x4000;
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_196AA0", CloseActionCommandInfo);
INCLUDE_ASM(s32, "196AA0", CloseActionCommandInfo);
INCLUDE_ASM(s32, "code_196AA0", func_80269470);
INCLUDE_ASM(s32, "196AA0", func_80269470);
INCLUDE_ASM(s32, "code_196AA0", func_802694A4);
INCLUDE_ASM(s32, "196AA0", func_802694A4);
ApiStatus GetActionSuccessCopy(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);

View File

@ -39,9 +39,9 @@ s32 get_nearest_home_index(f32 x, f32 y, f32 z) {
return yVal | (xVal << 2);
}
INCLUDE_ASM(void, "code_197F40", set_goal_pos_to_part, f32* goalPos, ActorID target, s32 partIndex);
INCLUDE_ASM(void, "197F40", set_goal_pos_to_part, f32* goalPos, ActorID target, s32 partIndex);
INCLUDE_ASM(s32, "code_197F40", set_part_goal_to_actor_part);
INCLUDE_ASM(s32, "197F40", set_part_goal_to_actor_part);
void set_actor_current_position(ActorID actorID, f32 x, f32 y, f32 z) {
Actor* actor = get_actor(actorID);
@ -99,7 +99,7 @@ Actor* get_actor(ActorID actorID) {
return ret;
}
INCLUDE_ASM(s32, "code_197F40", LoadBattleSection);
INCLUDE_ASM(s32, "197F40", LoadBattleSection);
ApiStatus GetBattlePhase(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.battlePhase);
@ -155,7 +155,7 @@ ApiStatus SetIdleGoalToHome(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetGoalToIndex);
INCLUDE_ASM(s32, "197F40", SetGoalToIndex);
ApiStatus GetIndexFromPos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -1145,7 +1145,7 @@ ApiStatus AddActorVar(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "code_197F40", AddActorVar);
INCLUDE_ASM(s32, "197F40", AddActorVar);
#endif
ApiStatus GetPartMovementVar(ScriptInstance* script, s32 isInitialCall) {
@ -1921,7 +1921,7 @@ ApiStatus func_8026DA94(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SummonEnemy);
INCLUDE_ASM(s32, "197F40", SummonEnemy);
ApiStatus GetOwnerID(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, script->owner1.actorID);
@ -2053,11 +2053,11 @@ ApiStatus func_8026E16C(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", func_8026E198);
INCLUDE_ASM(s32, "197F40", func_8026E198);
INCLUDE_ASM(s32, "code_197F40", func_8026E208);
INCLUDE_ASM(s32, "197F40", func_8026E208);
INCLUDE_ASM(s32, "code_197F40", func_8026E260);
INCLUDE_ASM(s32, "197F40", func_8026E260);
ApiStatus PlayerCreateTargetList(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -2090,11 +2090,11 @@ ApiStatus InitTargetIterator(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetOwnerTarget);
INCLUDE_ASM(s32, "197F40", SetOwnerTarget);
INCLUDE_ASM(s32, "code_197F40", ChooseNextTarget);
INCLUDE_ASM(s32, "197F40", ChooseNextTarget);
INCLUDE_ASM(s32, "code_197F40", func_8026E558);
INCLUDE_ASM(s32, "197F40", func_8026E558);
ApiStatus GetTargetListLength(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
@ -2103,60 +2103,60 @@ ApiStatus GetTargetListLength(ScriptInstance* script) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", GetOwnerTarget);
INCLUDE_ASM(s32, "197F40", GetOwnerTarget);
INCLUDE_ASM(s32, "code_197F40", func_8026E914);
INCLUDE_ASM(s32, "197F40", func_8026E914);
ApiStatus GetAttackerActorID(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.attackerActorID);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", func_8026E9A0);
INCLUDE_ASM(s32, "197F40", func_8026E9A0);
INCLUDE_ASM(s32, "code_197F40", GetDistanceToGoal);
INCLUDE_ASM(s32, "197F40", GetDistanceToGoal);
INCLUDE_ASM(s32, "code_197F40", func_8026EA7C);
INCLUDE_ASM(s32, "197F40", func_8026EA7C);
INCLUDE_ASM(s32, "code_197F40", func_8026EB20);
INCLUDE_ASM(s32, "197F40", func_8026EB20);
INCLUDE_ASM(s32, "code_197F40", func_8026EBF8);
INCLUDE_ASM(s32, "197F40", func_8026EBF8);
INCLUDE_ASM(s32, "code_197F40", func_8026ED20);
INCLUDE_ASM(s32, "197F40", func_8026ED20);
INCLUDE_ASM(s32, "code_197F40", func_8026EDE4);
INCLUDE_ASM(s32, "197F40", func_8026EDE4);
INCLUDE_ASM(s32, "code_197F40", AddActorDecoration);
INCLUDE_ASM(s32, "197F40", AddActorDecoration);
INCLUDE_ASM(s32, "code_197F40", RemoveActorDecoration);
INCLUDE_ASM(s32, "197F40", RemoveActorDecoration);
INCLUDE_ASM(s32, "code_197F40", ModifyActorDecoration);
INCLUDE_ASM(s32, "197F40", ModifyActorDecoration);
INCLUDE_ASM(s32, "code_197F40", UseIdleAnimation);
INCLUDE_ASM(s32, "197F40", UseIdleAnimation);
INCLUDE_ASM(s32, "code_197F40", func_8026F1A0);
INCLUDE_ASM(s32, "197F40", func_8026F1A0);
INCLUDE_ASM(s32, "code_197F40", GetStatusFlags);
INCLUDE_ASM(s32, "197F40", GetStatusFlags);
ApiStatus RemovePlayerBuffs(ScriptInstance* script, s32 isInitialCall) {
remove_player_buffs(*script->ptrReadPos);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetPartAlpha);
INCLUDE_ASM(s32, "197F40", SetPartAlpha);
INCLUDE_ASM(s32, "code_197F40", CreatePartShadow);
INCLUDE_ASM(s32, "197F40", CreatePartShadow);
INCLUDE_ASM(s32, "code_197F40", RemovePartShadow);
INCLUDE_ASM(s32, "197F40", RemovePartShadow);
ApiStatus func_8026F60C(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.unk_8D = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetBattleVar);
INCLUDE_ASM(s32, "197F40", SetBattleVar);
INCLUDE_ASM(s32, "code_197F40", GetBattleVar);
INCLUDE_ASM(s32, "197F40", GetBattleVar);
ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos);
@ -2169,13 +2169,13 @@ ApiStatus ResetAllActorSounds(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", SetActorSounds);
INCLUDE_ASM(s32, "197F40", SetActorSounds);
INCLUDE_ASM(s32, "code_197F40", ResetActorSounds);
INCLUDE_ASM(s32, "197F40", ResetActorSounds);
INCLUDE_ASM(s32, "code_197F40", SetPartSounds);
INCLUDE_ASM(s32, "197F40", SetPartSounds);
INCLUDE_ASM(s32, "code_197F40", SetActorType);
INCLUDE_ASM(s32, "197F40", SetActorType);
ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall) {
ActorID actorID = get_variable(script, *script->ptrReadPos);
@ -2188,22 +2188,22 @@ ApiStatus ShowShockEffect(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", GetActorAttackBoost);
INCLUDE_ASM(s32, "197F40", GetActorAttackBoost);
INCLUDE_ASM(s32, "code_197F40", GetActorDefenseBoost);
INCLUDE_ASM(s32, "197F40", GetActorDefenseBoost);
INCLUDE_ASM(s32, "code_197F40", BoostAttack);
INCLUDE_ASM(s32, "197F40", BoostAttack);
INCLUDE_ASM(s32, "code_197F40", BoostDefense);
INCLUDE_ASM(s32, "197F40", BoostDefense);
INCLUDE_ASM(s32, "code_197F40", VanishActor);
INCLUDE_ASM(s32, "197F40", VanishActor);
INCLUDE_ASM(s32, "code_197F40", ElectrifyActor);
INCLUDE_ASM(s32, "197F40", ElectrifyActor);
INCLUDE_ASM(s32, "code_197F40", HealActor);
INCLUDE_ASM(s32, "197F40", HealActor);
ApiStatus WaitForBuffDone(ScriptInstance* script, s32 isInitialCall) {
return (D_8029FBD4 == 0) * ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_197F40", CopyBuffs);
INCLUDE_ASM(s32, "197F40", CopyBuffs);

View File

@ -11,30 +11,30 @@ ApiStatus func_80271258(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_19FAF0", func_802712A0);
INCLUDE_ASM(s32, "19FAF0", func_802712A0);
INCLUDE_ASM(s32, "code_19FAF0", func_80271328);
INCLUDE_ASM(s32, "19FAF0", func_80271328);
INCLUDE_ASM(s32, "code_19FAF0", func_802713B0);
INCLUDE_ASM(s32, "19FAF0", func_802713B0);
ApiStatus func_8027143C(ScriptInstance* script, s32 isInitialCall) {
func_80070A90(0, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_19FAF0", func_80271484);
INCLUDE_ASM(s32, "19FAF0", func_80271484);
INCLUDE_ASM(s32, "code_19FAF0", func_80271588);
INCLUDE_ASM(s32, "19FAF0", func_80271588);
INCLUDE_ASM(s32, "code_19FAF0", dispatch_event_player);
INCLUDE_ASM(s32, "19FAF0", dispatch_event_player);
INCLUDE_ASM(s32, "code_19FAF0", dispatch_event_player_continue_turn);
INCLUDE_ASM(s32, "19FAF0", dispatch_event_player_continue_turn);
INCLUDE_ASM(s32, "code_19FAF0", calc_player_test_enemy);
INCLUDE_ASM(s32, "19FAF0", calc_player_test_enemy);
INCLUDE_ASM(s32, "code_19FAF0", calc_player_damage_enemy);
INCLUDE_ASM(s32, "19FAF0", calc_player_damage_enemy);
INCLUDE_ASM(s32, "code_19FAF0", dispatch_damage_event_player);
INCLUDE_ASM(s32, "19FAF0", dispatch_damage_event_player);
void dispatch_damage_event_player_0(s32 damageAmount, Event event) {
BattleStatus* battleStatus = &gBattleStatus;
@ -48,32 +48,32 @@ void dispatch_damage_event_player_1(s32 damageAmount, Event event) {
dispatch_damage_event_player(damageAmount, event, TRUE);
}
INCLUDE_ASM(s32, "code_19FAF0", GetMenuSelection);
INCLUDE_ASM(s32, "19FAF0", GetMenuSelection);
INCLUDE_ASM(s32, "code_19FAF0", func_80273444);
INCLUDE_ASM(s32, "19FAF0", func_80273444);
INCLUDE_ASM(s32, "code_19FAF0", PlayerFallToGoal);
INCLUDE_ASM(s32, "19FAF0", PlayerFallToGoal);
INCLUDE_ASM(s32, "code_19FAF0", PlayerLandJump);
INCLUDE_ASM(s32, "19FAF0", PlayerLandJump);
INCLUDE_ASM(s32, "code_19FAF0", PlayerRunToGoal);
INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal);
INCLUDE_ASM(s32, "code_19FAF0", CancelablePlayerRunToGoal);
INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal);
ApiStatus GetPlayerHP(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gPlayerData.curHP);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_19FAF0", PlayerDamageEnemy);
INCLUDE_ASM(s32, "19FAF0", PlayerDamageEnemy);
INCLUDE_ASM(s32, "code_19FAF0", PlayerPowerBounceEnemy);
INCLUDE_ASM(s32, "19FAF0", PlayerPowerBounceEnemy);
INCLUDE_ASM(s32, "code_19FAF0", PlayerTestEnemy);
INCLUDE_ASM(s32, "19FAF0", PlayerTestEnemy);
INCLUDE_ASM(s32, "code_19FAF0", DispatchDamagePlayerEvent);
INCLUDE_ASM(s32, "19FAF0", DispatchDamagePlayerEvent);
INCLUDE_ASM(s32, "code_19FAF0", EnablePlayerBlur);
INCLUDE_ASM(s32, "19FAF0", EnablePlayerBlur);
ApiStatus func_802749D8(ScriptInstance* script, s32 isInitialCall) {
func_802549A0();
@ -85,13 +85,13 @@ ApiStatus func_802749F8(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_19FAF0", func_80274A18);
INCLUDE_ASM(s32, "19FAF0", func_80274A18);
INCLUDE_ASM(s32, "code_19FAF0", func_802752AC);
INCLUDE_ASM(s32, "19FAF0", func_802752AC);
INCLUDE_ASM(s32, "code_19FAF0", func_80275F00);
INCLUDE_ASM(s32, "19FAF0", func_80275F00);
INCLUDE_ASM(s32, "code_19FAF0", DidActionSucceed);
INCLUDE_ASM(s32, "19FAF0", DidActionSucceed);
ApiStatus func_80276EFC(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.flags1 |= 0x200000;

View File

@ -33,7 +33,7 @@ void dispatch_event_general(Actor* actor, Event event) {
}
}
INCLUDE_ASM(s32, "code_1A5830", play_hit_sound);
INCLUDE_ASM(s32, "1A5830", play_hit_sound);
void dispatch_event_actor(Actor* actor, Event event) {
ScriptInstance* onHitScript = actor->onHitScript;
@ -60,11 +60,11 @@ void dispatch_event_actor(Actor* actor, Event event) {
}
}
INCLUDE_ASM(s32, "code_1A5830", calc_enemy_test_target);
INCLUDE_ASM(s32, "1A5830", calc_enemy_test_target);
INCLUDE_ASM(s32, "code_1A5830", calc_enemy_damage_target);
INCLUDE_ASM(s32, "1A5830", calc_enemy_damage_target);
INCLUDE_ASM(s32, "code_1A5830", dispatch_damage_event_actor);
INCLUDE_ASM(s32, "1A5830", dispatch_damage_event_actor);
s32 dispatch_damage_event_actor_0(Actor* actor, s32 damageAmount, s32 event) {
return dispatch_damage_event_actor(actor, damageAmount, event, FALSE);
@ -200,37 +200,37 @@ ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1A5830", JumpToGoal);
INCLUDE_ASM(s32, "1A5830", JumpToGoal);
INCLUDE_ASM(s32, "code_1A5830", IdleJumpToGoal);
INCLUDE_ASM(s32, "1A5830", IdleJumpToGoal);
INCLUDE_ASM(s32, "code_1A5830", JumpToGoalSimple2);
INCLUDE_ASM(s32, "1A5830", JumpToGoalSimple2);
INCLUDE_ASM(s32, "code_1A5830", JumpWithBounce);
INCLUDE_ASM(s32, "1A5830", JumpWithBounce);
INCLUDE_ASM(s32, "code_1A5830", LandJump);
INCLUDE_ASM(s32, "1A5830", LandJump);
INCLUDE_ASM(s32, "code_1A5830", FallToGoal);
INCLUDE_ASM(s32, "1A5830", FallToGoal);
INCLUDE_ASM(s32, "code_1A5830", RunToGoal);
INCLUDE_ASM(s32, "1A5830", RunToGoal);
INCLUDE_ASM(s32, "code_1A5830", IdleRunToGoal);
INCLUDE_ASM(s32, "1A5830", IdleRunToGoal);
INCLUDE_ASM(s32, "code_1A5830", JumpPartTo);
INCLUDE_ASM(s32, "1A5830", JumpPartTo);
INCLUDE_ASM(s32, "code_1A5830", FallPartTo);
INCLUDE_ASM(s32, "1A5830", FallPartTo);
INCLUDE_ASM(s32, "code_1A5830", LandJumpPart);
INCLUDE_ASM(s32, "1A5830", LandJumpPart);
INCLUDE_ASM(s32, "code_1A5830", RunPartTo);
INCLUDE_ASM(s32, "1A5830", RunPartTo);
INCLUDE_ASM(s32, "code_1A5830", update_lerp_battle);
INCLUDE_ASM(s32, "1A5830", update_lerp_battle);
INCLUDE_ASM(s32, "code_1A5830", FlyToGoal);
INCLUDE_ASM(s32, "1A5830", FlyToGoal);
INCLUDE_ASM(s32, "code_1A5830", IdleFlyToGoal);
INCLUDE_ASM(s32, "1A5830", IdleFlyToGoal);
INCLUDE_ASM(s32, "code_1A5830", FlyPartTo);
INCLUDE_ASM(s32, "1A5830", FlyPartTo);
ApiStatus GetLastEvent(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -331,9 +331,9 @@ ApiStatus GetEnemyMaxHP(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1A5830", RemoveActor);
INCLUDE_ASM(s32, "1A5830", RemoveActor);
INCLUDE_ASM(s32, "code_1A5830", DropStarPoints);
INCLUDE_ASM(s32, "1A5830", DropStarPoints);
ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -400,7 +400,7 @@ ApiStatus func_8027CC10(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1A5830", EnemyDamageTarget);
INCLUDE_ASM(s32, "1A5830", EnemyDamageTarget);
ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
@ -441,7 +441,7 @@ ApiStatus EnemyFollowupAfflictTarget(ScriptInstance* script, s32 isInitialCall)
}
INCLUDE_ASM(s32, "code_1A5830", EnemyTestTarget);
INCLUDE_ASM(s32, "1A5830", EnemyTestTarget);
ApiStatus DispatchDamageEvent(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -699,7 +699,7 @@ ApiStatus GetActorSize(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1A5830", SetPartSize);
INCLUDE_ASM(s32, "1A5830", SetPartSize);
ApiStatus GetOriginalActorType(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;

View File

@ -42,11 +42,11 @@ void dispatch_event_partner_continue_turn(s8 lastEventType) {
}
}
INCLUDE_ASM(s32, "code_1AC760", calc_partner_test_enemy);
INCLUDE_ASM(s32, "1AC760", calc_partner_test_enemy);
INCLUDE_ASM(s32, "code_1AC760", calc_partner_damage_enemy);
INCLUDE_ASM(s32, "1AC760", calc_partner_damage_enemy);
INCLUDE_ASM(s32, "code_1AC760", dispatch_damage_event_partner);
INCLUDE_ASM(s32, "1AC760", dispatch_damage_event_partner);
s32 dispatch_damage_event_partner_0(s32 damageAmount, s32 event, s32 stopMotion) {
return dispatch_damage_event_partner(damageAmount, event, FALSE);
@ -81,7 +81,7 @@ ApiStatus MakeOwnerTargetIndex(ScriptInstance* script, s32 isInitialCall) {
actor->targetActorID = selectableTarget->actorID;
actor->targetPartIndex = selectableTarget->partID;
}
set_variable(script, otherArg, arg2);
return ApiStatus_DONE2;
}
@ -127,13 +127,13 @@ ApiStatus GetActorLevel(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1AC760", PartnerDamageEnemy);
INCLUDE_ASM(s32, "1AC760", PartnerDamageEnemy);
INCLUDE_ASM(s32, "code_1AC760", PartnerAfflictEnemy);
INCLUDE_ASM(s32, "1AC760", PartnerAfflictEnemy);
INCLUDE_ASM(s32, "code_1AC760", PartnerPowerBounceEnemy);
INCLUDE_ASM(s32, "1AC760", PartnerPowerBounceEnemy);
INCLUDE_ASM(s32, "code_1AC760", PartnerTestEnemy);
INCLUDE_ASM(s32, "1AC760", PartnerTestEnemy);
ApiStatus func_8028070C(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
@ -177,7 +177,7 @@ ApiStatus func_802807D0(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
/// Seems to be the same functionality as YieldTurn in code_1A5830.c
/// Seems to be the same functionality as YieldTurn in 1A5830.c
ApiStatus func_80280818(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.flags1 |= 0x200000;
return ApiStatus_DONE2;

View File

@ -101,7 +101,7 @@ ApiStatus FadeOutMerlee(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
INCLUDE_ASM(s32, "code_1a1f0_len_5390", MerleeUpdateFX);
INCLUDE_ASM(s32, "1a1f0_len_5390", MerleeUpdateFX);
ApiStatus MerleeStopFX(ScriptInstance* script, s32 isInitialCall) {
D_800A0BB8 = 1;
@ -210,18 +210,18 @@ ApiStatus OnFleeBattleDrops(ScriptInstance* script, s32 isInitialCall) {
}
/// Default/neutral state during world gameplay; checks for player-enemy collisions and initiates battles when they occur.
INCLUDE_ASM(s32, "code_1a1f0_len_5390", update_encounters_neutral);
INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_neutral);
void draw_encounters_neutral() {
}
INCLUDE_ASM(s32, "code_1a1f0_len_5390", update_encounters_pre_battle);
INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_pre_battle);
INCLUDE_ASM(s32, "code_1a1f0_len_5390", draw_encounters_pre_battle);
INCLUDE_ASM(s32, "1a1f0_len_5390", draw_encounters_pre_battle);
INCLUDE_ASM(s32, "code_1a1f0_len_5390", show_first_strike_message);
INCLUDE_ASM(s32, "1a1f0_len_5390", show_first_strike_message);
INCLUDE_ASM(s32, "code_1a1f0_len_5390", update_encounters_post_battle);
INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_post_battle);
s32 draw_encounters_post_battle(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
@ -294,9 +294,9 @@ void update_encounters_conversation(void) {
void draw_encounters_conversation() {
}
INCLUDE_ASM(s32, "code_1a1f0_len_5390", check_conversation_trigger);
INCLUDE_ASM(s32, "1a1f0_len_5390", check_conversation_trigger);
INCLUDE_ASM(s32, "code_1a1f0_len_5390", create_encounters);
INCLUDE_ASM(s32, "1a1f0_len_5390", create_encounters);
void init_encounters_ui() {
}

View File

@ -72,7 +72,7 @@ void step_game_loop(void) {
}
func_8011BAE8();
func_8003857C();
npc_iter_no_op();
update_dynamic_entities();
update_triggers();
update_scripts();
@ -170,18 +170,18 @@ void gfx_task_background(void) {
NU_GFX_UCODE_F3DEX2, NU_SC_NOSWAPBUFFER);
}
INCLUDE_ASM(s32, "code_1b40_len_20b0", gfx_draw_frame);
INCLUDE_ASM(s32, "1b40_len_20b0", gfx_draw_frame);
void load_engine_data(void) {
GameStatus** gameStatus = &gGameStatusPtr;
s32 i;
dma_copy(&code_code_FEE30_ROM_START, &code_code_FEE30_ROM_END, &code_code_FEE30_VRAM);
dma_copy(&code_code_759B0_ROM_START, &code_code_759B0_ROM_END, &code_code_759B0_VRAM);
dma_copy(&code_code_E79B0_ROM_START, &code_code_E79B0_ROM_END, &code_code_E79B0_VRAM);
dma_copy(&code_code_102610_ROM_START, &code_code_102610_ROM_END, &code_code_102610_VRAM);
dma_copy(&code_code_A5DD0_ROM_START, &code_code_A5DD0_ROM_END, &code_code_A5DD0_VRAM);
dma_copy(&code_code_10CC10_ROM_START, &code_code_10CC10_ROM_END, &code_code_10CC10_VRAM);
dma_copy(FEE30_ROM_START, FEE30_ROM_END, FEE30_VRAM);
dma_copy(_759B0_ROM_START, _759B0_ROM_END, _759B0_VRAM);
dma_copy(E79B0_ROM_START, E79B0_ROM_END, E79B0_VRAM);
dma_copy(_102610_ROM_START, _102610_ROM_END, _102610_VRAM);
dma_copy(A5DD0_ROM_START, A5DD0_ROM_END, A5DD0_VRAM);
dma_copy(_10CC10_ROM_START, _10CC10_ROM_END, _10CC10_VRAM);
gOverrideFlags = 0;
(*gameStatus)->unk_79 = 0;
@ -214,7 +214,7 @@ void load_engine_data(void) {
clear_character_set();
clear_printers();
func_80112B98();
clear_npcs();
npc_list_clear();
func_80141100();
clear_trigger_data();
clear_entity_data(0);
@ -286,19 +286,19 @@ void gfx_init_state(void) {
gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(&D_80074210));
}
#else
INCLUDE_ASM(void, "code_1b40_len_20b0", gfx_init_state);
INCLUDE_ASM(void, "1b40_len_20b0", gfx_init_state);
#endif
INCLUDE_ASM(s32, "code_1b40_len_20b0", func_800271FC);
INCLUDE_ASM(s32, "1b40_len_20b0", func_800271FC);
INCLUDE_ASM(s32, "code_1b40_len_20b0", func_8002725C);
INCLUDE_ASM(s32, "1b40_len_20b0", func_8002725C);
INCLUDE_ASM(s32, "code_1b40_len_20b0", func_80027600);
INCLUDE_ASM(s32, "1b40_len_20b0", func_80027600);
INCLUDE_ASM(s32, "code_1b40_len_20b0", func_80027774);
INCLUDE_ASM(s32, "1b40_len_20b0", func_80027774);
INCLUDE_ASM(s32, "code_1b40_len_20b0", func_800279B4);
INCLUDE_ASM(s32, "1b40_len_20b0", func_800279B4);
INCLUDE_ASM(s32, "code_1b40_len_20b0", func_80027BAC);
INCLUDE_ASM(s32, "1b40_len_20b0", func_80027BAC);
INCLUDE_ASM(void, "code_1b40_len_20b0", gfx_draw_background);
INCLUDE_ASM(void, "1b40_len_20b0", gfx_draw_background);

View File

@ -58,9 +58,9 @@ ApiStatus MakeNpcs(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveNpc, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "1f580_len_1940", RemoveNpc, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveEncounter, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "1f580_len_1940", RemoveEncounter, ScriptInstance* script, s32 isInitialCall);
ApiStatus GetBattleOutcome(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gCurrentEncounter.battleOutcome);
@ -99,7 +99,7 @@ ApiStatus DoNpcDefeat(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_FINISH;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", start_battle);
INCLUDE_ASM(s32, "1f580_len_1940", start_battle);
ApiStatus StartBattle(ScriptInstance* script, s32 isInitialCall) {
start_battle(script, -1);
@ -111,7 +111,7 @@ ApiStatus StartBattleWith(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE1;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", StartBossBattle, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "1f580_len_1940", StartBossBattle, ScriptInstance* script, s32 isInitialCall);
ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) {
Bytecode songID = get_variable(script, *script->ptrReadPos);
@ -123,7 +123,7 @@ ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 isInitialCall);
ApiStatus BindNpcIdle(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -198,7 +198,7 @@ ApiStatus EnableNpcAI(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 isInitialCall);
ApiStatus BindNpcAux(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;

104
src/20ec0_len_5040.c Normal file
View File

@ -0,0 +1,104 @@
#include "common.h"
#include "map.h"
extern s32 D_800A0F40;
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045AC0);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045B10);
INCLUDE_ASM(s32, "20ec0_len_5040", update_merlee_messages);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045BC8);
INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_messages);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045C88);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045CC4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045D00);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045D7C);
INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_message_string);
INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_message);
s32 is_merlee_message_done(void) {
return D_800A0F40;
}
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045FB4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80046030);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800465E0);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047608);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800476F4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_8004778C);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800477F4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047820);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047898);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800478F8);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047928);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800479A0);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047A00);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047A30);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047AA8);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B08);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B38);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B84);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047BE4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047C14);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047CA4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047D00);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047D30);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047DC0);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047E1C);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047E4C);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047EDC);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047F28);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047F58);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047FE8);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048034);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048064);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800480F4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048140);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048170);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048200);
INCLUDE_ASM(s32, "20ec0_len_5040", func_8004824C);

View File

@ -1,7 +1,7 @@
#include "common.h"
#include "map.h"
INCLUDE_ASM(s32, "code_23680", spawn_drops);
INCLUDE_ASM(s32, "23680", spawn_drops);
// The issues here are only in the beginning where max and min are flipped
#ifdef NON_MATCHING
@ -62,10 +62,10 @@ s32 get_coin_drop_amount(Enemy* enemy) {
return amt;
}
#else
INCLUDE_ASM(s32, "code_23680", get_coin_drop_amount);
INCLUDE_ASM(s32, "23680", get_coin_drop_amount);
#endif
INCLUDE_ASM(s32, "code_23680", func_80048E34);
INCLUDE_ASM(s32, "23680", func_80048E34);
s32 func_80048F0C(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
@ -106,7 +106,7 @@ s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 c
}
}
INCLUDE_ASM(s32, "code_23680", func_800490B4, EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4);
INCLUDE_ASM(s32, "23680", func_800490B4, EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4);
s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3) {
PlayerStatus* playerStatus = &gPlayerStatus;
@ -160,14 +160,14 @@ void func_80049550(ScriptInstance* script, s32 arg1) {
}
}
INCLUDE_ASM(s32, "code_23680", func_800495A0);
INCLUDE_ASM(s32, "23680", func_800495A0);
INCLUDE_ASM(s32, "code_23680", func_800496B8);
INCLUDE_ASM(s32, "23680", func_800496B8);
#define NAMESPACE base
#include "world/common/UnkNpcAIFunc1.inc.c"
INCLUDE_ASM(s32, "code_23680", func_80049C04);
INCLUDE_ASM(s32, "23680", func_80049C04);
void func_80049E3C(ScriptInstance* script) {
Enemy* enemy = script->owner1.enemy;
@ -203,9 +203,9 @@ void func_80049ECC(ScriptInstance* script) {
}
}
INCLUDE_ASM(void, "code_23680", func_80049F7C, ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
INCLUDE_ASM(s32, "23680", func_80049F7C);
INCLUDE_ASM(void, "code_23680", func_8004A124, ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
INCLUDE_ASM(s32, "23680", func_8004A124);
void func_8004A3E8(ScriptInstance* script, s32 arg1) {
Enemy* enemy = script->owner1.enemy;
@ -218,4 +218,4 @@ void func_8004A3E8(ScriptInstance* script, s32 arg1) {
}
}
INCLUDE_ASM(s32, "code_23680", DoBasicAI, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "23680", DoBasicAI, ScriptInstance* script, s32 isInitialCall);

View File

@ -19,4 +19,4 @@ void func_8004A73C(ScriptInstance* script) {
}
}
INCLUDE_ASM(void, "code_25AF0", func_8004A784, Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5);
INCLUDE_ASM(void, "25AF0", func_8004A784, Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5);

View File

@ -15,7 +15,7 @@ u8 D_80078181 = 1;
//bss
//static u16 D_800A0F50;
INCLUDE_ASM(s32, "code_25f00_len_940", create_audio_system);
INCLUDE_ASM(s32, "25f00_len_940", create_audio_system);
void nuAuPreNMIFuncSet(NUAuPreNMIFunc func) {
OSIntMask mask = osSetIntMask(OS_IM_NONE);
@ -24,10 +24,10 @@ void nuAuPreNMIFuncSet(NUAuPreNMIFunc func) {
osSetIntMask(mask);
}
INCLUDE_ASM(s32, "code_25f00_len_940", func_8004AE08);
INCLUDE_ASM(s32, "25f00_len_940", func_8004AE08);
s32 nuAuDmaCallBack(s32 addr, s32 len, void* state, s32 arg3);
INCLUDE_ASM(s32, "code_25f00_len_940", nuAuDmaCallBack, s32 addr, s32 len, void* state, s32 arg3);
INCLUDE_ASM(s32, "25f00_len_940", nuAuDmaCallBack, s32 addr, s32 len, void* state, s32 arg3);
ALDMAproc nuAuDmaNew(NUDMAState** state) {
if (!nuAuDmaState.initialized) {
@ -109,7 +109,7 @@ void func_8004B328(s16 arg0, s32 arg1) {
}
}
#else
INCLUDE_ASM(s32, "code_25f00_len_940", func_8004B328);
INCLUDE_ASM(s32, "25f00_len_940", func_8004B328);
#endif
void alLink(ALLink* element, ALLink* after) {

View File

@ -83,7 +83,7 @@ void func_8004B440(SoundManager* manager, u8 arg1, u8 arg2, UnkAl19E0* arg3, u8
func_8004B9E4(manager, 0);
}
INCLUDE_ASM(void, "code_26840_len_20d0", snd_load_sfx_groups_from_SEF, SoundManager* manager);
INCLUDE_ASM(void, "26840_len_20d0", snd_load_sfx_groups_from_SEF, SoundManager* manager);
void snd_clear_sfx_queue(SoundManager* manager) {
s32 i;
@ -128,7 +128,7 @@ void snd_enqueue_sfx_event(SoundManager* manager, s32 soundID, s16 volume, s16 p
}
}
INCLUDE_ASM(void, "code_26840_len_20d0", func_8004B748, SoundManager* manager);
INCLUDE_ASM(void, "26840_len_20d0", func_8004B748, SoundManager* manager);
s32 func_8004B9E4(SoundManager* manager, s32 arg1) {
s32 a1 = (u8) arg1;
@ -158,85 +158,85 @@ void func_8004BA54(SoundManager* manager, s32 arg1) {
}
}
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004BA74);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004BA74);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C0E4);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C0E4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C268);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C268);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C2A4);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C2A4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C300);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C300);
INCLUDE_ASM(void, "code_26840_len_20d0", snd_set_modifiers, SoundManager* manager, SoundSFXEntry* sfxEntry);
INCLUDE_ASM(void, "26840_len_20d0", snd_set_modifiers, SoundManager* manager, SoundSFXEntry* sfxEntry);
INCLUDE_ASM(void, "code_26840_len_20d0", snd_set_player_modifiers, SoundManager* manager, SoundSFXEntry* sfxEntry);
INCLUDE_ASM(void, "26840_len_20d0", snd_set_player_modifiers, SoundManager* manager, SoundSFXEntry* sfxEntry);
INCLUDE_ASM(s16, "code_26840_len_20d0", func_8004C444, SoundManager* manager);
INCLUDE_ASM(s16, "26840_len_20d0", func_8004C444, SoundManager* manager);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C578);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C578);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C844);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C844);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004C884);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C884);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CD94);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CD94);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CDF8);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CDF8);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CE70);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CE70);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CEA4);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CEA4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CEC4);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CEC4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CF0C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CF0C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004CF3C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CF3C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D00C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D00C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D038);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D038);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D050);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D050);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D07C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D07C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D114);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D114);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D130);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D130);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D15C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D15C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D180);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D180);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D1B4);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D1B4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D23C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D23C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D2B0);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D2B0);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D2E4);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D2E4);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D310);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D310);
void func_8004D31C(void) {
}
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D324);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D324);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D33C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D33C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D354);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D354);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D36C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D36C);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D3A0);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D3A0);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D3F8);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D3F8);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D428);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D428);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D484);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D484);
INCLUDE_ASM(s32, "code_26840_len_20d0", func_8004D4BC);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D4BC);

View File

@ -1,6 +1,6 @@
#include "audio.h"
INCLUDE_ASM(void, "code_28910_len_5090", func_8004D510, BGMPlayer* arg0);
INCLUDE_ASM(void, "28910_len_5090", func_8004D510, BGMPlayer* arg0);
// Return values are being pushed into v0 in the wrong place
// May depend on data decomp
@ -17,10 +17,10 @@ BGMPlayer* snd_get_player_with_song_name(s32 songString) {
return NULL;
}
#else
INCLUDE_ASM(BGMPlayer*, "code_28910_len_5090", snd_get_player_with_song_name, s32 songString);
INCLUDE_ASM(BGMPlayer*, "28910_len_5090", snd_get_player_with_song_name, s32 songString);
#endif
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004D7E0);
INCLUDE_ASM(s32, "28910_len_5090", func_8004D7E0);
s32 func_8004DA0C(s32 songName) {
s32 ret = 0;
@ -47,7 +47,7 @@ s32 func_8004DA0C(s32 songName) {
return ret;
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA74);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DA74);
void func_8004DAA8(BGMPlayer* player) {
if (player->unk_221 != 0) {
@ -58,21 +58,21 @@ void func_8004DAA8(BGMPlayer* player) {
}
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DAE0);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DAE0);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DB28);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DB28);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DB4C);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DB4C);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DC80);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DC80);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DCB8);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DCB8);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DE2C);
INCLUDE_ASM(s32, "28910_len_5090", func_8004DE2C);
INCLUDE_ASM(void, "code_28910_len_5090", func_8004DFD4, UnkAl19E0* arg0);
INCLUDE_ASM(void, "28910_len_5090", func_8004DFD4, UnkAl19E0* arg0);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E0F4);
INCLUDE_ASM(s32, "28910_len_5090", func_8004E0F4);
void func_8004E158(BGMPlayer* player, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
s16 i;
@ -153,7 +153,7 @@ void func_8004E158(BGMPlayer* player, s32 arg1, s32 arg2, UnkAl19E0* arg3) {
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E344);
INCLUDE_ASM(s32, "28910_len_5090", func_8004E344);
void snd_update_bgm_fade(BGMPlayer* player) {
player->fadeInfo.fadeTime--;
@ -190,23 +190,23 @@ void func_8004E444(BGMPlayer *arg0) {
}
}
INCLUDE_ASM(s16, "code_28910_len_5090", func_8004E4B8, BGMPlayer* player);
INCLUDE_ASM(s16, "28910_len_5090", func_8004E4B8, BGMPlayer* player);
INCLUDE_ASM(s32, "code_28910_len_5090", snd_initialize_bgm_player, BGMPlayer* player);
INCLUDE_ASM(s32, "28910_len_5090", snd_initialize_bgm_player, BGMPlayer* player);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E844);
INCLUDE_ASM(s32, "28910_len_5090", func_8004E844);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E880);
INCLUDE_ASM(s32, "28910_len_5090", func_8004E880);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004E904);
INCLUDE_ASM(s32, "28910_len_5090", func_8004E904);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004EA34);
INCLUDE_ASM(s32, "28910_len_5090", func_8004EA34);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004EAD4);
INCLUDE_ASM(s32, "28910_len_5090", func_8004EAD4);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004EC04);
INCLUDE_ASM(s32, "28910_len_5090", func_8004EC04);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004EC68);
INCLUDE_ASM(s32, "28910_len_5090", func_8004EC68);
void snd_BGMCmd_E0_MasterTempo(BGMPlayer* player, BGMPlayerTrack* track) {
u32 unk_D4 = player->unk_D4.u16;
@ -395,7 +395,7 @@ void snd_BGMCmd_F4(BGMPlayer* player, BGMPlayerTrack* track) {
track->unk_57 = player->unk_D4.u8[1] & 0x7F;
}
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_F5_TrackVoice, BGMPlayer* player, BGMPlayerTrack* track);
INCLUDE_ASM(void, "28910_len_5090", snd_BGMCmd_F5_TrackVoice, BGMPlayer* player, BGMPlayerTrack* track);
void snd_BGMCmd_F7_SubTrackReverbType(BGMPlayer* player, BGMPlayerTrack* track) {
u8 temp_v0 = player->unk_D4.u8[0];
@ -414,7 +414,7 @@ void snd_BGMCmd_FD(BGMPlayer* player, BGMPlayerTrack* track) {
func_800560BC(player->unk_234, track->unk_5C, player->unk_D4.u16 >> 8);
}
#else
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_FD, BGMPlayer* player, BGMPlayerTrack* track);
INCLUDE_ASM(void, "28910_len_5090", snd_BGMCmd_FD, BGMPlayer* player, BGMPlayerTrack* track);
#endif
void snd_BGMCmd_FE(BGMPlayer* player, BGMPlayerTrack* track) {
@ -425,22 +425,22 @@ void snd_BGMCmd_FE(BGMPlayer* player, BGMPlayerTrack* track) {
track->bgmReadPos = temp;
}
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_FC_Jump, BGMPlayer* player, BGMPlayerTrack* track);
INCLUDE_ASM(void, "28910_len_5090", snd_BGMCmd_FC_Jump, BGMPlayer* player, BGMPlayerTrack* track);
INCLUDE_ASM(void, "code_28910_len_5090", snd_BGMCmd_FF, BGMPlayer* player, BGMPlayerTrack* track);
INCLUDE_ASM(void, "28910_len_5090", snd_BGMCmd_FF, BGMPlayer* player, BGMPlayerTrack* track);
void snd_BGMCmd_NOP(BGMPlayer* player, BGMPlayerTrack* track) {
}
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050568);
INCLUDE_ASM(s32, "28910_len_5090", func_80050568);
INCLUDE_ASM(s32, "code_28910_len_5090", func_800505E4);
INCLUDE_ASM(s32, "28910_len_5090", func_800505E4);
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050654);
INCLUDE_ASM(s32, "28910_len_5090", func_80050654);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8005068C);
INCLUDE_ASM(s32, "28910_len_5090", func_8005068C);
INCLUDE_ASM(s32, "code_28910_len_5090", func_800506C8, s32 arg0, s32 arg1);
INCLUDE_ASM(s32, "28910_len_5090", func_800506C8, s32 arg0, s32 arg1);
void func_80050770(BGMPlayer *player, f32 arg1) {
if (arg1 > 2.0) {
@ -477,10 +477,10 @@ void func_8005083C(BGMPlayer* arg0, s32 arg1, s16 arg2, s8 arg3) {
}
}
INCLUDE_ASM(void, "code_28910_len_5090", func_8005087C, BGMPlayer* player, s32* arg1, s32 arg2);
INCLUDE_ASM(void, "28910_len_5090", func_8005087C, BGMPlayer* player, s32* arg1, s32 arg2);
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050888);
INCLUDE_ASM(s32, "28910_len_5090", func_80050888);
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050900);
INCLUDE_ASM(s32, "28910_len_5090", func_80050900);
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050970);
INCLUDE_ASM(s32, "28910_len_5090", func_80050970);

View File

@ -1,6 +1,6 @@
#include "audio.h"
INCLUDE_ASM(s32, "code_2BF90", func_80050B90);
INCLUDE_ASM(s32, "2BF90", func_80050B90);
s32 func_80050C30(u32 arg0) {
if (D_8009A628->unk_20 <= arg0) {
@ -14,25 +14,25 @@ void func_80050C54(s32 arg0, s8 arg1) {
D_8009A628->unk_21 = arg1;
}
INCLUDE_ASM(s32, "code_2BF90", func_80050C64);
INCLUDE_ASM(s32, "2BF90", func_80050C64);
INCLUDE_ASM(s32, "code_2BF90", func_80050CA0);
INCLUDE_ASM(s32, "2BF90", func_80050CA0);
INCLUDE_ASM(void, "code_2BF90", func_80050D50, UnkAl1E4* arg0);
INCLUDE_ASM(void, "2BF90", func_80050D50, UnkAl1E4* arg0);
INCLUDE_ASM(s32, "code_2BF90", func_80050E18);
INCLUDE_ASM(s32, "2BF90", func_80050E18);
INCLUDE_ASM(s32, "code_2BF90", func_80050E84);
INCLUDE_ASM(s32, "2BF90", func_80050E84);
INCLUDE_ASM(s32, "code_2BF90", func_80050EF0);
INCLUDE_ASM(s32, "2BF90", func_80050EF0);
INCLUDE_ASM(s32, "code_2BF90", func_80050F64);
INCLUDE_ASM(s32, "2BF90", func_80050F64);
INCLUDE_ASM(s32, "code_2BF90", func_80050FD0);
INCLUDE_ASM(s32, "2BF90", func_80050FD0);
INCLUDE_ASM(s32, "code_2BF90", func_80051050);
INCLUDE_ASM(s32, "2BF90", func_80051050);
INCLUDE_ASM(s32, "code_2BF90", func_800510A4);
INCLUDE_ASM(s32, "2BF90", func_800510A4);
void func_800511BC(UnkAl834* arg0) {
u32 i;
@ -85,14 +85,14 @@ void func_800511BC(UnkAl834* arg0) {
arg0->unk_21 = 0;
}
INCLUDE_ASM(void, "code_2BF90", func_80051334, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "2BF90", func_80051334, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "code_2BF90", func_80051434, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "2BF90", func_80051434, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(s32, "code_2BF90", func_800521D0);
INCLUDE_ASM(s32, "2BF90", func_800521D0);
INCLUDE_ASM(void, "code_2BF90", func_800521E8, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "2BF90", func_800521E8, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "code_2BF90", func_800522A8, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "2BF90", func_800522A8, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "code_2BF90", func_8005232C, UnkAl834* arg0, UnkAl1E4* arg1);
INCLUDE_ASM(void, "2BF90", func_8005232C, UnkAl834* arg0, UnkAl1E4* arg1);

View File

@ -34,7 +34,7 @@ void func_80052614(UnkAl19E0* arg0) {
}
}
INCLUDE_ASM(void, "code_2d9a0_len_890", func_80052660, UnkAl19E0* arg0);
INCLUDE_ASM(void, "2d9a0_len_890", func_80052660, UnkAl19E0* arg0);
void func_80052B44(UnkAl48* arg0) {
s32 temp_lo = ((arg0->unk_3A * arg0->unk_40 * arg0->unk_3F) >> 14) * arg0->unk_30;
@ -49,8 +49,8 @@ s32 func_80052BC0(s32 arg0) {
return (arg0 / 5750) * 0xB8;
}
INCLUDE_ASM(void, "code_2d9a0_len_890", func_80052BF8, UnkAl48* arg0, s32* arg1);
INCLUDE_ASM(void, "2d9a0_len_890", func_80052BF8, UnkAl48* arg0, s32* arg1);
INCLUDE_ASM(s32, "code_2d9a0_len_890", func_80052CFC, UnkAl48* arg0);
INCLUDE_ASM(s32, "2d9a0_len_890", func_80052CFC, UnkAl48* arg0);
INCLUDE_ASM(s32, "code_2d9a0_len_890", func_80052E18);
INCLUDE_ASM(s32, "2d9a0_len_890", func_80052E18);

View File

@ -364,7 +364,7 @@ void func_800538C4(UnkAl48* arg0, s32 arg1) { // type may be wrong but it seems
func_800576EC(arg1, 0, 0xB8);
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538F8);
INCLUDE_ASM(s32, "2e230_len_2190", func_800538F8);
void snd_initialize_fade(Fade* fade, s32 time, s32 startValue, s16 endValue) {
fade->currentVolume.s32 = startValue * 0x10000;
@ -449,7 +449,7 @@ void func_80053BA8(UnkAl1* arg0) {
}
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053BE8, UnkAl19E0* arg0, s32 arg1, s32 arg2, s32* arg3);
INCLUDE_ASM(s32, "2e230_len_2190", func_80053BE8, UnkAl19E0* arg0, s32 arg1, s32 arg2, s32* arg3);
void snd_get_sequence_player_and_track(u32 playerIndex, s32** outCurrentTrackData, BGMPlayer** outPlayer) {
UnkAl19E0* temp_v1 = D_8009A5C0;
@ -489,9 +489,9 @@ void snd_get_sequence_player(u32 playerIndex, BGMPlayer** outPlayer) {
}
}
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_load_song_files);
INCLUDE_ASM(s32, "2e230_len_2190", snd_load_song_files);
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053E58);
INCLUDE_ASM(s32, "2e230_len_2190", func_80053E58);
BGMPlayer* func_80053F64(s32 arg0) {
if (arg0 == 0) {
@ -500,7 +500,7 @@ BGMPlayer* func_80053F64(s32 arg0) {
return NULL;
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053F80);
INCLUDE_ASM(s32, "2e230_len_2190", func_80053F80);
BGMPlayer* func_80054248(u8 arg0) {
switch (arg0) {
@ -515,15 +515,15 @@ BGMPlayer* func_80054248(u8 arg0) {
}
}
INCLUDE_ASM(void, "code_2e230_len_2190", snd_load_INIT, UnkAl19E0* arg0, s32 arg1, ALHeap* arg2);
INCLUDE_ASM(void, "2e230_len_2190", snd_load_INIT, UnkAl19E0* arg0, s32 arg1, ALHeap* arg2);
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_fetch_SBN_file, u16 arg0, s32 arg1, s32* arg2);
INCLUDE_ASM(s32, "2e230_len_2190", snd_fetch_SBN_file, u16 arg0, s32 arg1, s32* arg2);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_load_PER, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(void, "2e230_len_2190", snd_load_PER, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_load_PRG, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(void, "2e230_len_2190", snd_load_PRG, UnkAl19E0* arg0, s32* arg1);
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_load_BGM);
INCLUDE_ASM(s32, "2e230_len_2190", snd_load_BGM);
InstrumentGroup* snd_get_BK_instruments(s32 bankGroup, u32 bankIndex) {
InstrumentGroup* ret = NULL;
@ -556,7 +556,7 @@ InstrumentGroup* snd_get_BK_instruments(s32 bankGroup, u32 bankIndex) {
return ret;
}
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_load_BK_to_bank, s32 bkFileOffset, SoundBank* bank, s32 bankIndex, s32 arg3);
INCLUDE_ASM(s32, "2e230_len_2190", snd_load_BK_to_bank, s32 bkFileOffset, SoundBank* bank, s32 bankIndex, s32 arg3);
void snd_swizzle_BK_instruments(s32 bkFileOffset, SoundBank* bank, InstrumentGroup instruments, s32 instrumentCount, u8 arg4);
// float weirdness
@ -594,20 +594,20 @@ void snd_swizzle_BK_instruments(s32 bkFileOffset, SoundBank *bank, Instruments i
}
}
#else
INCLUDE_ASM(void, "code_2e230_len_2190", snd_swizzle_BK_instruments, s32 bkFileOffset, SoundBank* bank, InstrumentGroup instruments, s32 instrumentCount, u8 arg4);
INCLUDE_ASM(void, "2e230_len_2190", snd_swizzle_BK_instruments, s32 bkFileOffset, SoundBank* bank, InstrumentGroup instruments, s32 instrumentCount, u8 arg4);
#endif
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054AA0);
INCLUDE_ASM(s32, "2e230_len_2190", func_80054AA0);
s32 snd_load_BK(s32 arg0, s32 arg1) {
snd_load_BK_to_bank(arg0, D_8009A5C0->banks[arg1], arg1, 1);
return 0;
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054C84);
INCLUDE_ASM(s32, "2e230_len_2190", func_80054C84);
INCLUDE_ASM(void, "code_2e230_len_2190", func_80054CE0, s32 arg0, s32 arg1);
INCLUDE_ASM(void, "2e230_len_2190", func_80054CE0, s32 arg0, s32 arg1);
s32 func_80054D74(s32 arg0, s32 arg1) {
if (arg0 & 0x10) {
@ -616,11 +616,11 @@ s32 func_80054D74(s32 arg0, s32 arg1) {
return 0;
}
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80054DA8);
INCLUDE_ASM(s32, "2e230_len_2190", func_80054DA8);
INCLUDE_ASM(void, "code_2e230_len_2190", snd_read_rom, s32 arg0, s32* arg1, s32 arg2);
INCLUDE_ASM(void, "2e230_len_2190", snd_read_rom, s32 arg0, s32* arg1, s32 arg2);
INCLUDE_ASM(s32, "code_2e230_len_2190", snd_memset);
INCLUDE_ASM(s32, "2e230_len_2190", snd_memset);
void snd_bcopy(s8* src, s8 *dest, s32 size) {
if (size > 0) {

View File

@ -350,9 +350,9 @@ s32 snd_load_song(s32 songID, s32 playerIndex) {
}
}
INCLUDE_ASM(s32, "code_30450", func_8005591C);
INCLUDE_ASM(s32, "30450", func_8005591C);
INCLUDE_ASM(s32, "code_30450", func_80055970);
INCLUDE_ASM(s32, "30450", func_80055970);
s32 func_800559C4(UNK_TYPE arg0) {
return func_8004DA0C(arg0);
@ -366,29 +366,29 @@ void func_800559FC(void) {
func_8004DAE0();
}
INCLUDE_ASM(s32, "code_30450", func_80055A18);
INCLUDE_ASM(s32, "30450", func_80055A18);
INCLUDE_ASM(s32, "code_30450", func_80055A6C);
INCLUDE_ASM(s32, "30450", func_80055A6C);
INCLUDE_ASM(s32, "code_30450", func_80055ABC);
INCLUDE_ASM(s32, "30450", func_80055ABC);
INCLUDE_ASM(s32, "code_30450", func_80055AF0);
INCLUDE_ASM(s32, "30450", func_80055AF0);
INCLUDE_ASM(s32, "code_30450", func_80055B28);
INCLUDE_ASM(s32, "30450", func_80055B28);
INCLUDE_ASM(s32, "code_30450", func_80055B80);
INCLUDE_ASM(s32, "30450", func_80055B80);
INCLUDE_ASM(s32, "code_30450", func_80055BB8);
INCLUDE_ASM(s32, "30450", func_80055BB8);
INCLUDE_ASM(s32, "code_30450", func_80055BF0);
INCLUDE_ASM(s32, "30450", func_80055BF0);
INCLUDE_ASM(s32, "code_30450", func_80055C2C);
INCLUDE_ASM(s32, "30450", func_80055C2C);
INCLUDE_ASM(s32, "code_30450", func_80055C64);
INCLUDE_ASM(s32, "30450", func_80055C64);
INCLUDE_ASM(s32, "code_30450", func_80055C94);
INCLUDE_ASM(s32, "30450", func_80055C94);
INCLUDE_ASM(s32, "code_30450", func_80055CC4);
INCLUDE_ASM(s32, "30450", func_80055CC4);
s32 func_80055CE8(s32 songName, s32* arg1, BGMPlayer** player);
// We need to figure out what currentTrackData is a list of
@ -409,7 +409,7 @@ s32 func_80055CE8(s32 songName, s32* arg1, BGMPlayer** player) {
return ret;
}
#else
INCLUDE_ASM(s32, "code_30450", func_80055CE8, s32 songName, s32* arg1, BGMPlayer** player);
INCLUDE_ASM(s32, "30450", func_80055CE8, s32 songName, s32* arg1, BGMPlayer** player);
#endif
s32 func_80055D38(s32 songName, f32 arg1) {
@ -565,9 +565,9 @@ void func_800560A8(void) {
D_8009A5C0->unk_9C = 1;
}
INCLUDE_ASM(s32, "code_30450", func_800560BC);
INCLUDE_ASM(s32, "30450", func_800560BC);
INCLUDE_ASM(void, "code_30450", func_8005610C, void);
INCLUDE_ASM(void, "30450", func_8005610C, void);
void func_80056144(UnkFuncAl arg0, s32 arg1) {
D_8009A5C0->unk_A4[arg1] = arg0;

View File

@ -13,7 +13,7 @@ s32 D_80078E60[] = { 0x7FFF7FFC, 0x7FF57FE8, 0x7FD77FC0, 0x7FA57F84, 0x7F5F7F34,
};
INCLUDE_ASM(s32, "code_31650", func_80056250);
INCLUDE_ASM(s32, "31650", func_80056250);
void func_800565A4(void) {
UnkAl0** sym = &D_80078E50;
@ -23,7 +23,7 @@ void func_800565A4(void) {
}
}
INCLUDE_ASM(Acmd*, "code_31650", alAudioFrame, Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen);
INCLUDE_ASM(Acmd*, "31650", alAudioFrame, Acmd* cmdList, s32* cmdLen, s16* outBuf, s32 outLen);
void func_80056D34(void) {
D_80078E58 = 1;
@ -43,7 +43,7 @@ void func_80056D5C(s8 arg0) {
D_80078E5C = 1;
}
#else
INCLUDE_ASM(s32, "code_31650", func_80056D5C);
INCLUDE_ASM(s32, "31650", func_80056D5C);
#endif
void func_80056D78(u8 arg0, u16 arg1) {
@ -66,7 +66,7 @@ void func_80056DCC(u8 arg0, u8 arg1) {
func_8005904C(temp->unk_08, arg1);
}
INCLUDE_ASM(s32, "code_31650", func_80056E34);
INCLUDE_ASM(s32, "31650", func_80056E34);
void func_80056EC0(u8 arg0, s8 arg1) {
UnkAl7C* al7C = &D_80078E54->unk_1C[arg0];
@ -74,7 +74,7 @@ void func_80056EC0(u8 arg0, s8 arg1) {
al7C->unk_78 = arg1;
}
INCLUDE_ASM(void, "code_31650", func_80056EE8, u8 arg0);
INCLUDE_ASM(void, "31650", func_80056EE8, u8 arg0);
void func_80056F78(u8 arg0) {
UnkAl7C* al7C = &D_80078E54->unk_1C[arg0];
@ -82,10 +82,10 @@ void func_80056F78(u8 arg0) {
al7C->unk_70 = 1;
}
INCLUDE_ASM(void, "code_31650", func_80056FA4, u8 arg0, u8 arg1, s32 arg2, f32 arg3, s16 arg4, u8 arg5, u8 arg6,
INCLUDE_ASM(void, "31650", func_80056FA4, u8 arg0, u8 arg1, s32 arg2, f32 arg3, s16 arg4, u8 arg5, u8 arg6,
s32 arg7);
INCLUDE_ASM(void, "code_31650", func_80057224, u8 arg0, Instrument* arg1);
INCLUDE_ASM(void, "31650", func_80057224, u8 arg0, Instrument* arg1);
void func_80057344(u8 arg0, f32 arg1) {
UnkAl7C* al7C = &D_80078E54->unk_1C[arg0];
@ -93,15 +93,15 @@ void func_80057344(u8 arg0, f32 arg1) {
al7C->unk_3C = arg1;
}
INCLUDE_ASM(void, "code_31650", func_8005736C, u8 arg0, s16 arg1, s32 arg2, u8 arg3, u8 arg4);
INCLUDE_ASM(void, "31650", func_8005736C, u8 arg0, s16 arg1, s32 arg2, u8 arg3, u8 arg4);
INCLUDE_ASM(void, "code_31650", func_80057548, u8 arg0, u8 arg1, u8 arg2);
INCLUDE_ASM(void, "31650", func_80057548, u8 arg0, u8 arg1, u8 arg2);
INCLUDE_ASM(void, "code_31650", func_800576EC, u8 arg0, s32 arg1, s32 arg2);
INCLUDE_ASM(void, "31650", func_800576EC, u8 arg0, s32 arg1, s32 arg2);
INCLUDE_ASM(s32, "code_31650", func_80057874);
INCLUDE_ASM(s32, "31650", func_80057874);
INCLUDE_ASM(s32, "code_31650", func_800579D8);
INCLUDE_ASM(s32, "31650", func_800579D8);
s32 func_80057B64(u8 arg0) {
UnkAl7C* al7C = &D_80078E54->unk_1C[arg0];
@ -139,9 +139,9 @@ s16 func_80057C2C(u8 arg0) {
return al7C->unk_56;
}
INCLUDE_ASM(s32, "code_31650", func_80057C54);
INCLUDE_ASM(s32, "31650", func_80057C54);
INCLUDE_ASM(s32, "code_31650", func_80057D0C);
INCLUDE_ASM(s32, "31650", func_80057D0C);
void func_80057DC8(s32 arg0) {
s32* sym;
@ -208,7 +208,7 @@ void func_80057ED0(s16 arg0) {
D_800A3FE8 = 0;
}
INCLUDE_ASM(void, "code_31650", alHeapInit, ALHeap* hp, u8* base, s32 len);
INCLUDE_ASM(void, "31650", alHeapInit, ALHeap* hp, u8* base, s32 len);
void* alHeapAlloc(ALHeap* heap, s32 arg1, s32 size) {
void* ret = NULL;
@ -232,4 +232,4 @@ void alCopy(void* src, void* dst, s32 size) {
}
}
INCLUDE_ASM(s32, "code_31650", func_80058004);
INCLUDE_ASM(s32, "31650", func_80058004);

3
src/3169f0.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "3169f0", func_80200000);

3
src/316C00.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "316C00", func_802AE000_316C00);

3
src/316a70.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "316a70", func_80200080);

3
src/316d90.c Normal file
View File

@ -0,0 +1,3 @@
#include "common.h"
INCLUDE_ASM(s32, "316d90", func_802AE000);

26
src/316f30.c Normal file
View File

@ -0,0 +1,26 @@
#include "common.h"
#include "ld_addrs.h"
void func_80200000(void);
void func_80200080(void);
void func_802AE000(void);
void func_802B2000(void) {
dma_copy(_3169F0_ROM_START, _3169F0_ROM_END, _3169F0_VRAM);
func_80200000();
}
void func_802B203C(void) {
dma_copy(_316A70_ROM_START, _316A70_ROM_END, _316A70_VRAM);
func_80200080();
}
void func_802B2078(void) {
dma_copy(_316C00_ROM_START, _316C00_ROM_END, _316C00_VRAM);
func_802AE000();
}
void func_802B20B4(void) {
dma_copy(_316D90_ROM_START, _316D90_ROM_END, _316D90_VRAM);
func_802AE000();
}

7
src/325AD0.c Normal file
View File

@ -0,0 +1,7 @@
#include "common.h"
INCLUDE_ASM(s32, "325AD0", func_E0200000);
INCLUDE_ASM(s32, "325AD0", func_E0200044);
INCLUDE_ASM(s32, "325AD0", func_E02000AC);

81
src/325EE0.c Normal file
View File

@ -0,0 +1,81 @@
#include "common.h"
INCLUDE_ASM(s32, "325EE0", func_E0200410);
INCLUDE_ASM(s32, "325EE0", func_E0200420);
INCLUDE_ASM(s32, "325EE0", func_E0200430);
INCLUDE_ASM(s32, "325EE0", func_E0200440);
INCLUDE_ASM(s32, "325EE0", func_E0200450);
INCLUDE_ASM(s32, "325EE0", func_E0200460);
INCLUDE_ASM(s32, "325EE0", func_E0200470);
INCLUDE_ASM(s32, "325EE0", func_E0200480);
INCLUDE_ASM(s32, "325EE0", func_E0200490);
INCLUDE_ASM(s32, "325EE0", func_E02004A0);
INCLUDE_ASM(s32, "325EE0", func_E02004B0);
INCLUDE_ASM(s32, "325EE0", func_E02004C0);
INCLUDE_ASM(s32, "325EE0", func_E02004D0);
INCLUDE_ASM(s32, "325EE0", func_E02004E0);
INCLUDE_ASM(s32, "325EE0", func_E02004F0);
INCLUDE_ASM(s32, "325EE0", func_E0200500);
INCLUDE_ASM(s32, "325EE0", func_E0200510);
INCLUDE_ASM(s32, "325EE0", func_E0200520);
INCLUDE_ASM(s32, "325EE0", func_E0200530);
INCLUDE_ASM(s32, "325EE0", func_E0200540);
INCLUDE_ASM(s32, "325EE0", func_E0200550);
INCLUDE_ASM(s32, "325EE0", func_E0200560);
INCLUDE_ASM(s32, "325EE0", func_E0200570);
INCLUDE_ASM(s32, "325EE0", func_E0200580);
INCLUDE_ASM(s32, "325EE0", func_E0200590);
INCLUDE_ASM(s32, "325EE0", func_E02005A0);
INCLUDE_ASM(s32, "325EE0", func_E02005B0);
INCLUDE_ASM(s32, "325EE0", func_E02005C0);
INCLUDE_ASM(s32, "325EE0", func_E02005D0);
INCLUDE_ASM(s32, "325EE0", func_E02005E0);
INCLUDE_ASM(s32, "325EE0", func_E02005F0);
INCLUDE_ASM(s32, "325EE0", func_E0200600);
INCLUDE_ASM(s32, "325EE0", func_E0200610);
INCLUDE_ASM(s32, "325EE0", func_E0200620);
INCLUDE_ASM(s32, "325EE0", func_E0200630);
INCLUDE_ASM(s32, "325EE0", func_E0200640);
INCLUDE_ASM(s32, "325EE0", func_E0200650);
INCLUDE_ASM(s32, "325EE0", func_E0200660);
INCLUDE_ASM(s32, "325EE0", func_E0200670);
INCLUDE_ASM(s32, "325EE0", func_E0200680);

16
src/3278F0.c Normal file
View File

@ -0,0 +1,16 @@
#include "common.h"
INCLUDE_ASM(s32, "3278F0", func_E0002000);
void func_E00021B4(void) {
}
INCLUDE_ASM(s32, "3278F0", func_E00021BC);
INCLUDE_ASM(s32, "3278F0", func_E00022BC);
INCLUDE_ASM(s32, "3278F0", func_E0002300);
void func_E0002738(void) {
func_E02004A0();
}

18
src/328110.c Normal file
View File

@ -0,0 +1,18 @@
#include "common.h"
INCLUDE_ASM(s32, "328110", func_E000C000);
INCLUDE_ASM(s32, "328110", func_E000C094);
INCLUDE_ASM(s32, "328110", func_E000C0C8);
INCLUDE_ASM(s32, "328110", func_E000C160);
void func_E000C64C(void) {
}
INCLUDE_ASM(s32, "328110", func_E000C654);
INCLUDE_ASM(s32, "328110", func_E000C754);
INCLUDE_ASM(s32, "328110", func_E000C798);

12
src/32C110.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "32C110", func_E000E000);
void func_E000E16C(void) {
}
INCLUDE_ASM(s32, "32C110", func_E000E174);
INCLUDE_ASM(s32, "32C110", func_E000E244);
INCLUDE_ASM(s32, "32C110", func_E000E288);

18
src/32C7A0.c Normal file
View File

@ -0,0 +1,18 @@
#include "common.h"
INCLUDE_ASM(s32, "32C7A0", func_E0010000);
INCLUDE_ASM(s32, "32C7A0", func_E0010104);
INCLUDE_ASM(s32, "32C7A0", func_E00101E8);
void func_E00103EC(void) {
}
INCLUDE_ASM(s32, "32C7A0", func_E00103F4);
INCLUDE_ASM(s32, "32C7A0", func_E00104B0);
INCLUDE_ASM(s32, "32C7A0", func_E00104F4);
INCLUDE_ASM(s32, "32C7A0", func_E0010510);

18
src/32DD10.c Normal file
View File

@ -0,0 +1,18 @@
#include "common.h"
INCLUDE_ASM(s32, "32DD10", func_E0012000);
INCLUDE_ASM(s32, "32DD10", func_E0012104);
INCLUDE_ASM(s32, "32DD10", func_E0012204);
void func_E0012440(void) {
}
INCLUDE_ASM(s32, "32DD10", func_E0012448);
INCLUDE_ASM(s32, "32DD10", func_E0012504);
INCLUDE_ASM(s32, "32DD10", func_E0012548);
INCLUDE_ASM(s32, "32DD10", func_E0012564);

12
src/32E490.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "32E490", func_E0014000);
void func_E0014258(void) {
}
INCLUDE_ASM(s32, "32E490", func_E0014260);
INCLUDE_ASM(s32, "32E490", func_E001449C);
INCLUDE_ASM(s32, "32E490", func_E00144E0);

12
src/32EE30.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "32EE30", func_E0016000);
void func_E0016220(void) {
}
INCLUDE_ASM(s32, "32EE30", func_E0016228);
INCLUDE_ASM(s32, "32EE30", func_E0016410);
INCLUDE_ASM(s32, "32EE30", func_E0016454);

16
src/32F580.c Normal file
View File

@ -0,0 +1,16 @@
#include "common.h"
INCLUDE_ASM(s32, "32F580", func_E0018000);
INCLUDE_ASM(s32, "32F580", func_E0018078);
void func_E00182AC(void) {
}
INCLUDE_ASM(s32, "32F580", func_E00182B4);
INCLUDE_ASM(s32, "32F580", func_E0018378);
INCLUDE_ASM(s32, "32F580", func_E00183BC);
INCLUDE_ASM(s32, "32F580", func_E00183D8);

12
src/32FE30.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "32FE30", func_E001A000);
void func_E001A21C(void) {
}
INCLUDE_ASM(s32, "32FE30", func_E001A224);
INCLUDE_ASM(s32, "32FE30", func_E001A3FC);
INCLUDE_ASM(s32, "32FE30", func_E001A440);

12
src/330910.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "330910", func_E001C000);
void func_E001C120(void) {
}
INCLUDE_ASM(s32, "330910", func_E001C128);
INCLUDE_ASM(s32, "330910", func_E001C200);
INCLUDE_ASM(s32, "330910", func_E001C30C);

12
src/331940.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "331940", func_E001E000);
void func_E001E370(void) {
}
INCLUDE_ASM(s32, "331940", func_E001E378);
INCLUDE_ASM(s32, "331940", func_E001E6E8);
INCLUDE_ASM(s32, "331940", func_E001E730);

14
src/333EC0.c Normal file
View File

@ -0,0 +1,14 @@
#include "common.h"
INCLUDE_ASM(s32, "333EC0", func_E0020000);
INCLUDE_ASM(s32, "333EC0", func_E00202CC);
void func_E0020460(void) {
}
INCLUDE_ASM(s32, "333EC0", func_E0020468);
INCLUDE_ASM(s32, "333EC0", func_E002058C);
INCLUDE_ASM(s32, "333EC0", func_E00205D0);

7
src/33450.c Normal file
View File

@ -0,0 +1,7 @@
#include "common.h"
INCLUDE_ASM(s32, "33450", func_80058050);
INCLUDE_ASM(s32, "33450", func_80058B20);
INCLUDE_ASM(s32, "33450", func_80058C6C);

12
src/337240.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "337240", func_E0022000);
void func_E0022544(void) {
}
INCLUDE_ASM(s32, "337240", func_E002254C);
INCLUDE_ASM(s32, "337240", func_E0022960);
INCLUDE_ASM(s32, "337240", func_E0022998);

16
src/339250.c Normal file
View File

@ -0,0 +1,16 @@
#include "common.h"
INCLUDE_ASM(s32, "339250", func_E0024000);
void func_E0024180(void) {
}
INCLUDE_ASM(s32, "339250", func_E0024188);
INCLUDE_ASM(s32, "339250", func_E00242E0);
INCLUDE_ASM(s32, "339250", func_E0024324);
INCLUDE_ASM(s32, "339250", func_E00243BC);
INCLUDE_ASM(s32, "339250", func_E0024454);

12
src/33B180.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "33B180", func_E0026000);
void func_E0026184(void) {
}
INCLUDE_ASM(s32, "33B180", func_E002618C);
INCLUDE_ASM(s32, "33B180", func_E00264B0);
INCLUDE_ASM(s32, "33B180", func_E00264F4);

12
src/33CDF0.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "33CDF0", func_E0028000);
void func_E0028240(void) {
}
INCLUDE_ASM(s32, "33CDF0", func_E0028248);
INCLUDE_ASM(s32, "33CDF0", func_E00284E8);
INCLUDE_ASM(s32, "33CDF0", func_E002852C);

12
src/33E8C0.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "33E8C0", func_E002A000);
void func_E002A284(void) {
}
INCLUDE_ASM(s32, "33E8C0", func_E002A28C);
INCLUDE_ASM(s32, "33E8C0", func_E002A380);
INCLUDE_ASM(s32, "33E8C0", func_E002A3C4);

12
src/33FE80.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "33FE80", func_E002C000);
void func_E002C234(void) {
}
INCLUDE_ASM(s32, "33FE80", func_E002C23C);
INCLUDE_ASM(s32, "33FE80", func_E002C3D0);
INCLUDE_ASM(s32, "33FE80", func_E002C414);

12
src/3419E0.c Normal file
View File

@ -0,0 +1,12 @@
#include "common.h"
INCLUDE_ASM(s32, "3419E0", func_E002E000);
void func_E002E248(void) {
}
INCLUDE_ASM(s32, "3419E0", func_E002E250);
INCLUDE_ASM(s32, "3419E0", func_E002E330);
INCLUDE_ASM(s32, "3419E0", func_E002E368);

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